/* Tropiauto Performance · 01/11/2026 · sin CDN ni frameworks */
:root {
  --ink: #0b0b0c;
  --paper: #f5f3ee;
  --copper: #c48a5a;
  --line: rgba(255,255,255,.14);
  --ok: #2fd07f;
  --bad: #ff5a5f;
  --panel: rgba(18,18,22,.92);
  --ease: cubic-bezier(.2,.7,.2,1);
  --font: Outfit, system-ui, -apple-system, Segoe UI, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; background: var(--ink); color: var(--paper);
  font-family: var(--font); overflow: hidden;
}
button, a { font: inherit; color: inherit; }
#app {
  position: relative; width: 100%; height: 100%;
  display: grid; grid-template-rows: auto 1fr auto;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 16px;
  background: linear-gradient(180deg, rgba(0,0,0,.7), transparent);
  border-bottom: 1px solid var(--line); z-index: 5;
}
.brand {
  display: flex; flex-direction: column; gap: 2px;
}
.brand strong {
  letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; color: var(--copper);
}
.brand span { font-size: .72rem; color: rgba(245,243,238,.6); }
.topbar nav { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  min-height: 48px; min-width: 48px; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.06);
  cursor: pointer; transition: background .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover, .btn:focus-visible { border-color: var(--copper); background: rgba(196,138,90,.18); outline: none; }
.btn-primary { background: var(--copper); border-color: var(--copper); color: #111; font-weight: 700; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.stage {
  position: relative; min-height: 0; display: grid; place-items: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(196,138,90,.18), transparent 55%),
    linear-gradient(180deg, #121216, #0b0b0c 60%);
}
#game {
  display: block; width: min(100%, 1100px); height: min(100%, 720px);
  max-height: calc(100vh - 130px);
  background: #0e1014; border: 1px solid var(--line); border-radius: 16px;
  touch-action: none;
}
.hud-bottom {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-top: 1px solid var(--line);
  background: rgba(0,0,0,.55);
}
.hud-bottom .hint { font-size: .78rem; color: rgba(245,243,238,.65); max-width: 52ch; }
.panel {
  position: absolute; inset: 12px; max-width: 920px; margin: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px; overflow: auto; z-index: 4;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.panel h1 { margin: 0 0 6px; font-size: clamp(1.4rem, 3vw, 2rem); }
.panel h2 { margin: 0 0 12px; font-size: 1.05rem; color: var(--copper); letter-spacing: .06em; text-transform: uppercase; }
.panel p { line-height: 1.55; color: rgba(245,243,238,.88); }
.eras { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.era-chip {
  min-height: 40px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.05); cursor: pointer;
}
.era-chip.on { border-color: var(--copper); background: rgba(196,138,90,.2); }
.grid-cars {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px;
}
.car-card {
  text-align: left; padding: 12px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04);
  cursor: pointer; min-height: 120px;
}
.car-card:hover, .car-card:focus-visible { border-color: var(--copper); outline: none; }
.car-card .year { font-size: .72rem; color: var(--copper); letter-spacing: .08em; }
.car-card strong { display: block; margin: 4px 0 6px; }
.car-card .meta { font-size: .78rem; color: rgba(245,243,238,.65); }
.stats {
  display: grid; gap: 8px; margin: 14px 0;
}
.stat-row { display: grid; grid-template-columns: 90px 1fr 36px; gap: 8px; align-items: center; font-size: .84rem; }
.bar {
  height: 10px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden;
}
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--copper), #e8b48a); border-radius: inherit; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.hidden { display: none !important; }
.touch-pad {
  display: none; gap: 8px; justify-content: center; width: 100%;
}
.touch-pad .btn { flex: 1; max-width: 120px; font-size: .85rem; }
@media (max-width: 720px) {
  .touch-pad { display: flex; }
  .topbar { padding: 8px 12px; }
  .panel { inset: 8px; padding: 14px; }
  #game { border-radius: 10px; max-height: calc(100vh - 160px); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
