:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-tertiary: #1a1a24;
    --bg-card: #16161f;
    --accent-primary: #7c5cff;
    --accent-secondary: #a78bfa;
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;
    --accent-green: #22c55e;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.1);
    --glow-purple: rgba(124, 92, 255, 0.4);
    --glow-pink: rgba(236, 72, 153, 0.3);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --nav-bg: rgba(10, 10, 15, 0.8);
    --shadow: rgba(0, 0, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, var(--accent-primary), var(--accent-pink));
    --gradient-dark: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --bg-card: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: rgba(0, 0, 0, 0.1);
    --border-subtle: rgba(0, 0, 0, 0.1);
    --border: rgba(0, 0, 0, 0.1);
    --glow-purple: rgba(124, 92, 255, 0.3);
    --glow-pink: rgba(236, 72, 153, 0.2);
    --card-bg: rgba(0, 0, 0, 0.02);
    --card-border: rgba(0, 0, 0, 0.08);
    --nav-bg: rgba(255, 255, 255, 0.9);
    --shadow: rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

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

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}

.nav.scrolled,
body:not([data-page="home"]) .nav,
[data-theme="light"] .nav {
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav.scrolled {
    padding: 12px 0;
}

.nav .container.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
    flex-shrink: 0;
}

.nav-logo svg {
    width: 32px;
    height: 32px;
}

.nav-logo .logo-icon {
    position: relative;
    width: 32px;
    height: 32px;
}

.nav-logo .logo-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-pink));
    border-radius: 10px;
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-logo:hover .logo-icon::after {
    opacity: 0.5;
}

.nav-logo span {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-pink));
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.nav-user {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-user[hidden],
[data-auth-link][hidden] {
    display: none;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-pink));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}

.nav-cta {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-pink));
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.nav-cta:hover::before {
    left: 100%;
}

.nav-cta:hover,
.nav-cta.active {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--glow-purple);
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #ffffff;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .theme-toggle {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1a1a2e;
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-toggle .icon-sun {
    display: none;
}

.theme-toggle .icon-moon {
    display: block;
}

[data-theme="light"] .theme-toggle .icon-sun {
    display: block;
}

[data-theme="light"] .theme-toggle .icon-moon {
    display: none;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
}

.icon-muted {
    opacity: 0.3;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 1120px) {
    .nav-links {
        gap: 18px;
    }

    .nav-link {
        padding: 8px 10px;
    }

    .nav-cta {
        padding: 10px 14px;
    }
}

@media (max-width: 1024px) {
    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 16px);
        left: 24px;
        right: 24px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 16px;
        background: var(--nav-bg);
        border: 1px solid var(--border-subtle);
        border-radius: 16px;
        backdrop-filter: blur(20px);
        box-shadow: 0 20px 60px var(--shadow);
    }

    body.nav-open .nav-links {
        display: flex;
    }

    .nav-links li a {
        display: block;
        padding: 12px 4px;
    }

    .nav-links a::after {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .nav .container.nav-inner {
        padding: 0 16px;
    }

    .nav-logo span {
        font-size: 18px;
    }

    .nav-actions {
        gap: 6px;
    }

    .nav-link {
        display: none;
    }

    .nav-cta {
        padding: 8px 12px;
        font-size: 13px;
    }
}

.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 28px 0;
    background: var(--bg-primary);
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-logo span {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

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

.footer-copy {
    color: var(--text-muted);
    font-size: 13px;
}
