/* --- The Dashboard --- */
.car-dash-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: #1a1a1a; 
  background-image: radial-gradient(#2a2a2a 1px, transparent 1px);
  background-size: 4px 4px;
  padding: 40px;
  border-radius: 10px;
  border-bottom: 5px solid #000;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', sans-serif;
  color: #ddd;
  
  /* THE FIXES FOR SIZING: */
  width: 90%;             /* Take up 90% of the screen */
  max-width: 600px;       /* But never grow larger than 600px */
  box-sizing: border-box; /* Keeps padding from blowing up the width */
  flex-wrap: wrap;        /* Allows the knobs to wrap to the next line on small screens */
  margin: 50px auto; 
  overflow: hidden; 
}

/* --- Knobs --- */
.dash-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.dash-label {
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #aaa;
}

.car-knob {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: #111;
  /* Simulates the thick chrome outer ring */
  border: 6px solid #d4d4d4; 
  box-shadow: 0 5px 10px rgba(0,0,0,0.8), inset 0 2px 5px rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease-out;
}

.knob-insert {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #222;
  border: 1px solid #444;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  pointer-events: none; /* Let the click pass to the parent knob */
}

/* --- Center Radio Unit --- */
.radio-bezel {
  background: #111;
  padding: 10px;
  border: 3px solid #ccc; /* Chrome housing */
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.7), inset 0 2px 4px rgba(255,255,255,0.1);
  flex-grow: 1;
}

/* --- The Dial Window --- */
.dial-window {
  background: #2a2c2b;
  border: 2px solid #555;
  border-radius: 2px;
  height: 60px;
  position: relative;
  box-shadow: inset 0 5px 10px rgba(0,0,0,0.6);
  overflow: hidden;
  margin-bottom: 10px;
}

.fm-label {
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 10px;
  color: #888;
}

.dial-numbers {
  display: flex;
  justify-content: space-between;
  padding: 0 15px;
  line-height: 60px;
  color: #f4f4f4;
  font-size: 14px;
  font-weight: bold;
}

.car-needle {
  position: absolute;
  top: 10%;
  bottom: 10%;
  left: 5%; /* <-- Changed from 10% to 5% to match the knob's start position */
  width: 4px;
  background-color: #ff3b1f; /* Glowing orange/red */
  box-shadow: 0 0 8px #ff3b1f;
  transition: left 0.4s cubic-bezier(0.2, 0.8, 0.4, 1);
}

/* --- The 5 Presets --- */
.preset-buttons {
  display: flex;
  gap: 5px;
  justify-content: space-between;
}

.preset-btn {
  flex-grow: 1;
  height: 25px;
  /* Silver metallic gradient */
  background: linear-gradient(to bottom, #f0f0f0, #a0a0a0);
  border: 1px solid #666;
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 0 3px 0 #555, 0 4px 5px rgba(0,0,0,0.5);
  transition: all 0.1s;
}

.preset-btn:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 #555, 0 1px 2px rgba(0,0,0,0.5);
}
/* Update your existing .car-knob class to include these cursor properties */
.car-knob {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: #111;
  border: 6px solid #d4d4d4; 
  box-shadow: 0 5px 10px rgba(0,0,0,0.8), inset 0 2px 5px rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  /* Removed the transition from here */
}

.knob-insert {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #222;
  border: 1px solid #444;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  pointer-events: none;
  /* Added the transition here so the symbol spins smoothly */
  transition: transform 0.3s ease-out; 
}

/* --- Mobile Phone Adjustments --- */
@media (max-width: 650px) {
  .car-dash-container {
    padding: 20px; 
    flex-wrap: wrap; /* Allows wrapping */
    justify-content: center;
    gap: 15px;
    height: auto;
  }

  /* 1. Push the Radio Bezel to the very top */
  .radio-bezel {
    width: 100%;
    order: 1; 
    margin-bottom: 20px;
    box-sizing: border-box;
  }

  /* 2. Group both knobs together at the bottom */
  .dash-control {
    width: 45%; /* Makes them sit side-by-side */
    order: 2; 
    min-width: 40px;
  }

  /* Shrink the dial text so it fits on small screens */
  .dial-numbers {
    font-size: 11px;
    padding: 0 5px;
  }
}

