/* features/play/: the battle (the app's own bugdex-battle.css, vendored, drawn
   with these variables), the Bugdex, badges, levels, XP and trophies. */

/* The app's tokens the battle stylesheet reads (shellby src/renderer/shared/tokens.css). */
.bb-vars {
  --abyss: #071012; --ink: #0c1719; --reef: #11232a; --reef-2: #173039; --line: #214049;
  --sand: #f3e6cc; --sand-dim: #b3a892; --sand-faint: #9d9482; --glass: #7fd6c2;
  --coral: #ff7a5c; --amber: #ffc15e; --danger: #ff5a4a;
  --font-pixel: var(--f-pixel); --font-mono: var(--f-mono); --font-body: var(--f-body);
  --fs-9: 9px; --fs-9-5: 9.5px; --fs-10: 10px; --fs-11: 11px; --fs-11-5: 11.5px; --fs-12: 12px; --fs-12-5: 12.5px; --fs-13: 13px; --fs-14: 14px; --fs-16: 16px; --fs-18: 18px;
}

/* ------------------------------------------------------------ hero */
.play-hero h1 { max-width: 12ch; }
.play-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.play-stats .stat b { color: var(--sun); }

/* ------------------------------------------------------------ the battle */
.play-battle { display: grid; gap: clamp(2rem, 1rem + 3vw, 4rem); align-items: start; }
@media (min-width: 1000px) { .play-battle { grid-template-columns: .85fr 1.15fr; } }
.play-rules { list-style: none; display: grid; gap: .7rem; }
.play-rules li { position: relative; padding-left: 1.3rem; color: var(--text-2); }
.play-rules li::before { content: ''; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; background: var(--coral); }
.play-rules b { color: var(--paper); }
.battle { display: grid; gap: 1rem; padding: clamp(.6rem, .4rem + .8vw, 1rem); border-radius: 20px; border: 1px solid var(--line-2); background: #050b0c; box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .9), 0 0 80px -30px rgba(63, 184, 163, .35); }
.battle .bb-screen { border-radius: 10px; }
.battle .bb-foe { transition: opacity .6s, transform .6s var(--ease-out); }
.battle .bb-foe.caught { opacity: 0; transform: translateY(-30%) scale(.4); }
.battle .bb-foe.bb-hit .bb-foe-art { animation: bb-shake .35s steps(4) 1; }
@keyframes bb-shake { 25% { transform: translateX(-5px); filter: brightness(2); } 50% { transform: translateX(4px); } 75% { transform: translateX(-3px); filter: brightness(2); } }
.battle .bb-screen.bb-flashy::after { content: ''; position: absolute; inset: 0; z-index: 9; background: #fff; animation: bb-flash .35s ease-out forwards; pointer-events: none; }
@keyframes bb-flash { from { opacity: .5; } to { opacity: 0; } }
.battle .bb-screen.bb-heal .bb-foe-art { filter: drop-shadow(0 0 10px #80ed99); }
.battle .bb-hp-fill { transition: width .6s steps(12, end); }
.battle .bb-me-art img, .battle .bb-me-art svg { width: 100%; }
.bb-controls { display: grid; gap: .7rem; }
.bb-status { display: flex; justify-content: space-between; align-items: center; font: 600 .78rem/1 var(--f-mono); }
.bb-failing { padding: .35rem .6rem; border-radius: 6px; background: rgba(255, 90, 74, .14); border: 1px solid rgba(255, 90, 74, .45); color: #ffb3aa; }
.bb-failing.green { background: rgba(63, 184, 163, .16); border-color: rgba(127, 214, 194, .5); color: var(--foam); }
.bb-moves { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: .45rem; }
.bb-move { display: grid; justify-items: start; gap: .1rem; padding: .65rem .75rem; border-radius: 10px; border: 2px solid #26323a; background: linear-gradient(#f8f1de, #e7dcc2); color: #26323a; font: inherit; text-align: left; cursor: pointer; box-shadow: 3px 3px 0 rgba(0, 0, 0, .35); transition: transform .12s var(--ease-spring); }
.bb-move:hover:not(:disabled) { transform: translateY(-2px); }
.bb-move:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(0, 0, 0, .35); }
.bb-move:disabled { opacity: .45; cursor: default; }
.bb-move span { font-size: 1.05rem; }
.bb-move b { font: 700 .98rem/1.1 var(--f-pixel); }
.bb-move small { font: 500 .66rem/1.2 var(--f-mono); color: #4a5a63; }
.bb-move.main { border-color: #b8401f; background: linear-gradient(#ffd9c9, #ffb59a); }
.bb-move.cheat { border-style: dashed; }
.bb-logbox summary { cursor: pointer; font: 600 .74rem/1 var(--f-mono); color: var(--text-3); }
.bb-log { margin: .6rem 0 0; padding-left: 1.2rem; max-height: 160px; overflow-y: auto; display: grid; gap: .2rem; font-size: .88rem; color: var(--text-2); }
.bb-log .fx-resist, .bb-log .fx-heal { color: #9fd3ff; }
.bb-log .fx-caught { color: var(--foam); font-weight: 700; }
#bb-again { justify-self: start; }

/* ------------------------------------------------------------ the Bugdex */
.dex-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.4rem; }
.fchip-play { padding: .5rem .85rem; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(19, 40, 39, .5); color: var(--text-2); font: 700 .84rem/1 var(--f-body); cursor: pointer; }
.fchip-play:hover { color: var(--paper); border-color: var(--glass); }
.fchip-play[aria-pressed='true'] { background: var(--coral); border-color: transparent; color: var(--ink); }
.dex-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.dex-card { position: relative; display: grid; gap: .35rem; align-content: start; padding: 1rem; border-radius: 16px; border: 1px solid var(--line); background: radial-gradient(70% 50% at 50% 0%, rgba(127, 214, 194, .1), transparent 70%), rgba(13, 28, 29, .75); transition: transform .3s var(--ease-out), border-color .3s; }
.dex-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.dex-card[hidden] { display: none; }
.dex-art { display: grid; place-items: center; height: 96px; }
.dex-art svg { max-width: 100%; max-height: 96px; width: auto; height: 96px; image-rendering: pixelated; }
.dex-no { position: absolute; top: .7rem; right: .8rem; font: 600 .68rem/1 var(--f-mono); color: var(--text-3); }
.dex-card h3 { font: 700 1.05rem/1.15 var(--f-pixel); margin-top: .3rem; }
.dex-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.dex-type { padding: .1rem .45rem; border-radius: 4px; font: 700 .62rem/1.4 var(--f-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--type-ink, #fff); background: var(--type); }
.dex-rar { padding: .1rem .45rem; border-radius: 4px; font: 600 .62rem/1.4 var(--f-mono); border: 1px solid var(--line-2); color: var(--text-2); }
.dex-rar.r-rare { color: var(--foam); border-color: rgba(127, 214, 194, .45); }
.dex-rar.r-legendary { color: var(--sun); border-color: rgba(255, 209, 102, .5); }
.dex-blurb { color: var(--paper); font-size: .9rem; }
.dex-hint { color: var(--text-3); font: 500 .74rem/1.4 var(--f-mono); }
.dex-evo { color: var(--text-2); font-size: .8rem; }
.dex-events { margin-top: 2.5rem; }
.dex-mini { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }
.dex-mini figure { width: 120px; text-align: center; }
.dex-mini .dex-art { height: 72px; }
.dex-mini .dex-art svg { height: 72px; }
.dex-mini figcaption { font-size: .8rem; color: var(--text-2); }

/* ------------------------------------------------------------ badges and the league */
.badge-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.badge-card { display: grid; gap: .3rem; justify-items: center; text-align: center; padding: 1.1rem .9rem; border-radius: 16px; border: 1px solid rgba(255, 209, 102, .22); background: radial-gradient(60% 50% at 50% 30%, rgba(255, 209, 102, .1), transparent 70%), rgba(13, 28, 29, .75); }
.badge-art { display: grid; place-items: center; width: 72px; height: 72px; }
.badge-art svg { width: 100%; height: auto; image-rendering: pixelated; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .35)); }
.badge-card h3 { font: 700 1rem/1.15 var(--f-pixel); color: var(--sun); }
.badge-card p { font-size: .84rem; color: var(--text-2); }
.badge-boss { display: flex; align-items: center; gap: .35rem; justify-content: center; }
.mini-bug { display: inline-grid; place-items: center; width: 26px; height: 22px; }
.mini-bug svg { max-width: 26px; max-height: 22px; width: auto; height: auto; image-rendering: pixelated; }
.league-row { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); margin-top: 1.2rem; }
.league-card { padding: 1rem; border-radius: 16px; border: 1px solid rgba(255, 92, 92, .35); background: radial-gradient(70% 60% at 50% 30%, rgba(255, 92, 92, .14), transparent 70%), #12090b; text-align: center; }
.league-card.champ { border-color: rgba(255, 209, 102, .7); background: radial-gradient(70% 60% at 50% 30%, rgba(255, 209, 102, .2), transparent 70%), #141005; box-shadow: 0 0 40px -12px rgba(255, 209, 102, .5); }
.league-card .dex-art { height: 110px; }
.league-card .dex-art svg { height: 110px; }
.league-card figcaption { margin-top: .5rem; font: 700 1rem/1.2 var(--f-pixel); color: var(--paper); }
.league-card figcaption span { display: block; font: 600 .64rem/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: #ff8f8f; }
.league-card.champ figcaption span { color: var(--sun); }

/* ------------------------------------------------------------ levels */
.ranks { list-style: none; display: grid; gap: .5rem; }
.rank { display: grid; gap: .5rem 1.2rem; padding: .9rem 1.1rem; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--rank) 40%, transparent); border-left: 6px solid var(--rank); background: linear-gradient(90deg, color-mix(in srgb, var(--rank) 14%, transparent), rgba(13, 28, 29, .6) 55%); }
@media (min-width: 800px) { .rank { grid-template-columns: 170px 1fr; align-items: center; } .rank-shells { grid-column: 2; } }
.rank-head b { display: block; font: 700 1.15rem/1.1 var(--f-pixel); color: var(--rank); }
.rank-head small { font: 600 .7rem/1 var(--f-mono); color: var(--text-3); }
.rank-titles { display: flex; flex-wrap: wrap; gap: .35rem .5rem; }
.rank-titles span { padding: .25rem .55rem; border-radius: 999px; background: rgba(8, 18, 20, .6); border: 1px solid var(--line); font-size: .86rem; color: var(--paper); }
.rank-titles i { font: 600 .66rem/1 var(--f-mono); font-style: normal; color: var(--rank); margin-right: .35rem; }
.rank-shells { font-size: .84rem; color: var(--text-2); }
.rank-shells i { font-style: normal; color: var(--text-3); }

/* ------------------------------------------------------------ XP */
.xp-cols { display: grid; gap: 1rem; }
@media (min-width: 900px) { .xp-cols { grid-template-columns: 1fr 1fr; } }
.xp-col { padding: 1.3rem; border-radius: 18px; border: 1px solid var(--line); background: rgba(13, 28, 29, .7); }
.xp-col h3 { font: 700 1.1rem/1 var(--f-pixel); margin-bottom: .8rem; }
.xp-list { list-style: none; display: grid; }
.xp-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed var(--line); color: var(--text-2); font-size: .94rem; }
.xp-list li:last-child { border-bottom: 0; }
.xp-list b { font: 700 .86rem/1.4 var(--f-mono); color: var(--sun); white-space: nowrap; }
.play-daily { margin-top: 1.2rem; }
.quest-line { list-style: none; display: grid; gap: .6rem; margin-top: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.quest-line li { display: grid; grid-template-columns: 32px 1fr; gap: .7rem; padding: 1rem; border-radius: 14px; border: 1px solid rgba(255, 193, 94, .3); background: rgba(255, 193, 94, .05); }
.quest-line .qn { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--amber, #ffc15e); color: #ffc15e; font: 700 .9rem/1 var(--f-mono); }
.quest-line b { color: #ffc15e; }
.quest-line p { margin-top: .2rem; color: var(--text-2); font-size: .88rem; }

/* ------------------------------------------------------------ trophies */
.trophy-wall { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.trophy { display: grid; grid-template-columns: 44px 1fr; gap: .7rem; align-items: start; padding: .8rem .9rem; border-radius: 14px; border: 1px solid rgba(255, 193, 94, .22); background: radial-gradient(120% 140% at 0% 0%, rgba(255, 193, 94, .1), transparent 55%), rgba(13, 28, 29, .7); }
.t-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.25rem; background: radial-gradient(circle at 35% 30%, #ffe3a3, #e0a33b 70%, #a8701c); box-shadow: inset 0 0 0 4px #2b2006, 0 0 0 2px rgba(255, 193, 94, .25); }
.trophy h3 { font: 700 .98rem/1.2 var(--f-pixel); color: var(--paper); }
.trophy p { margin-top: .15rem; font-size: .82rem; color: var(--text-2); }
.trophy .t-rew { color: var(--sun); font: 600 .7rem/1.4 var(--f-mono); }
.trophy.secret { border-style: dashed; background: rgba(13, 28, 29, .5); }
.trophy.secret .t-ico { background: #1b2a2c; box-shadow: inset 0 0 0 2px var(--line-2); color: var(--text-3); font: 700 1.1rem/1 var(--f-pixel); }
.trophy.secret h3 { color: var(--text-3); }

.fair { margin-top: 2rem; padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); border-radius: 22px; border: 1px solid rgba(127, 214, 194, .35); background: radial-gradient(70% 100% at 0% 100%, rgba(63, 184, 163, .2), transparent 60%), var(--deep); }
.fair ul { list-style: none; display: grid; gap: .6rem; margin-top: 1rem; }
.fair li { position: relative; padding-left: 1.5rem; color: var(--text-2); }
.fair li::before { content: '✓'; position: absolute; left: 0; color: var(--glass); font-weight: 800; }

/* the overview's wide Play card (features/) */
.ov-play { display: grid; gap: 1.5rem; align-items: center; overflow: hidden; padding: clamp(1.4rem, 1rem + 2vw, 2.4rem); border-radius: 22px; border: 1px solid rgba(255, 193, 94, .35); color: inherit; text-decoration: none;
  background: radial-gradient(60% 90% at 100% 50%, rgba(255, 193, 94, .16), transparent 60%), radial-gradient(50% 80% at 0% 100%, rgba(255, 92, 92, .12), transparent 60%), var(--reef); transition: transform .45s var(--ease-out), border-color .3s; }
.ov-play:hover { color: inherit; transform: translateY(-5px); border-color: rgba(255, 193, 94, .7); }
@media (min-width: 900px) { .ov-play { grid-template-columns: 1.1fr .9fr; } }
.ov-play-body { display: grid; gap: .6rem; }
.ov-play .k { font: 600 .72rem/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--sun); }
.ov-play .t { font: 700 var(--step-3)/1.05 var(--f-pixel); color: var(--paper); }
.ov-play .d { color: var(--text-2); max-width: 52ch; }
.ov-play .go { font-weight: 700; color: var(--coral-hi); }
.ov-play .go::after { content: ' →'; }
.ov-play-art { position: relative; height: 320px; }
.ov-play-art img { position: absolute; height: 100%; width: auto; max-width: none; border-radius: 14px; border: 1px solid var(--line-2); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); }
.ov-play-art img:first-child { right: 4%; top: 0; z-index: 1; }
.ov-play-art img:last-child { right: 38%; top: 8%; height: 86%; opacity: .45; transform: rotate(-4deg); }
@media (max-width: 899px) { .ov-play-art img:last-child { display: none; } .ov-play-art img:first-child { left: 50%; right: auto; transform: translateX(-50%); } }
#bb-again[hidden] { display: none; }
