/* ============================================================
   WRITE — Pure Black Galactic Theme
   ============================================================ */

:root {
    /* Surfaces (black-on-black) */
    --bg-0: #000000;
    --bg-1: #050507;
    --bg-2: #0a0a0d;
    --surface: rgba(12, 12, 16, 0.72);
    --surface-2: rgba(16, 16, 22, 0.85);
    --surface-strong: rgba(20, 20, 28, 0.92);

    /* Borders (very subtle) */
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.12);
    --border-accent: rgba(167, 139, 250, 0.32);

    /* Text */
    --text: #f4f4f8;
    --text-dim: #a1a1aa;
    --text-muted: #6b6b76;

    /* Accents */
    --accent: #a78bfa;
    --accent-2: #818cf8;
    --accent-3: #22d3ee;
    --pink: #f472b6;
    --green: #34d399;
    --red: #f87171;
    --yellow: #fbbf24;

    /* Gradients */
    --grad-primary: linear-gradient(135deg, #a78bfa 0%, #818cf8 50%, #22d3ee 100%);
    --grad-pink: linear-gradient(135deg, #f472b6 0%, #a78bfa 100%);
    --grad-text: linear-gradient(135deg, #ffffff 0%, #c4b5fd 50%, #67e8f9 100%);
    --grad-soft: linear-gradient(180deg, rgba(167, 139, 250, 0.08), rgba(167, 139, 250, 0));

    /* Shadows / glows */
    --glow-sm: 0 0 20px rgba(167, 139, 250, 0.25);
    --glow: 0 0 40px rgba(167, 139, 250, 0.35);
    --glow-strong: 0 0 80px rgba(167, 139, 250, 0.45);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.7);

    /* Radii */
    --r-sm: 10px;
    --r: 14px;
    --r-lg: 22px;
    --r-xl: 28px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

::selection {
    background: rgba(167, 139, 250, 0.35);
    color: #fff;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2a2a35, #1a1a22);
    border-radius: 999px;
    border: 2px solid #000;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #3a3a48, #25252e); }

html, body { height: 100%; }

body {
    font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
    background: #000;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   Animated space background — pure black with subtle accents
   ============================================================ */
.space-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: #000;
    overflow: hidden;
}
.space-bg::before {
    /* very faint vignette so corners breathe */
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 1000px 600px at 50% -10%, rgba(167, 139, 250, 0.10), transparent 70%),
        radial-gradient(ellipse 800px 500px at 100% 100%, rgba(34, 211, 238, 0.06), transparent 70%),
        radial-gradient(ellipse 700px 600px at 0% 80%, rgba(244, 114, 182, 0.05), transparent 70%);
    pointer-events: none;
}

.stars {
    position: absolute;
    inset: -50%;
    background-image:
        radial-gradient(1px 1px at 25% 30%, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 60% 70%, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 80% 10%, rgba(196,181,253,0.9), transparent),
        radial-gradient(1px 1px at 15% 85%, rgba(255,255,255,0.7), transparent),
        radial-gradient(1.5px 1.5px at 50% 50%, rgba(103,232,249,0.8), transparent),
        radial-gradient(1px 1px at 90% 40%, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 35% 15%, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 70% 90%, rgba(244,114,182,0.7), transparent);
    background-size: 400px 400px;
    opacity: 0.55;
    animation: drift 140s linear infinite;
}
.stars-2 {
    background-size: 300px 300px;
    opacity: 0.35;
    animation-duration: 220s;
    animation-direction: reverse;
}
.stars-3 {
    background-size: 600px 600px;
    opacity: 0.25;
    animation-duration: 320s;
}
@keyframes drift {
    from { transform: translate(0, 0); }
    to   { transform: translate(-400px, -400px); }
}

/* Soft nebulas */
.nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.30;
    pointer-events: none;
    animation: float 22s ease-in-out infinite alternate;
    mix-blend-mode: screen;
}
.nebula-1 {
    width: 620px; height: 620px;
    top: -200px; left: -180px;
    background: radial-gradient(circle, #a78bfa, transparent 70%);
}
.nebula-2 {
    width: 700px; height: 700px;
    bottom: -300px; right: -200px;
    background: radial-gradient(circle, #f472b6, transparent 70%);
    opacity: 0.22;
    animation-delay: -7s;
}
.nebula-3 {
    width: 520px; height: 520px;
    top: 45%; right: 28%;
    background: radial-gradient(circle, #22d3ee, transparent 70%);
    opacity: 0.14;
    animation-delay: -14s;
}
@keyframes float {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(80px, -60px) scale(1.12); }
}

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
}
.brand-logo {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 0 12px rgba(167, 139, 250, 0.6));
    transition: transform 0.4s cubic-bezier(.34,1.56,.64,1);
}
.brand:hover .brand-logo { transform: rotate(20deg) scale(1.1); }
.brand-name {
    font-size: 1.55rem;
    letter-spacing: 0.22em;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    margin-left: 2rem;
}
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 1rem;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: var(--r);
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}
.nav-link img { width: 18px; height: 18px; opacity: 0.75; transition: opacity .2s; }
.nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}
.nav-link:hover img { opacity: 1; }
.nav-link.active {
    color: var(--text);
    background: rgba(167, 139, 250, 0.08);
}
.nav-link.active::after {
    content: "";
    position: absolute;
    left: 1rem; right: 1rem;
    bottom: 4px;
    height: 2px;
    background: var(--grad-primary);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.7);
}

.nav-cta {
    margin-left: auto;
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.85rem 1.5rem;
    border-radius: var(--r);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--text);
    transition: all 0.25s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.btn img { width: 18px; height: 18px; }
.btn-sm  { padding: 0.55rem 1rem; font-size: 0.875rem; border-radius: 10px; }
.btn-lg  { padding: 1.05rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-primary {
    background: var(--grad-primary);
    color: #0a0a12;
    box-shadow: 0 10px 30px rgba(167, 139, 250, 0.30), 0 0 0 1px rgba(255,255,255,0.08) inset;
    font-weight: 700;
}
.btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%);
    transform: translateX(-150%);
    transition: transform 0.6s ease;
}
.btn-primary:hover::before { transform: translateX(150%); }
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(167, 139, 250, 0.5);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border);
    color: var(--text);
}
.btn-ghost:hover {
    background: rgba(167, 139, 250, 0.08);
    border-color: var(--border-accent);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-accent);
}

.btn-danger {
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.28);
    color: var(--red);
}
.btn-danger:hover {
    background: rgba(248, 113, 113, 0.16);
    border-color: rgba(248, 113, 113, 0.5);
}

.btn:disabled, .btn.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

/* Discord button — special accent */
.btn-discord {
    background: linear-gradient(135deg, #5865F2 0%, #7289da 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.35);
    font-weight: 700;
}
.btn-discord:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(88, 101, 242, 0.55);
}

/* ============================================================
   Layout
   ============================================================ */
.main { flex: 1; display: flex; flex-direction: column; }
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================================
   Hero (Preview)
   ============================================================ */
.hero {
    padding: 7rem 2rem 5rem;
    text-align: center;
    position: relative;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 1rem;
    margin-bottom: 1.75rem;
    border-radius: 999px;
    background: rgba(167, 139, 250, 0.06);
    border: 1px solid var(--border-accent);
    font-size: 0.85rem;
    color: var(--text-dim);
    backdrop-filter: blur(10px);
}
.hero-eyebrow .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(0.85); }
}

.hero-title {
    font-size: clamp(2.6rem, 7vw, 5.2rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 80px rgba(167, 139, 250, 0.3);
}
.hero-title .accent {
    display: inline-block;
    transform: rotate(-2deg);
    background: var(--grad-pink);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub {
    max-width: 640px;
    margin: 0 auto 2.5rem;
    color: var(--text-dim);
    font-size: 1.15rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Features */
.features { padding: 5rem 2rem; }

.section-title {
    text-align: center;
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    margin-bottom: 0.75rem;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.section-sub {
    text-align: center;
    color: var(--text-dim);
    margin-bottom: 3.5rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(.4, 0, .2, 1);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(167, 139, 250, 0.10), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.feature-card::after {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    transition: left 0.7s ease;
}
.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow), 0 0 0 1px var(--border-accent);
}
.feature-card:hover::before { opacity: 1; }
.feature-card:hover::after { left: 100%; }

.feature-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.18), rgba(34, 211, 238, 0.10));
    border: 1px solid var(--border-accent);
    margin-bottom: 1.25rem;
    box-shadow: 0 0 24px rgba(167, 139, 250, 0.18);
}
.feature-icon img { width: 26px; height: 26px; }

.feature-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.feature-text {
    color: var(--text-dim);
    font-size: 0.95rem;
}

/* ============================================================
   Subscribe page
   ============================================================ */
.page-head {
    padding: 6rem 2rem 2rem;
    text-align: center;
}
.page-head h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    margin-bottom: 0.85rem;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    letter-spacing: -0.015em;
}
.page-head p {
    color: var(--text-dim);
    max-width: 580px;
    margin: 0 auto;
    font-size: 1.05rem;
}

.plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 2.5rem auto 5rem;
    padding: 0 2rem;
}

.plan {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 2.5rem 2rem;
    backdrop-filter: blur(18px);
    position: relative;
    transition: all 0.4s cubic-bezier(.4, 0, .2, 1);
    display: flex;
    flex-direction: column;
}
.plan:hover {
    transform: translateY(-8px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow);
}
.plan.is-highlight {
    background: linear-gradient(180deg, rgba(167, 139, 250, 0.10), rgba(0, 0, 0, 0));
    border-color: var(--border-accent);
    box-shadow: 0 0 80px rgba(167, 139, 250, 0.18);
}
.plan.is-highlight::before {
    content: "Most popular";
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    padding: 0.3rem 0.95rem;
    background: var(--grad-primary);
    color: #0a0a12;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(167, 139, 250, 0.35);
}

.plan-name {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
    color: var(--text);
}
.plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin: 1rem 0 1.5rem;
}
.plan-price .num {
    font-size: 2.7rem;
    font-weight: 700;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}
.plan-price .per { color: var(--text-muted); font-size: 0.95rem; }

.plan-features {
    list-style: none;
    margin-bottom: 1.75rem;
    flex: 1;
}
.plan-features li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0;
    color: var(--text-dim);
    font-size: 0.95rem;
}
.plan-features li::before {
    content: "";
    width: 18px; height: 18px;
    background: url("../icons/check.svg") center/contain no-repeat;
    flex-shrink: 0;
}

/* ============================================================
   Auth pages
   ============================================================ */
.auth-wrap {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 4rem 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 2.85rem 2.35rem;
    background: var(--surface-strong);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-xl);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    box-shadow: var(--shadow), 0 0 100px rgba(167, 139, 250, 0.10);
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.5;
}
.auth-head {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-head .icon-shell {
    width: 60px; height: 60px;
    border-radius: 18px;
    background: var(--grad-primary);
    display: grid; place-items: center;
    margin: 0 auto 1.1rem;
    box-shadow: var(--glow);
    position: relative;
}
.auth-head .icon-shell::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    background: var(--grad-primary);
    filter: blur(14px);
    opacity: 0.5;
    z-index: -1;
}
.auth-head .icon-shell img { width: 30px; height: 30px; filter: brightness(0) invert(1); }
.auth-head h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.auth-head p { color: var(--text-dim); font-size: 0.95rem; }

.field { margin-bottom: 1.1rem; }
.field label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 0.45rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.field input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.85rem;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border);
    border-radius: var(--r);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}
.field input:focus {
    outline: none;
    border-color: var(--border-accent);
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.15);
    background: rgba(0, 0, 0, 0.7);
}
.field input::placeholder { color: var(--text-muted); }
.field-with-icon { position: relative; }
.field-with-icon img {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    opacity: 0.5;
    pointer-events: none;
}
.field-hint {
    margin-top: 0.4rem;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.auth-foot {
    text-align: center;
    margin-top: 1.6rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}
.auth-foot a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.auth-foot a:hover { text-decoration: underline; }

/* ============================================================
   Profile page
   ============================================================ */
.profile-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 2rem 5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    padding: 2.5rem;
    background: var(--surface-strong);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-xl);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.profile-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle 400px at 100% 0%, rgba(167, 139, 250, 0.16), transparent 60%),
        radial-gradient(circle 300px at 0% 100%, rgba(34, 211, 238, 0.10), transparent 60%);
    pointer-events: none;
}

.avatar {
    width: 100px; height: 100px;
    border-radius: 50%;
    background: var(--grad-primary);
    display: grid; place-items: center;
    flex-shrink: 0;
    box-shadow: var(--glow), 0 0 0 4px rgba(167, 139, 250, 0.18);
    font-size: 2.6rem;
    font-weight: 700;
    color: #0a0a12;
    text-transform: uppercase;
    position: relative;
}
.avatar::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: var(--grad-primary);
    filter: blur(20px);
    opacity: 0.4;
    z-index: -1;
}

.profile-meta { position: relative; z-index: 1; flex: 1; }
.profile-meta .greeting {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    letter-spacing: 0.02em;
}
.profile-meta h1 {
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.profile-meta .badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.78rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-strong);
    color: var(--text-dim);
}
.badge.is-active {
    background: rgba(52, 211, 153, 0.10);
    border-color: rgba(52, 211, 153, 0.4);
    color: var(--green);
}
.badge.is-free {
    background: rgba(110, 110, 140, 0.08);
    border-color: rgba(110, 110, 140, 0.25);
    color: var(--text-dim);
}
.badge.is-uid {
    background: rgba(167, 139, 250, 0.10);
    border-color: rgba(167, 139, 250, 0.35);
    color: var(--accent);
    font-family: "JetBrains Mono", monospace;
    font-weight: 600;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.5rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 1.85rem;
    backdrop-filter: blur(20px);
    transition: border-color 0.3s ease;
}
.card:hover { border-color: var(--border-strong); }

.card-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.4rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--border);
}
.card-head img {
    width: 22px; height: 22px;
    opacity: 0.85;
}
.card-head h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
}
.info-row:last-child { border-bottom: none; }
.info-row .label {
    color: var(--text-muted);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-weight: 500;
}
.info-row .value {
    color: var(--text);
    font-weight: 500;
    text-align: right;
    word-break: break-all;
}
.info-row .value.mono {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.92rem;
    color: var(--accent);
}
.info-row .value .dim {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: 0.4rem;
}

.action-list {
    display: grid;
    gap: 0.75rem;
}

/* ============================================================
   Flash messages
   ============================================================ */
.flash-stack {
    position: fixed;
    top: 5.5rem;
    right: 1.5rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-width: 360px;
}
.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.15rem;
    background: var(--surface-strong);
    border: 1px solid var(--border-strong);
    border-radius: var(--r);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    color: var(--text);
    font-size: 0.92rem;
    animation: flash-in 0.3s ease;
}
.flash-success { border-color: rgba(52, 211, 153, 0.4); }
.flash-error   { border-color: rgba(248, 113, 113, 0.4); }
.flash-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.25rem;
}
.flash-close:hover { color: var(--text); }
@keyframes flash-in {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   Modal
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
}
.modal.is-open { display: flex; animation: flash-in 0.2s ease; }
.modal-card {
    width: 100%;
    max-width: 440px;
    padding: 2.2rem;
    background: var(--surface-strong);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-xl);
    backdrop-filter: blur(28px);
    box-shadow: var(--shadow), 0 0 100px rgba(167, 139, 250, 0.18);
    position: relative;
}
.modal-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.modal-card p {
    color: var(--text-dim);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}
.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.4rem;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
    margin-top: auto;
    padding: 2.5rem 2rem 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--text-dim);
}
.footer-brand img { width: 28px; height: 28px; }
.footer-note { color: var(--text-muted); font-size: 0.86rem; }

/* ============================================================
   Error page
   ============================================================ */
.error-page {
    flex: 1;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 4rem 2rem;
}
.error-code {
    font-size: clamp(5rem, 12vw, 8.5rem);
    font-weight: 700;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    text-shadow: 0 0 80px rgba(167, 139, 250, 0.4);
}
.error-msg {
    margin: 1rem 0 2rem;
    color: var(--text-dim);
    font-size: 1.15rem;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
    .nav-links { display: none; }
    .navbar { padding: 1rem; gap: 1rem; }
    .profile-grid { grid-template-columns: 1fr; }
    .profile-hero { flex-direction: column; text-align: center; padding: 2rem; }
    .profile-hero .badges { justify-content: center; }
}

@media (max-width: 520px) {
    .nav-cta .btn span { display: none; }
    .auth-card { padding: 2rem 1.5rem; }
    .hero { padding: 5rem 1.25rem 3rem; }
    .modal-actions { flex-direction: column; }
}

/* Focus a11y */
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ============================================================
   Admin panel
   ============================================================ */
.admin-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3.5rem 2rem 5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.admin-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.admin-eyebrow img { width: 16px; height: 16px; }
.admin-head h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 700;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.admin-tabs {
    display: flex;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.3rem;
}
.admin-tab {
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active {
    background: var(--grad-primary);
    color: #0a0a12;
    font-weight: 700;
}

/* Stat cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.6rem;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}
.stat-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
}
.stat-num {
    font-size: 2.2rem;
    font-weight: 700;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
}
.stat-label {
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.35rem;
}

/* Search / filter bar */
.admin-search {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.admin-search .field-with-icon { flex: 1; min-width: 220px; }
.admin-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.85rem;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border);
    border-radius: var(--r);
    color: var(--text);
    font-family: inherit;
    font-size: 0.92rem;
}
.admin-search input:focus {
    outline: none;
    border-color: var(--border-accent);
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.15);
}

.filter-pills { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.filter-pill {
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: capitalize;
    transition: all 0.2s ease;
}
.filter-pill:hover { color: var(--text); border-color: var(--border-strong); }
.filter-pill.active {
    background: rgba(167, 139, 250, 0.12);
    border-color: var(--border-accent);
    color: var(--accent);
}

/* Tables */
.table-card { padding: 0.5rem; }
.table-scroll { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.admin-table th {
    text-align: left;
    padding: 0.95rem 1rem;
    color: var(--text-muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    border-bottom: 1px solid var(--border-strong);
    white-space: nowrap;
}
.admin-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.admin-table .mono {
    font-family: "JetBrains Mono", monospace;
    color: var(--accent);
}
.admin-table .dim { color: var(--text-muted); }
.key-code { letter-spacing: 0.04em; }

.empty-note {
    text-align: center;
    color: var(--text-muted);
    padding: 1.5rem;
}

/* Pills */
.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-dim);
    cursor: default;
    font-family: inherit;
    text-transform: capitalize;
}
button.pill { cursor: pointer; transition: all 0.2s ease; }
.pill-active {
    background: rgba(52, 211, 153, 0.10);
    border-color: rgba(52, 211, 153, 0.4);
    color: var(--green);
}
.pill-free, .pill-user {
    background: rgba(110, 110, 140, 0.10);
    border-color: rgba(110, 110, 140, 0.3);
    color: var(--text-dim);
}
.pill-admin {
    background: rgba(167, 139, 250, 0.12);
    border-color: var(--border-accent);
    color: var(--accent);
}
.pill-revoked {
    background: rgba(248, 113, 113, 0.10);
    border-color: rgba(248, 113, 113, 0.35);
    color: var(--red);
}

/* Inline row forms */
.row-form {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: nowrap;
}
.inline-form { display: inline; }
.row-form select,
.row-form input,
.gen-form select,
.gen-form input {
    padding: 0.5rem 0.65rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
}
.row-form input { width: 80px; }
.row-form select:focus,
.row-form input:focus,
.gen-form select:focus,
.gen-form input:focus {
    outline: none;
    border-color: var(--border-accent);
}

/* Generate form */
.gen-form {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}
.gen-field { display: flex; flex-direction: column; gap: 0.4rem; }
.gen-field label {
    font-size: 0.78rem;
    color: var(--text-dim);
    letter-spacing: 0.02em;
}
.gen-field select, .gen-field input { min-width: 140px; }

/* Admin nav link accent */
.nav-link-admin img { filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.6)); }

@media (max-width: 860px) {
    .admin-head { align-items: flex-start; }
    .row-form { flex-wrap: wrap; }
}

/* Quick-day preset chips */
.quick-days {
    display: inline-flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    align-items: center;
}
.chip {
    padding: 0.4rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-dim);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.chip:hover {
    color: var(--text);
    border-color: var(--border-accent);
    background: rgba(167, 139, 250, 0.10);
}

/* Banned user row */
.row-banned td { opacity: 0.55; }
.row-banned td:first-child { position: relative; }
.row-banned td:nth-child(2)::after {
    content: "BANNED";
    margin-left: 0.5rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--red);
    border: 1px solid rgba(248, 113, 113, 0.4);
    border-radius: 999px;
    padding: 0.1rem 0.4rem;
    vertical-align: middle;
}

/* ============================================================
   Download page
   ============================================================ */
.download-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3.5rem 2rem 5rem;
    width: 100%;
}

.download-panel {
    position: relative;
    background: linear-gradient(180deg, rgba(14, 14, 18, 0.9), rgba(6, 6, 8, 0.9));
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 2rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.download-panel::before {
    /* red glow in the top-right corner, like the reference */
    content: "";
    position: absolute;
    top: -120px;
    right: -80px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(248, 70, 80, 0.30), transparent 70%);
    filter: blur(40px);
    pointer-events: none;
}

.download-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.6rem;
    position: relative;
    z-index: 1;
}
.download-head img { width: 24px; height: 24px; }
.download-head h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.01em;
}

.download-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.dl-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.dl-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
}

.dl-banner {
    height: 190px;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}
.dl-banner-blue {
    background:
        radial-gradient(circle at 30% 20%, rgba(96, 130, 220, 0.45), transparent 60%),
        linear-gradient(135deg, #1b2a4a 0%, #0c1322 70%);
}
.dl-banner-red {
    background:
        radial-gradient(circle at 70% 30%, rgba(230, 70, 80, 0.5), transparent 60%),
        linear-gradient(135deg, #4a161b 0%, #220b0e 70%);
}

.dl-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    background: rgba(8, 12, 24, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.dl-badge img { width: 26px; height: 26px; }
.dl-badge-red { background: rgba(24, 8, 10, 0.55); }

.dl-body { padding: 1.6rem; }
.dl-body h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.6rem;
}
.dl-body p {
    color: var(--text-dim);
    font-size: 0.93rem;
    line-height: 1.6;
    margin-bottom: 1.3rem;
}
.dl-mono {
    font-family: "JetBrains Mono", monospace;
    color: var(--accent);
    font-size: 0.88rem;
}

.dl-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }

.btn-dl {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.1rem;
    border-radius: var(--r);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-strong);
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}
.btn-dl img { width: 17px; height: 17px; }
.btn-dl:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: var(--border-accent);
    transform: translateY(-1px);
}
.btn-dl-sm { padding: 0.55rem 0.9rem; font-size: 0.84rem; margin-top: 0.4rem; }

/* Requirements */
.dl-reqs {
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}
.dl-reqs h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1.2rem;
}
.req-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.req-item {
    display: flex;
    gap: 0.85rem;
    padding: 1.2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
}
.req-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 0.45rem;
    flex-shrink: 0;
    background: var(--text-muted);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}
.req-dot.req-important { background: var(--red); box-shadow: 0 0 12px var(--red); }
.req-dot.req-ok { background: var(--green); box-shadow: 0 0 10px var(--green); }
.req-item h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.req-item p {
    color: var(--text-dim);
    font-size: 0.86rem;
    line-height: 1.55;
}
.req-tag {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.4);
    color: var(--red);
}
.req-tag-ok {
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.4);
    color: var(--green);
}

@media (max-width: 760px) {
    .download-grid { grid-template-columns: 1fr; }
    .req-grid { grid-template-columns: 1fr; }
    .dl-badge { font-size: 1.15rem; padding: 0.7rem 1.2rem; }
}
