/* ===========================================================================
   PokeMonster - Design System
   Tema escuro, glassmorphism, gradientes. Sem dependencias externas.
   ========================================================================= */

/* ------------------------------- TOKENS --------------------------------- */
:root {
    --bg:            #070912;
    --bg-soft:       #0b0f1e;
    --surface:       rgba(12, 14, 26, .44);
    --surface-2:     rgba(255, 255, 255, .085);
    --surface-3:     rgba(255, 255, 255, .13);
    --border:        rgba(255, 255, 255, .09);
    --border-strong: rgba(255, 255, 255, .18);

    --text:          #eef1fb;
    --muted:         #b3bdd8;
    --dim:           #8f99bb;

    --primary:       #c026ff;
    --primary-2:     #e879ff;
    --primary-deep:  #7413bd;
    --cyan:          #28a8ff;
    --green:         #34d399;
    --red:           #fb7185;
    --gold:          #fbbf24;
    --silver:        #cbd5e1;
    --bronze:        #e08c3c;

    --radius:        18px;
    --radius-sm:     11px;
    --radius-xs:     8px;
    --shadow:        0 22px 50px -22px rgba(0, 0, 0, .9);
    --shadow-sm:     0 10px 24px -14px rgba(0, 0, 0, .8);
    --ring:          0 0 0 3px rgba(124, 92, 255, .28);

    --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

/* -------------------------------- RESET --------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    /* Paisagem PokeFiB em tela cheia com contraste para os paineis. */
    background-image:
        linear-gradient(180deg, rgba(4, 7, 20, .35) 0%, rgba(4, 7, 20, .56) 48%, rgba(4, 7, 20, .82) 100%),
        url("../img/bg/pokefib-rain.png");
    background-size: auto, cover;
    background-position: center top, center top;
    background-repeat: no-repeat, no-repeat;
    background-attachment: fixed, fixed;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--primary-2); text-decoration: none; transition: color .18s ease; }
a:hover { color: #fff; }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
p { margin: 0 0 1em; }

::selection { background: rgba(124, 92, 255, .38); }

/* Abertura da primeira visita da sessão */
.site-intro[hidden] { display: none; }
.site-intro {
    position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center;
    overflow: hidden; isolation: isolate; color: #f7f3ff;
    background:
        radial-gradient(ellipse at 50% 45%, rgba(65, 22, 122, .38), transparent 48%),
        linear-gradient(145deg, #050611 0%, #0b0b20 55%, #080614 100%);
    animation: introBackdropIn .35s ease both;
}
.site-intro.is-leaving { animation: introBackdropOut .55s cubic-bezier(.65, 0, .35, 1) both; pointer-events: none; }
.site-intro__content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; width: min(90vw, 560px); text-align: center; }
.site-intro__eyebrow { color: #c9b7f8; font-size: .78rem; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; animation: introRise .65s .08s both; }
.site-intro__logo { width: min(76vw, 390px); height: auto; margin: 18px 0 4px; filter: drop-shadow(0 0 22px rgba(191, 38, 255, .42)); animation: introLogoIn .9s cubic-bezier(.18, .8, .22, 1) both; }
.site-intro__tagline { margin: 12px 0 24px; color: #d2d5ef; font-size: clamp(.95rem, 2.8vw, 1.13rem); letter-spacing: .04em; animation: introRise .65s .32s both; }
.site-intro__loading { width: 132px; height: 3px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .13); animation: introRise .65s .4s both; }
.site-intro__loading span { display: block; width: 42%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #9d39ff, #42d7ff); box-shadow: 0 0 14px rgba(192, 38, 255, .8); animation: introLoad 1.45s ease-in-out infinite; }
.site-intro__skip { margin-top: 22px; padding: 7px 12px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 99px; color: #b9bad0; background: rgba(255, 255, 255, .035); font: inherit; font-size: .76rem; cursor: pointer; animation: introRise .65s .48s both; }
.site-intro__skip:hover, .site-intro__skip:focus-visible { color: #fff; border-color: rgba(213, 123, 255, .7); outline: none; }
.site-intro__glow { position: absolute; z-index: -1; width: min(65vw, 650px); aspect-ratio: 1; border: 1px solid rgba(192, 38, 255, .17); border-radius: 50%; box-shadow: 0 0 70px rgba(124, 45, 207, .1), inset 0 0 70px rgba(46, 100, 255, .08); animation: introOrbit 22s linear infinite; }
.site-intro__glow::before, .site-intro__glow::after { position: absolute; inset: 10%; border: 1px solid rgba(56, 189, 248, .14); border-radius: 50%; content: ''; }
.site-intro__glow::after { inset: 22%; border-color: rgba(232, 121, 255, .12); }
.site-intro__glow--one { top: -38%; left: -25%; }
.site-intro__glow--two { right: -28%; bottom: -46%; width: min(72vw, 720px); animation-direction: reverse; animation-duration: 30s; }
@keyframes introBackdropIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes introBackdropOut { to { opacity: 0; visibility: hidden; } }
@keyframes introLogoIn { 0% { opacity: 0; transform: translateY(20px) scale(.82); filter: drop-shadow(0 0 0 rgba(191, 38, 255, 0)); } 65% { opacity: 1; transform: translateY(-3px) scale(1.03); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes introRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes introLoad { from { transform: translateX(-110%); } to { transform: translateX(340%); } }
@keyframes introOrbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .site-intro, .site-intro *, .site-intro::before, .site-intro::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #0a0d1a; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary-deep), var(--primary));
    border-radius: 99px;
    border: 2px solid #0a0d1a;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary-2); }

/* ------------------------------ LAYOUT ---------------------------------- */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.container-narrow { max-width: 780px; }

.main { padding: 34px 0 70px; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }

.section { margin-bottom: 34px; }
.section-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; margin-bottom: 16px; flex-wrap: wrap;
}
.section-head h2 { margin: 0; font-size: 1.28rem; display: flex; align-items: center; gap: 10px; }
.section-head h2 .dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--primary); box-shadow: 0 0 12px var(--primary);
}
.section-sub { color: var(--muted); font-size: .88rem; margin: -6px 0 0; }

/* ------------------------------- HEADER --------------------------------- */
.navbar {
    position: sticky; top: 0; z-index: 60;
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    background: rgba(7, 9, 18, .72);
    border-bottom: 1px solid var(--border);
}
.navbar-inner {
    display: flex; align-items: center; gap: 22px;
    height: 68px; max-width: 1180px; margin: 0 auto; padding: 0 22px;
}

.brand { display: flex; align-items: center; gap: 11px; color: var(--text); font-weight: 800; letter-spacing: -.03em; font-size: 1.16rem; }
.brand:hover { color: #fff; }
.brand-text small { display: block; font-size: .62rem; font-weight: 600; letter-spacing: .16em; color: var(--dim); text-transform: uppercase; }

/* Pokebola desenhada em CSS puro */
.pokeball {
    position: relative; flex: 0 0 auto;
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(180deg, #ff5670 0%, #ff5670 47%, #10131f 47%, #10131f 53%, #f4f6ff 53%, #f4f6ff 100%);
    border: 2.5px solid #10131f;
    box-shadow: 0 0 18px rgba(124, 92, 255, .5);
}
.pokeball::after {
    content: ""; position: absolute; left: 50%; top: 50%;
    width: 12px; height: 12px; margin: -7px 0 0 -7px;
    border-radius: 50%; background: #f4f6ff; border: 2.5px solid #10131f;
}

.nav-links { display: flex; align-items: center; gap: 3px; margin-left: auto; }
.nav-links a {
    position: relative;
    padding: 9px 13px; border-radius: var(--radius-xs);
    color: var(--muted); font-weight: 600; font-size: .88rem;
    transition: background .18s ease, color .18s ease;
}
.nav-links a:hover { background: var(--surface-2); color: var(--text); }
.nav-links a.active { color: #fff; background: var(--surface-2); }
.nav-links a.active::after {
    content: ""; position: absolute; left: 13px; right: 13px; bottom: 3px;
    height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--primary), var(--cyan));
}
.nav-actions { display: flex; align-items: center; gap: 9px; }

.nav-toggle {
    display: none; margin-left: auto;
    background: var(--surface-2); border: 1px solid var(--border);
    color: var(--text); width: 42px; height: 40px; border-radius: var(--radius-xs);
    font-size: 1.2rem; cursor: pointer;
}

/* -------------------------------- HERO ---------------------------------- */
.hero {
    position: relative; overflow: hidden;
    padding: 10px 0 52px;
    margin-top: -24px;
    border-bottom: 1px solid var(--border);
}
.hero::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(560px 320px at 22% 12%, rgba(124, 92, 255, .30), transparent 70%),
        radial-gradient(520px 300px at 82% 30%, rgba(34, 211, 238, .18), transparent 70%);
    pointer-events: none;
}
.hero-inner { position: relative; max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.hero h1 {
    font-size: clamp(2.1rem, 5.4vw, 3.5rem);
    margin-bottom: 10px;
    background: linear-gradient(100deg, #fff 8%, var(--primary-2) 52%, var(--cyan) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.hero p.lead { color: var(--muted); font-size: 1.06rem; max-width: 620px; margin-bottom: 26px; }
/* Texto que fica direto sobre a foto de fundo ganha sombra para nao perder o contraste. */
.hero p.lead, .hero .eyebrow,
.section-head h2, .section-head .muted,
.breadcrumb, .page-head h1, .page-head p {
    text-shadow: 0 2px 14px rgba(4, 3, 12, .82), 0 1px 3px rgba(4, 3, 12, .6);
}
/* O h1 do hero usa background-clip:text (fill transparente), entao text-shadow
   vazaria por tras das letras. drop-shadow desenha a sombra na silhueta certa. */
.hero h1 { filter: drop-shadow(0 3px 16px rgba(4, 3, 12, .9)) drop-shadow(0 1px 3px rgba(4, 3, 12, .7)); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
    gap: 28px; align-items: center; margin-top: 26px;
}
.hero-layout .gallery-wrap { max-width: 820px; width: 100%; }
.hero-side { display: flex; flex-direction: column; gap: 12px; }
.hero-side .btn { width: 100%; }
.hero-gallery { margin: 0; }

/* -------------------------------- CARDS --------------------------------- */
.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
}
.card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 17px 20px; border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent);
}
.card-head h3 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: 9px; }
.card-body { padding: 20px; }
.card-body.tight { padding: 12px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); background: rgba(0, 0, 0, .18); }

.card-hover { transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.card-hover:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
}

/* ------------------------------- STATS ---------------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat {
    padding: 18px 20px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border);
    position: relative; overflow: hidden;
}
.stat::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--cyan));
}
.stat-label { font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.stat-value { font-size: 1.85rem; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; }
.stat-value small { font-size: .8rem; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.stat-sub { font-size: .78rem; color: var(--muted); margin-top: 2px; }

/* -------------------------------- TABLES -------------------------------- */
.table-wrap { overflow-x: auto; }
table.rank { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.rank th {
    text-align: left; padding: 11px 14px;
    font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--dim); font-weight: 700; white-space: nowrap;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, .2);
}
table.rank td { padding: 11px 14px; border-bottom: 1px solid rgba(255, 255, 255, .045); vertical-align: middle; }
table.rank tbody tr { transition: background .16s ease; }
table.rank tbody tr:hover { background: var(--surface-2); }
table.rank tbody tr:last-child td { border-bottom: 0; }
table.rank .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.rank .center { text-align: center; }

.rank-pos {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 30px; height: 30px; padding: 0 8px;
    border-radius: 9px; font-weight: 800; font-size: .82rem;
    background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.rank-pos.p1 { background: linear-gradient(140deg, #fbbf24, #f59e0b); color: #25180a; border-color: transparent; box-shadow: 0 0 16px rgba(251, 191, 36, .35); }
.rank-pos.p2 { background: linear-gradient(140deg, #e6ecf7, #aab6cc); color: #1a2233; border-color: transparent; }
.rank-pos.p3 { background: linear-gradient(140deg, #e08c3c, #b56a1f); color: #2a1808; border-color: transparent; }

.p-name { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.p-name a { color: var(--text); }
.p-name a:hover { color: var(--primary-2); }

/* ------------------------------- AVATAR --------------------------------- */
.avatar {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 11px;
    font-weight: 800; font-size: .78rem; letter-spacing: .02em;
    color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
    border: 1px solid rgba(255, 255, 255, .16);
    background: linear-gradient(140deg, hsl(var(--h, 265), 68%, 52%), hsl(calc(var(--h, 265) + 42), 72%, 38%));
}
.avatar-lg { width: 84px; height: 84px; border-radius: 22px; font-size: 1.7rem; }
.avatar-sm { width: 28px; height: 28px; border-radius: 9px; font-size: .65rem; }
.avatar-xl { width: 74px; height: 74px; border-radius: 20px; font-size: 1.5rem; }

/* Avatar pelo looktype (outfit) do personagem. */
img.avatar { object-fit: contain; padding: 2px; background: var(--surface-2); }
img.avatar-sprite { image-rendering: pixelated; }

/* Brasao da guilda (23 emblemas do cliente). */
.guild-emblem {
    flex: 0 0 auto; object-fit: contain;
    padding: 4px; border-radius: 16px;
    background: linear-gradient(150deg, rgba(255, 255, 255, .10), rgba(0, 0, 0, .38));
    border: 1px solid var(--border-strong);
    box-shadow: 0 10px 26px -14px rgba(0, 0, 0, .95);
}
.guild-emblem.lg { width: 78px; height: 78px; }
.guild-emblem.sm { width: 30px; height: 30px; padding: 2px; border-radius: 9px; box-shadow: none; }
.guild-emblem.xs { width: 20px; height: 20px; padding: 1px; border-radius: 6px; box-shadow: none; vertical-align: -5px; }

/* ------------------------------- BADGES --------------------------------- */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 99px;
    font-size: .7rem; font-weight: 700; letter-spacing: .04em;
    background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
    white-space: nowrap;
}
.badge-primary { background: rgba(124, 92, 255, .16); color: var(--primary-2); border-color: rgba(124, 92, 255, .34); }
.badge-cyan    { background: rgba(34, 211, 238, .14); color: var(--cyan);     border-color: rgba(34, 211, 238, .32); }
.badge-green   { background: rgba(52, 211, 153, .14); color: var(--green);    border-color: rgba(52, 211, 153, .32); }
.badge-gold    { background: rgba(251, 191, 36, .14); color: var(--gold);     border-color: rgba(251, 191, 36, .32); }
.badge-red     { background: rgba(251, 113, 133, .14); color: var(--red);    border-color: rgba(251, 113, 133, .32); }
.badge-muted   { background: var(--surface-2); color: var(--dim); border-color: var(--border); }

.dot-online {
    width: 8px; height: 8px; border-radius: 50%; background: var(--green);
    box-shadow: 0 0 9px var(--green); flex: 0 0 auto;
    animation: pulse 2.2s ease-in-out infinite;
}
.dot-offline { width: 8px; height: 8px; border-radius: 50%; background: #4b5570; flex: 0 0 auto; }

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

/* ------------------------------- BUTTONS -------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: var(--radius-sm);
    font-family: var(--font); font-size: .89rem; font-weight: 700; letter-spacing: .01em;
    border: 1px solid transparent; cursor: pointer;
    text-decoration: none; white-space: nowrap;
    transition: transform .16s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
    color: #fff;
    box-shadow: 0 12px 26px -12px rgba(124, 92, 255, .95);
}
.btn-primary:hover { color: #fff; box-shadow: 0 16px 34px -12px rgba(124, 92, 255, 1); transform: translateY(-1px); }
.btn-ghost {
    background: var(--surface-2); color: var(--text); border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface-3); color: #fff; border-color: var(--border-strong); }
.btn-outline {
    background: transparent; color: var(--primary-2); border-color: rgba(124, 92, 255, .45);
}
.btn-outline:hover { background: rgba(124, 92, 255, .14); color: #fff; }
.btn-danger { background: rgba(251, 113, 133, .14); color: var(--red); border-color: rgba(251, 113, 133, .34); }
.btn-danger:hover { background: rgba(251, 113, 133, .24); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .8rem; border-radius: var(--radius-xs); }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Foco visivel (acessibilidade de teclado) */
.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-2);
    outline-offset: 2px;
}

/* Brilho no topo deixa o clique mais "tactil" (sem pseudo-elemento sobre o texto) */
.btn-primary {
    box-shadow: 0 12px 26px -12px rgba(124, 92, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-primary:hover {
    box-shadow: 0 16px 34px -12px rgba(124, 92, 255, 1), inset 0 1px 0 rgba(255, 255, 255, .32);
}
.btn-danger {
    background: linear-gradient(135deg, rgba(251, 113, 133, .20), rgba(190, 40, 70, .16));
    box-shadow: 0 10px 24px -14px rgba(251, 113, 133, .8);
}
.btn-danger:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 14px 28px -14px rgba(251, 113, 133, .95); }
.btn-outline { backdrop-filter: blur(6px); }
.btn-outline:hover { border-color: var(--primary); transform: translateY(-1px); }
.btn-ghost:hover { transform: translateY(-1px); }
.btn:disabled:hover, .btn[disabled]:hover { transform: none; }

/* -------------------------------- FORMS --------------------------------- */
.form-group { margin-bottom: 17px; }
.form-group label {
    display: block; margin-bottom: 7px;
    font-size: .78rem; font-weight: 700; letter-spacing: .07em;
    text-transform: uppercase; color: var(--muted);
}
.form-control,
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
    width: 100%; padding: 12px 14px;
    font-family: var(--font); font-size: .93rem; color: var(--text);
    background: rgba(0, 0, 0, .32);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
    outline: none;
}
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, select:focus, textarea:focus {
    border-color: var(--primary); background: rgba(0, 0, 0, .45); box-shadow: var(--ring);
}
select { cursor: pointer; appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
    background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
    padding-right: 38px;
}
select option { background: #121728; color: var(--text); }
.form-hint { font-size: .78rem; color: var(--dim); margin-top: 6px; }
.form-error { font-size: .8rem; color: var(--red); margin-top: 6px; font-weight: 600; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 22px; }

/* ------------------------------- ALERTS --------------------------------- */
.alert {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 13px 16px; margin-bottom: 18px;
    border-radius: var(--radius-sm); font-size: .89rem;
    border: 1px solid var(--border); background: var(--surface);
}
.alert::before { font-size: 1rem; line-height: 1.3; flex: 0 0 auto; }
.alert-success { background: rgba(52, 211, 153, .10); border-color: rgba(52, 211, 153, .32); color: #b8f5dd; }
.alert-success::before { content: "OK"; font-weight: 800; font-size: .72rem; color: var(--green); }
.alert-error { background: rgba(251, 113, 133, .10); border-color: rgba(251, 113, 133, .32); color: #ffd3da; }
.alert-error::before { content: "!"; font-weight: 800; color: var(--red); }
.alert-warning { background: rgba(251, 191, 36, .10); border-color: rgba(251, 191, 36, .30); color: #ffe9b8; }
.alert-warning::before { content: "!"; font-weight: 800; color: var(--gold); }
.alert-info { background: rgba(34, 211, 238, .10); border-color: rgba(34, 211, 238, .30); color: #c4f4fd; }
.alert-info::before { content: "i"; font-weight: 800; color: var(--cyan); }

/* -------------------------------- MISC ---------------------------------- */
.empty { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty-icon { font-size: 2.4rem; margin-bottom: 10px; opacity: .4; }
.empty h4 { color: var(--text); margin-bottom: 6px; }
.empty p { margin: 0 0 16px; font-size: .9rem; }

.kv { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); font-size: .9rem; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 650; text-align: right; }

.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-gold { color: var(--gold); }
.text-cyan { color: var(--cyan); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mt-2 { margin-top: 20px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.flex-center { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 22px; }
.text-right { text-align: right; }
.mt-1 { margin-top: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 13px; border-radius: 99px; font-size: .82rem; font-weight: 600;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
    transition: all .18s ease;
}
a.chip:hover { color: #fff; border-color: var(--border-strong); background: var(--surface-3); }
.chip.active { color: #fff; background: rgba(124, 92, 255, .20); border-color: rgba(124, 92, 255, .45); }

/* -------------------------------- FOOTER -------------------------------- */
.footer {
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, .28);
    padding: 40px 0 26px; margin-top: 40px;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 30px; margin-bottom: 28px; }
.footer h4 { font-size: .78rem; letter-spacing: .13em; text-transform: uppercase; color: var(--dim); margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer a { color: var(--muted); font-size: .89rem; }
.footer a:hover { color: var(--primary-2); }
.footer-legal { max-width: 1060px; margin: 0 auto 24px; padding: 16px 18px; color: #aeb9d6; font-size: .78rem; line-height: 1.7; text-align: center; border: 1px solid rgba(93, 116, 189, .25); border-radius: 12px; background: rgba(5, 9, 25, .7); }
.footer-status {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: max-content; margin: 0 auto 22px;
    padding: 6px 16px; border-radius: 99px;
    font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--primary-2);
    background: rgba(124, 92, 255, .12);
    border: 1px solid rgba(124, 92, 255, .32);
}
.footer-status [data-server-label] { font-weight: 700; }
.footer-status [data-server-dot].is-offline { background: var(--red); box-shadow: 0 0 8px rgba(251, 113, 133, .45); }
.footer-bottom {
    display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    padding-top: 22px; border-top: 1px solid var(--border);
    font-size: .82rem; color: var(--dim);
}

/* ------------------------------ ANIMATION ------------------------------- */
.fade-up { animation: fadeUp .5s cubic-bezier(.22, .8, .3, 1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ----------------------------- RESPONSIVE ------------------------------- */
@media (max-width: 980px) {
    .grid-main { grid-template-columns: minmax(0, 1fr); }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .container-narrow { max-width: 100%; }
    .hero-layout { grid-template-columns: minmax(0, 1fr); }
    .hero-side { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .hero-side .btn { width: auto; min-width: 170px; }
}

@media (max-width: 760px) {
    .navbar-inner { flex-wrap: wrap; height: auto; padding: 12px 20px; }
    .nav-toggle { display: block; }
    .nav-links {
        order: 3; width: 100%; margin: 0;
        flex-direction: column; align-items: stretch; gap: 2px;
        max-height: 0; overflow: hidden;
        transition: max-height .3s ease, padding .3s ease;
    }
    .nav-links.open { max-height: 460px; padding: 10px 0 4px; }
    .nav-links a { padding: 12px 14px; }
    .nav-links a.active::after { display: none; }
    .nav-actions { order: 2; margin-left: 0; }
    .nav-actions .btn { padding: 8px 13px; font-size: .8rem; }
    .nav-links .nav-mobile-actions { display: flex; flex-direction: column; gap: 8px; padding: 12px 0 4px; border-top: 1px solid var(--border); margin-top: 8px; }

    .hero { padding: 46px 0 40px; }
    .grid-2, .grid-3, .grid-4, .stat-grid, .form-row { grid-template-columns: minmax(0, 1fr); }
    .poke-grid { grid-template-columns: minmax(0, 1fr); }
    .gallery-stage { border-radius: var(--radius-sm); }
    .gallery-nav { width: 40px; height: 40px; font-size: 1.2rem; }
    .gallery-nav.prev { left: 8px; }
    .gallery-nav.next { right: 8px; }
    .gallery-counter { right: 8px; bottom: 8px; }
    .gallery-bar { flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px; }
    .gallery-thumb { width: 78px; }
    .gallery-desc-inner { padding: 22px 16px 16px; }
    .gallery-desc p { font-size: .86rem; }
    .gal-item > summary { flex-wrap: wrap; }
    .gal-item-tags { justify-content: flex-start; }
    .gal-actions .btn-danger { margin-left: 0; }
    .gal-foot { flex-direction: column; align-items: stretch; }
    .gal-foot .btn { width: 100%; }
    .footer-grid { grid-template-columns: minmax(0, 1fr); }
    .card-body { padding: 16px; }
    .stat-value { font-size: 1.55rem; }
}

@media (min-width: 761px) { .nav-links .nav-mobile-actions { display: none; } }

/* ------------------------------- LOGO ----------------------------------- */
.brand-logo {
    width: 42px; height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    filter: drop-shadow(0 4px 14px rgba(124, 58, 237, .45));
    transition: transform .25s ease, filter .25s ease;
}
.brand:hover .brand-logo {
    transform: translateY(-1px) rotate(-3deg) scale(1.04);
    filter: drop-shadow(0 6px 18px rgba(34, 211, 238, .5));
}
.hero-logo {
    width: 92px; height: 92px;
    margin: 0 auto 18px;
    display: block;
    filter: drop-shadow(0 12px 34px rgba(124, 58, 237, .5));
    animation: floaty 5s ease-in-out infinite;
}
@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

.card-body-tight { padding: 0; }

/* ------------------------------- ABAS ----------------------------------- */
.tabs {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 6px; margin-bottom: 22px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.tabs a {
    flex: 1 1 auto; text-align: center;
    padding: 11px 16px; border-radius: var(--radius-xs);
    color: var(--muted); font-weight: 650; font-size: .88rem;
    transition: background .18s ease, color .18s ease;
}
.tabs a:hover { background: var(--surface-2); color: var(--text); }
.tabs a.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fff; box-shadow: 0 8px 22px -10px rgba(124, 92, 255, .9);
}

/* ------------------------- CARDS DE ESCOLHA ----------------------------- */
.choice-grid {
    display: grid; gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.choice {
    position: relative; display: block; cursor: pointer;
    padding: 16px 14px; text-align: center;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.choice:hover { background: var(--surface-2); border-color: var(--border-strong); transform: translateY(-2px); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .choice-title { font-weight: 700; font-size: .92rem; }
.choice .choice-sub { color: var(--dim); font-size: .76rem; margin-top: 3px; }
.choice .choice-icon {
    width: 46px; height: 46px; margin: 0 auto 10px;
    display: grid; place-items: center;
    border-radius: 13px; font-size: 1.15rem; font-weight: 800;
    background: linear-gradient(135deg, rgba(124, 92, 255, .28), rgba(34, 211, 238, .22));
    border: 1px solid var(--border-strong);
}
.choice:has(input:checked) {
    border-color: var(--primary);
    background: linear-gradient(160deg, rgba(124, 92, 255, .20), rgba(34, 211, 238, .10));
    box-shadow: var(--ring);
}
.choice:has(input:checked)::after {
    content: "\2713";
    position: absolute; top: 8px; right: 10px;
    color: var(--primary-2); font-weight: 800; font-size: .95rem;
}

/* ------------------------- CARDS DE PERSONAGEM -------------------------- */
.char-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }
.char-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.char-card:has(.char-card-top > img.avatar-sprite) { margin-top: 22px; overflow: visible; }
/* Reserva o espaco de 6 pokemons para o botao ficar na mesma altura em todos os
   cards (personagem com 1, 6 ou nenhum pokemon). O rotulo acima da lista e
   sempre renderizado, entao reservar na lista basta.
   align-content/items: flex-start impedem que a pill estique ate a altura
   reservada quando o personagem tem so 1 pokemon (sem isso ela fica com 274px). */
.char-card .poke-list { min-height: 274px; align-content: flex-start; align-items: flex-start; }
/* O botao desce para o fim da area reservada. */
.char-card .char-actions { margin-top: auto; }
/* ------------------------- AREA DE EXCLUSAO ----------------------------- */
/* Fica abaixo da lista de personagens, separada da grade. */
.danger-zone { border-color: rgba(251, 113, 133, .34); margin-top: 22px; }
.danger-zone > summary {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 15px 18px; cursor: pointer; list-style: none;
    transition: background .16s ease;
}
.danger-zone > summary::-webkit-details-marker { display: none; }
.danger-zone > summary:hover { background: rgba(251, 113, 133, .08); }
.danger-zone[open] > summary { border-bottom: 1px solid var(--border); }
.danger-zone-title { font-weight: 750; font-size: 1rem; color: var(--red); }
.danger-list { display: grid; gap: 10px; }
.danger-row {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    flex-wrap: wrap; padding: 10px 14px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.char-card-top { display: flex; align-items: center; gap: 14px; }
.char-card-top:has(> img.avatar-sprite) { position: relative; min-height: 60px; padding-left: 84px; gap: 10px; }
.char-card-top > img.avatar-sprite { position: absolute; z-index: 2; left: 0; top: -38px; width: 82px; height: 82px; padding: 0; border: 0; border-radius: 0; background: transparent; filter: drop-shadow(0 0 10px rgba(52, 133, 255, .48)) drop-shadow(0 0 7px rgba(207, 54, 255, .28)); }
.char-card-top > div { min-width: 0; }
.char-card-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.char-card-name { font-weight: 750; font-size: 1.02rem; line-height: 1.2; }
.char-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; }
.char-meta .k { color: var(--dim); font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; font-weight: 700; }
.char-meta .v { font-family: var(--mono); font-size: .87rem; }
.char-actions { display: flex; gap: 9px; }
.char-actions .btn { flex: 1 1 auto; }

/* ---------------------------- LISTA DE POKEMONS ------------------------- */
.poke-list { display: flex; flex-wrap: wrap; gap: 8px; }
.poke-pill {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 12px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--border);
    font-size: .83rem; font-weight: 600;
    /* Nao encolhe nem quebra: nome longo nao deixa o balao maior que os outros. */
    flex: 0 0 auto; white-space: nowrap;
}
.poke-pill.shiny {
    border-color: rgba(251, 191, 36, .5);
    background: linear-gradient(135deg, rgba(251, 191, 36, .18), rgba(251, 191, 36, .04));
    color: var(--gold);
}
.poke-pill .lvl { font-family: var(--mono); font-size: .74rem; color: var(--dim); }
.poke-sprite-wrap { position: relative; display: inline-flex; }
/* A estrela do shiny fica sobre o sprite: destaca sem aumentar o balao. */
.poke-sprite-wrap.is-shiny::after {
    content: "\2605"; position: absolute; top: -5px; right: -4px;
    font-size: .62rem; line-height: 1; color: var(--gold);
    text-shadow: 0 0 8px rgba(251, 191, 36, .95), 0 1px 2px rgba(0, 0, 0, .95);
    pointer-events: none;
}
.poke-pill .boost {
    font-family: var(--mono); font-size: .72rem; color: var(--cyan);
    padding: 1px 6px; border-radius: 999px;
    background: rgba(34, 211, 238, .12); border: 1px solid rgba(34, 211, 238, .3);
}
.poke-pill .poke-sprite { margin-left: -4px; }

/* ------------------------------ FORM EXTRAS ----------------------------- */
.switch-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 14px 16px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.switch-row > div > strong { display: block; font-size: .92rem; }
.switch-row > div > span { color: var(--dim); font-size: .8rem; }
.field-check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; color: var(--muted); font-size: .87rem; }
.field-check input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }
.section-note {
    padding: 13px 16px; border-radius: var(--radius-sm);
    background: rgba(34, 211, 238, .07);
    border: 1px solid rgba(34, 211, 238, .22);
    color: var(--muted); font-size: .85rem;
}
.dl { display: grid; grid-template-columns: auto 1fr; gap: 9px 18px; margin: 0; font-size: .88rem; }
.dl dt { color: var(--dim); font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; font-weight: 700; align-self: center; }
.dl dd { margin: 0; font-family: var(--mono); text-align: right; }

/* --------------------------- BREADCRUMB --------------------------------- */
.breadcrumb {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: .82rem; color: var(--dim); margin-bottom: 20px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary-2); }
.breadcrumb > span { color: var(--dim); opacity: .7; }
.breadcrumb .now { color: var(--text); font-weight: 650; opacity: 1; }

/* ----------------------- PERFIL DO PERSONAGEM ---------------------------- */
.profile-hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(640px 320px at 88% -45%, rgba(124, 92, 255, .24), transparent 68%),
        radial-gradient(420px 260px at -8% 108%, rgba(34, 211, 238, .14), transparent 66%),
        var(--surface);
}
.profile-hero .hero-level {
    font-family: var(--mono); font-size: 2.15rem; font-weight: 800;
    line-height: 1; letter-spacing: -.03em; margin-top: 2px;
    background: linear-gradient(118deg, #fff 8%, var(--primary-2) 52%, var(--cyan) 100%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
}
.profile-stats {
    display: grid; gap: 12px; margin-top: 24px;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    padding-top: 22px; border-top: 1px solid var(--border);
}
.profile-stats .stat {
    padding: 13px 15px; border-radius: var(--radius-sm);
    background: var(--surface-2);
}
.profile-stats .stat .k {
    font-size: .68rem; letter-spacing: .11em; text-transform: uppercase;
    color: var(--dim); font-weight: 700;
}
.profile-stats .stat .v {
    font-family: var(--mono); font-size: 1.16rem; font-weight: 700;
    letter-spacing: -.02em; margin-top: 3px;
}

/* --------------------------- GRID DE POKEMONS ---------------------------- */
.poke-grid {
    display: grid; gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(182px, 1fr));
}
.poke-card {
    position: relative; overflow: hidden;
    padding: 15px 15px 14px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.poke-card::before {
    content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--cyan));
    opacity: .85;
}
.poke-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    background: var(--surface-2);
}
.poke-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.poke-ident { display: flex; align-items: center; gap: 9px; min-width: 0; }
.poke-sprite {
    flex: 0 0 auto; width: 40px; height: 30px;
    object-fit: contain; image-rendering: pixelated;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .55));
}
.poke-sprite.sm { width: 30px; height: 23px; filter: none; }
.poke-name { font-weight: 750; font-size: .96rem; letter-spacing: -.01em; }
.poke-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 13px; }
.poke-stats > div {
    display: flex; flex-direction: column; gap: 2px;
    padding: 8px 10px; border-radius: var(--radius-xs);
    background: rgba(0, 0, 0, .24); border: 1px solid var(--border);
}
.poke-stats .k { color: var(--dim); font-size: .64rem; letter-spacing: .11em; text-transform: uppercase; font-weight: 700; }
.poke-stats .v { font-family: var(--mono); font-size: .98rem; font-weight: 700; }
.poke-card.shiny {
    border-color: rgba(251, 191, 36, .45);
    background: linear-gradient(158deg, rgba(251, 191, 36, .13), rgba(251, 191, 36, .02));
}
.poke-card.shiny::before { background: linear-gradient(90deg, var(--gold), #fff3c4); }
.poke-card.shiny .poke-name { color: var(--gold); }

/* -------------- GALERIA: VISOR DE MIDIA + DESCRICAO SOBRE A MIDIA ------- */
.gallery { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }

.gallery-stage {
    position: relative; aspect-ratio: 16 / 9;
    background: #05070f; overflow: hidden;
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.gallery-media { position: absolute; inset: 0; }
.gallery-el {
    display: block; width: 100%; height: 100%;
    object-fit: cover; background: #05070f;
}
video.gallery-el { object-fit: contain; }

.gallery-kind {
    position: absolute; top: 14px; left: 14px; z-index: 5;
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .9);
}

.gallery-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 5; width: 52px; height: 52px; padding: 0 0 4px;
    display: grid; place-items: center; cursor: pointer;
    font-size: 1.6rem; line-height: 1; color: var(--text);
    background: rgba(7, 9, 18, .64); backdrop-filter: blur(9px);
    border: 1px solid var(--border-strong); border-radius: 50%;
    transition: background .18s ease, border-color .18s ease,
                color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.gallery-nav:hover {
    background: rgba(124, 92, 255, .38); border-color: var(--primary);
    color: #fff; box-shadow: var(--ring);
}
.gallery-nav:active { transform: translateY(-50%) scale(.93); }
.gallery-nav:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 3px; }
.gallery-nav.prev { left: 14px; }
.gallery-nav.next { right: 14px; }

.gallery-counter {
    position: absolute; right: 14px; bottom: 14px; z-index: 5;
    padding: 5px 12px; border-radius: 999px;
    font-size: .8rem; font-weight: 650; color: var(--muted);
    font-variant-numeric: tabular-nums;
    background: rgba(7, 9, 18, .72); backdrop-filter: blur(8px);
    border: 1px solid var(--border);
}
.gallery-counter b { color: var(--text); font-weight: 750; }

/* ---- Descricao: entra debaixo pra cima, por cima da midia ---- */
.gallery-desc {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
    max-height: 80%; overflow: hidden; pointer-events: none;
    transform: translateY(100%); opacity: 0;
    background: linear-gradient(180deg,
                rgba(5, 7, 15, 0) 0%,
                rgba(5, 7, 15, .82) 24%,
                rgba(5, 7, 15, .95) 100%);
    transition: transform .5s cubic-bezier(.22, .75, .25, 1), opacity .34s ease;
}
.gallery-desc-inner { padding: 30px 22px 20px; }
.gallery-desc h4 {
    margin: 0 0 6px; font-size: 1.02rem; color: #fff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .95);
}
.gallery-desc p {
    margin: 0; color: var(--text); font-size: .9rem; line-height: 1.62;
    white-space: pre-line; overflow-wrap: anywhere;
    text-shadow: 0 1px 10px rgba(0, 0, 0, .9);
}
/* No video a descricao para acima da barra de controles. */
.gallery-stage.is-video .gallery-desc { bottom: 46px; }

.gallery-stage:hover .gallery-desc,
.gallery-stage:focus-within .gallery-desc,
.gallery-stage.desc-aberta .gallery-desc { transform: translateY(0); opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    .gallery-desc { transition: opacity .2s ease; transform: none; }
}

.gallery-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 18px; padding: 16px 18px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius);
}
.gallery-info { min-width: 0; }
.gallery-info h3 { margin: 0 0 3px; font-size: 1.08rem; }
.gallery-info p { margin: 0; color: var(--dim); font-size: .88rem; }
.gallery-extra { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; flex-wrap: wrap; }

.gallery-thumbs {
    display: flex; gap: 10px; padding: 12px;
    overflow-x: auto; scroll-behavior: smooth;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); scrollbar-width: thin;
}
.gallery-thumbs::-webkit-scrollbar { height: 7px; }
.gallery-thumbs::-webkit-scrollbar-track { background: transparent; }
.gallery-thumbs::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 999px; }

.gallery-thumb {
    position: relative; flex: 0 0 auto; width: 106px; padding: 0;
    cursor: pointer; overflow: hidden; opacity: .55;
    background: #05070f; border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    transition: opacity .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.gallery-thumb img, .gallery-thumb .thumb-media {
    display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; pointer-events: none;
}
.gallery-thumb:hover { opacity: .86; transform: translateY(-2px); }
.gallery-thumb.active { opacity: 1; border-color: var(--primary); box-shadow: var(--ring); }
.thumb-play {
    position: absolute; inset: 0; display: grid; place-items: center;
    font-size: .95rem; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .95);
}
.thumb-play::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(5, 7, 15, .5), rgba(5, 7, 15, .08));
}

/* ------------ VISOR REDUZIDO (galeria da pagina inicial) ---------------- */
.gallery-wrap { max-width: 780px; margin: 0 auto; }

.gallery.is-compact { gap: 10px; }
.gallery.is-compact .gallery-bar { padding: 12px 14px; }
.gallery.is-compact .gallery-info h3 { font-size: 1rem; }
.gallery.is-compact .gallery-info p { font-size: .84rem; }
.gallery.is-compact .gallery-nav { width: 40px; height: 40px; font-size: 1.2rem; }
.gallery.is-compact .gallery-nav.prev { left: 10px; }
.gallery.is-compact .gallery-nav.next { right: 10px; }
.gallery.is-compact .gallery-kind { top: 10px; left: 10px; font-size: .72rem; }
.gallery.is-compact .gallery-counter { right: 10px; bottom: 10px; padding: 4px 10px; font-size: .76rem; }
.gallery.is-compact .gallery-thumbs { padding: 9px; gap: 8px; }
.gallery.is-compact .gallery-thumb { width: 84px; }
.gallery.is-compact .gallery-desc-inner { padding: 22px 16px 14px; }
.gallery.is-compact .gallery-desc h4 { font-size: .95rem; }
.gallery.is-compact .gallery-desc p { font-size: .85rem; line-height: 1.55; }
.gallery.is-compact .gallery-stage.is-video .gallery-desc { bottom: 44px; }

/* ---- Painel do administrador ---- */
.gal-upload { padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.gal-upload input[type="file"] { padding: 9px 12px; }
.gal-foot {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap; margin-top: 6px;
}
.gal-list { display: grid; gap: 12px; padding-top: 4px; }

.gal-item {
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); overflow: hidden;
}
.gal-item > summary {
    display: flex; align-items: center; gap: 14px; cursor: pointer;
    padding: 11px 14px; list-style: none; transition: background .16s ease;
}
.gal-item > summary::-webkit-details-marker { display: none; }
.gal-item > summary:hover { background: var(--surface-3); }
.gal-item[open] > summary { border-bottom: 1px solid var(--border); }
.gal-item-thumb {
    display: block; flex: 0 0 auto; width: 84px; overflow: hidden;
    background: #05070f; border: 1px solid var(--border); border-radius: var(--radius-xs);
}
.gal-item-thumb img, .gal-item-thumb .thumb-media {
    display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
}
.gal-item-main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.gal-item-main strong { font-size: .95rem; }
.gal-item-main .dim { font-size: .78rem; overflow-wrap: anywhere; }
.gal-item-tags {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 8px; flex-wrap: wrap; text-align: right;
}
.gal-item-body {
    display: grid; gap: 14px; padding: 16px 14px 14px;
    background: rgba(5, 7, 15, .34);
}
.gal-edit textarea { resize: vertical; min-height: 92px; }
.gal-actions {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding-top: 14px; border-top: 1px solid var(--border);
}
.gal-actions .btn-danger { margin-left: auto; }

@media print {
    .navbar, .footer, .hero-actions, .btn { display: none !important; }
    body { background: #fff; color: #000; }
}

/* -------------------- Home: neon trainer selection -------------------- */
body:has(.home-intro) { background-image: linear-gradient(180deg, rgba(4, 7, 20, .28) 0, rgba(4, 7, 20, 1) 88px, rgba(4, 7, 20, 1) 225px, rgba(4, 7, 20, .3) 370px, rgba(4, 7, 20, .7) 100%), url("../img/bg/pokefib-rain.png"); }
.navbar { background: rgba(5, 8, 21, .9); border-bottom-color: rgba(49, 137, 255, .28); }
.navbar-inner { max-width: 1600px; }
.brand-logo { width: clamp(118px, 12vw, 158px); height: 52px; flex: 0 0 auto; object-fit: contain; border-radius: 0; filter: drop-shadow(0 0 12px rgba(192, 38, 255, .45)); }
.nav-links { gap: 5px; }
.nav-links > a { border: 1px solid transparent; border-radius: 8px; padding: 9px 14px; }
.nav-links > a.active { color: #fff; border-color: rgba(57, 131, 255, .55); background: linear-gradient(135deg, rgba(156, 25, 255, .32), rgba(15, 39, 99, .35)); box-shadow: inset 0 0 18px rgba(62, 112, 255, .13), 0 0 18px rgba(151, 36, 255, .2); }
.nav-links > a.active::after { left: 10px; right: 10px; bottom: -2px; height: 2px; background: #ed4bff; box-shadow: 0 0 10px #d931ff; }
.main { padding-top: 24px; }
.hero { padding: 28px 0 42px; margin-top: -24px; border-bottom-color: rgba(88, 118, 255, .26); }
.hero::before { background: radial-gradient(ellipse at 54% 56%, rgba(24, 101, 255, .18), transparent 60%), linear-gradient(90deg, rgba(4, 7, 18, .48), transparent 48%, rgba(4, 7, 18, .42)); }
.hero-inner { max-width: 1600px; }
.home-intro { max-width: 840px; margin: 0 0 21px; }
.home-intro .eyebrow { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 8px; color: #9ebcff; font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; text-shadow: 0 2px 12px #050817; }
.home-intro .eyebrow .dot-online { width: 8px; height: 8px; }
.home-intro h1 { margin: 0; font-size: clamp(1.9rem, 3.5vw, 3.1rem); line-height: 1.06; letter-spacing: -.045em; color: #fff; -webkit-text-fill-color: #fff; background: none; filter: drop-shadow(0 3px 15px #02040d); }
.home-intro h1 span { color: #e85cff; -webkit-text-fill-color: #e85cff; }
.home-intro p { margin: 8px 0 0; color: #c2cbea; font-size: .96rem; text-shadow: 0 2px 10px #030611; }
.hero-layout { grid-template-columns: minmax(220px, .72fr) minmax(360px, 1.7fr) minmax(235px, .78fr); gap: 16px; align-items: stretch; margin-top: 0; }
.home-login-panel, .home-roster { min-width: 0; padding: 18px; border: 1px solid rgba(112, 104, 255, .55); border-radius: 14px; background: linear-gradient(145deg, rgba(8, 13, 39, .9), rgba(9, 9, 28, .82)); box-shadow: inset 0 0 25px rgba(106, 46, 223, .12), 0 14px 38px rgba(0, 0, 0, .38), 0 0 17px rgba(141, 46, 255, .1); backdrop-filter: blur(13px); }
.home-login-panel { justify-content: flex-start; gap: 10px; }
.home-login-panel .panel-kicker { color: #bf8aff; font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.home-login-panel h2 { margin: 0; color: #fff; font-size: 1.27rem; }
.home-login-panel > p { color: #aab6d4; font-size: .83rem; line-height: 1.45; margin: -3px 0 5px; }
.home-login-panel .btn { min-height: 47px; justify-content: center; border-radius: 9px; }
.home-login-panel .btn-primary { border: 1px solid #f057ff; background: linear-gradient(110deg, #8417c5, #d622ff 54%, #7923d2); box-shadow: 0 0 19px rgba(217, 34, 255, .38), inset 0 1px rgba(255,255,255,.25); }
.home-login-panel .btn-ghost { border-color: rgba(114, 148, 255, .34); background: rgba(15, 28, 67, .55); }
.home-panel-rule { height: 1px; margin: 5px 0 0; background: linear-gradient(90deg, transparent, rgba(130, 116, 255, .55), transparent); }
.home-download { min-height: 48px; display: flex; align-items: center; gap: 10px; color: #dce5ff; border-radius: 8px; padding: 7px 5px; }
.home-download:hover { background: rgba(100, 93, 255, .12); color: #fff; }
.home-link-icon { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; color: #e783ff; border: 1px solid rgba(195, 95, 255, .42); border-radius: 8px; background: rgba(147, 42, 224, .18); font-size: 1.1rem; }
.home-download b, .home-download small { display: block; line-height: 1.25; }
.home-download b { font-size: .82rem; }
.home-download small { color: #91a2cd; font-size: .67rem; margin-top: 3px; }
.home-link-arrow { margin-left: auto; color: #8ca9ff; font-size: 1.4rem; }
.hero-gallery { max-width: none !important; min-width: 0; display: flex; }
.hero-gallery .gallery, .hero-gallery .gallery-stage { width: 100%; height: 100%; }
.hero-gallery .gallery-stage { min-height: 330px; aspect-ratio: auto; border: 1px solid rgba(61, 153, 255, .72); border-radius: 14px; box-shadow: 0 0 25px rgba(28, 120, 255, .24), inset 0 0 30px rgba(22, 71, 181, .14); }
.hero-gallery .gallery-el { object-fit: cover; }
.hero-gallery .gallery-stage::after { background: linear-gradient(180deg, rgba(3, 7, 20, .08), transparent 44%, rgba(3, 7, 20, .6)); }
.home-roster { padding: 13px; }
.roster-head { display: flex; align-items: center; gap: 9px; padding: 2px 2px 12px; margin-bottom: 7px; border-bottom: 1px solid rgba(99, 120, 195, .32); }
.roster-icon { display: grid; place-items: center; width: 32px; height: 32px; color: #9fc4ff; border-radius: 8px; background: rgba(38, 110, 255, .18); }
.roster-head b, .roster-head small { display: block; }
.roster-head b { font-size: .87rem; color: #f4f6ff; }
.roster-head small { color: #91a2cd; font-size: .67rem; }
.roster-head > a { margin-left: auto; color: #a4baff; font-size: 1.55rem; line-height: 1; }
.roster-item { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px 7px; margin: 5px 0; border: 1px solid rgba(104, 123, 192, .28); border-radius: 9px; background: rgba(15, 23, 57, .58); color: #eef2ff; }
.roster-item:hover { border-color: rgba(204, 68, 255, .8); background: rgba(89, 30, 133, .3); color: #fff; }
.roster-item .char-avatar, .roster-item .avatar { flex: 0 0 auto; }
.roster-name { min-width: 0; flex: 1; }
.roster-name b, .roster-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.35; }
.roster-name b { font-size: .79rem; }
.roster-name small { color: #a8b4d3; font-size: .66rem; }
.roster-status { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; background: #667089; box-shadow: 0 0 0 3px rgba(102, 112, 137, .16); }
.roster-status.is-online { background: #26e88b; box-shadow: 0 0 10px rgba(38, 232, 139, .72); }
.roster-arrow { color: #a9b9e6; font-size: 1.2rem; }
.roster-empty { color: #a8b4d3; font-size: .79rem; padding: 10px 4px; }
.roster-more { display: flex; align-items: center; gap: 8px; color: #c3d3ff; font-size: .72rem; padding: 11px 4px 1px; }
.roster-more b { margin-left: auto; color: #d45fff; font-size: 1rem; }
.stat, .card { border-color: rgba(94, 113, 191, .3); background: rgba(7, 12, 31, .78); }
.stat::before { background: linear-gradient(180deg, #d343ff, #258fff); }
.card-head { border-bottom-color: rgba(94, 113, 191, .25); }
.btn-primary { background: linear-gradient(110deg, #7623bd, #c026ff); }
.btn-primary:hover { box-shadow: 0 16px 34px -12px rgba(192, 38, 255, .8); }

/* -------------------------- PIX THANK YOU ------------------------------- */
.donation-thanks-section { display: grid; place-items: center; padding: 28px 0 54px; }
.donation-thanks {
    position: relative;
    width: min(100%, 780px);
    padding: clamp(30px, 6vw, 62px);
    text-align: center;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(192, 38, 255, .2), transparent 55%),
        radial-gradient(ellipse at 100% 100%, rgba(40, 168, 255, .12), transparent 42%),
        rgba(7, 12, 31, .9);
}
.donation-thanks::before {
    position: absolute;
    inset: 0 18% auto;
    height: 1px;
    content: "";
    background: linear-gradient(90deg, transparent, rgba(232, 121, 255, .8), transparent);
}
.thanks-check, .thanks-pending-icon {
    display: grid;
    width: 78px;
    height: 78px;
    margin: 0 auto 18px;
    place-items: center;
    border: 1px solid rgba(52, 211, 153, .48);
    border-radius: 50%;
    color: #9af2d0;
    background: radial-gradient(circle, rgba(52, 211, 153, .25), rgba(52, 211, 153, .07));
    box-shadow: 0 0 36px rgba(52, 211, 153, .18), inset 0 0 20px rgba(52, 211, 153, .08);
}
.thanks-check svg { width: 38px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.thanks-pending-icon { border-color: rgba(40, 168, 255, .42); color: #9bdfff; font-size: 2.5rem; font-weight: 800; }
.thanks-eyebrow { margin: 0 0 8px; color: #d78aff; font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.donation-thanks h1 { margin: 0; font-size: clamp(1.8rem, 5vw, 2.65rem); line-height: 1.15; }
.thanks-copy { max-width: 590px; margin: 18px auto 24px; color: var(--muted); font-size: 1.04rem; }
.thanks-copy strong { color: #fff; }
.thanks-reward {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 22px;
    padding: 14px 20px;
    border: 1px solid rgba(192, 38, 255, .34);
    border-radius: 16px;
    background: rgba(192, 38, 255, .09);
    text-align: left;
}
.thanks-reward-icon { color: #e879ff; font-size: 1.8rem; }
.thanks-reward strong, .thanks-reward small { display: block; }
.thanks-reward strong { color: #f2d4ff; }
.thanks-reward small { margin-top: 2px; color: var(--muted); }
.thanks-footnote { margin: 0 auto 24px; color: #c1c9e1; }
.thanks-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.thanks-spark { position: absolute; color: rgba(232, 121, 255, .72); text-shadow: 0 0 16px rgba(192, 38, 255, .8); pointer-events: none; }
.thanks-spark-one { top: 14%; left: 12%; font-size: 1.5rem; }
.thanks-spark-two { top: 24%; right: 11%; color: rgba(40, 168, 255, .8); font-size: 1.9rem; }
.thanks-spark-three { right: 19%; bottom: 15%; font-size: 1.1rem; }
.admin-account-card { margin-top: 16px; }
.admin-actions-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.admin-action-box { display: grid; align-content: start; gap: 10px; min-width: 0; padding: 14px; border: 1px solid rgba(94, 113, 191, .25); border-radius: 13px; background: rgba(3, 7, 21, .38); }
.admin-action-box label { display: grid; gap: 6px; font-size: .82rem; }
.admin-action-box small { font-size: .73rem; }
.admin-characters { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); }
.admin-characters h4 { margin: 0 0 8px; }
.admin-character-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.admin-character-row:last-child { border-bottom: 0; }
.admin-character-row span strong, .admin-character-row span small { display: block; }
.admin-character-row span small { color: var(--muted); font-size: .78rem; }
.admin-empty-state { margin-top: 18px; display: grid; place-items: center; min-height: 190px; color: var(--muted); text-align: center; }
.admin-empty-state span { color: #d78aff; font-size: 2.4rem; line-height: 1; }
.admin-security-note { max-width: 940px; margin-top: 18px; font-size: .8rem; }
@media (max-width: 520px) {
    .donation-thanks-section { padding: 12px 0 34px; }
    .donation-thanks { padding: 32px 20px; }
    .thanks-spark-one { left: 5%; }
    .thanks-spark-two { right: 5%; }
    .thanks-actions { flex-direction: column; }
    .thanks-actions .btn { width: 100%; }
    .admin-actions-grid { grid-template-columns: 1fr; }
    .admin-character-row { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 1120px) {
    .hero-layout { grid-template-columns: minmax(220px, .75fr) minmax(350px, 1.45fr); }
    .home-roster { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; }
    .roster-head, .roster-more { grid-column: 1 / -1; }
    .roster-item { margin: 0; }
}
@media (max-width: 760px) {
    .hero { padding-top: 18px; }
    .hero-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .home-intro { margin-bottom: 16px; }
    .home-intro p { max-width: 36rem; font-size: .86rem; }
    .home-login-panel { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
    .home-login-panel .panel-kicker, .home-login-panel h2, .home-login-panel > p, .home-panel-rule { grid-column: 1 / -1; }
    .home-login-panel .btn { grid-column: 1 / -1; }
    .home-login-panel .btn { font-size: .8rem; padding: 10px; }
    .home-download { grid-column: span 1; }
    .hero-gallery .gallery-stage { min-height: 260px; aspect-ratio: 16 / 10; }
    .home-roster { grid-column: auto; }
}
@media (max-width: 480px) {
    .home-roster { grid-template-columns: minmax(0, 1fr); }
    .roster-head, .roster-more { grid-column: auto; }
    .home-login-panel { padding: 14px; }
    .home-login-panel .btn { min-height: 43px; }
}
