/* ===================================================================
   FutCards — estilo
   =================================================================== */
:root {
  --green:   #0b7a3b;
  --green-2: #12a651;
  --bg:      #0e1512;
  --bg-2:    #141d19;
  --card:    #1a2620;
  --line:    #24332b;
  --text:    #e9f2ec;
  --muted:   #90a89a;
  --gold:    #f5c542;
  --purple:  #8b5cf6;
  --blue:    #3b82f6;
  --danger:  #e5484d;
  --radius:  14px;
  --shadow:  0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #16241d 0%, var(--bg) 60%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--green-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0 0 .6rem; }
h2 { font-size: 1.2rem; }
.muted { color: var(--muted); }

/* ---- Topbar ---- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .7rem 1rem;
  background: rgba(14,21,18,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: max(.7rem, env(safe-area-inset-top));
}
.brand { font-weight: 800; font-size: 1.15rem; color: var(--text); }
.brand span { color: var(--gold); }
.nav { display: flex; align-items: center; gap: .35rem; }
.nav a { color: var(--text); padding: .45rem .6rem; border-radius: 10px; font-size: .95rem; }
.nav a:hover { background: var(--bg-2); text-decoration: none; }
.has-badge { position: relative; }
.badge {
  position: absolute; top: -2px; right: -4px; background: var(--danger);
  color: #fff; font-size: .68rem; font-weight: 700; border-radius: 999px;
  min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}
.inline-form { display: inline; margin: 0; }
.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .9rem; padding: .45rem .5rem; }
.linkbtn:hover { color: var(--text); }

/* ---- Menu hambúrguer + drawer ---- */
.menu-toggle { display: none; position: relative; z-index: 60; background: none; border: 0; cursor: pointer; padding: .45rem; flex-direction: column; gap: 5px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.nav-scrim { display: none; }
.drawer-user { display: none; }
.pack-result-actions { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; margin-top: .4rem; }

@media (max-width: 720px) {
  .menu-toggle { display: flex; }
  .nav {
    position: fixed; top: 0; right: 0; height: 100dvh; width: min(80%, 300px);
    flex-direction: column; align-items: stretch; gap: .15rem;
    background: var(--bg-2); border-left: 1px solid var(--line);
    padding: calc(env(safe-area-inset-top) + 4.3rem) 1rem 1.5rem;
    transform: translateX(100%); transition: transform .28s ease; z-index: 50; overflow-y: auto;
  }
  body.nav-open .nav { transform: translateX(0); box-shadow: -12px 0 40px rgba(0,0,0,.5); }
  .nav a { padding: .85rem .6rem; border-radius: 10px; font-size: 1.05rem; }
  .nav a:hover { background: var(--card); }
  .nav a.btn { text-align: center; }
  .drawer-user { display: block; color: var(--gold); font-weight: 800; padding: 0 .6rem .7rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; }
  .nav .lang { align-self: flex-start; margin: .6rem .5rem; }
  .nav .inline-form { margin-top: .3rem; }
  .nav .linkbtn { font-size: 1rem; padding: .85rem .6rem; width: 100%; text-align: left; }
  .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); opacity: 0; visibility: hidden; transition: opacity .28s ease, visibility .28s ease; z-index: 40; }
  body.nav-open .nav-scrim { opacity: 1; visibility: visible; }
  body.nav-open { overflow: hidden; }
  body.nav-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---- Layout ---- */
.container { max-width: 960px; margin: 0 auto; padding: 1.1rem 1rem 4rem; }
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 2rem 1rem; }

/* ---- Botões ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: linear-gradient(180deg, var(--green-2), var(--green));
  color: #fff; border: 0; border-radius: 12px; padding: .6rem 1rem;
  font-weight: 700; font-size: .95rem; cursor: pointer; text-decoration: none;
  box-shadow: var(--shadow); transition: transform .06s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: .8rem 1.3rem; font-size: 1.05rem; }
.btn-sm { padding: .35rem .7rem; font-size: .82rem; border-radius: 9px; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); box-shadow: none; }
.btn-danger { background: linear-gradient(180deg, #ef5a5f, var(--danger)); }
.btn-upgrade { background: linear-gradient(180deg, #f7d26b, #d99e12); color: #2a2100; }
.btn-disabled, .btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---- Flash / Toast (fixo — não precisa rolar a tela pra ver) ---- */
.flashes {
  position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom));
  transform: translateX(-50%); z-index: 60; width: min(92%, 460px);
  display: grid; gap: .5rem; margin: 0; padding: 0; pointer-events: none;
}
.flash {
  pointer-events: auto; padding: .7rem .9rem; border-radius: 10px; font-size: .92rem;
  border: 1px solid transparent; box-shadow: var(--shadow); animation: toastin .25s ease both;
}
.flash-out { animation: toastout .4s ease forwards; }
@keyframes toastin { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes toastout { to { opacity: 0; transform: translateY(14px); } }
.flash-success { background: #10331f; border-color: #1e6b3d; color: #b6f0cd; }
.flash-error   { background: #3a1618; border-color: #7d2a2e; color: #ffc9cb; }
.flash-info    { background: #14263a; border-color: #2a5686; color: #bcdcff; }

/* ---- Hero / landing ---- */
.hero { text-align: center; padding: 2rem 0; }
.hero h1 { font-size: 2rem; line-height: 1.15; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 34ch; margin: .6rem auto 1.4rem; }
.hero-actions { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.feature-list { list-style: none; padding: 0; margin: 2rem auto 0; max-width: 22rem; display: grid; gap: .5rem; text-align: left; }
.feature-list li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; }

/* ---- Auth / forms ---- */
.auth { max-width: 24rem; margin: 1rem auto; }
.form { display: grid; gap: .9rem; }
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .92rem; }
.form input, .form textarea, .form select {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: .7rem .8rem; font-size: 1rem; font-family: inherit;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--green-2); border-color: transparent; }
.label-text { font-weight: 600; margin: .3rem 0 -.2rem; }

/* ---- Dashboard ---- */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin: 1rem 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem .6rem; text-align: center; }
a.stat { text-decoration: none; color: inherit; transition: border-color .15s ease, transform .06s ease; }
a.stat:hover { border-color: var(--green-2); text-decoration: none; }
a.stat:active { transform: translateY(1px); }
.stat-num { font-size: 1.8rem; font-weight: 800; }
.stat-num span { font-size: 1rem; color: var(--muted); font-weight: 600; }
.stat-label { color: var(--muted); font-size: .78rem; margin-top: .2rem; }
.progress { background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; height: 12px; overflow: hidden; margin: .4rem 0; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--green-2), var(--gold)); }
.cta-row { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.2rem; }

/* ===================================================================
   Cards (figurinhas)
   =================================================================== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .8rem; }
.card-grid > *, .card { min-width: 0; }
.pick-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, #223027, #16211b);
  border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card-sm { border-radius: 10px; }
.card-top { position: absolute; top: .4rem; left: .4rem; right: .4rem; display: flex; justify-content: space-between; z-index: 2; }
.card-rating { background: rgba(0,0,0,.55); color: var(--gold); font-weight: 800; font-size: .95rem; border-radius: 7px; padding: .05rem .35rem; }
.card-pos { background: rgba(0,0,0,.55); color: #fff; font-weight: 700; font-size: .72rem; border-radius: 7px; padding: .1rem .35rem; }
.card-media { position: relative; aspect-ratio: 1/1; background: radial-gradient(circle at 50% 30%, #2c3d31, #16211b); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-photo { width: 100%; height: 100%; object-fit: cover; }
.card-initials { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; font-weight: 800; color: #fff; opacity: .85; }
.card-sm .card-initials { font-size: 1.6rem; }
.card-info { padding: .5rem .6rem .6rem; }
.card-name { font-weight: 800; font-size: .95rem; line-height: 1.1; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.card-sm .card-name { font-size: .82rem; }
.card-meta { color: var(--muted); font-size: .74rem; margin-top: .15rem; }
.card-rarity { margin-top: .35rem; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }

/* Raridades: borda/topo colorido */
.card-common { --rc: #6b7d72; }
.card-rare   { --rc: var(--blue); }
.card-epic   { --rc: var(--purple); }
.card-legend { --rc: var(--gold); }
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--rc); pointer-events: none; z-index: 3; }
.card-rarity { color: var(--rc); }
.card-legend { background: linear-gradient(160deg, #3a2f10, #1c1608); }
.card-epic   { background: linear-gradient(160deg, #2a1f3d, #16112b); }
.card-legend .card-media { background: radial-gradient(circle at 50% 30%, #5a4a17, #221a08); }

.card-faded { filter: grayscale(1) brightness(.55); opacity: .8; }
.card-faded::before { border-color: #3a4a40; }

.qty-badge { background: var(--green); color: #fff; font-size: .68rem; padding: .05rem .35rem; border-radius: 6px; font-weight: 800; }
.dupe-badge { background: var(--gold); color: #2a2100; font-size: .64rem; padding: .05rem .35rem; border-radius: 6px; font-weight: 800; }

.card-empty { align-items: center; justify-content: center; min-height: 180px; color: var(--muted); font-size: 3rem; border-style: dashed; }
.card-empty::before { border-style: dashed; border-color: var(--line); }

/* ---- Álbum ---- */
.album-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.album-filters { display: flex; gap: .4rem; }
.chip { background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: .35rem .8rem; font-size: .85rem; cursor: pointer; }
.chip.is-active { background: var(--green); color: #fff; border-color: var(--green); }
.chip b { display: inline-block; margin-left: .25rem; background: rgba(0,0,0,.28); border-radius: 999px; padding: 0 .4rem; font-size: .8em; font-weight: 800; }
.chip.is-active b { background: rgba(255,255,255,.25); }
.album-cell { display: flex; flex-direction: column; gap: .4rem; }
.album-cell .paste-form { margin: 0; }
.album-cell .btn { width: 100%; }
.pasted-tag { text-align: center; font-size: .8rem; color: #b6f0cd; font-weight: 700; }
.missing-tag { text-align: center; font-size: .78rem; color: var(--muted); }

/* ===================================================================
   Pacotes
   =================================================================== */
.pack-stage { display: flex; justify-content: center; margin: 1.5rem 0; }
.pack { background: none; border: 0; cursor: pointer; display: grid; gap: .8rem; justify-items: center; }
.pack-art {
  position: relative; width: 200px; height: 280px; border-radius: 18px;
  background: linear-gradient(160deg, var(--green-2), #073f20 70%);
  border: 2px solid var(--gold); box-shadow: var(--shadow), 0 0 40px rgba(18,166,81,.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; overflow: hidden;
  transition: transform .15s ease;
}
.pack:not(.is-disabled):hover .pack-art { transform: translateY(-4px) scale(1.02); }
.pack-shine { position: absolute; top: -60%; left: -30%; width: 60%; height: 220%; transform: rotate(20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent); animation: shine 3.5s infinite; }
@keyframes shine { 0% { left: -40%; } 60%,100% { left: 130%; } }
.pack-label { font-size: 1.9rem; font-weight: 900; letter-spacing: .08em; color: #fff; }
.pack-sub { color: var(--gold); font-weight: 700; }
.pack-cta { color: var(--muted); font-weight: 700; }
.pack.is-disabled { opacity: .55; cursor: not-allowed; }
.pack.opening .pack-art { animation: rip .5s ease forwards; }
@keyframes rip { 0% { transform: scale(1); } 50% { transform: scale(1.1) rotate(-2deg); } 100% { transform: scale(0) rotate(6deg); opacity: 0; } }

/* ---- Contador regressivo ---- */
.countdown { text-align: center; margin: .8rem auto; display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.countdown .cd-label { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.countdown .cd-time { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--gold); }
.countdown.small { flex-direction: row; gap: .4rem; opacity: .85; }
.countdown.small .cd-label { font-size: .78rem; }
.countdown.small .cd-time { font-size: .95rem; }
.countdown.big { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.4rem; }
.countdown.big .cd-time { font-size: 2.4rem; }

.pack-result { margin-top: 1rem; }
.pack-result .card-grid { margin: 1rem 0; }
.pack-result .card { animation: pop .4s ease both; }
.pack-result .card:nth-child(2) { animation-delay: .1s; }
.pack-result .card:nth-child(3) { animation-delay: .2s; }
.pack-result .card:nth-child(4) { animation-delay: .3s; }
.pack-result .card:nth-child(5) { animation-delay: .4s; }
@keyframes pop { from { transform: scale(.7) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ===================================================================
   Trocas
   =================================================================== */
.trade-list { list-style: none; padding: 0; display: grid; gap: .7rem; }
.trade-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.trade-item a { display: block; padding: .8rem .9rem; color: var(--text); }
.trade-item a:hover { text-decoration: none; background: var(--bg-2); }
.trade-item.needs-me { border-color: var(--gold); }
.trade-item-head { display: flex; justify-content: space-between; gap: .6rem; font-size: .9rem; flex-wrap: wrap; }
.trade-status { color: var(--muted); font-size: .82rem; }
.trade-item-body { display: flex; gap: .5rem; align-items: center; margin-top: .35rem; color: var(--muted); font-size: .88rem; flex-wrap: wrap; }
.trade-item-body strong { color: var(--text); }
.needs-me-tag { margin-top: .4rem; display: inline-block; background: var(--gold); color: #2a2100; font-weight: 800; font-size: .72rem; padding: .12rem .5rem; border-radius: 6px; }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .6rem; margin: .5rem 0; }
.pick { cursor: pointer; display: block; position: relative; }
.pick input { position: absolute; opacity: 0; }
.pick .card { transition: outline .12s ease; }
.pick input:checked + .card { outline: 3px solid var(--gold); outline-offset: 1px; }
.pick-cap { display: block; text-align: center; font-size: .74rem; font-weight: 800; margin-top: .28rem; text-transform: uppercase; letter-spacing: .03em; }
.pick-cap-common { color: #8fa398; } .pick-cap-rare { color: var(--blue); }
.pick-cap-epic { color: var(--purple); } .pick-cap-legend { color: var(--gold); }
.pick input:checked ~ .pick-cap { text-decoration: underline; }

.trade-parties { color: var(--muted); margin-top: -.3rem; }
.trade-swap { display: flex; align-items: center; gap: .8rem; margin: 1rem 0; }
.trade-swap .swap-side { flex: 1; min-width: 0; }
.trade-swap h3 { font-size: .85rem; color: var(--muted); font-weight: 700; margin: 0 0 .4rem; }
.swap-arrow { font-size: 1.6rem; color: var(--gold); }
.trade-actions { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-top: 1rem; }
.trade-actions h3 { margin-top: 0; }
.msg { background: var(--bg-2); border-left: 3px solid var(--green-2); margin: .6rem 0; padding: .6rem .8rem; border-radius: 8px; color: var(--text); }
.msg-resp { border-left-color: var(--gold); }
.decline { margin-top: .8rem; }
.decline summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.decline .form { margin-top: .6rem; }
.back { display: inline-block; margin-bottom: .3rem; color: var(--muted); }

/* ---- Stats no card (Super Trunfo) ---- */
.card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px 5px; margin-top: .45rem; }
.card-stats .st { font-size: .78rem; color: var(--text); font-weight: 700; display: flex; justify-content: space-between; gap: 2px; min-width: 0; background: rgba(0,0,0,.24); border-radius: 5px; padding: .12rem .32rem; }
.card-stats .st b { color: var(--muted); font-weight: 800; }
.card-sm .card-stats { display: none; }
.card-rarribbon { position: absolute; bottom: .3rem; left: .3rem; background: rgba(0,0,0,.62); color: var(--rc); font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: .1rem .4rem; border-radius: 6px; z-index: 2; }
.card-rarribbon i { color: #fff; opacity: .8; font-style: normal; }

/* raridades também nas repetidas do álbum */
.rar-owned { display: flex; flex-wrap: wrap; gap: 3px; }
.rob { font-size: .6rem; font-weight: 800; padding: .05rem .3rem; border-radius: 5px; border: 1px solid var(--line); }
.rob-common { color: #8fa398; } .rob-rare { color: var(--blue); }
.rob-epic { color: var(--purple); } .rob-legend { color: var(--gold); }

/* ---- Nível / XP ---- */
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.level-badge { text-align: right; min-width: 160px; }
.lvl-num { font-weight: 800; color: var(--gold); }
.xp-bar { background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; height: 8px; overflow: hidden; margin: .25rem 0; }
.xp-fill { height: 100%; background: linear-gradient(90deg, var(--green-2), var(--gold)); }

/* ---- Seletor de idioma ---- */
.lang { display: inline-flex; gap: 2px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang a { padding: .3rem .5rem; font-size: .78rem; color: var(--muted); }
.lang a.on { background: var(--green); color: #fff; }
.lang a:hover { text-decoration: none; }

/* ---- Batalhas ---- */
.battles .album-head small { font-weight: 400; font-size: .9rem; }
.mine-open { background: var(--bg-2); border: 1px solid var(--gold); border-radius: var(--radius); padding: .8rem 1rem; margin: .8rem 0; }
.attr-pill { display: inline-block; background: var(--green); color: #fff; font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; margin-right: .25rem; }
.battle-form { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: .8rem 0; }
.slot-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.slot { display: grid; gap: .3rem; font-size: .82rem; font-weight: 700; color: var(--muted); }
.slot select { background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: .55rem .5rem; font-size: .9rem; }
.warn { color: var(--gold); }
.queue-list { list-style: none; padding: 0; display: grid; gap: .5rem; }
.queue-item { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.trade-item.won { border-left: 3px solid var(--green-2); } .trade-item.lost { border-left: 3px solid var(--danger); }

.battle-result { text-align: center; font-size: 1.1rem; font-weight: 700; padding: 1rem; border-radius: var(--radius); margin: .6rem 0; animation: resultpop .55s cubic-bezier(.2,.8,.2,1.2) both; }
.battle-result.won { background: #10331f; border: 1px solid #1e6b3d; box-shadow: 0 0 28px rgba(30,107,61,.45); }
.battle-result.lost { background: #3a1618; border: 1px solid #7d2a2e; box-shadow: 0 0 22px rgba(125,42,46,.4); }
@keyframes resultpop { 0% { opacity: 0; transform: scale(.82); } 60% { transform: scale(1.05); } 100% { opacity: 1; transform: scale(1); } }

/* Notificações de resultado (para o desafiante que saiu da tela) */
.battle-notifs { display: grid; gap: .5rem; margin: .4rem 0 1rem; }
.battle-notif { display: block; padding: .8rem 1rem; border-radius: var(--radius); font-weight: 700; color: var(--text); border: 1px solid var(--line); animation: notifpop .4s ease both; }
.battle-notif:hover { text-decoration: none; filter: brightness(1.1); }
.battle-notif.won { background: #10331f; border-color: #1e6b3d; }
.battle-notif.lost { background: #3a1618; border-color: #7d2a2e; }
@keyframes notifpop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.battle-score { text-align: center; font-size: 1.2rem; }
.rounds { display: grid; gap: .8rem; margin-top: 1rem; }
.round { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; }
.round-attr { text-align: center; color: var(--muted); margin-bottom: .5rem; }
.round-cards { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; }
.rc { text-align: center; opacity: .7; }
.rc.rc-win { opacity: 1; }
.rc-val { font-size: 1.6rem; font-weight: 800; margin-top: .2rem; }
.rc.rc-win .rc-val { color: var(--green-2); }
.rc-vs { font-weight: 800; color: var(--muted); }

/* ---- Ranking ---- */
.table-wrap { overflow-x: auto; }
.rank-table { width: 100%; border-collapse: collapse; }
.rank-table th, .rank-table td { padding: .55rem .5rem; text-align: left; border-bottom: 1px solid var(--line); font-size: .9rem; }
.rank-table th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.rank-table td:nth-child(n+3), .rank-table th:nth-child(n+3) { text-align: center; }
.rank-table tr.me { background: rgba(18,166,81,.12); }

@media (max-width: 520px) {
  .stat-num { font-size: 1.4rem; }
  .hero h1 { font-size: 1.6rem; }
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .pick-grid { grid-template-columns: repeat(2, 1fr); }
  .container { padding-left: .7rem; padding-right: .7rem; }
  .trade-swap { flex-direction: column; }
  .swap-arrow { transform: rotate(90deg); }
  .level-badge { text-align: left; }
  .slot-row { grid-template-columns: 1fr; }
}
