* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b0e14; font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif; color: #eef1f5; user-select: none; }
#game { position: fixed; inset: 0; display: block; cursor: crosshair; }
.ui { position: fixed; inset: 0; display: none; overflow: auto; padding: 22px 28px; }
.ui.on { display: block; background: linear-gradient(180deg, rgba(8,11,18,0.55), rgba(8,11,18,0.82)); backdrop-filter: blur(1.5px); }
.ui.scr-menu { background: radial-gradient(ellipse at 30% 40%, rgba(8,11,18,0.25), rgba(8,11,18,0.85) 70%); }
.ui.scr-loading { background: rgba(8,11,18,0.92); }
.panel { background: rgba(18,23,34,0.82); border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; padding: 16px 18px; box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
h2, h3 { margin: 0 0 10px; letter-spacing: 0.5px; } h3 { color: #f4c542; }
.sub { color: rgba(255,255,255,0.6); font-size: 13px; } .desc { color: rgba(255,255,255,0.85); font-size: 14px; line-height: 1.4; }
.btn { font: inherit; font-weight: bold; color: #fff; background: linear-gradient(180deg, #3a4356, #2a3140); border: 1px solid rgba(255,255,255,0.14); border-radius: 10px; padding: 9px 16px; cursor: pointer; transition: transform .08s, background .15s, box-shadow .15s; box-shadow: 0 3px 0 rgba(0,0,0,0.35); }
.btn:hover { background: linear-gradient(180deg, #4a556c, #343d50); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(0,0,0,0.35); }
.btn.big { font-size: 19px; padding: 13px 22px; width: 100%; margin: 5px 0; text-align: left; }
.btn.sm { font-size: 13px; padding: 6px 11px; }
.btn.gold { background: linear-gradient(180deg, #f6cf55, #d79e1c); color: #2a1a00; border-color: #ffe08a; }
.btn.gold:hover { background: linear-gradient(180deg, #ffdc6e, #e6ab25); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.danger { background: linear-gradient(180deg, #c0392b, #8e2219); }
.btn.on { background: linear-gradient(180deg, #c0392b, #922b21); border-color: #ff8a7a; }
.btn.disabled { opacity: 0.4; cursor: not-allowed; }
.money { font-weight: bold; color: #f4c542; background: rgba(0,0,0,0.35); padding: 7px 14px; border-radius: 20px; white-space: nowrap; }
.hdr { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; } .hdr h2 { flex: 1; font-size: 28px; text-shadow: 0 2px 8px rgba(0,0,0,0.6); }
/* menu */
.menu-wrap { max-width: 440px; margin-left: 5vw; padding-top: 4vh; }
.logo { margin-bottom: 22px; text-shadow: 0 4px 20px rgba(0,0,0,0.8); }
.logo-top { font-size: 26px; letter-spacing: 12px; color: #f4c542; font-weight: bold; }
.logo-main { font-size: 84px; line-height: 0.9; font-weight: 900; font-style: italic; letter-spacing: 2px; background: linear-gradient(180deg, #ffffff 30%, #ff6b5b 55%, #c0392b 80%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 rgba(0,0,0,0.6)); }
.logo-sub { color: rgba(255,255,255,0.8); margin-top: 6px; font-size: 15px; }
.menu-btns .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .menu-btns .row2 .btn { margin: 4px 0; padding: 10px; }
.menu-foot { display: flex; gap: 12px; align-items: center; margin-top: 16px; flex-wrap: wrap; } .curcar, .ach-count { background: rgba(0,0,0,0.35); padding: 7px 14px; border-radius: 20px; font-size: 14px; }
/* rychlý závod */
.quick-grid { display: grid; grid-template-columns: 1fr 360px; gap: 18px; }
.tracks { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; align-content: start; }
.tcard { background: rgba(18,23,34,0.82); border: 2px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 6px; cursor: pointer; transition: transform .1s, border-color .1s; }
.tcard:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.3); } .tcard.sel { border-color: #f4c542; box-shadow: 0 0 0 2px rgba(244,197,66,0.3); }
.tcard.locked { opacity: 0.45; cursor: default; } .tcard canvas { width: 100%; border-radius: 8px; display: block; }
.tname { font-weight: bold; font-size: 14px; margin: 5px 2px 3px; } .ttags { display: flex; flex-wrap: wrap; gap: 3px; } .ttags span { font-size: 10px; background: rgba(255,255,255,0.1); padding: 2px 5px; border-radius: 6px; }
.ttags.big span { font-size: 12px; padding: 3px 7px; }
.qside .lbl, .lbl { margin: 12px 0 6px; font-size: 13px; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 1px; }
.modes { display: flex; flex-wrap: wrap; gap: 5px; } .mdesc { font-size: 13px; color: #9be7ff; margin-top: 6px; }
.stepper { display: flex; align-items: center; gap: 12px; } .stepper span { font-size: 22px; font-weight: bold; min-width: 30px; text-align: center; }
.sel { font: inherit; background: #222a38; color: #fff; border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; padding: 8px; width: 100%; }
.qside .btn.big { margin-top: 16px; text-align: center; }
/* karty */
.cards, .cups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ccard .cicon { font-size: 40px; } .ccard.locked, .cup.locked { opacity: 0.5; } .lock { color: #ff9a8a; font-size: 13px; margin-top: 8px; }
.cup { cursor: pointer; border-top: 5px solid var(--cc); transition: transform .1s; position: relative; } .cup:hover { transform: translateY(-3px); } .cup .trophy { position: absolute; right: 16px; top: 12px; font-size: 34px; }
.cup .prog { margin-top: 8px; font-weight: bold; color: #f4c542; font-size: 14px; }
.cup-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.ev { display: grid; grid-template-columns: 30px 1fr 150px 40px; gap: 8px; padding: 8px; border-radius: 8px; align-items: center; background: rgba(255,255,255,0.04); margin-bottom: 5px; }
.ev.cur { background: rgba(244,197,66,0.18); border: 1px solid rgba(244,197,66,0.5); } .ev.done { opacity: 0.75; } .ev .n { font-weight: bold; color: #f4c542; } .ev .em { font-size: 13px; color: rgba(255,255,255,0.7); } .ev .er { text-align: right; font-weight: bold; }
.cupbtns { display: flex; gap: 10px; margin: 12px 0; } .cupbtns .btn.big { width: auto; flex: 1; text-align: center; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; } .tbl td, .tbl th { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.07); text-align: left; } .tbl th { color: rgba(255,255,255,0.55); font-size: 12px; text-transform: uppercase; }
.tbl tr.me { background: rgba(244,197,66,0.15); color: #ffe08a; font-weight: bold; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: middle; border: 1px solid rgba(0,0,0,0.5); }
/* garáž */
.garage-grid { display: grid; grid-template-columns: 270px 1fr 340px; gap: 16px; }
.clist { max-height: calc(100vh - 110px); overflow: auto; padding: 8px; }
.citem { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; } .citem:hover { background: rgba(255,255,255,0.07); } .citem.sel { background: rgba(244,197,66,0.18); }
.citem .cn { flex: 1; } .citem .cp { font-size: 12px; color: rgba(255,255,255,0.6); }
.gmain canvas { width: 100%; border-radius: 12px; display: block; margin-bottom: 10px; }
.stat { display: grid; grid-template-columns: 110px 1fr 36px; gap: 8px; align-items: center; margin: 5px 0; font-size: 13px; } .bar { height: 9px; background: rgba(255,255,255,0.1); border-radius: 5px; overflow: hidden; } .bar i { display: block; height: 100%; background: linear-gradient(90deg, #c0392b, #f4c542); border-radius: 5px; }
.gmain .btn.gold { margin-top: 10px; width: 100%; font-size: 17px; } .okmsg { margin-top: 10px; color: #7dff9a; font-weight: bold; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.uprow { display: grid; grid-template-columns: 1fr 86px 92px; gap: 8px; align-items: center; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.07); } .uprow small { display: block; color: rgba(255,255,255,0.55); font-size: 11px; }
.lv { display: flex; gap: 3px; } .lv i { width: 13px; height: 13px; border-radius: 3px; background: rgba(255,255,255,0.12); } .lv i.on { background: #f4c542; box-shadow: 0 0 6px rgba(244,197,66,0.6); }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; } .sw { height: 38px; border-radius: 8px; border: 2px solid rgba(255,255,255,0.2); cursor: pointer; } .sw.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(244,197,66,0.6); }
.liveries { display: flex; flex-wrap: wrap; gap: 6px; } .num { font: inherit; font-size: 20px; width: 90px; padding: 6px; background: #222a38; color: #fff; border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; }
input[type=color] { width: 80px; height: 40px; border: none; background: none; cursor: pointer; }
/* úspěchy */
.achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; } .ach { display: flex; gap: 12px; align-items: center; opacity: 0.5; padding: 12px; } .ach.got { opacity: 1; border-color: rgba(244,197,66,0.5); } .ach .ai { font-size: 32px; } .ach small { display: block; color: rgba(255,255,255,0.65); font-size: 12px; } .ach .when { color: #f4c542; }
/* nastavení */
.settings { max-width: 640px; } .srow { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.07); } .srow input[type=range] { width: 100%; } .srow input[type=checkbox] { width: 22px; height: 22px; }
ul { padding-left: 20px; line-height: 1.6; color: rgba(255,255,255,0.85); }
/* pauza */
.pause { max-width: 380px; margin: 14vh auto; text-align: center; } .pause .btn.big { text-align: center; }
/* výsledky */
.results { max-width: 1100px; margin: 0 auto; } .rhead { text-align: center; margin: 10px 0 8px; } .rhead .rt { color: rgba(255,255,255,0.7); letter-spacing: 2px; text-transform: uppercase; font-size: 14px; }
.rhead h1 { font-size: 54px; margin: 4px 0; color: #f4c542; text-shadow: 0 4px 20px rgba(0,0,0,0.7); font-style: italic; } .rhead h1.bad { color: #ff6b5b; } .medal { font-size: 26px; font-weight: bold; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin: 6px 0 16px; }
.pod { width: 150px; text-align: center; } .pod canvas { display: block; margin: 0 auto; filter: drop-shadow(0 6px 8px rgba(0,0,0,0.5)); } .pod .pn { font-weight: bold; font-size: 14px; margin: 4px 0; }
.pod .pb { border-radius: 10px 10px 0 0; font-size: 36px; font-weight: 900; color: rgba(0,0,0,0.6); padding-top: 8px; }
.pod.p1 .pb { height: 110px; background: linear-gradient(180deg, #ffe27a, #c9961a); } .pod.p2 .pb { height: 80px; background: linear-gradient(180deg, #eef2f5, #9aa4ad); } .pod.p3 .pb { height: 60px; background: linear-gradient(180deg, #f0b27a, #a0522d); }
.rw { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.07); } .rw.total { font-size: 20px; color: #f4c542; border: none; margin-top: 6px; }
.btns { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; } .btns .btn.big { text-align: center; }
/* toasty */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: rgba(18,23,34,0.95); border: 1px solid rgba(255,255,255,0.15); border-left: 5px solid #f4c542; padding: 12px 16px; border-radius: 10px; display: flex; gap: 12px; align-items: center; animation: tin .3s ease-out; transition: opacity .5s, transform .5s; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
.toast.bad { border-left-color: #e74c3c; } .toast .ti { font-size: 30px; } .toast.out { opacity: 0; transform: translateX(40px); }
@keyframes tin { from { transform: translateX(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; font-size: 22px; }
.spinner { width: 56px; height: 56px; border: 6px solid rgba(255,255,255,0.15); border-top-color: #f4c542; border-radius: 50%; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1100px) { .quick-grid, .cup-grid, .garage-grid { grid-template-columns: 1fr; } .logo-main { font-size: 60px; } }
/* ===== v2 rozšíření ===== */
.menu-btns .row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; } .menu-btns .row3 .btn { margin: 4px 0; padding: 9px 6px; font-size: 13px; }
.menu-btns .row2 .btn.big { font-size: 15px; padding: 12px 8px; }
.btn.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(244, 208, 63, 0.0); } 50% { box-shadow: 0 0 0 4px rgba(244, 208, 63, 0.45); } }
.rival { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: linear-gradient(135deg, rgba(255, 95, 162, 0.16), rgba(80, 120, 255, 0.12)); border: 1px solid rgba(255, 255, 255, 0.12); }
.rival p { margin: 6px 0 0; font-size: 13px; opacity: 0.9; }
.boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding: 0 24px 24px; }
.board h3 { font-size: 15px; margin: 0 0 8px; }
.bigprev { width: 100%; height: auto; border-radius: 12px; display: block; margin: 8px 0; }
.bigtxt { font-size: 34px; font-weight: 800; margin: 6px 0; }
.center { text-align: center; }
.hud-hint { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); font: 12px Arial; color: rgba(255, 255, 255, 0.6); pointer-events: none; }
.photo-ui { position: fixed; left: 16px; bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; z-index: 20; max-width: 70vw; }
.photo-ui .btn { padding: 8px 12px; font-size: 13px; }
.photo-ui .hint { color: #fff; font: 12px Arial; background: rgba(10, 14, 24, 0.7); padding: 8px 12px; border-radius: 10px; }
.replay-ui { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; z-index: 20; background: rgba(10, 14, 24, 0.75); padding: 8px 12px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.12); }
.replay-ui .btn { padding: 7px 11px; font-size: 13px; margin: 0; }
.replay-ui input[type=range] { width: 260px; }
.ui.passive { pointer-events: none; background: none !important; }
.ui.passive .photo-ui, .ui.passive .replay-ui { pointer-events: auto; }
.cityev { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.duo-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
