/* AJugarDino.CU — tema oscuro azul, verde neón, amarillo. Móvil vertical primero. */
:root {
  --bg: #0b1026; --bg2: #111838; --card: #171f45; --line: #26306b;
  --green: #22c55e; --green-dim: #16a34a; --yellow: #facc15;
  --text: #eef2ff; --muted: #9aa3c7; --danger: #ef4444;
  --radius: 14px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: "Courier New", ui-monospace, monospace; min-height: 100dvh; }
body { overscroll-behavior: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.error { color: #fca5a5; background: #450a0a; padding: 10px; border-radius: 10px; }
h1 { font-size: 22px; letter-spacing: 1px; margin: 12px 0 4px; text-align: center; }
h2 { font-size: 19px; margin: 6px 0 10px; }
h3 { font-size: 16px; margin: 18px 0 8px; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

/* --- Auth --- */
.auth-wrap { max-width: 420px; margin: 0 auto; padding: calc(20px + env(safe-area-inset-top)) 18px 30px; text-align: center; }
.logo { width: min(78vw, 320px); border-radius: 50%; border: 4px solid var(--line); box-shadow: 0 0 40px rgba(34,197,94,.35); animation: pop .5s ease; }
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.subtitle { color: var(--muted); margin: 4px 0 18px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.auth-tab { flex: 1; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font-weight: bold; }
.auth-tab.active { background: var(--green); color: #04140a; border-color: var(--green); }
.auth-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.auth-form input { width: 100%; padding: 13px; border-radius: 10px; border: 1px solid var(--line); background: #0d1330; color: var(--text); font-size: 16px; }
.field-row { display: flex; gap: 6px; }
.field-row input { flex: 1; }
.eye { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 0 12px; }
.hint { font-size: 12px; color: var(--muted); }
.version { font-size: 11px; color: var(--muted); margin-top: 18px; }

/* --- Botones --- */
.btn-primary { background: var(--green); color: #04140a; border: none; border-radius: 12px; padding: 14px 18px; font-weight: bold; font-size: 16px; }
.btn-primary:disabled { opacity: .5; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 12px 14px; font-weight: bold; }
.btn-jump, .btn-duck { flex: 1; padding: 18px 10px; font-size: 18px; font-weight: bold; border-radius: 14px; border: none; }
.btn-jump { background: var(--green); color: #04140a; }
.btn-duck { background: var(--yellow); color: #231a02; }
.icon-btn { background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 10px; font-size: 16px; position: relative; }
.badge { position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff; border-radius: 50%; font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; }

/* --- App --- */
#screen-main { max-width: 520px; margin: 0 auto; padding-bottom: calc(86px + env(safe-area-inset-bottom)); min-height: 100dvh; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; background: rgba(11,16,38,.96); border-bottom: 1px solid var(--line); }
.player-chip { display: flex; align-items: center; gap: 6px; font-weight: bold; font-size: 14px; min-width: 0; overflow: hidden; white-space: nowrap; }
.avatar-dot { width: 22px; height: 22px; border-radius: 6px; background: var(--green); flex: none; }
.balances { display: flex; gap: 8px; margin-left: auto; font-size: 12px; flex-wrap: wrap; justify-content: flex-end; }
.bal b { color: var(--green); }
.top-icons { display: flex; gap: 6px; }
#views { padding: 10px 12px; }
.view h2 { text-align: center; }

.game-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.biome-label { background: var(--bg2); border: 1px solid var(--line); padding: 6px 10px; border-radius: 999px; font-size: 13px; font-weight: bold; }
.score-now { margin-left: auto; font-size: 22px; font-weight: bold; color: var(--yellow); }
.biome-toast { text-align: center; font-weight: bold; color: var(--yellow); padding: 6px; animation: pop .4s ease; }
.game-wrap { position: relative; border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; background: linear-gradient(#bfe8ff, #e8f7d9); }
#game { display: block; width: 100%; height: auto; aspect-ratio: 720 / 300; touch-action: none; }
.game-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(11,16,38,.55); color: #fff; text-align: center; padding: 10px; }
.difficulty { display: flex; gap: 8px; margin: 10px 0; }
.diff { flex: 1; padding: 10px 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font-weight: bold; }
.diff.active { background: var(--green); color: #04140a; border-color: var(--green); }
.controls { display: flex; gap: 10px; }
.stats-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: 13px; color: var(--muted); margin: 10px 0; }
.stats-row b { color: var(--text); }
.booster-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.booster-chip { border: 1px solid var(--line); background: var(--bg2); border-radius: 999px; padding: 6px 10px; font-size: 13px; }
.booster-chip.active { background: var(--yellow); color: #231a02; border-color: var(--yellow); font-weight: bold; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.card label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; margin-bottom: 10px; }
.card input, .search { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: #0d1330; color: var(--text); font-size: 15px; }
.search { margin-bottom: 10px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list-item { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.list-item .grow { flex: 1; min-width: 0; }
.progress { height: 10px; background: var(--bg2); border-radius: 999px; overflow: hidden; margin: 6px 0; }
.progress-fill { height: 100%; background: var(--green); width: 0%; transition: width .3s; }

.shop-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.shop-cat { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font-weight: bold; font-size: 13px; }
.shop-cat.active { background: var(--green); color: #04140a; }
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shop-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-align: center; }
.shop-item.owned { border-color: var(--green); }
.shop-item .item-icon { font-size: 34px; }
.shop-item h4 { margin: 6px 0 2px; font-size: 14px; }
.shop-item p { font-size: 12px; color: var(--muted); margin: 2px 0 8px; min-height: 28px; }
.price { color: var(--yellow); font-weight: bold; }
.old-price { text-decoration: line-through; color: var(--muted); font-size: 12px; margin-right: 6px; }
.offer-badge { background: var(--danger); color: #fff; border-radius: 6px; padding: 2px 6px; font-size: 11px; font-weight: bold; }
.shop-preview { background: var(--bg2); border: 1px dashed var(--green); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; text-align: center; }

.rank-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.rank-tab { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font-weight: bold; }
.rank-tab.active { background: var(--yellow); color: #231a02; }
.podium { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 12px; }
.podium-spot { flex: 1; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 4px; }
.podium-spot.first { border-color: var(--yellow); background: #2b2305; }
.chat-box { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.chat-msg { background: var(--bg2); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; }

.bottom-nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(520px, 100%); display: flex; background: #0d1330; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 30; overflow-x: auto; scrollbar-width: none; }
.bottom-nav::-webkit-scrollbar { display: none; }
.nav-btn { flex: 1 0 76px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 2px 8px; background: none; border: none; color: var(--muted); font-size: 18px; }
.nav-btn span { font-size: 10px; font-weight: bold; white-space: nowrap; }
.nav-btn.active { color: var(--green); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 100px; background: #111; color: #fff; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--green); z-index: 50; max-width: 90vw; text-align: center; }
@media (min-width: 480px) { .shop-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
