/* =====================================================================
   Merciless Gaming - "Midnight"
   A World of Warcraft: Midnight themed template.
   Palette taken from the MG logo: void black, arcane violet, azure,
   forged silver, with a Sunwell amber accent.
   ===================================================================== */

/* ------------------------------------------------ 1. Tokens ------- */
:root {
    --void-900: #05030d;
    --void-850: #080614;
    --void-800: #0b0819;
    --void-700: #120d24;
    --void-600: #1a1333;
    --void-500: #241a45;

    --arcane-600: #5b21b6;
    --arcane-500: #7c3aed;
    --arcane-400: #8b5cf6;
    --arcane-300: #a78bfa;
    --arcane-200: #c4b5fd;

    --azure-500: #3b82f6;
    --azure-400: #60a5fa;
    --azure-300: #93c5fd;

    --sun: #f5c451;
    --sun-dim: #c9963a;

    --silver-100: #f2f3fb;
    --silver-200: #dcdef0;
    --silver-300: #b6b9d6;
    --silver-400: #8b8fb4;
    --silver-500: #666a8c;

    --ok: #4ade80;
    --warn: #fbbf24;
    --bad: #fb7185;

    --line: rgba(167, 139, 250, .16);
    --line-strong: rgba(167, 139, 250, .34);
    --glass: rgba(20, 14, 40, .62);
    --glass-solid: #100c20;

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, .45);
    --shadow-md: 0 12px 34px rgba(0, 0, 0, .55);
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, .65);
    --glow: 0 0 32px rgba(124, 58, 237, .45);

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;

    --font-display: "Cinzel", "Georgia", "Times New Roman", serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --nav-h: 74px;
    --maxw: 1220px;
}

/* ------------------------------------------------ 2. Reset -------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 20px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--void-900);
    color: var(--silver-200);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--arcane-300); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--arcane-200); }
h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--silver-100);
    line-height: 1.18;
    margin: 0 0 .5em;
    letter-spacing: .01em;
}
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

:focus-visible {
    outline: 2px solid var(--arcane-400);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection { background: rgba(124, 58, 237, .45); color: #fff; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--void-850); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--arcane-600), var(--arcane-500));
    border-radius: 99px;
    border: 2px solid var(--void-850);
}
::-webkit-scrollbar-thumb:hover { background: var(--arcane-400); }

/* ------------------------------------------------ 3. Cosmos ------- */
/* Fixed starfield + drifting nebula behind everything. Pure CSS. */
.cosmos {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(1100px 700px at 18% -8%, rgba(91, 33, 182, .40), transparent 62%),
        radial-gradient(900px 620px at 86% 6%, rgba(37, 99, 235, .26), transparent 60%),
        radial-gradient(1200px 900px at 50% 110%, rgba(124, 58, 237, .22), transparent 66%),
        linear-gradient(180deg, #05030d 0%, #080615 45%, #05030d 100%);
}

.cosmos::before,
.cosmos::after {
    content: "";
    position: absolute;
    inset: -50%;
    background-repeat: repeat;
    opacity: .55;
}

.cosmos::before {
    background-image:
        radial-gradient(1.4px 1.4px at 20px 30px, rgba(255, 255, 255, .85), transparent),
        radial-gradient(1.1px 1.1px at 130px 80px, rgba(199, 210, 254, .75), transparent),
        radial-gradient(1.6px 1.6px at 240px 180px, rgba(255, 255, 255, .70), transparent),
        radial-gradient(1px 1px at 330px 60px, rgba(196, 181, 253, .80), transparent),
        radial-gradient(1.2px 1.2px at 80px 260px, rgba(255, 255, 255, .60), transparent);
    background-size: 400px 320px;
    animation: drift 220s linear infinite;
    will-change: transform;
}

.cosmos::after {
    background-image:
        radial-gradient(1px 1px at 60px 120px, rgba(147, 197, 253, .6), transparent),
        radial-gradient(1.3px 1.3px at 200px 40px, rgba(255, 255, 255, .5), transparent),
        radial-gradient(1px 1px at 300px 240px, rgba(216, 180, 254, .55), transparent);
    background-size: 340px 280px;
    animation: drift 340s linear infinite reverse, twinkle 7s ease-in-out infinite;
}

@keyframes drift {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-400px, -320px, 0); }
}

@keyframes twinkle {
    0%, 100% { opacity: .30; }
    50% { opacity: .70; }
}

/* Arcane aurora wash. Static geometry - only opacity animates, so the
   compositor handles it and nothing is re-rasterised every frame. */
.aurora {
    position: fixed;
    top: -25vh;
    left: 50%;
    width: 150vw;
    height: 85vh;
    transform: translateX(-50%) rotate(-8deg);
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(50% 60% at 28% 45%, rgba(124, 58, 237, .30), transparent 70%),
        radial-gradient(46% 55% at 72% 55%, rgba(59, 130, 246, .22), transparent 70%);
    animation: breathe 16s ease-in-out infinite;
    will-change: opacity;
    opacity: .7;
}

@keyframes breathe {
    0%, 100% { opacity: .48; }
    50% { opacity: .82; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .cosmos::before, .cosmos::after, .aurora { animation: none !important; }
    .reveal { opacity: 1 !important; transform: none !important; }
}

/* ------------------------------------------------ 4. Layout ------- */
.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 22px;
}

.section { padding: 92px 0; position: relative; }
.section--tight { padding: 62px 0; }

.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 54px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-body);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--arcane-300);
    margin-bottom: 14px;
}

.eyebrow::before,
.eyebrow::after {
    content: "";
    width: 26px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--arcane-400));
}
.eyebrow::after { background: linear-gradient(90deg, var(--arcane-400), transparent); }

.section-head h2 {
    font-size: clamp(1.9rem, 4.2vw, 2.85rem);
    margin-bottom: .35em;
}

.section-head p {
    color: var(--silver-400);
    font-size: 1.02rem;
    margin: 0;
}

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ------------------------------------------------ 5. Nav ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 900;
    display: flex;
    align-items: center;
    transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
    border-bottom: 1px solid transparent;
}

.nav.is-stuck {
    background: rgba(8, 6, 20, .88);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border-bottom-color: var(--line);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}

.nav__inner {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    color: var(--silver-100);
}

.brand img {
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 0 12px rgba(124, 58, 237, .65));
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.brand:hover img { transform: rotate(-8deg) scale(1.08); }

.brand__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.06rem;
    letter-spacing: .06em;
    line-height: 1.1;
    text-transform: uppercase;
    white-space: nowrap;
}

.brand__sub {
    display: block;
    font-family: var(--font-body);
    font-size: .62rem;
    letter-spacing: .2em;
    color: var(--arcane-300);
    font-weight: 600;
    text-transform: uppercase;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav__links a {
    position: relative;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 600;
    color: var(--silver-300);
    letter-spacing: .02em;
    white-space: nowrap;
}

.nav__links a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--arcane-400), var(--azure-400));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}

.nav__links a:hover { color: var(--silver-100); }
.nav__links a:hover::after,
.nav__links a.is-active::after { transform: scaleX(1); }
.nav__links a.is-active { color: #fff; }

.nav__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nav__toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-strong);
    background: var(--glass);
    border-radius: var(--radius-sm);
    color: var(--silver-100);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.nav__toggle svg { width: 20px; height: 20px; }

/* ------------------------------------------------ 6. Buttons ------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-family: var(--font-body);
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
    transition: transform .18s ease, box-shadow .22s ease, background .22s ease, border-color .22s ease, color .22s ease;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
    background: linear-gradient(135deg, var(--arcane-500) 0%, var(--arcane-600) 55%, #3730a3 100%);
    color: #fff;
    box-shadow: 0 8px 26px rgba(91, 33, 182, .48), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn--primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 38px rgba(124, 58, 237, .62), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.btn--ghost {
    background: rgba(124, 58, 237, .07);
    border-color: var(--line-strong);
    color: var(--silver-100);
    backdrop-filter: blur(6px);
}
.btn--ghost:hover {
    color: #fff;
    border-color: var(--arcane-400);
    background: rgba(124, 58, 237, .18);
    transform: translateY(-2px);
}

.btn--danger {
    background: rgba(251, 113, 133, .12);
    border-color: rgba(251, 113, 133, .4);
    color: #fda4af;
}
.btn--danger:hover { background: rgba(251, 113, 133, .22); color: #fff; border-color: var(--bad); }

.btn--sm { padding: 8px 15px; font-size: .8rem; }
.btn--block { width: 100%; }
.btn--lg { padding: 15px 34px; font-size: .98rem; }

/* ------------------------------------------------ 7. Hero --------- */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-h) + 60px) 0 70px;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 220px;
    background: linear-gradient(180deg, transparent, var(--void-900));
    pointer-events: none;
}

.hero__grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.hero__title {
    font-size: clamp(2.5rem, 6.4vw, 4.6rem);
    line-height: 1.03;
    margin: 0 0 18px;
    letter-spacing: -.005em;
}

.hero__title .accent {
    display: block;
    background: linear-gradient(100deg, #ffffff 0%, var(--arcane-200) 35%, var(--azure-300) 70%, #ffffff 100%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: shimmer 9s linear infinite;
}

@keyframes shimmer {
    to { background-position: 220% center; }
}

.hero__lede {
    font-size: 1.1rem;
    color: var(--silver-300);
    max-width: 56ch;
    margin-bottom: 30px;
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 34px;
}

.hero__art {
    position: relative;
    display: grid;
    place-items: center;
}

.hero__art img {
    width: min(430px, 82%);
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .75));
    animation: float 9s ease-in-out infinite;
}

.hero__art::before {
    content: "";
    position: absolute;
    width: min(430px, 82%);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, .5), rgba(59, 130, 246, .18) 55%, transparent 72%);
    filter: blur(46px);
    animation: pulse 7s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-16px) rotate(1.4deg); }
}

@keyframes pulse {
    0%, 100% { opacity: .65; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

/* Realmlist copy strip */
.realmlist-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 6px 6px 18px;
    background: rgba(10, 7, 22, .72);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    max-width: 480px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

.realmlist-box__label {
    font-size: .66rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--silver-500);
    font-weight: 700;
    display: block;
}

.realmlist-box code {
    font-family: "SFMono-Regular", "JetBrains Mono", Consolas, monospace;
    font-size: .95rem;
    color: var(--arcane-200);
    letter-spacing: .02em;
    word-break: break-all;
}

.realmlist-box > div { min-width: 0; flex: 1; }

/* ------------------------------------------------ 8. Cards -------- */
.card {
    position: relative;
    background: linear-gradient(160deg, rgba(26, 19, 51, .78), rgba(11, 8, 25, .88));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow-sm);
    transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg, rgba(167, 139, 250, .5), transparent 42%, transparent 62%, rgba(96, 165, 250, .32));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md), 0 0 40px rgba(124, 58, 237, .18);
}
.card:hover::before { opacity: 1; }

.card__icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    margin-bottom: 16px;
    background: linear-gradient(140deg, rgba(124, 58, 237, .3), rgba(59, 130, 246, .16));
    border: 1px solid var(--line-strong);
    color: var(--arcane-200);
}
.card__icon svg { width: 24px; height: 24px; }

.card h3 { font-size: 1.14rem; margin-bottom: .45em; }
.card p { color: var(--silver-400); font-size: .93rem; margin: 0; }

.card--flat { background: rgba(13, 9, 26, .6); }

/* Stat tiles */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.stat {
    padding: 20px 18px;
    text-align: center;
    background: rgba(13, 9, 26, .66);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    backdrop-filter: blur(8px);
    transition: border-color .25s ease, transform .25s ease;
}
.stat:hover { border-color: var(--line-strong); transform: translateY(-3px); }

.stat__value {
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--silver-100);
    line-height: 1.1;
    display: block;
    text-shadow: 0 0 22px rgba(124, 58, 237, .55);
}

.stat__label {
    font-size: .7rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--silver-500);
    font-weight: 700;
    margin-top: 6px;
    display: block;
}

/* Numbered step cards */
.step { position: relative; padding-top: 34px; }

.step__num {
    position: absolute;
    top: -14px;
    left: 22px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
    background: linear-gradient(135deg, var(--arcane-500), var(--arcane-600));
    border: 2px solid rgba(196, 181, 253, .4);
    box-shadow: 0 6px 20px rgba(91, 33, 182, .55);
}

/* Info rows */
.info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px dashed var(--line);
    font-size: .94rem;
}
.info-list li:last-child { border-bottom: 0; }
.info-list .k { color: var(--silver-400); }
.info-list .v { color: var(--silver-100); font-weight: 600; text-align: right; }

/* ------------------------------------------------ 9. Forms -------- */
.field { margin-bottom: 16px; }

.field label {
    display: block;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--silver-400);
    margin-bottom: 7px;
}

.input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(6, 4, 15, .72);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--silver-100);
    font-family: var(--font-body);
    font-size: .95rem;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

textarea { resize: vertical; min-height: 96px; font-family: Consolas, monospace; }

.input:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--arcane-400);
    background: rgba(10, 7, 22, .9);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .22);
}

input::placeholder, textarea::placeholder { color: var(--silver-500); }

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8fb4' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 17px;
    padding-right: 38px;
}

select option { background: var(--void-700); color: var(--silver-100); }

.field__hint {
    display: block;
    margin-top: 6px;
    font-size: .78rem;
    color: var(--silver-500);
    letter-spacing: 0;
    text-transform: none;
    font-weight: 400;
}

.checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    color: var(--silver-300);
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    margin: 0;
}

.check input {
    width: 17px;
    height: 17px;
    accent-color: var(--arcane-500);
    cursor: pointer;
}

.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 16px; }

/* Alerts */
.alert,
.alert-danger,
.alert-success {
    display: block;
    padding: 13px 17px;
    border-radius: var(--radius-sm);
    border: 1px solid;
    font-size: .92rem;
    margin: 0 0 18px;
}

.alert-danger {
    background: rgba(251, 113, 133, .10);
    border-color: rgba(251, 113, 133, .38);
    color: #fecdd3;
}

.alert-success {
    background: rgba(74, 222, 128, .10);
    border-color: rgba(74, 222, 128, .36);
    color: #bbf7d0;
}

.alert-info {
    background: rgba(96, 165, 250, .10);
    border-color: rgba(96, 165, 250, .34);
    color: #bfdbfe;
}

/* ------------------------------------------------ 10. Tabs -------- */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 30px;
}

.tab {
    padding: 9px 18px;
    border-radius: 99px;
    border: 1px solid var(--line);
    background: rgba(13, 9, 26, .6);
    color: var(--silver-300);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    font-family: var(--font-body);
}

.tab:hover { border-color: var(--line-strong); color: var(--silver-100); }

.tab.is-active {
    background: linear-gradient(135deg, var(--arcane-500), var(--arcane-600));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 20px rgba(91, 33, 182, .45);
}

.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadeIn .35s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* ------------------------------------------------ 11. Tables ------ */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(11, 8, 25, .66);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .91rem;
    min-width: 520px;
}

thead th {
    text-align: left;
    padding: 13px 16px;
    font-size: .7rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--silver-400);
    background: rgba(36, 26, 69, .5);
    border-bottom: 1px solid var(--line-strong);
    white-space: nowrap;
}

tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(167, 139, 250, .08);
    color: var(--silver-200);
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .18s ease; }
tbody tr:hover { background: rgba(124, 58, 237, .09); }

td img { display: inline-block; border-radius: 4px; }

.rank-cell {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--silver-400);
    width: 54px;
}
.rank-1 { color: var(--sun); text-shadow: 0 0 14px rgba(245, 196, 81, .6); }
.rank-2 { color: #cfd6e6; }
.rank-3 { color: #d8a06a; }

.char-name { font-weight: 600; color: var(--silver-100); }

/* ------------------------------------------------ 12. Badges ------ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 11px;
    border-radius: 99px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    border: 1px solid;
    white-space: nowrap;
}

.badge--ok { background: rgba(74, 222, 128, .12); border-color: rgba(74, 222, 128, .4); color: #86efac; }
.badge--bad { background: rgba(251, 113, 133, .12); border-color: rgba(251, 113, 133, .4); color: #fda4af; }
.badge--warn { background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .4); color: #fcd34d; }
.badge--arcane { background: rgba(124, 58, 237, .16); border-color: var(--line-strong); color: var(--arcane-200); }
.badge--muted { background: rgba(139, 143, 180, .1); border-color: rgba(139, 143, 180, .3); color: var(--silver-400); }

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.dot--live { animation: blink 2.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* ------------------------------------------------ 13. Accordion --- */
.accordion { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

.accordion__item + .accordion__item { border-top: 1px solid var(--line); }

.accordion__head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 20px;
    background: rgba(13, 9, 26, .55);
    border: 0;
    color: var(--silver-100);
    font-family: var(--font-body);
    font-size: .97rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background .2s ease;
}

.accordion__head:hover { background: rgba(124, 58, 237, .12); }
.accordion__head svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform .25s ease; color: var(--arcane-300); }
.accordion__item.is-open .accordion__head svg { transform: rotate(180deg); }

.accordion__body {
    display: none;
    padding: 4px 20px 20px;
    color: var(--silver-400);
    font-size: .93rem;
}
.accordion__item.is-open .accordion__body { display: block; animation: fadeIn .3s ease; }

/* ------------------------------------------------ 14. Auth pages -- */
.auth-page {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: calc(var(--nav-h) + 50px) 0 70px;
}

.auth-card {
    width: min(460px, 100%);
    padding: 38px 34px;
    background: linear-gradient(165deg, rgba(30, 22, 58, .84), rgba(9, 6, 20, .93));
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 70px rgba(124, 58, 237, .16);
    backdrop-filter: blur(14px);
}

.auth-card__logo {
    width: 84px;
    margin: 0 auto 18px;
    filter: drop-shadow(0 0 22px rgba(124, 58, 237, .7));
}

.auth-card h1 { font-size: 1.65rem; text-align: center; margin-bottom: .3em; }
.auth-card__sub { text-align: center; color: var(--silver-400); font-size: .92rem; margin-bottom: 26px; }

.auth-foot {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: .88rem;
    color: var(--silver-400);
}

/* ------------------------------------------------ 15. Panels ------ */
.panel-layout {
    display: grid;
    grid-template-columns: 232px 1fr;
    gap: 26px;
    align-items: start;
    padding: calc(var(--nav-h) + 46px) 0 80px;
}

.side-nav {
    position: sticky;
    top: calc(var(--nav-h) + 22px);
    background: rgba(13, 9, 26, .68);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    backdrop-filter: blur(10px);
}

.side-nav__title {
    font-size: .68rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--silver-500);
    font-weight: 700;
    padding: 6px 12px 12px;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--silver-300);
    font-size: .9rem;
    font-weight: 600;
    transition: all .2s ease;
}

.side-nav a svg { width: 17px; height: 17px; flex-shrink: 0; }
.side-nav a:hover { background: rgba(124, 58, 237, .14); color: var(--silver-100); }

.side-nav a.is-active {
    background: linear-gradient(135deg, rgba(124, 58, 237, .32), rgba(59, 130, 246, .16));
    color: #fff;
    box-shadow: inset 0 0 0 1px var(--line-strong);
}

.panel {
    background: linear-gradient(165deg, rgba(24, 17, 47, .62), rgba(10, 7, 22, .78));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    margin-bottom: 22px;
}

.panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.panel__head h2 { font-size: 1.3rem; margin: 0; }
.panel__head p { margin: 4px 0 0; font-size: .87rem; color: var(--silver-400); }

.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: clamp(1.7rem, 4vw, 2.35rem); margin-bottom: .18em; }
.page-head p { color: var(--silver-400); margin: 0; }

.console-out {
    background: #05030d;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 15px 17px;
    font-family: Consolas, "SFMono-Regular", monospace;
    font-size: .84rem;
    color: #a5f3c4;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 340px;
    overflow: auto;
}

/* Character tiles */
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }

.char-tile {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px;
    background: rgba(9, 6, 20, .62);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color .22s ease, transform .22s ease;
}
.char-tile:hover { border-color: var(--line-strong); transform: translateY(-2px); }

.char-tile__icons { display: flex; gap: 4px; flex-shrink: 0; }
.char-tile__icons img { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--line); }
.char-tile__name { font-weight: 700; color: var(--silver-100); font-size: .95rem; }
.char-tile__meta { font-size: .78rem; color: var(--silver-400); }

/* ------------------------------------------------ 16. Footer ------ */
.footer {
    position: relative;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(8, 6, 20, .5), rgba(5, 3, 13, .95));
    padding: 62px 0 26px;
    margin-top: 40px;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 36px;
    margin-bottom: 40px;
}

.footer h4 {
    font-family: var(--font-body);
    font-size: .74rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--silver-400);
    margin-bottom: 15px;
    font-weight: 700;
}

.footer__links li { margin-bottom: 9px; }
.footer__links a { color: var(--silver-300); font-size: .9rem; }
.footer__links a:hover { color: var(--arcane-200); }

.footer__brand { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }
.footer__brand img { width: 52px; filter: drop-shadow(0 0 14px rgba(124, 58, 237, .55)); }
.footer__about { color: var(--silver-400); font-size: .89rem; max-width: 42ch; }

.socials { display: flex; gap: 9px; margin-top: 16px; }

.socials a {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(13, 9, 26, .6);
    color: var(--silver-300);
    transition: all .22s ease;
}
.socials a:hover {
    color: #fff;
    border-color: var(--arcane-400);
    background: rgba(124, 58, 237, .22);
    transform: translateY(-2px);
}
.socials svg { width: 18px; height: 18px; }

.footer__bottom {
    padding-top: 22px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    font-size: .82rem;
    color: var(--silver-500);
}

.footer__legal { max-width: 74ch; font-size: .78rem; line-height: 1.6; }

/* ------------------------------------------------ 17. Misc -------- */
.to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: rgba(13, 9, 26, .86);
    color: var(--arcane-200);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all .28s ease;
    z-index: 800;
    cursor: pointer;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--arcane-400); color: #fff; background: rgba(124, 58, 237, .3); }
.to-top svg { width: 19px; height: 19px; }

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s cubic-bezier(.22, .61, .36, 1), transform .7s cubic-bezier(.22, .61, .36, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

.divider-rune {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--arcane-400);
    margin: 0 auto 8px;
    max-width: 220px;
}
.divider-rune::before,
.divider-rune::after {
    content: "";
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, transparent, var(--line-strong));
}
.divider-rune::after { background: linear-gradient(90deg, var(--line-strong), transparent); }

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    place-items: center;
    padding: 20px;
    background: rgba(3, 2, 8, .78);
    backdrop-filter: blur(6px);
}
.modal.is-open { display: grid; }

.modal__box {
    width: min(420px, 100%);
    background: linear-gradient(165deg, rgba(30, 22, 58, .96), rgba(9, 6, 20, .98));
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-lg);
}

.modal__box h3 { font-size: 1.2rem; margin-bottom: 18px; }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 1100;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    background: var(--arcane-500);
    color: #fff;
    font-weight: 700;
    transition: top .2s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ------------------------------------------------ 18. Responsive -- */
@media (max-width: 1080px) {
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 960px) {
    .hero__grid { grid-template-columns: 1fr; gap: 34px; text-align: center; }
    .hero__lede { margin-left: auto; margin-right: auto; }
    .hero__cta { justify-content: center; }
    .realmlist-box { margin: 0 auto; }
    .hero__art { order: -1; }
    .hero__art img { width: min(300px, 62%); }
    .hero__art::before { width: min(300px, 62%); }
    .panel-layout { grid-template-columns: 1fr; }
    .side-nav { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
    .side-nav__title { width: 100%; }
    .side-nav a { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 860px) {
    .nav__toggle { display: inline-flex; }

    .nav__links {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 14px;
        background: rgba(8, 6, 20, .97);
        border-bottom: 1px solid var(--line-strong);
        backdrop-filter: blur(18px);
        box-shadow: var(--shadow-lg);
        display: none;
    }

    .nav__links.is-open { display: flex; }
    .nav__links a { padding: 13px 16px; font-size: .95rem; }
    .nav__links a::after { display: none; }
    .nav__links a.is-active { background: rgba(124, 58, 237, .2); border-radius: var(--radius-sm); }
    .nav__actions .btn span.hide-sm { display: none; }
}

@media (max-width: 640px) {
    .section { padding: 66px 0; }
    .wrap { padding: 0 16px; }
    .card { padding: 20px; }
    .panel { padding: 20px; }
    .auth-card { padding: 28px 22px; }
    .footer__grid { grid-template-columns: 1fr; }
    .brand__sub { display: none; }
    .brand__name { font-size: .95rem; }
    .stat__value { font-size: 1.55rem; }
    .nav__inner { gap: 10px; padding: 0 14px; }
    .btn--sm { padding: 8px 12px; }
}

/* Below this the wordmark stops fitting next to the menu and the two
   buttons, so the logo mark carries the brand on its own. */
@media (max-width: 480px) {
    .brand__name { display: none; }
    .brand img { width: 38px; height: 38px; }
    .nav__actions .btn { font-size: .78rem; padding: 8px 11px; }
}

@media (max-width: 420px) {
    .hero__cta .btn { width: 100%; }
    .realmlist-box { flex-wrap: wrap; padding: 12px; }
    .realmlist-box > div { flex-basis: 100%; }
    .realmlist-box .btn { width: 100%; }
}

/* ------------------------------------------------ 19. Print ------- */
@media print {
    .nav, .footer, .to-top, .cosmos, .aurora { display: none !important; }
    body { background: #fff; color: #000; }
}
