@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@300;400;600;700&family=Share+Tech+Mono&display=swap');

:root {
  --bg: #050507;
  --surface: #0f0f13;
  --border: #d2d2d2;
  --accent: #e8ff00;
  --red: #ff2233;
  --text: #e8e8f0;
  --muted: #a8a8a8;
}

* { box-sizing: border-box; }

body {
  font-family: 'Rajdhani', sans-serif;
  background: var(--bg); 
  color: var(--text);
  margin: 0; 
  padding: 5vw 20px;
  display: flex; 
  flex-direction: column; 
  align-items: center;
  touch-action: manipulation;
  font-weight: bold;
}

/* Navigation */
#topNav {
  width: 100%; 
  max-width: 800px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #1a1a22;
}
#topNav a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
  transition: color 0.2s;
}
#topNav a:hover { color: var(--accent); }

/* Layout Containers */
#dashboard, #contentBox { width: 80%; max-width: 3000px; }

#contentBox {
  background: var(--surface); 
  border: 1px solid var(--border); 
  border-radius: 12px; 
  padding: 25px; 
}

#contentBox p{
font-weight: bold;
font-size: 1.2em;
}

/* Dashboard Elements */
#headerBox { 
  background: var(--surface); 
  border: 1px solid var(--border); 
  border-radius: 12px; 
  padding: 15px; 
  margin-bottom: 20px; 
}
#carSelect { 
  width: 100%; 
  background: #16161e; 
  color: var(--text); 
  border: 1px solid var(--border); 
  border-radius: 6px; 
  padding: 12px; 
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
  font-weight: 700; 
  margin-bottom: 15px; 
  outline: none;
  cursor: pointer;
}

/* Stats Display */
#statsGrid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); 
  gap: 10px; 
  align-items: stretch;
}
.stat { 
  background: #16161e; 
  padding: 10px; 
  border-radius: 8px; 
  border: 1px solid var(--border); 
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 60px;
}
.stat-label { 
  font-size: 0.75rem;
  text-transform: uppercase; 
  margin-bottom: 2px;
  font-weight: 900;
}
.stat-val { 
  color: #fff; 
  font-family: 'Rajdhani', sans-serif; 
  font-size: 1.1rem; 
  font-weight: 700;
  word-break: break-word;
}

/* Speedometer */
#speedoWrap { 
  position: relative; 
  width: 100%; 
  max-width: 380px; 
  margin: 0 auto; 
}
#speedo { width: 100%; height: auto; display: block; }

/* Animation */
@keyframes shake {
  0% { transform: translate(1.5px, 1.5px); }
  50% { transform: translate(-2.5px, 1.5px); }
  100% { transform: translate(1.5px, 1.5px); }
}
.lugging { animation: shake 0.08s infinite; filter: saturate(1.8) drop-shadow(0 0 15px rgba(255,0,0,0.4)); }

/* Controls */
#controlArea { display: flex; flex-direction: column; align-items: center; gap: 20px; margin: 30px 0; }
#pedalRow { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 15px; width: 100%; }

.paddle { 
  width: 60px; height: 90px; 
  background: #111116; border: 2px solid var(--border); border-radius: 8px; 
  display: flex; align-items: center; justify-content: center; 
  font-size: 28px; color: var(--muted); cursor: pointer; 
}
.pedal {
  width: 80px; height: 130px; 
  background: #343333; border: 3px solid #ffffff; border-radius: 10px;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 15px;
  cursor: pointer; transition: 0.1s; -webkit-tap-highlight-color: transparent;
}
.pedal span { font-weight: 800; color: #ffffff; text-transform: uppercase; font-size: 13px; }
.pedal.active { transform: translateY(8px) scale(0.95); border-color: var(--color); }
.pedal.active span { color: var(--color); text-shadow: 0 0 10px var(--color); }

#btnGas { --color: var(--accent); }
#btnBrake { --color: var(--red); width: 90px; height: 90px; }

#utilRow { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; width: 100%; }
.btn-utility {
  background: transparent; color: var(--muted); border: 1px solid var(--border);
  padding: 10px 18px; border-radius: 4px; font-family: 'Rajdhani'; font-weight: 700;
  text-transform: uppercase; cursor: pointer; transition: 0.2s; font-size: 13px; flex-grow: 1; max-width: 150px;
}
.btn-utility.active-mode { border-color: #e8ff00 !important;
    color: #e8ff00 !important;
    box-shadow: 0 0 8px rgba(232, 255, 0, 0.2); }
.btn-utility:focus {
    outline: none;
}


#btnUnit {
  background: transparent; color: var(--muted); border: 1px solid var(--border);
  padding: 10px 18px; border-radius: 4px; font-family: 'Rajdhani'; font-weight: 700;
  text-transform: uppercase; cursor: pointer; transition: 0.2s; font-size: 13px; flex-grow: 1; max-width: 150px;
}

#btnUnit:active{
  border-color: white;
  color: white;
}

#logGrids { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 15px; margin-top: 10px; }
.results-box { background: var(--surface); border-radius: 12px; border: 1px solid var(--border); height: 280px; display: flex; flex-direction: column; overflow: hidden; }
.res-title { 
  padding: 10px 12px; 
  background: #07070a; 
  font-size: 12px; 
  font-weight: 700; 
  color: var(--muted); 
  text-transform: uppercase; 
  border-bottom: 1px solid var(--border); 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
}
.scroll-area { flex: 1; overflow-y: auto; }
.row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; padding: 12px 15px; border-bottom: 1px solid #16161e; font-size: 14px; }
.val { font-family: 'Share Tech Mono'; color: var(--accent); }
.brake-row { padding: 12px 15px; border-bottom: 1px solid #1a1a22; font-family: 'Share Tech Mono'; font-size: 14px; color: var(--red); }

#shareBtn {
    margin-top: 30px;
    background: var(--accent);
    color: #000;
    padding: 12px 30px;
    font-family: 'Rajdhani';
    font-weight: 700;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

#btnReset.flash-blue-fade{
  color: rgb(187, 216, 255);
  border-color: rgb(187, 216, 255);
}

#btnExport {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  max-width: fit-content;
  padding: 4px 8px; 
  font-size: 10px;
  margin-left: 8px;
}

#authNavArea {
  display: flex;
  align-items: center;
  min-height: 20px;
}

.user-label {
  color: var(--muted);
  font-size: 0.85rem;
  margin-right: 12px;
  text-transform: lowercase;
}

/* --- Mobile Support --- */
@media (max-width: 400px) {
  body { padding: 10px 10px; }
  #pedalRow { gap: 8px; }
  .pedal { width: 70px; height: 110px; }
  #btnBrake { width: 80px; height: 80px; }
  .paddle { width: 45px; height: 70px; font-size: 20px; }
  #logGrids { grid-template-columns: 1fr; }
}

@media (max-width: 280px) {
  #topNav a { font-size: 0.9rem; }
  .pedal { width: 60px; height: 100px; }
  #btnBrake { width: 70px; height: 70px; }
  .paddle { display: none; }
  #utilRow .btn-utility { padding: 8px 4px; font-size: 9px; }
  .stat-val { font-size: 1rem; }
}

#roadSimWrap {
      width: 400px;
      max-width: 100%;
      margin: 0 auto 18px auto;
      border-radius: 12px;
      overflow: hidden;
      border: 1px solid #2a2a38;
      background: #0d0d14;
      box-shadow: 0 4px 24px rgba(0,0,0,0.5);
    }
    #roadSim {
      display: block;
      width: 100%;
      height: auto;
    }
    #sideViewWrap {
      width: 400px;
      max-width: 100%;
      margin: 0 auto 18px auto;
      border-radius: 12px;
      overflow: hidden;
      border: 1px solid #2a2a38;
      background: #060610;
      box-shadow: 0 4px 24px rgba(0,0,0,0.5);
    }
    #sideView {
      display: block;
      width: 100%;
      height: auto;
    }

    #utilRow {
  position: relative;
}


#simulatorsBox{
  margin: 20px auto;
  justify-items: center;
}


strong{
  font-size: 1.2em;
  margin: 1em;
}




#software_dwnld{
  margin: 1em 0 1em;
  text-decoration: none;
  font-size: 1.3em;
  color: white;
  background: grey;
  padding: .5em;
  border-radius: 5px;
}