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

:root {
    --bg:      #111114;
    --surface: #1a1a1f;
    --border:  rgba(255,255,255,0.07);
    --accent:  #5865f2;
    --text:    #f0f0f4;
    --muted:   #8b8b9a;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Figtree', sans-serif;
    font-weight: 400;
    line-height: 1.6;
}

/* ─── NAVBAR ─────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 64px;
    background: rgba(17,17,20,0.88);
    backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid var(--border);
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 17px;
}

.navbar-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.navbar-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

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

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-ghost {
    color: var(--text);
    background: transparent;
}

.btn-ghost:hover { background: rgba(255,255,255,0.07); }

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover { opacity: 0.88; }

/* ─── LEGAL CONTENT ──────────────────────────────────────── */
.legal-container {
    display: flex;
    justify-content: center;
    padding: 100px 24px 80px;
}

.legal-box {
    max-width: 860px;
    width: 100%;
}

.legal-box h1 {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 40px;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 8px;
}

.legal-box .back-link {
    display: inline-block;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 40px;
    transition: color 0.2s;
}

.legal-box .back-link:hover { color: var(--text); }

.legal-box h2 {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    margin-top: 40px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.legal-box p {
    margin: 12px 0;
    color: var(--muted);
    font-size: 15px;
}

.legal-box ul {
    margin: 12px 0 12px 20px;
    color: var(--muted);
    font-size: 15px;
}

.legal-box li { margin-bottom: 6px; }

.legal-box a {
    color: var(--accent);
    text-decoration: none;
}

.legal-box a:hover { text-decoration: underline; }

/* ─── FOOTER ─────────────────────────────────────────────── */
footer {
    border-top: 1px solid var(--border);
    padding: 32px 40px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: var(--surface); border-radius: 4px; }

@media (max-width: 900px) {
    .navbar {
        padding: 10px 20px;
        min-height: 64px;
        height: auto;
        gap: 12px;
        flex-wrap: wrap;
    }

    .navbar-links {
        display: flex;
        width: 100%;
        order: 3;
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 8px;
        padding-bottom: 2px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .navbar-links::-webkit-scrollbar { display: none; }
    .navbar-links li { flex: 0 0 auto; }

    .navbar-links a {
        display: inline-flex;
        align-items: center;
        min-height: 34px;
        white-space: nowrap;
        padding: 6px 12px;
        background: rgba(255,255,255,0.04);
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 999px;
    }

    .legal-container {
        padding-top: 140px;
    }
}

@media (max-width: 640px) {
    .navbar {
        padding: 10px 14px 12px;
        align-items: flex-start;
        gap: 10px 12px;
    }

    .navbar-logo {
        gap: 8px;
        min-width: 0;
        font-size: 16px;
    }

    .navbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
    }

    .navbar-actions .btn {
        width: 100%;
        min-width: 0;
        justify-content: center;
        padding: 9px 12px;
        font-size: 13px;
    }

    .navbar-links {
        gap: 6px;
    }

    .navbar-links a {
        font-size: 13px;
        padding: 6px 11px;
    }

    .legal-container {
        padding: 152px 18px 64px;
    }

    .legal-box h1 { font-size: 28px; }

    footer {
        padding: 28px 18px;
    }
}

@media (max-width: 420px) {
    .navbar-actions {
        grid-template-columns: 1fr;
    }

    .legal-container {
        padding-top: 188px;
    }
}
