/*! REXAROX · © 2026 Rexarox.com · created by NicoraX.com – Alle Rechte vorbehalten. */
@font-face { font-family: 'Poppins'; font-weight: 500; font-display: swap; src: url('../assets/fonts/poppins-medium.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 600 800; font-display: swap; src: url('../assets/fonts/poppins-bold.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  --bg: #0d0907; --panel: rgba(28, 20, 14, 0.92); --stone: #3a2e24; --stone-2: #4d3d2f;
  --amber: #ffb43a; --amber-2: #ff8a1a; --gold: #ffe2a0; --text: #f6ecdc; --muted: #b9a68c;
  --red: #e0453a; --radius: 18px;
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: 'Poppins', system-ui, sans-serif; overflow: hidden; overscroll-behavior: none; user-select: none; -webkit-user-select: none; touch-action: none; }
button { font: inherit; color: inherit; cursor: pointer; }
#app { position: fixed; inset: 0; }
#stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, #1d140d, #070504); }
#game { display: block; box-shadow: 0 0 60px rgba(0, 0, 0, 0.8); }

/* ---------- Screens ---------- */
.screen { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; overflow-y: auto; padding: 16px calc(16px + var(--safe-r)) calc(16px + var(--safe-b)) calc(16px + var(--safe-l)); background: radial-gradient(ellipse at 50% 30%, rgba(60, 36, 16, 0.92), rgba(8, 5, 3, 0.97) 70%); z-index: 10; }
.screen.active { display: flex; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: scale(1.01); } to { opacity: 1; transform: none; } }

#scr-title { justify-content: center; gap: 8px; }
.title-bg { position: absolute; inset: 0; background: url('../assets/img/og.jpg') center/cover; opacity: .14; filter: blur(6px); pointer-events: none; }
.logo { width: min(560px, 82vw, 62vh * 1.35); height: auto; position: relative; -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 72%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 72%, transparent 100%); animation: float 5s ease-in-out infinite; }
.logo.small { width: min(240px, 50vw); animation: none; }
@keyframes float { 50% { transform: translateY(-8px); } }
.claim { margin: -6px 0 6px; position: relative; color: var(--gold); font-weight: 700; font-size: clamp(14px, 2vw, 18px); letter-spacing: .18em; text-transform: uppercase; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); text-align: center; }
@media (max-height: 520px) { .claim { display: none; } }
.menu { display: flex; flex-direction: column; gap: 10px; width: min(320px, 80vw); position: relative; }
@media (max-height: 520px) { .menu { flex-direction: row; flex-wrap: wrap; justify-content: center; width: auto; } .menu .btn { min-width: 150px; } .logo { width: min(420px, 60vw, 58vh * 1.35); } }

.btn { position: relative; padding: 12px 22px; border-radius: 14px; border: 2px solid #6b4f33; background: linear-gradient(180deg, #4d3a28, #2c2017); color: var(--text); font-weight: 700; font-size: 18px; letter-spacing: .02em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 4px 0 #160f09, 0 8px 18px rgba(0, 0, 0, 0.4); transition: transform .08s, filter .15s; }
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 0 #160f09; }
.btn.primary { border-color: #ffcf6a; background: linear-gradient(180deg, #ffc455, #e0770e); color: #2a1404; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 4px 0 #7a3c06, 0 10px 26px rgba(255, 140, 30, 0.35); }
.btn.ghost { background: transparent; border-style: dashed; }
.btn.danger { border-color: #8a2a22; background: linear-gradient(180deg, #6a2a22, #3a1612); }
.btn:disabled { opacity: .45; pointer-events: none; }
.hidden { display: none !important; }
.copy { color: var(--muted); font-size: 13px; margin-top: 14px; position: relative; text-align: center; }
.copy a, .legal a { color: var(--gold); text-decoration: none; }
.copy.small { font-size: 12px; margin-top: 10px; }

.bar { width: 100%; max-width: 1100px; display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bar h2 { flex: 1; margin: 0; font-size: clamp(20px, 3vw, 30px); color: var(--gold); text-shadow: 0 2px 0 #000; }
.bar-right { display: flex; gap: 8px; }
.pill { background: rgba(0, 0, 0, 0.45); border: 1px solid #5a4430; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.icon-btn { width: 46px; height: 46px; border-radius: 50%; border: 2px solid #6b4f33; background: linear-gradient(180deg, #4d3a28, #2c2017); font-size: 24px; font-weight: 700; line-height: 1; display: grid; place-items: center; flex: none; }

/* ---------- Levelkarte ---------- */
.map-dino { width: 100%; max-width: 1100px; display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid #4a3828; border-radius: var(--radius); padding: 8px 12px; margin-bottom: 12px; }
.map-dino img { width: 64px; height: 52px; object-fit: cover; border-radius: 10px; }
.map-dino .info { flex: 1; min-width: 0; }
.map-dino b { color: var(--gold); }
.map-dino small { color: var(--muted); display: block; }
.map-dino .btn { padding: 8px 14px; font-size: 15px; }
.levels { width: 100%; max-width: 1100px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 760px) { .levels { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 761px) and (max-width: 980px) { .levels { grid-template-columns: repeat(3, 1fr); } }
.lvl { position: relative; aspect-ratio: 4 / 3.2; border-radius: var(--radius); border: 2px solid #5a4430; overflow: hidden; padding: 10px; text-align: left; display: flex; flex-direction: column; justify-content: flex-end; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); transition: transform .12s; }
.lvl:hover { transform: translateY(-3px); }
.lvl canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lvl .num { position: absolute; top: 8px; left: 10px; font-size: 26px; font-weight: 800; color: #fff; text-shadow: 0 2px 6px #000; }
.lvl .nm { position: relative; font-weight: 700; font-size: 15px; text-shadow: 0 2px 4px #000; line-height: 1.2; }
.lvl .st { position: relative; color: var(--amber); font-size: 16px; letter-spacing: 2px; text-shadow: 0 1px 3px #000; }
.lvl.locked { filter: grayscale(0.85) brightness(0.55); pointer-events: none; }
.lvl.locked::after { content: '🔒'; position: absolute; top: 8px; right: 10px; font-size: 22px; }
.lvl.next { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(255, 180, 58, 0.4), 0 0 26px rgba(255, 160, 40, 0.45); }

/* ---------- Dinos ---------- */
.dinos { width: 100%; max-width: 1150px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 900px) { .dinos { grid-template-columns: repeat(2, 1fr); } }
.dino { position: relative; background: var(--panel); border: 2px solid #4a3828; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-align: left; padding: 0; }
.dino.sel { border-color: var(--amber); box-shadow: 0 0 24px rgba(255, 160, 40, 0.45); }
.dino .pic { position: relative; height: 150px; background: #151010 center/cover no-repeat; }
.dino .pic::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(20, 14, 10, 0.95)); }
.dino .body { padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.dino h3 { margin: 0; font-size: 19px; color: var(--gold); }
.dino .ab { font-size: 13px; color: var(--amber); font-weight: 700; }
.dino p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.evo { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.evo span.on { color: var(--gold); }
.evo i { font-style: normal; opacity: .5; }
.xp { height: 7px; background: rgba(0, 0, 0, 0.5); border-radius: 4px; overflow: hidden; }
.xp b { display: block; height: 100%; background: linear-gradient(90deg, #ffcf5a, #ff8a1a); }
.dino.locked .pic { filter: grayscale(1) brightness(0.25); }
.dino.locked .egg { position: absolute; top: 0; left: 0; right: 0; height: 150px; display: grid; place-items: center; font-size: 54px; z-index: 2; }
.dino .tag { position: absolute; top: 8px; right: 8px; z-index: 2; background: var(--amber); color: #2a1404; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.hint { color: var(--muted); font-size: 13px; text-align: center; max-width: 700px; }

/* ---------- Panels/Overlays ---------- */
.panel { background: var(--panel); border: 2px solid #5a4430; border-radius: 22px; padding: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.panel.center { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: min(420px, 92vw); max-width: 92vw; text-align: center; }
.panel h2 { margin: 0 0 4px; color: var(--gold); font-size: clamp(24px, 4vw, 34px); }
.opts { width: min(520px, 100%); display: flex; flex-direction: column; gap: 14px; }
.toggle { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; cursor: pointer; }
.toggle input { width: 26px; height: 26px; accent-color: var(--amber); }
.controls-help h3 { margin: 6px 0; color: var(--gold); }
.controls-help p { margin: 4px 0; color: var(--muted); font-size: 14px; }
kbd { background: #2a1f16; border: 1px solid #6b4f33; border-bottom-width: 3px; border-radius: 6px; padding: 1px 6px; font-family: inherit; font-size: 12px; color: var(--text); }
.legal { color: var(--muted); font-size: 12px; text-align: center; line-height: 1.6; }

.overlay { position: absolute; inset: 0; display: none; overflow-y: auto; align-items: center; justify-content: center; background: rgba(5, 3, 2, 0.6); backdrop-filter: blur(3px); z-index: 30; padding: 16px; }
.overlay.active { display: flex; animation: fade .25s ease; }
.overlay .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.stars { font-size: 52px; letter-spacing: 6px; line-height: 1; }
.stars span { color: #4a3a2a; text-shadow: 0 2px 0 #000; display: inline-block; }
.stars span.on { color: var(--amber); text-shadow: 0 0 20px rgba(255, 180, 40, 0.8), 0 2px 0 #7a3c06; animation: pop .45s cubic-bezier(.3, 1.8, .5, 1) both; }
.stars span:nth-child(2) { animation-delay: .25s; } .stars span:nth-child(3) { animation-delay: .5s; }
@keyframes pop { from { transform: scale(0) rotate(-40deg); } to { transform: none; } }
.stats { display: grid; grid-template-columns: auto auto; gap: 4px 18px; font-size: 16px; }
.stats div:nth-child(odd) { color: var(--muted); text-align: right; }
.stats div:nth-child(even) { font-weight: 700; text-align: left; }
.news { color: #7fe8ff; font-weight: 700; display: flex; flex-direction: column; gap: 4px; }
.final p { color: var(--muted); max-width: 460px; }

/* ---------- HUD & Touch ---------- */
.hud-pause { position: absolute; top: calc(10px); right: calc(10px + var(--safe-r)); z-index: 20; width: 42px; height: 42px; font-size: 14px; opacity: .85; }
.touch { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 calc(18px + var(--safe-r)) calc(16px + var(--safe-b)) calc(18px + var(--safe-l)); z-index: 20; pointer-events: none; }
.tright { display: flex; gap: 14px; align-items: flex-end; }
.tbtn { pointer-events: auto; width: 84px; height: 84px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.4); background: rgba(20, 12, 8, 0.38); color: #fff; font-size: 30px; backdrop-filter: blur(2px); touch-action: none; }
.tbtn.jump { width: 100px; height: 100px; }
.tbtn.ability { width: 70px; height: 70px; border: none; color: rgba(255,255,255,0.5); margin-bottom: 30px; background: radial-gradient(circle, rgba(20,12,8,0.6) 58%, transparent 60%), conic-gradient(var(--amber) var(--cd, 360deg), rgba(255,255,255,0.25) 0); }
.tbtn.ability.ready { color: var(--amber); box-shadow: 0 0 18px rgba(255, 180, 60, 0.6); }
.tbtn.down { background: rgba(255, 180, 60, 0.35); transform: scale(0.94); }

.rotate { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; text-align: center; background: #0d0907; color: var(--gold); font-size: 26px; font-weight: 700; line-height: 1.6; }
.rotate small { color: var(--muted); font-size: 14px; }
@media (orientation: portrait) and (max-width: 820px) { .rotate.need { display: flex; } }
.toast { position: absolute; left: 50%; top: 18px; transform: translateX(-50%) translateY(-220%); opacity: 0; background: var(--panel); border: 1px solid var(--amber); padding: 10px 18px; border-radius: 999px; font-weight: 700; z-index: 50; transition: transform .3s; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

@media (max-height: 520px) {
  .panel { padding: 14px 18px; }
  .panel.center { gap: 6px; }
  .stars { font-size: 34px; }
  .stats { font-size: 13.5px; gap: 2px 14px; }
  .overlay .btn { padding: 9px 16px; font-size: 16px; }
  .dinos { grid-template-columns: repeat(5, minmax(150px, 1fr)); overflow-x: auto; }
  .dino .pic { height: 96px; }
  .dino.locked .egg { height: 96px; font-size: 40px; }
  .dino p { font-size: 11.5px; }
}

/* ---------- v1.2: Sprache, Update-Hinweis, Vorschau-Tag ---------- */
.lang-row { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; flex-wrap: wrap; }
.lang-row span { margin-right: 6px; }
.lang-btn { padding: 6px 14px; border-radius: 999px; border: 2px solid #6b4f33; background: transparent; color: var(--text); font-weight: 700; }
.lang-btn.on { background: var(--amber); border-color: var(--amber); color: #2a1404; }
.dino .tag.ghost { background: rgba(0, 0, 0, 0.55); color: var(--gold); border: 1px solid var(--gold); }
.update { position: absolute; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translate(-50%, 160%); display: flex; align-items: center; gap: 14px; background: var(--panel); border: 2px solid var(--amber); border-radius: 18px; padding: 10px 12px 10px 18px; z-index: 60; font-weight: 700; transition: transform .35s; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); }
.update.show { transform: translate(-50%, 0); }
.update .btn { padding: 8px 16px; font-size: 15px; }
/* Inhalte in scrollenden Bildschirmen nicht stauchen; lange Dino-Namen umbrechen */
.screen > * { flex-shrink: 0; }
.dino h3 { overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 1100px), (max-height: 520px) { .dino h3 { font-size: 16px; } }

/* ---------- Special Guests ---------- */
.guest-head { grid-column: 1 / -1; margin: 10px 0 0; color: var(--gold); font-size: 20px; text-shadow: 0 2px 0 #000; }
.dino.guest { border-color: #b8862e; box-shadow: 0 0 0 1px rgba(255, 200, 90, 0.25), 0 8px 24px rgba(0, 0, 0, 0.4); }
.dino.guest.sel { border-color: var(--amber); box-shadow: 0 0 26px rgba(255, 180, 60, 0.55); }
.dino .breed { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: -2px; }
