:root {
    --bg: #f6f8fc;
    --surface: rgba(255,255,255,.78);
    --surface-solid: #ffffff;
    --line: rgba(15,23,42,.08);

    --text: #0f172a;
    --muted: #64748b;
    --soft: #94a3b8;

    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #8b5cf6;
    --blue: #0ea5e9;
    --green: #10b981;

    --radius-sm: 14px;
    --radius-md: 22px;
    --radius-lg: 34px;

    --shadow-soft: 0 20px 60px rgba(15,23,42,.08);
    --shadow-primary: 0 18px 40px rgba(99,102,241,.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at 15% 10%, rgba(99,102,241,.12), transparent 32%),
        radial-gradient(circle at 85% 20%, rgba(14,165,233,.10), transparent 28%),
        radial-gradient(circle at 50% 100%, rgba(139,92,246,.08), transparent 35%),
        var(--bg);

    color: var(--text);

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    min-height: 100vh;

    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
textarea,
select {
    font: inherit;
}

::selection {
    background: rgba(99,102,241,.18);
}

/* =========================================================
   GLOBAL LAYOUT
========================================================= */

main {
    width: 100%;
    position: relative;
}

/* =========================================================
   HEADER
========================================================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    z-index: 1000;

    padding: 24px 42px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    backdrop-filter: blur(18px);

    background:
        linear-gradient(
            to bottom,
            rgba(255,255,255,.72),
            rgba(255,255,255,.42)
        );

    border-bottom:
        1px solid rgba(255,255,255,.5);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 48px;
    height: 48px;

    border-radius: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: white;

    font-weight: 800;
    font-size: 15px;

    background:
        linear-gradient(
            135deg,
            #6366f1,
            #8b5cf6
        );

    box-shadow:
        0 16px 40px rgba(99,102,241,.22);
}

.brand strong {
    display: block;
    color: #0f172a;
    font-size: 16px;
}

.brand small {
    color: var(--muted);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 34px;
}

.nav-links a {
    position: relative;

    color: #334155;

    font-size: 15px;
    font-weight: 600;

    transition: .25s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 6px;

    border-radius: 999px;

    background:
        rgba(255,255,255,.65);

    border:
        1px solid rgba(15,23,42,.06);
}

.lang-switcher a {
    width: 38px;
    height: 38px;

    border-radius: 999px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 13px;
    font-weight: 700;

    transition: .25s ease;
}

.lang-switcher a:hover {
    background: white;
    color: var(--primary);
}

.header-btn {
    height: 54px;

    padding: 0 28px;

    border-radius: 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: white;

    font-weight: 700;

    background:
        linear-gradient(
            135deg,
            #6366f1,
            #8b5cf6
        );

    box-shadow:
        0 18px 40px rgba(99,102,241,.24);

    transition: .25s ease;
}

.header-btn:hover {
    transform:
        translateY(-2px)
        scale(1.02);
}

/* =========================
   HEADER AUTH
========================= */

.header-link-btn {
    height: 44px;

    padding: 0 18px;

    border-radius: 14px;

    background: rgba(99,102,241,.08);

    color: var(--primary);

    font-size: 13px;
    font-weight: 800;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;

    transition: .25s ease;
}

.header-link-btn:hover {
    transform: translateY(-2px);

    background: rgba(99,102,241,.14);
}

.header-link-btn.secondary {
    background: rgba(15,23,42,.06);
    color: #0f172a;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 8px 14px;

    border-radius: 18px;

    background: rgba(255,255,255,.72);

    border: 1px solid rgba(15,23,42,.06);
}

.user-avatar {
    width: 38px;
    height: 38px;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #6366f1,
            #8b5cf6
        );

    color: white;

    font-size: 14px;
    font-weight: 900;

    display: flex;
    align-items: center;
    justify-content: center;
}

.user-pill strong {
    display: block;
    font-size: 13px;
    line-height: 1.1;
}

.user-pill small {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.premium-badge {
    color: #7c3aed !important;
    font-weight: 900 !important;
}

.logout-btn {
    height: 44px;

    padding: 0 16px;

    border: 0;
    border-radius: 14px;

    background: rgba(239,68,68,.08);

    color: #dc2626;

    font-size: 13px;
    font-weight: 800;

    cursor: pointer;

    transition: .25s ease;
}

.logout-btn:hover {
    transform: translateY(-2px);

    background: rgba(239,68,68,.14);
}

@media (max-width: 1100px) {

    .user-pill div {
        display: none;
    }

}

@media (max-width: 900px) {

    .nav-links {
        display: none;
    }

    .header-right {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .user-menu {
        width: 100%;
        justify-content: flex-end;
    }

}

/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    width: min(1450px, calc(100% - 40px));

    margin: 120px auto 30px;

    padding: 42px;

    border-radius: 36px;

    background:
        rgba(255,255,255,.72);

    border:
        1px solid rgba(255,255,255,.85);

    backdrop-filter: blur(24px);

    box-shadow:
        0 30px 80px rgba(15,23,42,.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;

    margin-bottom: 50px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-bottom: 20px;
}

.footer-brand span {
    width: 44px;
    height: 44px;

    border-radius: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: white;

    font-size: 14px;
    font-weight: 800;

    background:
        linear-gradient(
            135deg,
            #6366f1,
            #8b5cf6
        );
}

.footer-brand strong {
    font-size: 18px;
}

.site-footer p {
    color: var(--muted);
    line-height: 1.8;

    max-width: 500px;
}

.site-footer h4 {
    margin-bottom: 20px;
    font-size: 16px;
}

.site-footer a {
    display: block;

    margin-bottom: 14px;

    color: var(--muted);

    transition: .25s ease;
}

.site-footer a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 24px;

    border-top:
        1px solid rgba(15,23,42,.06);

    color: var(--soft);

    font-size: 14px;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {

    .nav-links {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {

    .site-header {
        padding: 20px;
    }

    .header-right {
        gap: 10px;
    }

    .lang-switcher {
        display: none;
    }

    .site-footer {
        width: calc(100% - 20px);

        padding: 28px;
        margin-top: 80px;
    }
}