:root {
    --bg-color: #050505;
    --text-color: #E0E0E0;
    --text-dim: #888;
    --accent: #a78bfa;
    --accent-secondary: #ec4899;
    --accent-gradient: linear-gradient(135deg, #ec4899, #8b5cf6);
    --glass: rgba(167, 139, 250, 0.08);
    --glass-border: rgba(167, 139, 250, 0.15);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    scrollbar-gutter: stable;
}

/* --- Cursor --- */
#cursor-ring, #cursor {
    width: 24px;
    height: 24px;
    border: 2px solid #fff;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 100000;
    mix-blend-mode: difference;
    display: none;
    top: 0;
    left: 0;
    transition: width 0.3s, height 0.3s, background 0.3s;
}

#cursor-dot {
    position: fixed;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100001;
    transform: translate(-50%, -50%);
}

.cursor-expand {
    width: 50px !important;
    height: 50px !important;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.2), rgba(139, 92, 246, 0.1));
}

.no-mouse {
    cursor: none !important;
}

/* --- Navigation --- */
.glass-nav, nav {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 12px 45px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.7));
    flex-shrink: 0;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
}

.support-btn, .support-nav-btn {
    color: var(--accent) !important;
    border: 1px solid var(--accent);
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 600;
    transition: 0.3s;
    text-decoration: none;
    font-size: 0.85rem;
    white-space: nowrap;
}

.support-btn:hover, .support-nav-btn:hover {
    background: var(--accent-gradient);
    color: white !important;
    box-shadow: 0 0 25px rgba(167, 139, 250, 0.6);
    border-color: transparent;
    transform: translateY(-2px);
}

/* --- Dropdown / Mobile Menu --- */
.hamburger-btn {
    background: var(--glass);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.hamburger-btn span {
    width: 18px;
    height: 2px;
    background: white;
    transition: 0.3s;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 50px;
    background: #0f0f0f;
    min-width: 180px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
}

.dropdown-content.show {
    display: block;
}

.dropdown-content a {
    color: #ccc;
    padding: 14px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-content a:hover {
    background: var(--accent);
    color: white;
}

/* --- Footer --- */
footer {
    padding: 100px 5% 40px;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    background: linear-gradient(to bottom, #050505, #0a0a0a);
}

.footer-copyright {
    color: #333;
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* --- Legal Modal --- */
.legal-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 6vw, 3rem);
    margin-bottom: 20px;
}

.legal-desc {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    color: #aaa;
    line-height: 2;
}

/* --- Nav hamburger wrapper (sits outside nav-links) --- */
.nav-hamburger {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Legal links shown only inside the mobile menu */
.nav-legal-link {
    display: none;
}

/* Hamburger X animation when active */
.hamburger-btn.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }

@media (max-width: 768px) {
    /* Nav collapses to logo + hamburger row */
    .glass-nav, nav {
        top: 12px;
        padding: 10px 18px;
        border-radius: 20px;
        flex-direction: row;
        width: 94%;
        gap: 0;
    }

    /* Main nav links: always flex on mobile but hidden via opacity/transform */
    .nav-links {
        display: flex;
        position: fixed;
        top: 68px;
        left: 3%;
        right: 3%;
        width: auto;
        flex-direction: column;
        background: rgba(5, 5, 8, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--glass-border);
        border-radius: 20px;
        padding: 12px;
        gap: 3px;
        z-index: 998;
        /* hidden state */
        visibility: hidden;
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
        overscroll-behavior: contain;
    }

    .nav-links.mobile-open {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Each nav link becomes a full-width 44px touch target */
    .nav-links > a {
        font-size: 0.85rem;
        letter-spacing: 1px;
        padding: 13px 20px;
        border-radius: 10px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        text-align: center;
    }

    .nav-links > a:hover,
    .nav-links > a.active {
        background: var(--glass);
    }

    .support-btn, .support-nav-btn {
        width: 100%;
        text-align: center;
        font-size: 0.85rem;
        padding: 13px 20px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Legal links visible inside the mobile menu */
    .nav-legal-link {
        display: flex !important;
        color: var(--text-dim) !important;
        font-size: 0.8rem !important;
        border-top: 1px solid var(--glass-border);
        margin-top: 4px;
        padding-top: 6px;
    }

    /* Hamburger button — proper 44px touch target */
    .hamburger-btn {
        width: 44px;
        height: 44px;
        margin-left: auto;
    }

    /* Hide desktop dropdown on mobile (legal links are in the mobile menu instead) */
    .nav-hamburger .dropdown-content {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .glass-nav, nav {
        top: 10px;
        padding: 8px 14px;
        width: 96%;
    }

    .logo {
        font-size: 0.9rem;
    }

    .logo-img {
        width: 26px;
        height: 26px;
    }

    .nav-links {
        top: 60px;
    }
}
