:root {
  --bg: #0e1118; --panel: #171c27; --panel2: #1f2634; --line: #2d3647; --text: #e8ecf3; --muted: #9aa5b8;
  --accent: #ffb300; --good: #4caf50; --warn: #ff9800; --bad: #ef5350; --blue: #42a5f5;
  --common: #9e9e9e; --rare: #42a5f5; --epic: #ab47bc; --mythic: #ffb300;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; }
button { font: inherit; color: inherit; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
button:hover { border-color: var(--accent); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: var(--accent); color: #221a00; border-color: transparent; font-weight: 600; }
button.danger { border-color: var(--bad); }
kbd { font: 11px ui-monospace, monospace; background: #0008; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-left: 4px; color: var(--muted); }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=number], input[type=text], select { font: inherit; color: inherit; background: #0b0e14; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }

#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

#topbar { position: fixed; top: 0; left: 0; right: 0; height: 52px; display: flex; align-items: center; gap: 14px; padding: 0 14px; background: linear-gradient(#0e1118f2, #0e1118c8); border-bottom: 1px solid var(--line); z-index: 5; }
#topbar .brand { font-weight: 800; letter-spacing: .5px; color: var(--accent); }
#topbar .stat { font-size: 14px; white-space: nowrap; }
#topbar .trainer { display: flex; flex-direction: column; gap: 3px; min-width: 130px; }
#topbar .spacer { flex: 1; }
#topbar nav { display: flex; gap: 6px; }
#topbar nav button { padding: 5px 9px; font-size: 13px; }
@media (max-width: 1100px) { #topbar nav button kbd { display: none; } #topbar .brand { display: none; } #topbar { gap: 10px; } }
@media (max-width: 900px) { #topbar nav button { font-size: 12px; padding: 4px 6px; } #topbar .stat.trainer { min-width: 90px; } }
.bar { height: 6px; background: #0008; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.bar .fill { height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.bar.hp .fill { background: var(--good); }
.bar.hunger .fill { background: #ff7043; }
.bar.happy .fill { background: #ec407a; }
.bar.grow .fill { background: #26c6da; }
.bar.heat .fill { background: linear-gradient(90deg, #42a5f5, #ffb300, #ef5350); }

#scanner { position: fixed; right: 16px; top: 68px; width: 180px; background: #0e1118cc; border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-align: center; z-index: 4; backdrop-filter: blur(4px); }
#scanner-text { font-size: 13px; margin-top: 4px; min-height: 18px; font-weight: 600; }
#scanner .bars { display: flex; gap: 3px; justify-content: center; margin-top: 6px; }
#scanner .bars i { width: 14px; height: 8px; background: #2a3242; border-radius: 2px; }
#scanner .bars i.on { background: var(--good); }
#scanner .bars i.on.hot { background: var(--accent); }

#bag { position: fixed; left: 16px; bottom: 16px; background: #0e1118cc; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; z-index: 4; }
#bag .title { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
#bag .eggs { display: flex; gap: 6px; }
#bag .eggs .slot { width: 40px; height: 40px; border: 1px dashed var(--line); border-radius: 8px; display: grid; place-items: center; }
#bag .eggs .slot img { width: 34px; height: 34px; object-fit: contain; }

#hint { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--muted); background: #0e1118aa; padding: 4px 10px; border-radius: 8px; z-index: 4; }

#toasts { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 20; pointer-events: none; }
.toast { background: #1f2634ee; border: 1px solid var(--line); border-left: 4px solid var(--blue); padding: 8px 14px; border-radius: 8px; font-size: 14px; animation: toastin .25s ease; max-width: 520px; }
.toast.good { border-left-color: var(--good); } .toast.warn { border-left-color: var(--warn); } .toast.bad { border-left-color: var(--bad); } .toast.gold { border-left-color: var(--accent); }
@keyframes toastin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

#modal { position: fixed; inset: 0; background: #0009; display: grid; place-items: center; z-index: 10; }
#modal.hidden { display: none; }
.panel { width: min(1100px, 94vw); max-height: 90vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; box-shadow: 0 20px 60px #0008; }
.panel h2 { margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.panel h2 .close { margin-left: auto; }
.panel .sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs button.active { border-color: var(--accent); background: #2a2410; }
.grid { display: grid; gap: 12px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); } .grid.c3 { grid-template-columns: repeat(3, 1fr); } .grid.c4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.box { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.box h3 { margin: 0 0 8px; font-size: 15px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }
.right { margin-left: auto; }
.price { color: var(--accent); font-weight: 600; }
.status.perfect { color: var(--good); font-weight: 700; } .status.good { color: #9ccc65; } .status.warn { color: var(--warn); } .status.bad { color: var(--bad); font-weight: 700; } .status.empty { color: var(--muted); }

.comp { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.comp .eggimg { width: 110px; height: 110px; display: grid; place-items: center; background: radial-gradient(#2a3242, #171c27); border-radius: 12px; }
.comp .eggimg img { width: 90px; height: 90px; object-fit: contain; }
.temp-big { font-size: 28px; font-weight: 800; }
.temp-set { font-size: 13px; color: var(--muted); }

.card { position: relative; border-radius: 14px; padding: 12px; background: linear-gradient(160deg, #222a3a, #121620); border: 2px solid var(--common); display: flex; flex-direction: column; gap: 6px; }
.card.rare { border-color: var(--rare); box-shadow: 0 0 14px #42a5f544; }
.card.epic { border-color: var(--epic); box-shadow: 0 0 18px #ab47bc66; }
.card.mythic { border-color: var(--mythic); box-shadow: 0 0 26px #ffb30088; background: linear-gradient(160deg, #3a2a10, #121620); }
.card .art { height: 150px; display: grid; place-items: center; background: radial-gradient(#ffffff10, #0000); border-radius: 10px; }
.card .art img { max-height: 140px; max-width: 100%; object-fit: contain; filter: drop-shadow(0 6px 8px #0008); }
.card.big .art { height: 260px; } .card.big .art img { max-height: 250px; }
.card .name { font-weight: 800; font-size: 17px; display: flex; gap: 8px; align-items: center; }
.card .rarity { margin-left: auto; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; padding: 2px 8px; border-radius: 10px; background: #0006; }
.card .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 13px; }
.card .stats b { display: inline-block; width: 36px; color: var(--muted); font-weight: 600; }
.card .moves { font-size: 12px; display: grid; gap: 3px; }
.card .moves span { display: flex; gap: 6px; }
.card .moves .pw { margin-left: auto; color: var(--muted); }
.card .types { font-size: 12px; color: var(--muted); }
.card.unknown { opacity: .55; filter: grayscale(.8); }
.card.unknown .art img { filter: brightness(0) opacity(.6); }
.el { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; color: #000a; font-weight: 700; }

.hab-grid { grid-template-columns: minmax(200px, 280px) 1fr; }
.hab-detail { grid-template-columns: minmax(260px, 320px) 1fr; align-items: start; }
.arena-grid { grid-template-columns: 1fr minmax(260px, 340px); }
@media (max-width: 1000px) { .hab-grid, .hab-detail, .arena-grid, .grid.c2, .grid.c3 { grid-template-columns: 1fr; } .battle { grid-template-columns: 1fr 1fr; } }
.creature-row { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; }
.creature-row.sel { border-color: var(--accent); background: #2a2410; }
.creature-row img { width: 56px; height: 56px; object-fit: contain; }
.slots { display: flex; gap: 8px; }
.slot-decor { flex: 1; min-height: 64px; border: 1px dashed var(--line); border-radius: 10px; padding: 6px; font-size: 12px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.slot-decor.ok { border-color: var(--good); border-style: solid; } .slot-decor.wrong { border-color: var(--bad); border-style: solid; }

.battle { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fighter { text-align: center; }
.fighter img { max-height: 220px; filter: drop-shadow(0 10px 12px #0009); }
.fighter .hp { margin: 8px auto; max-width: 320px; }
.moves-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.moves-grid button { text-align: left; padding: 10px; }
.blog { background: #0b0e14; border: 1px solid var(--line); border-radius: 10px; padding: 10px; height: 180px; overflow: auto; font-size: 13px; display: flex; flex-direction: column-reverse; }
.blog div { padding: 2px 0; border-bottom: 1px dashed #ffffff10; }
.hit { animation: hit .3s; } @keyframes hit { 0%,100% { transform: none; } 50% { transform: translateX(-8px); filter: brightness(2); } }

.reveal { text-align: center; }
.reveal .card { margin: 0 auto; width: 380px; animation: reveal .8s ease; }
@keyframes reveal { 0% { transform: scale(.4) rotateY(90deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.shop-item { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; }
.shop-item .ico { font-size: 24px; text-align: center; }
.locked { opacity: .5; }
.log { font-size: 13px; max-height: 240px; overflow: auto; }
.log div { padding: 4px 0; border-bottom: 1px dashed #ffffff12; }
.quality { color: var(--accent); }

/* --- account / avatars / online --- */
#tb-account { display: flex; align-items: center; gap: 6px; }
.avatar { border-radius: 50%; object-fit: cover; background: #0b0e14; border: 2px solid var(--line); }
.acc-name { font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gems { color: #80deea; font-weight: 600; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.avatar-card { text-align: center; }
.avatar-card .avatar { width: 96px; height: 96px; margin: 4px auto 6px; display: block; }
.avatar-card.sel .avatar { border-color: var(--accent); box-shadow: 0 0 14px #ffb30066; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; background: #0006; }
.badge.limited { color: var(--mythic); border: 1px solid var(--mythic); }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); margin-right: 4px; }
.pvp-timer { font-weight: 800; color: var(--accent); }
.player-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; }
.player-row .avatar { width: 36px; height: 36px; }
.form { display: grid; gap: 8px; max-width: 360px; }
.form input { width: 100%; }
.error { color: var(--bad); font-size: 13px; }
.pack { text-align: center; }
.pack .big { font-size: 26px; font-weight: 800; color: #80deea; }
.notice { background: #2a2410; border: 1px solid var(--accent); border-radius: 10px; padding: 10px; font-size: 13px; }
select.lang { min-width: 140px; }
#trial-banner { position: fixed; right: 66px; bottom: 12px; display: flex; align-items: center; gap: 10px; background: #2a2410ee; border: 1px solid var(--accent); border-radius: 12px; padding: 8px 12px; font-size: 13px; z-index: 4; }
#trial-banner.hidden { display: none; }

/* --- instellingen: checkboxes/radios niet oprekken --- */
.form input[type=checkbox], .form input[type=radio], label.check input { width: auto; margin-right: 8px; }
label.check { display: flex; align-items: center; gap: 6px; }

/* --- touch/muis-besturing --- */
#game { touch-action: none; }
#dig-btn { position: fixed; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 4; padding: 14px 26px; font-size: 16px; font-weight: 700; border-radius: 30px; background: #1f2634ee; border: 2px solid var(--line); color: var(--muted); user-select: none; -webkit-user-select: none; touch-action: none; }
#dig-btn.near { border-color: var(--good); color: var(--text); }
#dig-btn.ready { background: var(--accent); color: #221a00; border-color: transparent; box-shadow: 0 0 18px #ffb30088; animation: digpulse 1s infinite; }
#dig-btn.hidden { display: none; }
@keyframes digpulse { 50% { transform: translateX(-50%) scale(1.06); } }
.move-marker { pointer-events: none; }

/* --- mobiel --- */
@media (max-width: 760px), (pointer: coarse) {
  #hint { display: none; }
  #topbar { height: 48px; gap: 8px; padding: 0 8px; overflow: visible; }
  #topbar #tb-day, #topbar #tb-biome { display: none; }
  #topbar .stat.trainer { min-width: 0; flex: 1; }
  #topbar .stat.trainer span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  #topbar .spacer { display: none; }
  /* menu op touch: alleen iconen. Staand: verticale kolom links; liggend: rij bovenin (zie aparte regels hieronder). */
  #topbar nav button span { display: none; }
  #topbar nav button::before { content: attr(data-icon); font-size: 22px; line-height: 1; margin: 0; }
  #topbar nav button kbd { display: none; }
  #topbar nav button.active { background: var(--accent); border-color: transparent; }
  #topbar nav button .badge { position: absolute; top: -4px; right: -4px; margin: 0; }
  /* sluitknop altijd bereikbaar: koptekst van een venster blijft bovenaan plakken */
  .panel > h2 { position: sticky; top: -12px; margin: -12px -12px 8px; padding: 10px 12px; background: var(--panel); z-index: 3; border-bottom: 1px solid var(--line); }
  #scanner { width: 120px; padding: 6px; top: 56px; right: 8px; }
  #scanner canvas { width: 100px; height: 100px; }
  #scanner-text { font-size: 11px; }
  #bag { left: 8px; bottom: 8px; padding: 6px; }
  #bag .eggs .slot { width: 32px; height: 32px; }
  #trial-banner { right: 58px; bottom: 64px; font-size: 12px; padding: 6px 8px; max-width: 58vw; }   /* boven de eiertas, links van de fullscreen-knop */
  #dig-btn { bottom: 118px; }
  .panel { width: 100vw; max-height: 100vh; border-radius: 0; padding: 12px; }
  #modal { place-items: start center; }
  .panel h2 { font-size: 20px; }
  .grid.c2, .grid.c3, .grid.c4, .hab-grid, .hab-detail, .arena-grid { grid-template-columns: 1fr; }
  .battle { grid-template-columns: 1fr 1fr; }
  .fighter img { max-height: 140px; }
  .comp { grid-template-columns: 80px 1fr; }
  .comp .eggimg { width: 80px; height: 80px; }
  button { min-height: 40px; }
}

/* --- intro --- */
.intro { max-width: 980px; margin: 0 auto; }
.intro-hero { position: relative; display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: center; padding: 22px; border-radius: 18px;
  background: radial-gradient(ellipse at 20% 30%, #3a2a10 0%, #1a1420 55%, #0b0e14 100%); border: 1px solid #ffb30055; box-shadow: inset 0 0 60px #000a, 0 0 40px #ffb30022; overflow: hidden; }
.intro-dragon img { width: 260px; height: 260px; object-fit: contain; filter: drop-shadow(0 0 24px #ff7a2a99) drop-shadow(0 12px 10px #000c); animation: hover 4s ease-in-out infinite; }
@keyframes hover { 50% { transform: translateY(-8px); } }
.intro-kicker { color: var(--accent); font-weight: 800; letter-spacing: 2px; text-transform: uppercase; font-size: 12px; }
.intro h1 { margin: 4px 0 2px; font-size: 40px; line-height: 1.05; background: linear-gradient(90deg, #ffe082, #ffb300, #ff7043); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro-tag { color: var(--muted); font-style: italic; margin-bottom: 10px; }
.intro-lead { font-size: 15px; line-height: 1.55; margin: 0; }
.intro-eggs { position: absolute; right: 18px; bottom: 10px; display: flex; gap: 4px; opacity: .9; }
.intro-eggs img { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 4px 6px #000a); }
.intro-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.intro-step { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.intro-art { height: 110px; display: grid; place-items: center; background: radial-gradient(#ffffff0e, #0000); border-radius: 10px; }
.intro-art img { max-height: 100px; max-width: 100%; object-fit: contain; filter: drop-shadow(0 6px 6px #0009); }
.intro-n { display: inline-block; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #221a00; font-weight: 800; text-align: center; line-height: 22px; font-size: 12px; margin-right: 6px; }
.intro-step p { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.intro-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
button.big { font-size: 18px; padding: 12px 26px; border-radius: 30px; }
@media (max-width: 760px) {
  .intro-hero { grid-template-columns: 1fr; text-align: center; padding: 14px; }
  .intro-dragon img { width: 160px; height: 160px; }
  .intro h1 { font-size: 30px; }
  .intro-eggs { position: static; justify-content: center; margin-top: 8px; }
  .intro-steps { grid-template-columns: 1fr 1fr; }
}

/* --- broedkamer indicator --- */
.tempgauge { display: flex; gap: 4px; margin: 4px 0; }
.tempgauge i { flex: 1; text-align: center; font-style: normal; font-size: 13px; padding: 4px 0; border-radius: 6px; background: #0b0e14; border: 1px solid var(--line); opacity: .45; }
.tempgauge i.on { opacity: 1; border-color: var(--text); }
.tempgauge i.on.perfect, .tempgauge i.on.good { background: #1e3a22; border-color: var(--good); }
.tempgauge i.on.warn { background: #3a2a10; border-color: var(--warn); }
.tempgauge i.on.bad { background: #3a1414; border-color: var(--bad); }
.advice { font-size: 13px; font-weight: 600; }
.advice.perfect, .advice.good { color: var(--good); } .advice.warn { color: var(--warn); } .advice.bad { color: var(--bad); }

/* --- groei-overzicht --- */
.growbox { background: #0b0e14; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.growbox.running { border-color: #26c6da66; } .growbox.paused { border-color: var(--warn); } .growbox.adult { border-color: var(--good); color: var(--good); }
.growbox .ok { color: var(--good); font-weight: 600; } .growbox .warn { color: var(--warn); font-weight: 600; }
.growbar { position: relative; height: 18px; background: #1a2130; border-radius: 9px; overflow: hidden; margin: 6px 0 4px; border: 1px solid var(--line); }
.growbar .fill { height: 100%; background: linear-gradient(90deg, #26c6da, #4caf50); transition: width .4s; }
.growbar span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; }
.checks { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; display: grid; gap: 2px; }
.checks li.ok { color: var(--good); } .checks li.no { color: var(--warn); }

/* --- kaart --- */
.map-wrap { display: grid; grid-template-columns: minmax(280px, 700px) 1fr; gap: 16px; align-items: start; }
#map-canvas { width: 100%; max-width: 700px; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 12px; background: #0b1a2a; image-rendering: pixelated; }
.map-legend { display: grid; gap: 6px; }
.map-legend .sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 6px; border: 1px solid #0006; }
.map-legend .sw.dot { background: #ff3b30; border-radius: 50%; } .map-legend .sw.home { background: #fff; }
@media (max-width: 760px) { .map-wrap { grid-template-columns: 1fr; } }

/* --- pauze, schatkamer, bewaker --- */
.pausebtn { padding: 2px 8px; font-size: 14px; min-height: 0; line-height: 1.4; }
.pausebtn.active { background: var(--accent); color: #221a00; border-color: transparent; }
.treasure-card { text-align: center; }
.treasure-art { height: 100px; display: grid; place-items: center; background: radial-gradient(#ffffff12, #0000); border-radius: 10px; margin-bottom: 6px; }
.treasure-card.unknown { opacity: .55; filter: grayscale(.9); }
.treasure-card.unknown img, .treasure-card.unknown .item-icon { filter: brightness(0) opacity(.5); }

.avatar-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 8px; font-size: 11px; }
.avatar-pick.sel { border-color: var(--accent); background: #2a2410; }
.avatar-pick .avatar { width: 44px; height: 44px; }

#pause-overlay { position: fixed; inset: 0; z-index: 4; /* onder de topbar (5) en de menu's (10): menu's blijven bereikbaar */ background: #0a0d14aa; backdrop-filter: blur(2px); display: grid; place-items: center; text-align: center; font-size: 22px; font-weight: 800; cursor: pointer; }
#pause-overlay.hidden { display: none; }
#pause-overlay .big { font-size: 64px; margin-bottom: 8px; }

/* ---- gevecht: teams, effecten, animaties ---- */
.fighter .stage { position: relative; display: inline-block; }
.fighter .stage img { position: relative; z-index: 1; transition: transform .2s; }
.fxlayer { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.fxlayer .fx { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 190px; height: 190px; display: grid; place-items: center; }
.fxlayer .fx img { max-width: 100%; max-height: 100%; filter: drop-shadow(0 0 8px #fff8); }
.fxlayer .fx.burst { border-radius: 50%; background: radial-gradient(#fff9, #ffffff00 70%); animation: burst .6s ease-out forwards; }
.fxlayer .dmg { position: absolute; left: 50%; top: 20%; transform: translateX(-50%); font-weight: 900; font-size: 26px; color: #fff; text-shadow: 0 2px 6px #000, 0 0 10px #f44; animation: floatup .9s ease-out forwards; }
.fxlayer .dmg.big { font-size: 36px; color: #ffd54f; }
@keyframes floatup { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -60px); } }
@keyframes burst { from { opacity: .9; transform: translate(-50%, -50%) scale(.3); } to { opacity: 0; transform: translate(-50%, -50%) scale(1.4); } }
.fighter img.lunge-right { animation: lungeR .45s ease; } .fighter img.lunge-left { animation: lungeL .45s ease; }
@keyframes lungeR { 0% { translate: 0 0; } 40% { translate: 70px 0; } 100% { translate: 0 0; } }
@keyframes lungeL { 0% { translate: 0 0; } 40% { translate: -70px 0; } 100% { translate: 0 0; } }
.fighter img.hit { animation: shake .42s ease; filter: brightness(1.6) drop-shadow(0 0 12px #f66); }
@keyframes shake { 0%, 100% { translate: 0 0; } 20% { translate: -8px 0; } 40% { translate: 8px 0; } 60% { translate: -6px 0; } 80% { translate: 6px 0; } }
.fighter img.faint { filter: grayscale(1) brightness(.5); opacity: .5; transition: all .5s; }
.fighter .status { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; min-height: 20px; margin-top: 4px; }
.fighter .st { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: #0006; border: 1px solid var(--line); }
.fighter .st.charged { color: #ffd54f; border-color: #ffd54f88; } .fighter .st.frozen { color: #80deea; } .fighter .st.dot { color: #ef5350; } .fighter .st.up { color: var(--good); } .fighter .st.down { color: var(--warn); }
.bench { display: flex; gap: 8px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.bench-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #0004; min-width: 90px; }
.bench-item img { width: 48px; height: 48px; object-fit: contain; } .bench-item.ko img { filter: grayscale(1) brightness(.5); }
.bench-item button { font-size: 11px; padding: 3px 7px; }
.move-btn .kind { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.move-btn.kind-defend { border-color: #42a5f566; } .move-btn.kind-support { border-color: #66bb6a66; }
.creature-row .order { margin-left: 6px; font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--accent); color: #221a00; font-weight: 800; }
.creature-row.unavailable { opacity: .6; }
.moveslist { display: grid; gap: 4px; font-size: 12px; }
.moveslist div { display: flex; gap: 8px; align-items: baseline; padding: 4px 8px; border-radius: 8px; background: #0004; border-left: 3px solid var(--line); }
.moveslist div.kind-defend { border-left-color: #42a5f5; } .moveslist div.kind-support { border-left-color: #66bb6a; } .moveslist div.kind-attack { border-left-color: #ef5350; }
.opp-list { display: grid; gap: 6px; margin-top: 8px; }
.opp { display: flex; gap: 10px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 10px; }
.opp img { width: 56px; height: 56px; object-fit: contain; transform: scaleX(-1); }
.bench-item.reserve { border-style: dashed; opacity: .85; }
.wonegg { display: flex; gap: 14px; align-items: center; justify-content: center; margin: 8px auto; padding: 10px; border: 1px solid var(--good); border-radius: 12px; background: #1b2a1b; max-width: 460px; text-align: left; }
.fxlayer .dmg.crit { color: #ff5252; text-shadow: 0 2px 6px #000, 0 0 14px #ff1744; animation: floatup 1.1s ease-out forwards, critpop .35s ease-out; }
@keyframes critpop { 0% { scale: .6; } 60% { scale: 1.4; } 100% { scale: 1; } }
.move-btn .pp { float: right; font-size: 11px; padding: 1px 7px; border-radius: 10px; background: #0006; color: var(--muted); }
.move-btn .pp.low { color: var(--warn); } .move-btn .pp.empty { color: var(--bad); }
.move-btn.pick { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.moveslist .pp { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: #0006; color: var(--muted); white-space: nowrap; }
.moveslist .pp.low { color: var(--warn); } .moveslist .pp.empty { color: var(--bad); }
.moveslist button.small { font-size: 11px; padding: 2px 7px; }
.col-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #0003; }
.col-stage > .small { margin-bottom: 4px; text-align: center; }
.card.col-placeholder { opacity: .6; justify-content: center; text-align: center; border-style: dashed; }
.card.col-placeholder .art { font-size: 40px; }
@media (max-width: 700px) { .col-pair { grid-template-columns: 1fr; } }
#cave-btn { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 4; padding: 12px 24px; font-size: 15px; font-weight: 700; border-radius: 30px; background: #2a1f3dee; border: 2px solid #9575cd; color: #fff; }
#cave-btn.hidden { display: none; }
.treasure-section { margin: 14px 0 8px; display: flex; align-items: center; gap: 10px; }
.treasure-section .rar { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; padding: 2px 8px; border-radius: 10px; background: #0006; }
.treasure-card.rare { border-color: var(--rare); } .treasure-card.epic { border-color: var(--epic); box-shadow: 0 0 12px #ab47bc44; } .treasure-card.mythic { border-color: var(--mythic); box-shadow: 0 0 18px #ffb30066; }
/* ---- vrienden, badge, fullscreen ---- */
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; text-align: center; line-height: 18px; margin-left: 4px; font-style: normal; }
.badge.hidden { display: none; }
#topbar nav button { position: relative; }
.msgs { display: grid; gap: 6px; max-height: 420px; overflow: auto; }
.msg { padding: 8px 10px; border-radius: 10px; background: #0004; border-left: 3px solid var(--line); }
.msg.unread { border-left-color: var(--accent); background: #2a241033; }
a.btn { display: inline-block; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); text-decoration: none; font-size: 13px; }
a.btn.share-whatsapp { border-color: #25d36688; } a.btn.share-telegram { border-color: #2aabee88; } a.btn.share-x { border-color: #ffffff44; } a.btn.share-facebook { border-color: #1877f288; }
#fs-btn { position: fixed; right: 12px; bottom: 12px; z-index: 5; width: 42px; height: 42px; border-radius: 12px; background: #0e1118cc; border: 1px solid var(--line); color: #fff; font-size: 20px; padding: 0; }
#fs-btn.hidden { display: none; }
body.touch kbd { display: none !important; }
/* ---- responsive: tablet en telefoon ---- */
.tabs { flex-wrap: wrap; }
.row { flex-wrap: wrap; }
.panel img { max-width: 100%; }
@media (max-width: 1000px) { .grid.c4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px), (pointer: coarse) {
  .grid.c4 { grid-template-columns: repeat(2, 1fr); }
  .moves-grid { grid-template-columns: 1fr; }
  .battle { gap: 8px; }
  .fighter .stage img { max-height: 150px; }
  .fxlayer .fx { width: 130px; height: 130px; }
  .bench-item { min-width: 70px; } .bench-item img { width: 40px; height: 40px; }
  .card.big { width: auto; }
  .reveal .card { width: min(380px, 100%); }
  .opp img { width: 44px; height: 44px; }
  input[type="text"], input[type="email"], input[type="password"], input[type="number"], select { font-size: 16px; }   /* geen auto-zoom op iOS */
  #cave-btn { bottom: 168px; font-size: 14px; padding: 10px 16px; }
  #fs-btn { right: 8px; bottom: 60px; }
  .treasure-card .treasure-art img { width: 72px; height: 72px; }
  .col-pair { padding: 4px; }
  .msgs { max-height: 240px; }
}
@media (max-width: 480px) {
  .battle { grid-template-columns: 1fr 1fr; }
  .fighter .stage img { max-height: 120px; }
  .panel h2 { font-size: 18px; }
  .panel h2 .close { font-size: 13px; padding: 4px 8px; }
  .grid.c4 { grid-template-columns: repeat(2, 1fr); }
  .comp { grid-template-columns: 1fr; }
}
@media (max-width: 900px) { #topbar #tb-day { display: none; } #topbar .stat.trainer { min-width: 140px; } #topbar .stat.trainer span { white-space: nowrap; font-size: 12px; } }
}
@media (max-width: 900px) { #hint { display: none; } }
/* ---- menu-plaatsing op touch ---- */
/* staand: kolom met grote tikknoppen aan de linkerrand */
@media ((max-width: 760px) or (pointer: coarse)) and (orientation: portrait) {
  #topbar nav { position: fixed; left: 6px; top: 56px; flex-direction: column; gap: 5px; max-height: calc(100vh - 150px); overflow-y: auto; scrollbar-width: none; padding: 2px; z-index: 5; }
  #topbar nav::-webkit-scrollbar { display: none; }
  #topbar nav button { width: 46px; height: 46px; padding: 0; display: grid; place-items: center; border-radius: 12px; background: #0e1118d9; border: 1px solid var(--line); box-shadow: 0 2px 8px #0008; backdrop-filter: blur(4px); position: relative; }
  #pause-overlay { padding: 0 16px 0 72px; box-sizing: border-box; font-size: 18px; }   /* tekst rechts van de menukolom */
}
/* liggend: compacte rij icoonknoppen in de bovenbalk */
@media ((max-width: 760px) or (pointer: coarse)) and (orientation: landscape) {
  #topbar { gap: 6px; }
  #topbar nav { display: flex; gap: 3px; margin-left: auto; flex-shrink: 0; }
  #topbar nav button { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border-radius: 9px; position: relative; }
  #topbar nav button::before { font-size: 18px; }
  #topbar .stat.trainer { max-width: 120px; }
  #trial-banner { bottom: 8px; right: 58px; }
  #scanner { width: 100px; padding: 4px; } #scanner canvas { width: 80px; height: 80px; }
  #dig-btn { bottom: 56px; } #cave-btn { bottom: 104px; }
}
/* pc: icoon én naam */
@media (pointer: fine) and (min-width: 761px) {
  #topbar nav button { white-space: nowrap; }
  #topbar nav button::before { content: attr(data-icon); margin-right: 5px; }
  #topbar nav button[data-panel="menu"]::before { content: none; }
}

/* tekstknop (wachtwoord vergeten) */
button.linkbtn { background: none; border: none; color: var(--accent, #e8c15a); text-decoration: underline; padding: 4px 0; font-size: 13px; box-shadow: none; }
button.linkbtn:hover { opacity: .85; }

/* deelkaart (vrienden) */
.share-preview { width: 100%; border-radius: 10px; margin-top: 8px; display: block; box-shadow: 0 6px 20px #0008; }
.share-thumb { display: block; width: 100%; max-width: 280px; border-radius: 8px; margin-top: 6px; }
.share-friends label { display: inline-flex; align-items: center; gap: 4px; margin: 2px 10px 2px 0; }

/* tekstvak (probleem melden) */
textarea { font: inherit; color: inherit; background: #0e1118; border: 1px solid var(--line); border-radius: 8px; padding: 8px; resize: vertical; min-height: 70px; }
