@font-face {
    font-family: 'Rajdhani';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/fonts/rajdhani/rajdhani-300.woff2') format('woff2');
}

@font-face {
    font-family: 'Rajdhani';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/rajdhani/rajdhani-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Rajdhani';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/rajdhani/rajdhani-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Rajdhani';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/rajdhani/rajdhani-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Share Tech Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/share-tech-mono/share-tech-mono-400.woff2') format('woff2');
}









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

*,
*::before,
*::after {
  box-sizing: border-box;
  font-weight: 400;
  margin: 0;
  padding: 0;
}

html {
  font-size: clamp(1.5rem, 1rem + 1vw, 3rem);
}

h1 { font-size: 1.5em; }
h2 { font-size: 1.25em; }
h3 { font-size: 1em; }
button { font-size: .8em; }
a { display: block; font-size: .75em; font-weight: bold; }
p { display: block; font-size: .7em; }
select { font-size: .9em; }
span { font-size: .8em; }

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








/* ===== NAVBAR ===== */
#topNav {
  width: 95%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1a1a22;
  padding-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
}

.nav-links a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  padding: 5px 10px;
  display: inline-block;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

#car_evo_link {
  background: rgb(0, 195, 255);
  border-radius: 5px;
  padding: 5px 10px;
}

#car_evo_link:hover {
  background: rgb(0, 137, 179);
}

.nav-message {
  font-weight: 700;
  font-size: 0.7em;
  color: var(--muted);
  margin: 0;
}

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

.auth-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-greeting {
  color: var(--muted);
  font-size: 0.8em;
}

.btn-logout {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 5px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-family: Rajdhani;
  font-weight: 700;
  font-size: 0.8em;
}

.btn-logout:hover {
  background: var(--red);
  color: #fff;
}

.auth-status a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
}

/* ===== FOOTER ===== */
footer {
  margin-top: 30px;
  border-top: 1px solid var(--border);
  padding-top: 40px;
  width: 95%;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  max-width: 2000px;
  margin: 0 auto;
}

.footer-section h3 {
  color: var(--accent);
  margin-bottom: 10px;
}

.footer-section p {
  color: var(--muted);
  font-size: 0.9em;
  line-height: 1.25;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 5px;
}

.footer-section ul li a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  display: inline-block;
  font-size: 0.9rem;
}

.footer-section ul li a:hover {
  color: var(--accent);
}

.read-more-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  margin-top: 15px;
}

.read-more-link:hover {
  text-decoration: underline;
}

/* Footer Contact Form */
.footer-contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-contact-form input,
.footer-contact-form textarea {
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: Rajdhani;
  font-weight: 600;
  font-size: 0.9em;
}

.footer-contact-form textarea {
  resize: vertical;
}

.footer-contact-form button {
  padding: 10px;
  background: var(--accent);
  color: black;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9em;
}

.footer-contact-form button:hover {
  opacity: 0.85;
}

#footerContactStatus {
  font-size: 0.8em;
  text-align: center;
}

/* Footer Bottom Bar */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.footer-bottom span {
  color: var(--muted);
  font-size: 0.8em;
}

.footer-bottom-links {
  display: flex;
  gap: 10px;
}

.footer-bottom-links a {
  color: var(--muted);
  font-size: 0.8em;
  text-decoration: none;
  display: inline-block;
}

.footer-bottom-links a:hover {
  color: var(--accent);
}

.footer-bottom-links .support-link {
  color: var(--accent);
}


/* ===== CONTENT BOX ===== */

#contentBox {
  width: 95%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
}



#contentBox h1 {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

#update-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#update-list li {
  position: relative;
  padding: 14px 18px;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  transition: background 0.15s ease, border-color 0.15s ease;
}


/* Version + date line */
#update-list .time {
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

/* Description */
#update-list .desc {
  display: block;
  font-size: 0.9rem;
  color: var(--text);
  margin-top: 4px;
  font-weight: 700;
}

/* Empty desc — hide the line so it doesn't leave a gap */
#update-list .desc:empty {
  display: none;
}

/* Optional: hide hover effect on empty items */
#update-list li:has(.desc:empty) {
  border-left-color: var(--border);
  opacity: 0.7;
}










/* ===== CONTACT FORM (standalone page) ===== */
#contactForm {
  max-width: 500px;
  margin: 40px auto;
  padding: 20px;
  background: var(--surface);
  border-radius: 12px;
}

#contactForm h3 {
  margin-bottom: 20px;
}

#contactForm input,
#contactForm textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: Rajdhani;
  font-weight: 600;
  font-size: 0.9em;
}

#contactForm textarea {
  resize: vertical;
}

#contactForm button {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: black;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.9em;
}

#contactForm button:hover {
  opacity: 0.85;
}

#contactStatus {
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 6px;
  display: none;
}

/* ===== DASHBOARD ===== */
#dashboard {
  width: 95%;
}

#headerBox {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
}

#brandSelect,
#carSelect {
  width: 100%;
  padding: 8px;
  background: #16161e;
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow-y: auto;
  font-size: 1em;
}

#brandSelect option,
#carSelect option {
  padding: 8px 10px;
}

#brandSelect option:checked,
#carSelect option:checked {
  background: #6aa9ff;
  color: #000;
}

.car-select-row {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.car-select-main {
  flex: 1 1 220px;
  min-width: 180px;
}

#carSelect {
  width: 100%;
  background: #16161e;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}


.car-sort-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  margin-bottom: 6px;
}

.car-sort-btn {
  padding: 4px 10px;
  font-weight: 600;
  font-size: 0.8rem;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.car-sort-btn:hover {
  color: var(--text);
}

.car-sort-btn.active-mode {
  background: var(--accent);
  color: black;
  border-color: var(--accent);
}


.car-preview-box {
  flex: 0 0 240px;
  width: 240px;
  aspect-ratio: 520 / 460;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #16161e;
}

.car-preview-box canvas {
  touch-action: none;
  cursor: grab;
}

.car-preview-box canvas,
.car-preview-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}




#statsToggleRow{
  display: block;
  margin-top: 15px;
  text-align: center;
  font-size: 1rem;
}



#statsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 10px;
  align-items: stretch;
  margin-top: 15px;
}

.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 {
  text-transform: uppercase;
  margin-bottom: 2px;
  font-weight: 900;
  font-size: 0.7em;
}

.stat-val {
  color: #fff;
  font-weight: 700;
  word-break: break-word;
  font-size: 0.9em;
}

/* ===== SPEEDOMETER ===== */
#speedoWrap {
  position: relative;
  min-width: 200px;
  width: clamp(250px, 35vw, 3000px);
  margin: 0 auto;
}

#speedo {
  width: 100% !important;
  height: auto !important;
  display: block;
  aspect-ratio: 1 / 1;
}

@keyframes shake {
  0% { transform: translate(1px, 1px); }
  50% { transform: translate(-2px, 1.5px); }
  100% { transform: translate(1px, 1px); }
}

.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;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.2em;
}

.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: 0.8em;
}

.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%;
  position: relative;
}

.btn-utility {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.2s;
  flex-grow: 1;
  max-width: 150px;
  font-size: 0.8em;
}

.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-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.2s;
  flex-grow: 1;
  max-width: 150px;
  font-size: 0.8em;
}

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

/* ===== LOGS ===== */
#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-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8em;
}

.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: 0.8em;
}

.val {
  color: var(--accent);
}

.brake-row {
  padding: 12px 15px;
  border-bottom: 1px solid #1a1a22;
  color: var(--red);
  font-size: 0.8em;
}

.brake-row span {
  color: var(--muted);
}

/* ===== SHARE BUTTON ===== */
#shareBtn {
  margin-top: 30px;
  background: var(--accent);
  color: #000;
  padding: 12px 30px;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.9em;
}

/* ===== RESET BUTTON FLASH ===== */
#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;
  margin-left: 8px;
}

/* ===== SIMULATORS ===== */
#simulatorsBox {
  margin: 20px auto;
  justify-items: center;
}

#roadSimWrap {
  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% !important;
  height: auto !important;
  aspect-ratio: 400 / 180;
}

#sideViewWrap {
  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% !important;
  height: auto !important;
  aspect-ratio: 400 / 200;
}

#view3dWrap {
  position: relative;
  max-width: 100%;
  margin: 0 auto 18px auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #2a2a38;
}

#view3d {
  display: block;
  width: 100%;
  height: auto;
}

#view3dBlur {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* ===== RACE MODE ===== */
#raceModeWrap {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  width: 100%;
}

#raceModeWrap .res-title {
  margin: -15px -15px 15px -15px;
  border-radius: 12px 12px 0 0;
  padding: 10px;
}

.race-pickers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 15px;
}

.race-car-box {
  border-radius: 8px;
  padding: 2px;
}

.race-car-box.carA { border: 2px solid var(--accent); }
.race-car-box.carB { border: 2px solid var(--red); }

.race-car-box select {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  background: #16161e;
  color: #fff;
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9em;
}

.race-car-box .race-label {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 4px;
  padding-left: 4px;
  font-size: 0.8em;
}

.race-car-box.carA .race-label { color: var(--accent); }
.race-car-box.carB .race-label { color: var(--red); }

.race-finish-row {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.race-finish-row select,
.race-finish-row button {
  flex: 1;
  min-width: 120px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #16161e;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.8em;
}

#btnStartRace {
  background: var(--accent);
  color: #000;
  border: none;
}

#btnStartRace:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.race-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.race-readout {
  border-radius: 8px;
  padding: 12px;
  background: #16161e;
  text-align: center;
}

.race-readout.carA { border: 2px solid var(--accent); }
.race-readout.carB { border: 2px solid var(--red); }

.race-readout .car-name {
  font-weight: 700;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.9em;
}

.race-readout .race-stat {
  margin-bottom: 2px;
  font-size: 1.2em;
}

.race-readout .race-stat-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-size: 0.7em;
}

.race-readout .race-substat {
  color: var(--muted);
  font-size: 0.8em;
}

#raceResultMsg {
  text-align: center;
  margin-top: 12px;
  color: var(--accent);
  min-height: 1.4em;
  font-size: 0.9em;
}

.race-speed-row {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.race-speed-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  align-self: center;
  font-size: 0.8em;
}

.race-speed-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
  font-family: Rajdhani;
  font-size: 0.8em;
}

.race-speed-btn.active-mode {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 8px rgba(232, 255, 0, 0.2);
}

#btnStopRace {
  display: none;
  flex: 1;
  min-width: 120px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--red);
  background: transparent;
  color: var(--red);
  font-family: Rajdhani;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.8em;
}

/* ===== CUSTOM GARAGE ===== */
#customGarage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  width: 100%;
}

#customGarage .garage-title {
  font-size: 1em;
  margin-bottom: 10px;
}

#customGarage .garage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

#customGarage .garage-grid input {
  padding: 8px;
  border-radius: 6px;
  background: #16161e;
  color: #fff;
  border: 1px solid var(--border);
  font-family: Rajdhani;
  font-weight: 600;
  font-size: 0.9em;
  max-width: none;
  text-transform: none;
}

#customGarage .garage-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

#btnSaveCar {
  flex: 3;
  max-width: none;
  background: var(--accent);
  color: black;
}

#btnCancelEdit {
  flex: 1;
  max-width: none;
  background: var(--surface);
  color: var(--text);
  display: none;
}

#ccMsg {
  text-align: center;
  margin-top: 10px;
  color: var(--accent);
  font-size: 0.9em;
}

.saved-cars-section {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 15px;
}

.saved-cars-section .section-label {
  color: var(--muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8em;
}

.saved-cars-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.saved-car-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1a1a24;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.9em;
}

.saved-car-row .car-name {
  font-weight: 600;
}

.saved-car-row .car-name span {
  color: var(--muted);
  font-weight: 400;
}

.saved-car-row .car-actions {
  display: flex;
  gap: 10px;
}

.saved-car-row .edit-link {
  color: var(--accent);
  cursor: pointer;
}

.saved-car-row .delete-link {
  color: var(--red);
  cursor: pointer;
}

#customCarSelect {
  display: none;
  margin-top: 10px;
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  background: #16161e;
  color: #fff;
  border: 1px solid var(--border);
  font-family: Rajdhani;
  font-weight: 600;
  font-size: 0.9em;
}

/* ===== MISC ===== */
.info_text {
  margin: 15px auto;
  font-weight: bold;
}

strong {
  margin: 1em;
}

section {
  text-align: center;
}

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

/* ===== EVOLUTION SITE OVERRIDES ===== */
html.evolution-site .brands-section {
  background: rgb(30, 72, 95);
  padding: 10px;
}

html.evolution-site .brands-section .brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(6em, 100%), 1fr));
  gap: 1em;
  text-align: center;
}

html.evolution-site .brands-section .brands-grid a {
  background: rgb(112, 186, 223);
  padding: 10px;
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

html.evolution-site .topic-section {
  margin: 1em auto;
  padding: 2em;
  background: grey;
}

html.evolution-site .topic-section .one-topic {
  width: 90%;
  background: red;
  text-align: center;
  justify-items: center;
  margin: 20px 0;
  padding: 15px;
  border-radius: 8px;
}

html.evolution-site .topic-section .one-topic .topic-list {
  background: blue;
  padding: 10px;
  border-radius: 4px;
}

html.evolution-site .topic-section .one-topic .topic-list ul li {
  background: green;
  padding: 5px 10px;
  margin: 4px 0;
  border-radius: 3px;
  color: #fff;
}

/* ===== IMAGE SLIDER ===== */
html.evolution-site .image-slider-container {
  position: relative;
  margin: 20px 0;
  max-width: 800px;
  width: 100%;
}

html.evolution-site .image-slider {
  display: flex;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #f8f9fa;
}

html.evolution-site .image-slider .slide {
  display: none;
  width: 100%;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  position: relative;
}

html.evolution-site .image-slider .slide.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

html.evolution-site .whole-image {
  margin: 0;
  width: 100%;
}

html.evolution-site .whole-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

html.evolution-site .slider-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 15px;
  padding: 10px;
}

html.evolution-site .slider-prev,
html.evolution-site .slider-next {
  background: #333;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

html.evolution-site .slider-prev:hover,
html.evolution-site .slider-next:hover {
  background: #555;
}

html.evolution-site .slider-dots {
  display: flex;
  gap: 10px;
}

html.evolution-site .slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #333;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s;
}

html.evolution-site .slider-dot.active {
  background: #333;
  transform: scale(1.2);
}

html.evolution-site .slider-dot:hover {
  background: #666;
}

html.evolution-site .image-slider-container .whole-image figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 15px;
  font-size: 14px;
  text-align: center;
  transition: opacity 0.3s ease;
}

html.evolution-site .image-slider-container.same-credits .whole-image figcaption {
  position: static;
  background: transparent;
  color: #666;
  padding: 10px 0;
  font-style: italic;
}

html.evolution-site .image-slider .slide:not(.active) figcaption {
  opacity: 0;
  visibility: hidden;
}

html.evolution-site .image-slider .slide.active figcaption {
  opacity: 1;
  visibility: visible;
}

/* ===== ERROR MESSAGES ===== */
html.evolution-site .error-message {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  color: white;
  padding: 30px;
  border-radius: 10px;
  margin: 20px 0;
  text-align: center;
}

html.evolution-site .error-message h3 {
  margin: 0 0 15px 0;
}

html.evolution-site .error-message a {
  display: inline-block;
  background: white;
  color: #ff6b6b;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 15px;
  transition: all 0.3s ease;
}

html.evolution-site .error-message a:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

html.evolution-site .container .topics-section .topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(6em, 100%), 1fr));
  gap: 1em;
  text-align: center;
  padding: 10px;
}

/* ===== TEXT TOGGLE ===== */
html.evolution-site .text-toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background: #f5f5f5;
  border-radius: 25px;
  margin: 15px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  max-width: 200px;
  justify-self: end;
}

html.evolution-site .toggle-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

html.evolution-site .toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  flex-shrink: 0;
}

html.evolution-site .toggle-checkbox {
  opacity: 0;
  width: 0;
  height: 0;
}

html.evolution-site .toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

html.evolution-site .toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

html.evolution-site .toggle-checkbox:checked + .toggle-slider {
  background-color: #4CAF50;
}

html.evolution-site .toggle-checkbox:checked + .toggle-slider:before {
  transform: translateX(26px);
}

html.evolution-site .section-text.hidden {
  display: none;
}

html.evolution-site .section-text {
  transition: opacity 0.3s ease;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  html.evolution-site .text-toggle-container {
    padding: 8px 12px;
    gap: 8px;
  }
  
  html.evolution-site .toggle-label {
    font-size: 0.8rem;
  }
  
  html.evolution-site .toggle-switch {
    width: 45px;
    height: 22px;
  }
  
  html.evolution-site .toggle-slider:before {
    height: 14px;
    width: 14px;
    left: 4px;
    bottom: 4px;
  }
  
  html.evolution-site .toggle-checkbox:checked + .toggle-slider:before {
    transform: translateX(23px);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@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; }
  #logGrids { grid-template-columns: 1fr; }
  .race-pickers { grid-template-columns: 1fr; }
  .race-results { grid-template-columns: 1fr; }
}

@media (max-width: 280px) {
  .pedal { width: 60px; height: 100px; }
  #btnBrake { width: 70px; height: 70px; }
  .paddle { display: none; }
  #utilRow .btn-utility { padding: 8px 4px; font-size: 0.6em; }
}