/* Zenith AutoOS — Volvo S90 · Interior 3D (Dark Mode Técnico) */
@font-face { font-family: "Rajdhani"; font-weight: 600; font-display: swap; src: url("/assets/fonts/rajdhani-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-weight: 700; font-display: swap; src: url("/assets/fonts/rajdhani-latin-700-normal.woff2") format("woff2"); }
:root { --bg: #0b0c10; --cy: #00e5ff; --cy2: #00a8ff; --tx: #f2f2f2; --mu: #a0aab2; --ln: rgba(160, 170, 178, .16); --or: #ff5722; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--tx); font-family: "Inter", system-ui, sans-serif; }
h1, h2, .s90-btn, .s90-vista { font-family: "Rajdhani", "Inter", sans-serif; }

#s90-stage { position: fixed; inset: 0; overflow: hidden; touch-action: none; cursor: grab;
  background: radial-gradient(ellipse 70% 60% at 50% 58%, #1a2330 0%, #0e1218 55%, #07080b 100%); }
#s90-stage:active { cursor: grabbing; }
#s90-stage.is-look { cursor: crosshair; }
#s90-stage.is-night { background: radial-gradient(ellipse 70% 60% at 50% 58%, #0b1220 0%, #05070b 60%, #020304 100%); }
#s90-css, #s90-gl { position: absolute; inset: 0; pointer-events: none; }
#s90-gl canvas { display: block; }
.s90-screen { background: #000; overflow: hidden; backface-visibility: hidden; pointer-events: none; }
.s90-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; pointer-events: none; opacity: 0; transition: opacity .6s ease; }
.s90-screen.is-on iframe { opacity: 1; }
.s90-screen-off { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(circle at 50% 40%, #0d1a24, #000 70%); color: var(--mu); font: 600 34px "Rajdhani", sans-serif; letter-spacing: .04em; }
.s90-screen-off img { width: 34%; max-width: 360px; opacity: .85; }

/* ---------- topo ---------- */
.s90-top { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 18px; padding: 14px 20px; z-index: 5; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 8, 11, .92), rgba(7, 8, 11, 0)); }
.s90-top > * { pointer-events: auto; }
.s90-top img { height: 30px; width: auto; }
.s90-top h1 { min-width: 0; margin: 0; font-size: 22px; font-weight: 700; letter-spacing: .02em; line-height: 1.05; }
.s90-top h1 small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 12.5px "Inter", sans-serif; color: var(--mu); letter-spacing: 0; margin-top: 3px; }
.s90-back { color: var(--mu); text-decoration: none; font-size: 13px; border: 1px solid var(--ln); padding: 7px 12px; border-radius: 999px; white-space: nowrap; }
.s90-back:hover { color: var(--tx); border-color: rgba(0, 229, 255, .5); }
.s90-cta { margin-left: auto; background: var(--or); color: #fff; text-decoration: none; font: 700 15px "Rajdhani", sans-serif; letter-spacing: .04em; padding: 9px 18px; border-radius: 8px; white-space: nowrap; }
.s90-cta:hover { filter: brightness(1.1); }

/* ---------- painel lateral ---------- */
.s90-panel { position: fixed; left: 16px; top: 74px; bottom: 54px; width: 268px; z-index: 5; display: flex; flex-direction: column; gap: 12px; overflow: auto; scrollbar-width: thin;
  padding: 14px; border-radius: 14px; background: rgba(11, 12, 16, .78); border: 1px solid var(--ln); backdrop-filter: blur(10px); transition: transform .35s ease, opacity .35s ease; }
body.panel-closed .s90-panel { transform: translateX(-110%); opacity: 0; pointer-events: none; }
.s90-panel h2 { margin: 2px 0 2px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cy); }
.s90-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.s90-vista, .s90-btn { appearance: none; border: 1px solid var(--ln); background: rgba(255, 255, 255, .03); color: var(--tx); border-radius: 9px; padding: 8px 9px; font-size: 14.5px; font-weight: 600; text-align: left; cursor: pointer; line-height: 1.1; transition: border-color .2s, background .2s; }
.s90-vista small, .s90-btn small { display: block; font: 500 11px "Inter", sans-serif; color: var(--mu); margin-top: 2px; }
.s90-vista:hover, .s90-btn:hover { border-color: rgba(0, 229, 255, .45); }
.s90-vista.on { border-color: var(--cy); background: rgba(0, 229, 255, .1); box-shadow: inset 0 0 0 1px rgba(0, 229, 255, .25); }
.s90-vista.wide { grid-column: span 2; }
.s90-btn[aria-pressed="true"] { border-color: var(--cy); background: rgba(0, 229, 255, .12); }
.s90-btn[aria-pressed="true"]::after { content: "LIGADO"; float: right; font-size: 10px; color: var(--cy); letter-spacing: .1em; margin-top: 2px; }
.s90-telas { display: flex; flex-direction: column; gap: 6px; }
.s90-tela { display: flex; gap: 10px; align-items: center; }
.s90-tela i { flex: 0 0 9px; height: 9px; border-radius: 50%; background: var(--cy); box-shadow: 0 0 10px var(--cy); }
.s90-note { font-size: 11.5px; color: var(--mu); line-height: 1.45; margin: 0; }
.s90-note b { color: var(--tx); font-weight: 600; }
#s90-panel-toggle { position: fixed; left: 16px; bottom: 14px; z-index: 6; }

/* ---------- rodapé ---------- */
#s90-hint { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 4; font-size: 12.5px; color: var(--tx); background: rgba(11, 12, 16, .72); border: 1px solid var(--ln); padding: 7px 14px; border-radius: 999px; white-space: nowrap; pointer-events: none; }
.s90-credit { position: fixed; right: 14px; bottom: 12px; z-index: 4; font-size: 10.5px; color: rgba(160, 170, 178, .75); max-width: 340px; text-align: right; line-height: 1.35; }
.s90-credit a { color: inherit; }

/* ---------- carregando ---------- */
#s90-loader { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--bg); transition: opacity .8s ease; }
#s90-loader.is-done { opacity: 0; pointer-events: none; }
#s90-loader img { width: 200px; opacity: .9; }
#s90-loader-txt { color: var(--mu); font-size: 14px; }
.s90-loader-track { width: 240px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
#s90-loader-bar { width: 0; height: 100%; background: linear-gradient(90deg, var(--cy2), var(--cy)); transition: width .2s; }
#s90-loader.is-error #s90-loader-txt { color: #ff8a65; }
#s90-loader-pct { font: 700 22px "Rajdhani", sans-serif; color: var(--cy); }

/* ---------- tela cheia de uma tela ---------- */
#s90-modal { position: fixed; inset: 0; z-index: 30; background: rgba(3, 4, 6, .92); display: flex; flex-direction: column; }
#s90-modal[hidden] { display: none; }
.s90-modal-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--ln); }
.s90-modal-bar b { font: 700 18px "Rajdhani", sans-serif; letter-spacing: .03em; }
.s90-modal-bar small { color: var(--mu); font-size: 12px; }
.s90-modal-bar a, .s90-modal-bar button { margin-left: auto; color: var(--tx); background: transparent; border: 1px solid var(--ln); border-radius: 8px; padding: 7px 12px; font-size: 13px; text-decoration: none; cursor: pointer; }
.s90-modal-bar button { margin-left: 0; border-color: rgba(0, 229, 255, .5); }
#s90-modal-frame { flex: 1; width: 100%; border: 0; background: #000; }

@media (max-width: 760px) {
  .s90-top { padding: 10px 12px; gap: 10px; }
  .s90-top h1 { font-size: 17px; } .s90-top h1 small, .s90-back { display: none; }
  .s90-panel { top: auto; bottom: 56px; left: 8px; right: 8px; width: auto; max-height: 46vh; }
  .s90-credit { display: none; }
  #s90-hint { bottom: 60px; font-size: 11px; }
  #s90-panel-toggle { left: 8px; }
}
