/* Turbo TukTuk Drift 3D — rank 17 quality pass (isolated presentation layer).
   Keeps gameplay in the existing renderer. Mobile scroll and readable HUD first. */
:root {
  --panel-bg: rgba(7, 19, 36, .91);
  --panel-border: rgba(103, 221, 248, .34);
}
.game-bar {
  background: linear-gradient(180deg, rgba(3,9,21,.96),rgba(4,11,25,.74) 72%,transparent);
  border-bottom: 1px solid rgba(100,217,245,.11);
}
.game-bar-title { letter-spacing: .05em; font-size: clamp(12px, 2vw, 16px); }
.hud-card {
  border: 1px solid var(--panel-border);
  border-radius: 13px;
  background: rgba(4,19,40,.89);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.11), 0 7px 20px rgba(0,0,0,.3);
}
.hud-card .label { color: #b4cfdd; }
.hud-rival-gap {
  position: absolute;
  top: calc(110px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(255,205,104,.5);
  border-radius: 50px;
  padding: 6px 12px;
  background: rgba(13,16,37,.89);
  color: #ffe4a4;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  text-shadow: 0 0 15px rgba(251,188,69,.25);
}
.hud-rival-gap[hidden] { display: none; }
.hud-center-drift { top: 27%; width: max-content; max-width: 82vw; }
.drift-badge { font-size: clamp(19px, 5vw, 29px); }
.drift-combo { font-size: clamp(12px, 3vw, 17px); }
.modal-screen {
  background:
    radial-gradient(ellipse at 52% 20%,rgba(22,68,102,.52),transparent 58%),
    rgba(2,6,17,.79);
  backdrop-filter: blur(8px);
}
.menu-card {
  position: relative;
  border: 1px solid rgba(103,226,254,.48);
  border-radius: 25px;
  background: linear-gradient(140deg,rgba(30,76,106,.38),rgba(7,16,35,.98) 49%,rgba(12,11,30,.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 24px 60px rgba(0,0,0,.57), 0 0 0 5px rgba(38,201,255,.035);
  padding: clamp(18px, 4vh, 28px) clamp(16px, 3.5vw, 26px);
  gap: clamp(10px, 2vh, 15px);
}
.menu-card::before {
  content: ''; position: absolute; left: 20%; right: 20%; top: 0;
  height: 2px; pointer-events: none;
  background: linear-gradient(90deg,transparent,#65e9ff,transparent);
}
.menu-eyebrow {
  color: #9bedff;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: .2em;
  font-weight: 800;
}
.title-logo {
  font-style: normal;
  font-size: clamp(25px, 7vw, 37px);
  line-height: 1.07;
  letter-spacing: -.025em;
  text-shadow: none;
  background: linear-gradient(115deg,#ffde87,#ff9c53 60%,#6ceaff);
  -webkit-background-clip: text;
  background-clip: text;
}
.title-logo span { color: #83eaff; -webkit-text-fill-color: #83eaff; }
.subtitle { margin-top: 0; color: #b6cad9; line-height: 1.35; font-size: 12px; letter-spacing: .08em; }
.mode-selector { gap: 8px; }
.mode-option {
  min-height: 60px;
  background: rgba(17,43,70,.55);
  border: 1px solid rgba(97,185,227,.21);
  border-radius: 13px;
  padding: 12px 14px;
}
.mode-option:hover, .mode-option.selected {
  background: rgba(32,112,158,.23);
  border-color: #76edff;
  box-shadow: inset 3px 0 0 #6ae8fa, 0 0 22px rgba(0,205,245,.1);
}
.mode-name { font-size: 14px; color: #f8e1a9; }
.mode-desc { color: #b3cada; font-size: 11px; line-height: 1.5; }
.controls-hint {
  text-align: left; border-radius: 12px;
  background: rgba(4,18,35,.75);
  border: 1px solid rgba(117,211,246,.16);
  padding: 11px 12px; line-height: 1.6;
  color: #c2d9e5; font-size: 11px;
}
.pause-description { color: #bcd3df; line-height: 1.45; font-size: 13px; }
.btn-primary {
  min-height: 50px; height: auto;
  background: linear-gradient(115deg,#ffe68f,#ffab56);
  color: #17122b;
  border: 1px solid rgba(255,243,171,.75);
  box-shadow: 0 6px 24px rgba(255,182,67,.22);
  font-style: normal;
}
.btn-secondary {
  min-height: 44px; height: auto;
  background: rgba(107,178,218,.1);
  border: 1px solid rgba(119,201,248,.3);
}
.stat-box {
  background: rgba(4,20,39,.8);
  border-color: rgba(112,211,241,.24);
  border-radius: 12px;
}
.stat-box .title { color: #b4cbdb; }
.stat-box .number { overflow-wrap: anywhere; }
.touch-btn { touch-action: none; }
.touch-btn:focus-visible, .btn-primary:focus-visible, .btn-secondary:focus-visible, .mode-option:focus-visible {
  outline: 3px solid #ffed8f; outline-offset: 3px;
}
@media (max-width: 520px) {
  .modal-screen { padding-top: calc(58px + var(--safe-top)); }
  .menu-card { max-width: 390px; }
  .menu-eyebrow { font-size: 9px; }
  .mode-option { padding: 10px 11px; }
  .mode-name { font-size: 13px; }
  .mode-desc { font-size: 11px; }
  .hud-rival-gap { top: calc(108px + var(--safe-top)); }
  .hud-center-drift { top: 33%; }
  .touch-btn-zone { gap: min(2vw, 8px); }
  .touch-btn, .touch-btn.drift-btn, .touch-btn.n2o-btn {
    width: clamp(48px, 14.2vw, 66px);
    height: clamp(48px, 14.2vw, 66px);
    min-width: 48px; min-height: 48px;
  }
}
@media (max-height: 570px) and (orientation: landscape) {
  .menu-card { padding: 12px 15px; gap: 7px; }
  .menu-eyebrow { font-size: 9px; }
  .controls-hint { font-size: 10px; padding: 7px 9px; }
  .mode-option { min-height: 47px; }
  .hud-rival-gap { top: calc(100px + var(--safe-top)); }
  .hud-center-drift { top: 45%; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-card, .mode-option, .modal-screen, .touch-btn, .hud-center-drift {
    animation: none !important; transition: none !important;
  }
}
