/* ===== Auf Achse — Spiel (Overlay, UI, Launcher) ===== */

/* Dezenter Footer-Launcher (entdeckbar, nicht aufdringlich) */
.fb-game { background: none; border: none; cursor: pointer; font: inherit; font-size: .85rem; color: #a9afb8; display: inline-flex; align-items: center; gap: .4rem; opacity: 1; transition: color .2s ease; padding: 0; }
.fb-game:hover { color: var(--accent-2, #3ad13a); opacity: 1; }
.fb-game svg { width: 15px; height: 15px; }

/* Launcher-Teaser (optional, derzeit ungenutzt) */
.game-teaser { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--ink-2, #1b1e22), var(--ink, #121417)); border-radius: var(--radius-xl, 22px); padding: clamp(1.8rem, 4.5vw, 3.4rem); color: #fff; display: grid; grid-template-columns: 1.25fr .75fr; gap: 2rem; align-items: center; }
.game-teaser .kicker { color: var(--accent-2, #3ad13a); }
.game-teaser h2 { color: #fff; margin: .2rem 0 .6rem; }
.game-teaser .lead { color: rgba(255,255,255,.72); margin-bottom: 1.4rem; }
.gt-art { position: relative; height: 170px; border-radius: 16px; overflow: hidden; background: #15181b; border: 1px solid rgba(255,255,255,.08); }
.gt-art .gt-lane { position: absolute; top: -20px; bottom: -20px; width: 4px; background: repeating-linear-gradient(180deg, rgba(255,255,255,.32) 0 18px, transparent 18px 40px); animation: gtDrive .7s linear infinite; }
.gt-art .gt-lane.l1 { left: 33%; } .gt-art .gt-lane.l2 { left: 66%; }
.gt-art .gt-edge { position: absolute; top: 0; bottom: 0; width: 3px; background: rgba(255,255,255,.18); } .gt-art .gt-edge.r { right: 0; }
.gt-art .gt-truck { position: absolute; left: 50%; bottom: 14px; width: 30px; height: 50px; transform: translateX(-50%); border-radius: 6px; background: linear-gradient(#2b3036 0 32%, #3c424a 32% 100%); box-shadow: 0 6px 16px rgba(0,0,0,.5); }
.gt-art .gt-truck::before { content: ""; position: absolute; left: 3px; right: 3px; top: 5px; height: 7px; border-radius: 2px; background: #a9d8f5; }
.gt-art .gt-truck::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: 4px; top: 36%; border-left: 3px solid #16a016; border-right: 3px solid #16a016; }
@keyframes gtDrive { to { background-position: 0 40px; } }
@media (prefers-reduced-motion: reduce) { .gt-art .gt-lane { animation: none; } }
@media (max-width: 760px) { .game-teaser { grid-template-columns: 1fr; } .gt-art { display: none; } }

/* Overlay */
.tg-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(8,10,12,.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 14px; animation: tgFade .25s ease; }
@keyframes tgFade { from { opacity: 0; } to { opacity: 1; } }
.tg-frame { position: relative; width: min(600px, 97vw); height: min(920px, 93vh); background: #0b0f14; border-radius: 22px; overflow: hidden; box-shadow: 0 40px 110px rgba(0,0,0,.7); border: 1px solid rgba(255,255,255,.09); }
.tg-stage { position: absolute; inset: 0; }
.tg-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.tg-close { position: absolute; top: 10px; right: 10px; z-index: 7; width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(255,255,255,.14); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.tg-close:hover { background: rgba(255,255,255,.26); }
.tg-mute { position: absolute; top: 12px; left: 12px; z-index: 7; width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; display: grid; place-items: center; }
.tg-mute:hover { background: rgba(255,255,255,.26); }
.tg-mute svg { width: 18px; height: 18px; }
.tg-credit { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.4); font-size: .68rem; z-index: 6; pointer-events: none; }
.tg-ctrl { position: absolute; bottom: 26px; z-index: 6; width: 62px; height: 62px; border-radius: 18px; border: none; background: rgba(255,255,255,.1); color: #fff; font-size: 30px; line-height: 1; display: grid; place-items: center; cursor: pointer; }
.tg-ctrl:active { background: rgba(58,209,58,.35); }
.tg-ctrl.left { left: 16px; } .tg-ctrl.right { right: 16px; }
@media (hover: hover) and (pointer: fine) { .tg-ctrl { display: none; } }

/* Start-/Gameover-Screen */
.tg-screen { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .7rem; padding: 26px; background: radial-gradient(120% 85% at 50% 12%, rgba(16,140,16,.20), rgba(10,12,14,.92) 62%); color: #fff; overflow-y: auto; }
.tg-screen.hidden { display: none; }
.tg-logo { width: 60px; height: auto; opacity: .95; }
.tg-title { font-family: var(--font-display, sans-serif); font-weight: 700; font-size: 2.1rem; margin: 0; color: #fff; letter-spacing: .01em; }
.tg-sub { color: rgba(255,255,255,.72); font-size: .94rem; max-width: 290px; margin: 0; line-height: 1.5; }
.tg-score-big { font-family: var(--font-display, sans-serif); font-weight: 700; font-size: 3rem; color: var(--accent-2, #3ad13a); line-height: 1; }
.tg-btn { margin-top: .5rem; background: linear-gradient(135deg, #16a016, #0a6b0a); color: #fff; border: none; border-radius: 100px; padding: .8rem 1.9rem; font-family: var(--font-display, sans-serif); font-weight: 700; font-size: 1rem; cursor: pointer; box-shadow: 0 12px 28px rgba(0,128,0,.42); }
.tg-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.tg-keys { color: rgba(255,255,255,.5); font-size: .78rem; margin: .3rem 0 0; }
/* Highscore-Board im Game-Over-Screen */
.tg-btn.ghost { background: rgba(255,255,255,.10); box-shadow: none; border: 1px solid rgba(255,255,255,.22); }
.tg-btn.ghost:hover { background: rgba(255,255,255,.18); filter: none; }
.tg-hs-form { display: flex; gap: .5rem; width: 100%; max-width: 300px; margin-top: .2rem; }
.tg-hs-name { flex: 1; min-width: 0; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.24); border-radius: 100px; padding: .7rem 1rem; color: #fff; font-family: var(--font-display, sans-serif); font-size: .95rem; }
.tg-hs-name::placeholder { color: rgba(255,255,255,.5); }
.tg-hs-name:focus { outline: none; border-color: var(--accent-2, #3ad13a); }
.tg-hs-form .tg-btn { margin-top: 0; padding: .7rem 1.2rem; flex: none; }
.tg-hs { width: 100%; max-width: 300px; }
.tg-hs-h { font-family: var(--font-display, sans-serif); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); margin: 0 0 .5rem; }
.tg-hs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 28vh; overflow-y: auto; }
.tg-hs-list li { display: flex; align-items: center; gap: .6rem; padding: .4rem .7rem; border-radius: 8px; background: rgba(255,255,255,.05); font-size: .9rem; }
.tg-hs-list li .r { width: 1.6em; text-align: right; color: rgba(255,255,255,.5); font-weight: 700; font-variant-numeric: tabular-nums; }
.tg-hs-list li .n { flex: 1; text-align: left; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-hs-list li .s { color: var(--accent-2, #3ad13a); font-weight: 700; font-variant-numeric: tabular-nums; }
.tg-hs-list li.hot { background: rgba(58,209,58,.18); box-shadow: inset 0 0 0 1px rgba(58,209,58,.5); }
.tg-hs-list li.hot .r { color: var(--accent-2, #3ad13a); }
/* Brandsta-Media-Werbung im Spiel */
.tg-ad { display: inline-flex; align-items: center; gap: .55rem; max-width: 330px; margin-top: .5rem; padding: .5rem .85rem; border-radius: 100px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); color: rgba(255,255,255,.82); text-decoration: none; font-size: .78rem; line-height: 1.3; transition: background .2s, border-color .2s, transform .2s; }
.tg-ad:hover { background: rgba(22,160,22,.16); border-color: rgba(58,209,58,.5); color: #fff; transform: translateY(-1px); }
.tg-ad .tg-ad-tag { flex: none; font-size: .58rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.25); border-radius: 5px; padding: .12rem .32rem; }
.tg-ad .tg-ad-tx { text-align: left; }
.tg-ad .tg-ad-tx strong { color: var(--accent-2, #3ad13a); }
.tg-ad .tg-ad-go { flex: none; font-weight: 700; color: var(--accent-2, #3ad13a); }
