/* ===========================================================================
   NinjinhaHub — TOP 10 por tempo assistido (página única, auto-contida)
   =========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0a0b12;
  --panel: #12131d;
  --panel-2: #171927;
  --line: rgba(255,255,255,0.07);
  --fg: #f1f2f7;
  --muted: #8b8fa6;
  --violet: #8b5cf6;
  --violet-soft: #a78bfa;
  --gold: #fbbf24;
  --silver: #cbd5e1;
  --bronze: #f0997b;
  --twitch: #9146ff;
  --youtube: #ff0000;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(139,92,246,0.16), transparent 60%),
    var(--bg);
  color: var(--fg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
.wrap { width: min(620px, 92vw); margin: 0 auto; }

/* header */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.15rem; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--violet), #2dd4bf);
}
.brand .logo svg { width: 22px; height: 22px; }
.brand span { color: #2dd4bf; }

/* botões */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: inherit; font-weight: 600; font-size: .92rem; color: #fff;
  padding: 9px 16px; border-radius: 10px; border: 1px solid transparent;
  transition: transform .12s, background .15s, box-shadow .15s; text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn-twitch { background: var(--twitch); }
.btn-youtube { background: var(--youtube); }
.btn-ghost { background: var(--panel-2); border-color: var(--line); color: var(--fg); }
.btn-ghost:hover { border-color: var(--violet-soft); }

.me { display: flex; align-items: center; gap: 10px; }
.me img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--violet); }
.me .nm { font-weight: 600; font-size: .92rem; line-height: 1.1; }
.me .pf { font-size: .74rem; color: var(--muted); text-transform: capitalize; }

.wrap { width: min(1080px, 94vw); }

/* faixa do patrocinador */
.partner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 16px; padding: 16px 20px; margin: 6px 0 4px;
}
.p-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.plogo { width: 58px; height: 58px; border-radius: 14px; overflow: hidden; flex: none; background: var(--panel-2); border: 1px solid var(--line); }
.plogo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* placeholder no estilo Moedaz (azul + amarelo) enquanto a logo real não é adicionada */
.plogo.ph { position: relative; background: #3a32d6; border-color: #3a32d6; }
.plogo.ph::after { content: ""; position: absolute; inset: 16px; border-radius: 0 50% 50% 50%; background: #f5c20d; transform: rotate(-12deg); }

.p-info { min-width: 0; }
.p-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 700; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.p-tag svg { width: 15px; height: 15px; }
.p-title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; margin: 4px 0 6px; }
.p-badge { font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #3a2a04; background: var(--gold); padding: 3px 9px; border-radius: 6px; }
.p-coupon { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .85rem; flex-wrap: wrap; }
.code {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font: inherit;
  font-weight: 800; letter-spacing: .06em; color: var(--gold);
  background: rgba(251,191,36,.1); border: 1px dashed rgba(251,191,36,.45);
  padding: 5px 11px; border-radius: 8px; transition: background .15s;
}
.code:hover { background: rgba(251,191,36,.18); }
.code svg { width: 14px; height: 14px; }
.p-cta {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-weight: 700; font-size: .95rem; color: #3a2a04; text-decoration: none;
  background: var(--gold); padding: 12px 20px; border-radius: 11px;
  transition: transform .12s, box-shadow .15s;
}
.p-cta:hover { box-shadow: 0 0 26px rgba(251,191,36,.4); transform: translateY(-1px); }
.p-cta svg { width: 18px; height: 18px; }

/* layout 2 colunas */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; padding: 8px 0 40px; }

.col-left { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* 3 cards de acesso rápido */
.quick-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.qcard {
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; font: inherit;
  color: var(--fg); background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px; transition: transform .14s, border-color .14s, box-shadow .15s;
}
.qcard:active { transform: scale(.98); }
.q-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.q-ico svg { width: 22px; height: 22px; }
.q-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.q-title { font-weight: 800; font-size: .98rem; }
.q-sub { color: var(--muted); font-size: .73rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-arrow { color: var(--muted); font-size: 1.25rem; font-weight: 700; }

.q-gold { border-color: rgba(251,191,36,.35); }
.q-gold .q-ico { background: rgba(251,191,36,.14); color: var(--gold); }
.q-gold:hover { transform: translateY(-2px); border-color: rgba(251,191,36,.65); box-shadow: 0 8px 22px -10px rgba(251,191,36,.4); }
.q-violet { border-color: rgba(139,92,246,.32); }
.q-violet .q-ico { background: rgba(139,92,246,.16); color: var(--violet-soft); }
.q-violet:hover { transform: translateY(-2px); border-color: rgba(139,92,246,.65); box-shadow: 0 8px 22px -10px rgba(139,92,246,.45); }
.q-teal { border-color: rgba(45,212,191,.3); }
.q-teal .q-ico { background: rgba(45,212,191,.14); color: #2dd4bf; }
.q-teal:hover { transform: translateY(-2px); border-color: rgba(45,212,191,.6); box-shadow: 0 8px 22px -10px rgba(45,212,191,.4); }

/* painel (card de coluna) */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.panel-head { margin-bottom: 14px; }
.panel-title { display: flex; align-items: center; gap: 12px; }
.panel-title.center { flex-direction: column; gap: 2px; text-align: center; }
.panel-title .ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(139,92,246,.14); border: 1px solid var(--line); color: var(--violet-soft); flex: none; }
.panel-title .ico svg { width: 22px; height: 22px; }
.panel-title h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; }
.panel-title .sub { color: var(--muted); font-size: .85rem; margin-top: 1px; }

/* subabas */
.tabs { display: flex; gap: 4px; margin-top: 14px; background: var(--bg); padding: 4px; border-radius: 11px; border: 1px solid var(--line); }
.tab {
  flex: 1; cursor: pointer; font: inherit; font-weight: 600; font-size: .85rem; color: var(--muted);
  padding: 8px 10px; border-radius: 8px; border: none; background: transparent; transition: color .15s, background .15s;
}
.tab:hover { color: var(--fg); }
.tab.active { color: var(--fg); background: var(--panel-2); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }

/* linha de sorteado (drop) */
.drop {
  display: grid; grid-template-columns: 36px 42px 1fr auto; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 13px; margin-bottom: 8px;
  background: var(--panel-2); border: 1px solid var(--line); transition: transform .14s, border-color .14s;
  animation: rise .3s ease both;
}
.drop:hover { transform: translateY(-2px); border-color: rgba(139,92,246,.4); }
.drop .chest { width: 36px; height: 36px; display: grid; place-items: center; color: var(--ct, #8b8fa6); }
.drop .chest svg { width: 30px; height: 30px; }
.drop .ava { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--bg); }
.drop .who { min-width: 0; }
.drop .who .name { font-weight: 700; font-size: .96rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop .who .meta { color: var(--muted); font-size: .76rem; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop .who .meta b { color: var(--ct, #8b8fa6); font-weight: 600; }
.drop .amount { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 1.05rem; color: var(--gold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.drop .amount svg { width: 18px; height: 18px; }
/* destaque do maior ganhador */
.drop.featured { background: linear-gradient(100deg, rgba(251,191,36,.13), var(--panel-2) 60%); border-color: rgba(251,191,36,.45); padding: 13px 12px; }
.drop.featured .ava { width: 48px; height: 48px; border: 2px solid var(--gold); }
.drop.featured .who .name { font-size: 1.05rem; }
.drop.featured .amount { font-size: 1.25rem; }
/* cores por raridade do baú */
.t-comum   { --ct: #9aa0bd; }
.t-raro    { --ct: #60a5fa; }
.t-epico   { --ct: #a78bfa; }
.t-lendario{ --ct: #fbbf24; }

.earning {
  display: none; align-items: center; justify-content: center; gap: 9px;
  margin: 0 auto 12px; padding: 9px 14px; border-radius: 11px;
  background: rgba(45,212,191,0.1); border: 1px solid rgba(45,212,191,0.3); color: #5eead4;
  font-weight: 600; font-size: .82rem; text-decoration: none; transition: border-color .15s;
}
.earning:hover { border-color: rgba(45,212,191,0.7); }
.earning.on { display: flex; }
.earning .pulse { width: 9px; height: 9px; border-radius: 50%; background: #2dd4bf; animation: blink 1.4s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* leaderboard */
.board { padding: 6px 0 50px; }
.row {
  display: grid; grid-template-columns: 44px 48px 1fr auto; align-items: center; gap: 14px;
  padding: 13px 16px; border-radius: 14px; margin-bottom: 9px;
  background: var(--panel); border: 1px solid var(--line);
  position: relative; overflow: hidden; transition: transform .14s, border-color .14s;
  animation: rise .35s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.row:hover { transform: translateY(-2px); border-color: rgba(139,92,246,.4); }
.row .bar { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(139,92,246,.14), transparent); z-index: 0; }
.row > * { position: relative; z-index: 1; }

.row .pos { font-weight: 800; font-size: 1.25rem; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.row .ava { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--panel-2); }
.row .who { min-width: 0; }
.row .who .name { font-weight: 700; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .who .time { color: var(--muted); font-size: .82rem; margin-top: 1px; }
.row .xp { text-align: right; }
.row .xp .v { font-weight: 800; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.row .xp .l { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }

/* top 3 */
.row.top { border-color: rgba(255,255,255,.12); }
.row.r1 { background: linear-gradient(100deg, rgba(251,191,36,.12), var(--panel) 55%); border-color: rgba(251,191,36,.45); }
.row.r1 .pos, .row.r1 .xp .v { color: var(--gold); }
.row.r1 .ava { border: 2px solid var(--gold); }
.row.r2 { border-color: rgba(203,213,225,.35); }
.row.r2 .pos { color: var(--silver); }
.row.r2 .ava { border: 2px solid var(--silver); }
.row.r3 { border-color: rgba(240,153,123,.35); }
.row.r3 .pos { color: var(--bronze); }
.row.r3 .ava { border: 2px solid var(--bronze); }
.row.is-me { box-shadow: 0 0 0 1.5px var(--violet) inset; }
.row.is-me::after { content: 'você'; position: absolute; right: 14px; top: 8px; font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; color: var(--violet-soft); z-index: 2; }

.empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.empty .spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--violet); margin: 0 auto 14px; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===========================================================================
   Loja
   =========================================================================== */
.shop { padding: 10px 0 30px; }
.shop-hero { text-align: center; padding: 20px 0 22px; }
.shop-hero h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; letter-spacing: .04em; }
.shop-hero p { color: var(--muted); margin-top: 4px; }

.howto { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 18px; }
.howto summary { cursor: pointer; padding: 14px 18px; font-weight: 700; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.howto summary::after { content: "⌄"; font-size: 1.1rem; }
.howto[open] summary::after { content: "⌃"; }
.howto summary::-webkit-details-marker { display: none; }
.howto-body { padding: 0 18px 16px; color: var(--fg); font-size: .95rem; line-height: 1.6; }

.balances { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.bal-pill { display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px 8px 8px; border-radius: 999px; font-weight: 600; font-size: .92rem; border: 1px solid var(--line); background: var(--panel); }
.bal-pill b { font-weight: 800; font-variant-numeric: tabular-nums; }
.bal-pill.c-tc { border-color: rgba(251,191,36,.4); color: var(--gold); }
.bal-pill.c-points { border-color: rgba(139,92,246,.4); color: var(--violet-soft); }

/* ícones de moeda (img com fallback colorido) */
.coin-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; flex: none; }
.coin-ic.sm { width: 30px; height: 30px; }
.coin-ic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.coin-ic.c-points { background: radial-gradient(circle at 35% 30%, #a78bfa, #6d28d9); }
.coin-ic.c-tc { background: radial-gradient(circle at 35% 30%, #fde68a, #d99e09); }

.catalog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.catalog-head .eyebrow { color: var(--muted); font-weight: 700; letter-spacing: .12em; font-size: .72rem; text-transform: uppercase; }
.catalog-head h2 { font-size: 1.5rem; font-weight: 800; }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.xitem { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px 18px 18px; }
.xtag { position: absolute; top: 14px; left: 16px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--violet-soft); background: rgba(139,92,246,.14); padding: 3px 10px; border-radius: 999px; }
.xbody { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 18px 0 16px; }
.xside { text-align: center; }
.xside .coin-ic { margin: 0 auto 8px; }
.xval { font-family: inherit; font-weight: 800; font-size: 1.9rem; line-height: 1; font-variant-numeric: tabular-nums; }
.xval.gold { color: var(--gold); }
.xlbl { color: var(--muted); font-size: .78rem; margin-top: 3px; }
.xarrow { color: var(--violet-soft); }
.xarrow svg { width: 26px; height: 26px; }
.xbtn { width: 100%; justify-content: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--fg); }
.xbtn:hover { border-color: var(--violet-soft); background: rgba(139,92,246,.12); }
.xbtn svg { width: 18px; height: 18px; }
.shop-note { text-align: center; margin-top: 18px; font-size: .85rem; }

/* ===========================================================================
   Bingo
   =========================================================================== */
.tc-pill { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: .9rem; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); }

.bingo-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.bingo-prize { text-align: center; margin-bottom: 18px; }
.bingo-prize .prize-val { font-family: inherit; font-weight: 800; font-size: 1.9rem; color: var(--gold); margin: 4px 0; }
#bingo-status { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }

.cost-line { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; color: var(--violet-soft); background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.3); border-radius: 11px; padding: 10px; margin-bottom: 16px; }
.cost-line b { color: var(--fg); }

.buy-controls { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.qty { display: flex; align-items: stretch; gap: 8px; justify-content: center; }
.qbtn { width: 46px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel-2); color: var(--fg); font-size: 1.4rem; font-weight: 700; cursor: pointer; transition: border-color .15s; }
.qbtn:hover { border-color: var(--violet-soft); }
#qty { width: 90px; text-align: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--fg); border-radius: 11px; font: inherit; font-size: 1.2rem; font-weight: 700; padding: 8px; }
.btn-accent { background: linear-gradient(135deg, #f43f5e, #fb7185); color: #fff; }
.btn-accent:hover { box-shadow: 0 0 26px rgba(244,63,94,.45); }

.my-line { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; border-top: 1px solid var(--line); padding-top: 14px; }
.my-line > div { display: flex; flex-direction: column; gap: 2px; }
.my-line .muted { font-size: .72rem; }
.my-line b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }

/* reveal do vencedor */
.winner-banner { display: none; align-items: center; gap: 16px; background: linear-gradient(100deg, rgba(139,92,246,.2), rgba(45,212,191,.14)); border: 1px solid var(--violet); border-radius: 16px; padding: 18px 22px; margin-bottom: 20px; }
.winner-banner.show { display: flex; animation: rise .4s ease; }
.winner-banner img { width: 64px; height: 64px; border-radius: 50%; border: 3px solid #2dd4bf; }
.winner-banner .wlabel { color: #2dd4bf; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.winner-banner .wname { font-weight: 800; font-size: 1.5rem; }

@media (max-width: 760px) { .bingo-grid { grid-template-columns: 1fr; } }

/* rodapé */
.site-footer {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  text-align: center; padding: 30px 0 50px; margin-top: 12px; border-top: 1px solid var(--line);
}
.mini-partner {
  display: inline-flex; align-items: center; gap: 14px; text-decoration: none;
  background: var(--panel); border: 1px solid rgba(251,191,36,.3); border-radius: 12px; padding: 10px 16px;
  transition: border-color .15s, transform .12s;
}
.mini-partner:hover { border-color: rgba(251,191,36,.6); transform: translateY(-1px); }
.mini-partner .mp-text { text-align: right; }
.mini-partner .mp-title { color: var(--fg); font-weight: 600; font-size: .9rem; }
.mini-partner .mp-coupon { color: var(--gold); font-weight: 700; font-size: .76rem; letter-spacing: .04em; }
.plogo.sm { width: 42px; height: 42px; border-radius: 10px; }
.plogo.sm.ph::after { inset: 11px; }

.socials { display: flex; gap: 12px; }
.socials a {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px;
  color: var(--muted); background: var(--panel); border: 1px solid var(--line); transition: .15s;
}
.socials a:hover { color: var(--fg); border-color: var(--violet-soft); transform: translateY(-2px); }
.socials svg { width: 20px; height: 20px; }

.site-footer .copy { color: var(--muted); font-size: .85rem; }
.site-footer .priv { color: var(--muted); font-size: .8rem; text-decoration: none; }
.site-footer .priv:hover { color: var(--violet-soft); }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--panel-2); border: 1px solid var(--line); padding: 12px 20px; border-radius: 12px;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 100; font-weight: 600;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: #2dd4bf; color: #5eead4; }
.toast.err { border-color: #f43f5e; color: #fda4af; }

.hidden { display: none !important; }

@media (max-width: 880px) {
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .row { grid-template-columns: 34px 42px 1fr auto; gap: 10px; padding: 11px 12px; }
  .row .ava { width: 42px; height: 42px; }
  .row.is-me::after { display: none; }
  .drop { grid-template-columns: 30px 38px 1fr auto; gap: 9px; }
  .qcard { flex-direction: column; text-align: center; gap: 7px; padding: 12px 6px; }
  .q-arrow { display: none; }
  .q-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
