/* Herní automat – sdílený vzhled pro /hra/ a malý automat na Hřišti. Ocel, nýty, maják, překlápěcí počítadlo. */
.cab { --acc: #F26A1B; --edge: #5d6064; --ink: #2b2d30; position: relative; width: min(440px, 100%); margin-inline: auto; display: grid; font-family: 'HraPix', monospace; color: var(--ink); filter: drop-shadow(0 30px 30px rgb(0 0 0 / .7)); }
.cab::after { content: ''; position: absolute; left: 6%; right: 6%; bottom: -24px; height: 28px; border-radius: 50%; background: radial-gradient(closest-side, rgb(0 0 0 / .5), transparent); z-index: -1; }

/* broušená ocel + nýty v rozích */
.cab-top, .cab-body, .cab-panel, .cab-base { position: relative; background: linear-gradient(100deg, rgb(255 255 255 / 0) 30%, rgb(255 255 255 / .35) 46%, rgb(255 255 255 / 0) 60%), repeating-linear-gradient(90deg, #8e9297 0 1px, #a5a9ae 1px 2px, #979ba0 2px 4px); box-shadow: inset 0 0 0 2px var(--edge); }
.cab-top::before, .cab-body::before, .cab-base::before { content: ''; position: absolute; inset: 7px; pointer-events: none; --rv: radial-gradient(circle at 35% 35%, #eee, #6b6e72 60%, #3d3f42); background: var(--rv) 0 0 / 9px 9px no-repeat, var(--rv) 100% 0 / 9px 9px no-repeat, var(--rv) 0 100% / 9px 9px no-repeat, var(--rv) 100% 100% / 9px 9px no-repeat; }

/* maják nahoře – točí se a svítí do místnosti */
.beacon { position: relative; z-index: 2; justify-self: center; width: 64px; height: 44px; margin-bottom: -4px; }
.beacon::before { content: ''; position: absolute; left: 6px; right: 6px; bottom: 0; height: 10px; border-radius: 3px; background: #2a2a2a; }
.beacon b { position: absolute; left: 12px; right: 12px; top: 0; bottom: 8px; overflow: hidden; border-radius: 20px 20px 4px 4px; background: rgb(242 106 27 / .8); box-shadow: inset 0 -6px 10px rgb(0 0 0 / .3); }
.beacon b::after { content: ''; position: absolute; inset: -40%; background: conic-gradient(transparent 0 60%, #fff3cf 75%, transparent 90%); animation: cab-spin 1s linear infinite; }
.beacon i { position: absolute; left: 50%; top: 18px; width: 900px; height: 900px; margin: -450px 0 0 -450px; z-index: -1; pointer-events: none; background: conic-gradient(transparent 0 62%, rgb(255 170 80 / .16) 72%, transparent 82%); animation: cab-spin 1s linear infinite; mix-blend-mode: screen; -webkit-mask: radial-gradient(closest-side, #000 35%, transparent); mask: radial-gradient(closest-side, #000 35%, transparent); }
@keyframes cab-spin { to { transform: rotate(1turn) } }

/* ražený štít */
.cab-top { padding: 18px 16px 14px; border-radius: 8px 8px 0 0; }
.marquee { display: grid; place-items: center; gap: 6px; text-align: center; }
.marquee b { order: -1; font: 400 clamp(24px, 6.4vw, 32px)/1 'Black Ops One', 'Archivo', sans-serif; color: #5c5f63; text-shadow: 0 1px 0 #d6d9dc, 0 -1px 0 #3a3c3f; letter-spacing: .02em; }
.marquee small { font-size: 10px; font-weight: 700; letter-spacing: .3em; color: #44474a; }

/* tělo s obrazovkou v přišroubovaném rámu */
.cab-body { padding: 18px 18px 16px; }
.bezel { padding: 10px; border-radius: 16px; background: #1a1b1d; box-shadow: 0 0 0 3px var(--edge); }
.screen { position: relative; aspect-ratio: 3 / 4; border-radius: 12px / 16px; overflow: hidden; background: #14111f; box-shadow: 0 0 0 2px #000; transform-origin: 50% 50%; }
.screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; }
.crt { position: absolute; inset: 0; pointer-events: none; z-index: 5; border-radius: inherit; background: repeating-linear-gradient(0deg, rgb(0 0 0 / .16) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 58%, rgb(0 0 0 / .5) 100%), linear-gradient(135deg, rgb(255 255 255 / .08) 0%, transparent 35%); box-shadow: inset 0 0 50px rgb(0 0 0 / .6); }
/* zapnutí jako stará televize */
.cab.boot .screen { animation: crt-on .9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes crt-on { 0% { transform: scale(.02, .004); filter: brightness(6) } 35% { transform: scale(1, .006); filter: brightness(5) } 60% { transform: scale(1, 1); filter: brightness(2.2) } 100% { transform: none; filter: none } }

/* překlápěcí počítadlo pater */
.count { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; font-size: 12px; font-weight: 700; letter-spacing: .2em; color: var(--ink); }
.flip { display: flex; gap: 3px; padding: 4px; border-radius: 6px; background: #151515; box-shadow: inset 0 2px 4px #000; }
.flip span { position: relative; width: 26px; height: 36px; display: grid; place-items: center; border-radius: 3px; background: linear-gradient(#2c2c2c 50%, #1f1f1f 50%); color: #f5f4f0; font: 400 26px/1 'Black Ops One', 'Archivo', sans-serif; }
.flip span::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #000; }
.flip span.go-flip { animation: flip .35s ease; }
@keyframes flip { 50% { transform: rotateX(90deg) } }

/* pult: páka, hřibové tlačítko s krytem, dvě malá tlačítka */
.cab-panel { display: flex; align-items: center; justify-content: space-around; gap: 16px; padding: 24px 22px 22px; border-top: 3px solid var(--edge); }
.stick { position: relative; width: 70px; height: 70px; flex: none; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #2a2830, #0b0a0d 70%); box-shadow: 0 0 0 4px var(--edge), inset 0 3px 6px rgb(0 0 0 / .8); }
.stick i { position: absolute; left: 50%; bottom: 50%; width: 8px; height: 34px; margin-left: -4px; border-radius: 4px; background: linear-gradient(90deg, #555, #ddd 45%, #444); transform-origin: 50% 100%; transition: transform .25s cubic-bezier(.3, 1.8, .5, 1); }
.stick i::after { content: ''; position: absolute; left: 50%; top: -22px; width: 36px; height: 36px; margin-left: -18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff9b5a, var(--acc) 45%, #a23e07 100%); box-shadow: 0 4px 8px rgb(0 0 0 / .5); }
.stick.l i { transform: rotate(-18deg) } .stick.r i { transform: rotate(18deg) }
.go-wrap { position: relative; display: grid; justify-items: center; gap: 12px; isolation: isolate; perspective: 300px; }
.go-wrap::before { content: ''; position: absolute; top: -14px; left: 50%; width: 124px; height: 124px; margin-left: -62px; border-radius: 50%; z-index: -1; background: repeating-conic-gradient(#f2c21b 0 30deg, #151515 30deg 60deg); box-shadow: 0 4px 0 #3d3f42; }
.go { position: relative; display: block; width: 96px; height: 96px; border: 0; border-radius: 50%; cursor: pointer; background: radial-gradient(circle at 40% 30%, #ffb07d 0%, var(--acc) 42%, #8a3305 100%); box-shadow: 0 9px 0 #5a2206, 0 14px 18px rgb(0 0 0 / .45), inset 0 -4px 8px rgb(0 0 0 / .3), inset 0 3px 4px rgb(255 255 255 / .35); transition: transform .06s, box-shadow .06s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.go.down, .go:active { transform: translateY(7px); box-shadow: 0 2px 0 #5a2206, 0 5px 8px rgb(0 0 0 / .4), inset 0 -2px 6px rgb(0 0 0 / .3), inset 0 3px 4px rgb(255 255 255 / .3); }
.go:focus-visible { outline: 3px solid #fff; outline-offset: 16px; }
.go-label { padding: 2px 8px; border-radius: 4px; background: #151515; font-size: 12px; font-weight: 700; letter-spacing: .2em; color: var(--acc); }
/* průhledný ochranný kryt – odklopí se na najetí nebo po prvním zmáčknutí */
.cover { position: absolute; top: -14px; left: 50%; width: 124px; height: 124px; margin-left: -62px; border-radius: 50%; pointer-events: none; background: linear-gradient(160deg, rgb(255 255 255 / .45), rgb(200 230 255 / .12) 50%, rgb(255 255 255 / .25)); border: 2px solid rgb(255 255 255 / .55); transform-origin: 50% 0; transition: transform .45s cubic-bezier(.3, 1.5, .5, 1); }
.cab:hover .cover, .cab.live .cover { transform: rotateX(-118deg); }
.mini-btns { display: grid; gap: 10px; }
.mini-btns span { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #7fc3ff, #2f7de1 50%, #17468a); box-shadow: 0 4px 0 #0f2f5c, 0 0 0 5px #151515; }
.mini-btns span + span { background: radial-gradient(circle at 40% 30%, #ffe27a, #f2c21b 50%, #8a6a07); box-shadow: 0 4px 0 #5c4605, 0 0 0 5px #151515; }

/* spodek: výstražný pruh a mincovník */
.cab-base { display: flex; justify-content: center; gap: 14px; padding: 34px 16px 16px; border-radius: 0 0 8px 8px; }
.cab-base::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 18px; background: repeating-linear-gradient(-45deg, #f2c21b 0 12px, #151515 12px 24px); }
.coin { display: grid; justify-items: center; gap: 6px; padding: 10px 14px; border-radius: 6px; background: #1d1e20; box-shadow: inset 0 0 0 2px var(--edge); font-size: 10px; font-weight: 700; letter-spacing: .15em; color: var(--acc); }
.coin i { width: 6px; height: 22px; border-radius: 3px; background: #000; box-shadow: 0 0 0 2px var(--acc), 0 0 12px var(--acc); animation: coin 2.4s ease-in-out infinite; }
.coin + .coin i { animation-delay: 1.2s }
@keyframes coin { 50% { box-shadow: 0 0 0 2px var(--acc) } }

/* malý automat (Hřiště) */
.cab.mini { width: min(330px, 100%); }
.cab.mini .marquee b { font-size: 24px; }
.cab.mini .cab-panel { padding: 20px 16px 20px; }
.cab.mini .go { width: 66px; height: 66px; }
.cab.mini .go-wrap::before, .cab.mini .cover { top: -11px; width: 88px; height: 88px; margin-left: -44px; }
.cab.mini .stick { width: 52px; height: 52px; }
.cab.mini .stick i { height: 26px; }
.cab.mini .stick i::after { width: 28px; height: 28px; margin-left: -14px; top: -16px; }
.cab.mini .flip span { width: 22px; height: 30px; font-size: 21px; }
.cab.mini .cab-base { padding: 30px 10px 12px; }

@media (prefers-reduced-motion: reduce) {
  .beacon b::after, .beacon i, .coin i { animation: none; }
  .cab.boot .screen { animation: none; }
}
