@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');
* { margin:0; padding:0; box-sizing:border-box; }
:root {
  --ink:#0a0a14; --ink2:#1e1e30; --paper:#f7f7fb; --muted:#8888a0;
  --red:#e63946; --red-soft:#fff0f1; --green:#16a34a; --green-soft:#f0fdf4;
  --blue:#1d4ed8; --blue-soft:#eff6ff; --amber:#d97706; --amber-soft:#fffbeb;
  --orange:#ea580c; --orange-soft:#fff7ed; --white:#ffffff;
  --border:rgba(0,0,0,0.07); --r:14px;
  --shadow-sm:0 1px 3px rgba(0,0,0,0.08);
}

body.dark-mode {
  --ink:#f7f7fb; --ink2:#ffffff; --paper:#0a0a14; --white:#161622;
  --border:rgba(255,255,255,0.1); --muted:#a1a1aa;
  --red-soft:#3f1115; --green-soft:#062d16; --blue-soft:#0f172a;
  --amber-soft:#451a03; --orange-soft:#431407;
}

html { scroll-behavior:smooth; }
body {
  font-family:'Sora',sans-serif; background:var(--paper); color:var(--ink);
  min-height:100vh; font-size:14px; line-height:1.6;
  -webkit-font-smoothing:antialiased; transition: background 0.3s, color 0.3s;
}

/* ─── HEADER & NAV ─────────────────── */
.hdr { background:var(--ink2); color:#fff; position:sticky; top:0; z-index:300; border-bottom:1px solid rgba(255,255,255,0.06); }
.hdr-in { display:flex; align-items:center; gap:14px; padding:12px 20px; max-width:860px; margin:0 auto; }
.logo { width:38px; height:38px; border-radius:10px; background:var(--blue); display:flex; align-items:center; justify-content:center; font-size:20px; }
.brand { display:flex; flex-direction:column; }
.brand-name { font-size:17px; font-weight:800; line-height:1; }
.brand-tag { font-size:10px; color:rgba(255,255,255,0.6); letter-spacing:1px; text-transform:uppercase; margin-top:2px; }
.hdr-actions { margin-left:auto; display:flex; gap:6px; align-items:center; }
.icon-btn { background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.15); border-radius:8px; padding:7px 11px; cursor:pointer; color:#fff; display:flex; align-items:center; gap:6px; font-size:14px; font-family:'Sora'; font-weight:600; }

.nav-wrap { background:var(--white); border-bottom:1px solid var(--border); position:sticky; top:62px; z-index:200; }
.nav-inner { display:flex; overflow-x:auto; scrollbar-width:none; max-width:860px; margin:0 auto; padding:0 16px; gap:0; }
.nav-inner::-webkit-scrollbar { display:none; }
.tab-btn { display:flex; align-items:center; gap:7px; padding:14px 18px; border:none; background:none; font-family:'Sora',sans-serif; font-size:12px; font-weight:700; color:var(--muted); cursor:pointer; border-bottom:2.5px solid transparent; white-space:nowrap; transition:all 0.2s; }
.tab-btn.active { color:var(--ink); border-bottom-color:var(--blue); }
.sos-tab { color:var(--red); font-weight:800; }

/* ─── SECTIONS & UI ─────────── */
.sec { display:none; max-width:860px; margin:0 auto; padding:24px 16px 60px; }
.sec.active { display:block; animation:slideUp 0.3s ease both; }
@keyframes slideUp { from{opacity:0; transform:translateY(16px)} to{opacity:1; transform:translateY(0)} }
@keyframes fadeSlide { from{opacity: 0; transform: translateY(10px);} to{opacity: 1; transform: translateY(0);} }

.hero { border-radius:20px; padding:28px 24px; margin-bottom:24px; color:#fff; position:relative; overflow:hidden; }
.hero h2 { font-size:26px; font-weight:800; margin-bottom:6px; }
.h-blue { background:linear-gradient(135deg,#1e3a8a 0%,#1d4ed8 60%,#3b82f6 100%); }
.h-purple { background:linear-gradient(135deg,#4c1d95 0%,#7c3aed 60%,#a78bfa 100%); }
.h-green { background:linear-gradient(135deg,#065f46 0%,#16a34a 60%,#22c55e 100%); }
.h-orange { background:linear-gradient(135deg,#9a3412 0%,#ea580c 60%,#fb923c 100%); }
.h-dark { background:linear-gradient(135deg,#1f2937 0%,#374151 60%,#4b5563 100%); }
.h-red { background:linear-gradient(135deg,#7f1d1d 0%,#dc2626 60%,#ef4444 100%); }

.sec-label { font-size:10px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:var(--muted); margin:24px 0 12px; display:flex; align-items:center; gap:8px; }
.sec-label::after { content:''; flex:1; height:1px; background:var(--border); }
.tts-btn { cursor:pointer; font-size:16px; opacity:0.6; transition:opacity 0.2s; background:none; border:none; color:inherit; }
.tts-btn:hover { opacity:1; }

.card { background:var(--white); border-radius:var(--r); padding:20px; margin-bottom:14px; box-shadow:var(--shadow-sm); border:1px solid var(--border); }
.btn-primary { display:block; text-align:center; background:var(--ink2); color:#fff; border:none; border-radius:12px; padding:12px 24px; font-family:'Sora',sans-serif; font-size:14px; font-weight:700; cursor:pointer; width:100%; transition:0.2s; text-decoration:none; }
.btn-primary:hover { background:var(--ink); }

/* ─── GLOWING VISUALISATION BUTTON ─── */
.viz-btn-wrapper { position: relative; display: inline-block; margin: 20px 0; }
.viz-btn { position: relative; background: #18181b; color: #e4e4e7; border: 1px solid rgba(255,255,255,0.1); padding: 12px 28px; border-radius: 30px; font-family: 'Sora', sans-serif; font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 10px; cursor: pointer; z-index: 2; transition: transform 0.2s, background 0.2s; }
.viz-btn:hover { background: #27272a; transform: translateY(-1px); }
.viz-icon { font-size: 18px; }
.viz-btn-wrapper::before { content: ''; position: absolute; top: -2px; left: -2px; right: -2px; bottom: -2px; background: linear-gradient(90deg, #8b5cf6, #3b82f6, #8b5cf6); background-size: 200% 200%; border-radius: 32px; z-index: 1; filter: blur(8px); opacity: 0.6; animation: glowMove 3s linear infinite; }
@keyframes glowMove { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.viz-container { display: none; opacity: 0; transition: opacity 0.4s ease; margin-top: 15px; }
.viz-container.show { display: block; opacity: 1; }

/* ─── SOS CHECKLIST & DASHBOARD ─── */
.sos-chk-label { display:flex; gap:12px; align-items:flex-start; cursor:pointer; padding:12px 0; border-bottom:1px solid var(--border); font-weight:600; }
.sos-chk-label:last-child { border-bottom:none; }
.sos-chk-label input { margin-top:4px; transform:scale(1.2); accent-color:var(--red); }
.sos-chk-label input:checked ~ span { text-decoration:line-through; color:var(--muted); }

.dash-panel { background:#111; padding:25px 15px; border-radius:12px; display:flex; justify-content:space-around; align-items:center; flex-wrap:wrap; gap:15px; box-shadow:inset 0 0 20px rgba(0,0,0,0.8); border:2px solid var(--ink2); }
.dash-icon { font-size:28px; width:60px; height:60px; border-radius:50%; display:flex; align-items:center; justify-content:center; cursor:pointer; background:rgba(255,255,255,0.05); border:2px solid transparent; transition:0.3s; }
.dash-red { box-shadow:0 0 15px rgba(230,57,70,0.6); border-color:var(--red); }
.dash-amber { box-shadow:0 0 15px rgba(217,119,6,0.6); border-color:var(--amber); }
.dash-green { box-shadow:0 0 15px rgba(22,163,74,0.6); border-color:var(--green); }
.dash-icon:hover { transform:scale(1.1); }
.callout { border-radius:12px; padding:14px 16px; margin-top:15px; display:flex; gap:12px; border:1px solid; }

/* ─── SMART GARAGE & MAINTENANCE ───────────────── */
.doc-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:15px; padding-bottom:15px; border-bottom:1px solid var(--border); }
.doc-row:last-child { border-bottom:none; margin-bottom:0; padding-bottom:0; }
.doc-info h4 { font-size:14px; font-weight:700; }
.doc-info p { font-size:11px; color:var(--muted); }
.input-group { margin-bottom:15px; }
.input-group label { display:block; font-size:12px; font-weight:700; margin-bottom:6px; color:var(--muted); }
.input-group input, .input-group select { width:100%; padding:12px; border-radius:8px; border:1px solid var(--border); background:var(--paper); color:var(--ink); font-family:'Sora'; font-weight:600; }
.status-badge { padding:4px 8px; border-radius:6px; font-size:10px; font-weight:800; text-transform:uppercase; margin-left:10px; }
.status-ok { background:var(--green-soft); color:var(--green); border:1px solid var(--green); }
.status-warn { background:var(--amber-soft); color:var(--amber); border:1px solid var(--amber); }
.status-exp { background:var(--red-soft); color:var(--red); border:1px solid var(--red); }

.maint-item { margin-bottom:15px; }
.maint-header { display:flex; justify-content:space-between; font-size:12px; font-weight:700; margin-bottom:6px; }
.bar-chart-maint { height:12px; background:var(--border); border-radius:6px; overflow:hidden; }
.bar-fill { height:100%; border-radius:6px; transition:width 0.4s ease, background 0.4s ease; }
.calc-box { background:var(--white); border:1px solid var(--border); border-radius:16px; padding:20px; margin-bottom:20px; }
.calc-slider { width:100%; margin:15px 0; accent-color:var(--blue); }

.bar-chart-dist { height:34px; display:flex; border-radius:12px; overflow:hidden; margin-top:10px; background:var(--border); }
.bar-reaction { background:var(--amber); transition:width 0.3s ease; display:flex; align-items:center; justify-content:center; color:#fff; font-size:12px; font-weight:bold; white-space:nowrap; overflow:hidden; padding:0 5px; }
.bar-braking { background:var(--red); transition:width 0.3s ease; display:flex; align-items:center; justify-content:center; color:#fff; font-size:12px; font-weight:bold; white-space:nowrap; overflow:hidden; padding:0 5px; }
.dist-stats { display:flex; justify-content:space-between; margin-top:10px; font-size:12px; font-weight:700; }

.calc-result { background:var(--blue-soft); border:1px solid var(--blue); padding:15px; border-radius:12px; text-align:center; margin-top:20px; }
.calc-result h3 { color:var(--blue); font-size:24px; font-weight:800; }

/* ─── SIMULATOR ────── */
.sim-container { background:#2d3748; border-radius:12px; padding:20px; position:relative; overflow:hidden; display:flex; justify-content:center; align-items:center; height:280px; margin-bottom:20px; border:2px solid var(--ink2); }
.road-vertical { position:absolute; width:80px; height:100%; background:#4a5568; }
.road-horizontal { position:absolute; height:80px; width:100%; background:#4a5568; }
.dashed-line { position:absolute; border:1px dashed #cbd5e0; }
.sim-car { position:absolute; width:24px; height:44px; border-radius:4px; display:flex; justify-content:center; align-items:center; color:#fff; font-size:12px; font-weight:bold; transition:all 0.8s ease-in-out; z-index:10; }
.car-a { background:var(--red); }
.car-b { background:var(--blue); }
.sim-controls { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.sim-btn { padding:14px; border-radius:8px; border:2px solid var(--border); background:var(--white); font-weight:700; cursor:pointer; font-family:'Sora'; transition:0.2s; }
.sim-btn:hover { background:var(--paper); }
.sim-feedback { padding:15px; border-radius:8px; margin-top:15px; font-weight:600; font-size:13px; display:none; }

/* ─── QUIZ STYLES ───────────────── */
.qopts { display:grid; grid-template-columns:1fr; gap:10px; margin-top:16px; }
.qopt { border:2px solid var(--border); background:var(--paper); border-radius:12px; padding:13px; font-family:'Sora',sans-serif; font-size:13px; font-weight:600; text-align:left; cursor:pointer; color:var(--ink); }
.qopt.correct { border-color:var(--green); background:var(--green-soft); color:var(--green); }
.qopt.wrong { border-color:var(--red); background:var(--red-soft); color:var(--red); }
.explanation { margin-top:16px; padding:12px; border-radius:8px; font-size:13px; display:none; }
.adaptive-badge { background:var(--orange-soft); color:var(--orange); border:1px solid var(--orange); padding:4px 10px; border-radius:20px; font-size:10px; font-weight:bold; margin-bottom:15px; display:inline-block; }

/* ─── P2P SYNC UI ───────── */
.sync-id-box { background:var(--paper); border:2px dashed var(--border); padding:15px; border-radius:12px; text-align:center; margin-bottom:15px; font-family:monospace; font-size:18px; font-weight:bold; letter-spacing:2px; color:var(--blue); word-break:break-all; }
.flash-card { height:150px; display:flex; align-items:center; justify-content:center; font-size:80px; background:var(--paper); border-radius:15px; margin-bottom:15px; border:2px solid var(--border); }
.premium-lock { filter: blur(4px); pointer-events: none; position: relative; }
.premium-lock::after { content: "🔒 Premium"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.7); color: #fff; padding: 8px 14px; border-radius: 8px; font-weight: 700; }

/* ========================================== */
/* NEON DRIVE GAME STYLES */
/* ========================================== */


:root {
  --neon-cyan: #00f5ff;
  --neon-pink: #ff006e;
  --neon-yellow: #ffbe0b;
}

#sec-game.active {
  display: flex !important;
  justify-content: center;
  align-items: center;
  background: #050510;
  height: calc(100vh - 120px); 
}

#nd-wrap {
  position: relative;
  width: min(400px, 100vw);
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(0,245,255,0.2);
  box-shadow: 0 0 60px rgba(0,245,255,0.15), inset 0 0 60px rgba(0,0,0,0.5);
  border-radius: 12px;
  background: #050510;
}

#nd-canvas { display: block; width: 100%; height: 100%; }

#nd-ui {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: flex-start;
  pointer-events: none;
}

.nd-stat-box { text-align: center; }
.nd-stat-label { font-family: 'Sora', sans-serif; font-size: 10px; letter-spacing: 3px; color: rgba(0,245,255,0.5); text-transform: uppercase; font-weight: 700;}
.nd-stat-value { font-family: 'Orbitron', sans-serif; font-size: 22px; font-weight: 700; color: var(--neon-cyan); text-shadow: 0 0 15px var(--neon-cyan); line-height: 1; }
#nd-lives { display: flex; gap: 4px; margin-top: 2px; }
.nd-heart { font-size: 14px; filter: drop-shadow(0 0 4px var(--neon-pink)); color: var(--neon-pink); }

#nd-controls {
  position: absolute; bottom: 20px; left: 0; right: 0;
  display: flex; justify-content: space-between; padding: 0 20px; gap: 16px;
}

.nd-ctrl-btn {
  flex: 1; height: 64px; background: rgba(0,245,255,0.05);
  border: 1px solid rgba(0,245,255,0.3); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; cursor: pointer; transition: all 0.1s;
  user-select: none; -webkit-user-select: none; backdrop-filter: blur(4px); color: #fff;
}
.nd-ctrl-btn:active, .nd-ctrl-btn.pressed {
  background: rgba(0,245,255,0.15); border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0,245,255,0.3); transform: scale(0.96);
}

#nd-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; background: rgba(5,5,16,0.92);
  backdrop-filter: blur(8px); z-index: 10; transition: opacity 0.3s;
}
#nd-overlay.hidden { display: none; }

.nd-overlay-title {
  font-family: 'Orbitron', sans-serif; font-size: 42px; font-weight: 900;
  color: var(--neon-cyan); text-shadow: 0 0 30px var(--neon-cyan), 0 0 60px rgba(0,245,255,0.4);
  letter-spacing: 4px; margin-bottom: 4px;
}
.nd-overlay-sub { font-family: 'Sora', sans-serif; font-size: 13px; font-weight:700; letter-spacing: 6px; color: rgba(0,245,255,0.4); margin-bottom: 40px; text-transform: uppercase; }
.nd-score-display { font-family: 'Orbitron', sans-serif; font-size: 16px; color: var(--neon-yellow); text-shadow: 0 0 15px var(--neon-yellow); margin-bottom: 8px; letter-spacing: 2px; }
.nd-hi-display { font-family: 'Orbitron', sans-serif; font-size: 12px; color: rgba(255,190,11,0.5); letter-spacing: 2px; margin-bottom: 40px; }

#nd-start-btn {
  background: transparent; border: 2px solid var(--neon-cyan); color: var(--neon-cyan);
  font-family: 'Orbitron', sans-serif; font-size: 14px; font-weight: 700;
  letter-spacing: 4px; padding: 14px 40px; cursor: pointer; text-transform: uppercase;
  transition: all 0.2s; box-shadow: 0 0 20px rgba(0,245,255,0.2); border-radius: 8px;
}
#nd-start-btn:hover { background: rgba(0,245,255,0.1); box-shadow: 0 0 40px rgba(0,245,255,0.4); }
.nd-key-hint { margin-top: 20px; font-size: 11px; letter-spacing: 3px; color: rgba(255,255,255,0.2); text-transform: uppercase; }

/* Saare sections hidden rahenge */
.sec {
    display: none;
}

/* Sirf active class wala section dikhega */
.sec.active {
    display: block;
}
