:root {
    --bg-base: #030712;
    --bg-surface: #0a1120;
    --bg-surface-glass: rgba(15, 25, 45, 0.6);
    --bg-card: #111e36;
    --primary: #238ea6;
    --primary-glow: #1fa7c4;
    --secondary: #3b82f6;
    --accent: #f59e0b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(148, 163, 184, 0.1);
    --border-highlight: rgba(148, 163, 184, 0.25);
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 35px -5px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(35, 142, 166, 0.4);
    
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-pill: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-base);
    color: var(--text-main);
}

body {
    overflow-x: hidden;
    position: relative;
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
}

/* Background Effects */
.bg-effects {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 { width: 50vw; height: 50vw; background: var(--primary); top: -20%; left: -10%; animation-delay: 0s; }
.orb-2 { width: 40vw; height: 40vw; background: #1e1b4b; bottom: -10%; right: -10%; animation-delay: -5s; }
.orb-3 { width: 30vw; height: 30vw; background: var(--secondary); top: 30%; left: 40%; animation-delay: -10s; opacity: 0.2; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 10%) scale(1.1); }
    100% { transform: translate(-5%, -10%) scale(0.9); }
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    opacity: 0.3;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Baloo 2', 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(3rem, 6vw, 5rem); background: linear-gradient(to right, #ffffff, #94a3b8); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: clamp(2.5rem, 5vw, 3.5rem); margin-bottom: 1.5rem; text-align: center; }
p { color: var(--text-muted); line-height: 1.6; font-size: 1.125rem; }

/* Navbar */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 20px 0;
    background: rgba(3, 7, 18, 0.5);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Baloo 2', 'Outfit', sans-serif;
    letter-spacing: 0.5px;
    color: var(--text-main);
    text-decoration: none;
}

.nav-logo span, .footer-logo span {
    font-family: 'Baloo 2', 'Outfit', sans-serif;
}

.nav-logo img {
    height: 48px;
    filter: drop-shadow(0 0 10px rgba(35, 142, 166, 0.5));
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover { color: var(--text-main); }

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 105;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: var(--shadow-md), 0 0 20px rgba(35, 142, 166, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(35, 142, 166, 0.5);
    filter: brightness(1.1);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-highlight);
    color: var(--text-main);
    backdrop-filter: blur(10px);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(35, 142, 166, 0.15);
    border: 1px solid rgba(35, 142, 166, 0.3);
    border-radius: var(--radius-pill);
    color: var(--primary-glow);
    font-weight: 600;
    font-size: 0.875rem;
    width: fit-content;
}

.hero-desc {
    font-size: 1.25rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-val {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Baloo 2', sans-serif;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Device Mockup */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.phone-mockup {
    position: relative;
    width: 320px;
    height: 650px;
    background: #000;
    border-radius: 48px;
    border: 12px solid #1a202c;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 60px rgba(35, 142, 166, 0.3);
    overflow: hidden;
    transform: rotate(-5deg) translateY(-20px);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.phone-mockup:hover {
    transform: rotate(0deg) translateY(0);
}

.phone-screen {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.floating-card {
    position: absolute;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-lg);
    animation: floatingCard 6s infinite ease-in-out alternate;
}

.floating-card.card-1 {
    top: 10%;
    right: -40px;
    animation-delay: 0s;
}

.floating-card.card-2 {
    bottom: 20%;
    left: -60px;
    animation-delay: -3s;
}

.card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(35, 142, 166, 0.2), rgba(59, 130, 246, 0.2));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-glow);
    font-size: 1.5rem;
}

.card-text {
    display: flex;
    flex-direction: column;
}

.card-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}

.card-sub {
    font-size: 0.875rem;
    color: var(--text-muted);
}

@keyframes floatingCard {
    0% { transform: translateY(0); }
    100% { transform: translateY(-15px); }
}

/* Features Section */
.features {
    padding: 120px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.feature-card {
    background: linear-gradient(160deg, rgba(35, 142, 166, 0.05), rgba(3, 7, 18, 0.8));
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-xl);
    padding: 40px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transform-style: preserve-3d;
}

/* Inner Radial Glow on Hover */
.feature-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(35, 142, 166, 0.15), transparent 60%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(35, 142, 166, 0.4);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8), 0 0 40px rgba(35, 142, 166, 0.15);
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), transparent);
    transform: scaleX(0);
    transition: transform 0.5s cubic-bezier(0.2, 0, 0.2, 1);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.icon-wrapper {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(35, 142, 166, 0.15), rgba(59, 130, 246, 0.05));
    border: 1px solid rgba(35, 142, 166, 0.3);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), inset 0 2px 5px rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-card:hover .icon-wrapper {
    transform: translateY(-5px) scale(1.1);
    background: linear-gradient(135deg, rgba(35, 142, 166, 0.4), rgba(59, 130, 246, 0.2));
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 30px rgba(35, 142, 166, 0.3), inset 0 2px 10px rgba(255, 255, 255, 0.2);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text-main);
    transition: all 0.3s;
}

.feature-card:hover h3 {
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* Leaderboard Preview */
.leaderboard-preview {
    padding: 120px 0;
    background: linear-gradient(to bottom, transparent, var(--bg-surface), transparent);
}

.lb-container {
    background: rgba(10, 17, 32, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
}

.lb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.lb-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lb-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    transition: transform 0.2s, background 0.2s;
}

.lb-item:hover {
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.06);
}

.lb-rank {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    font-weight: 700;
    margin-right: 24px;
}

.lb-item.rank-1 .lb-rank { background: linear-gradient(135deg, #fbbf24, #d97706); color: #000; box-shadow: 0 0 15px rgba(251, 191, 36, 0.5); }
.lb-item.rank-2 .lb-rank { background: linear-gradient(135deg, #e2e8f0, #94a3b8); color: #000; }
.lb-item.rank-3 .lb-rank { background: linear-gradient(135deg, #d97706, #92400e); color: #fff; }

.lb-user {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
}

.lb-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid var(--border-highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.lb-name {
    font-weight: 600;
    font-size: 1.125rem;
}

.lb-score {
    font-family: 'Baloo 2', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-glow);
}

/* Footer */
footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--border);
    margin-top: 80px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 32px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Baloo 2', 'Outfit', sans-serif;
    letter-spacing: 0.5px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-main);
}

.copyright {
    text-align: center;
    margin-top: 40px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 968px) {
    .hero { min-height: auto; padding-top: 140px; padding-bottom: 60px; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .hero-content { align-items: center; }
    .hero-desc { margin: 0 auto; text-align: center; font-size: 1.125rem; }
    .hero-actions { justify-content: center; }
    .hero-visual { margin-top: 40px; }
    
    .hamburger { display: flex; }
    
    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        background: rgba(3, 7, 18, 0.95);
        backdrop-filter: blur(25px);
        padding: 120px 32px 32px;
        transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        border-left: 1px solid var(--border);
        box-shadow: -15px 0 40px rgba(0,0,0,0.6);
        gap: 40px;
        z-index: 100;
    }
    
    .nav-links.active { right: 0; }
    .nav-links .nav-link { font-size: 1.25rem; }
    
    /* Hamburger 2-Line Cross Animation */
    .hamburger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { transform: translateY(-6px) rotate(-45deg); }
    
    .feature-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

@media (max-width: 768px) {
    h1 { font-size: clamp(2.5rem, 8vw, 3.5rem); }
    h2 { font-size: clamp(2rem, 6vw, 2.8rem); margin-bottom: 1rem; }
    .features, .leaderboard-preview { padding: 80px 0; }
    
    /* Phone Shrink for smaller screens */
    .phone-mockup { width: 260px; height: 530px; border-width: 8px; transform: rotate(-3deg) translateY(0); }
    .phone-mockup:hover { transform: rotate(0deg) translateY(0); }
    
    /* Floating Cards adjustment so they don't block the phone */
    .floating-card { padding: 10px; gap: 10px; transform: scale(0.85); transform-origin: center; animation: floatingCardMobile 4s infinite ease-in-out alternate; }
    .floating-card.card-1 { right: -10px; top: 5%; }
    .floating-card.card-2 { left: -10px; bottom: 10%; }
    .card-icon { width: 36px; height: 36px; font-size: 1.2rem; border-radius: 8px; }
    .card-title { font-size: 1rem; }
    .card-sub { font-size: 0.75rem; }
    
    .hero-stats { gap: 20px; flex-wrap: wrap; justify-content: center; margin-top: 24px; padding-top: 24px; }
    .stat-val { font-size: 1.75rem; }
    .stat-label { font-size: 0.75rem; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .btn { width: 100%; justify-content: center; padding: 14px 20px; }
    .hero-actions { width: 100%; flex-direction: column; gap: 12px; }
    
    /* Make Leaderboard nice on phone */
    .lb-container { padding: 24px 16px; }
    .lb-item { padding: 12px 14px; gap: 12px; }
    .lb-rank { width: 32px; height: 32px; margin-right: 0; font-size: 0.9rem; }
    .lb-user { gap: 10px; }
    .lb-avatar { width: 36px; height: 36px; font-size: 0.8rem; }
    .lb-name { font-size: 0.95rem; }
    .lb-score { font-size: 1.1rem; }
    
    .feature-card { padding: 24px; }
    .icon-wrapper { width: 50px; height: 50px; font-size: 1.5rem; margin-bottom: 16px; }
    .feature-card h3 { font-size: 1.3rem; }
    
    .footer-content { flex-direction: column; text-align: center; gap: 20px; }
    .footer-links { flex-direction: column; gap: 12px; }
}

@keyframes floatingCardMobile {
    0% { transform: scale(0.85) translateY(0); }
    100% { transform: scale(0.85) translateY(-10px); }
}
