:root {
  --radio-bg: #2c3e50;
  --display-bg: #1a2530;
  --display-text: #4cd137;
  --button-bg: #34495e;
  --button-hover: #2c3e50;
  --button-active: #1a2530;
  --correct: #4cd137;
  --incorrect: #e74c3c;
  --option-hover: #34495e;
  --meter-bg: #1a2530;
  --meter-fill: #e67e22;
  --led-on: #4cd137;
  --led-off: #1a2530;
  --noise-opacity: 0.05;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Share Tech Mono", monospace;
  background-color: #121212;
  color: #ecf0f1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background-image: radial-gradient(circle at center, #2c3e50 0%, #121212 100%);
  position: relative;
}

.static-noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: var(--noise-opacity);
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
}

.radio-container {
  width: 100%;
  max-width: 800px;
  background-color: var(--radio-bg);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  border: 2px solid #34495e;
  position: relative;
  z-index: 2;
}

.radio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #34495e;
  border-bottom: 2px solid #2c3e50;
}

.radio-brand h1 {
  font-family: "VT323", monospace;
  font-size: 2rem;
  letter-spacing: 2px;
  margin: 0;
  color: #ecf0f1;
}

.model {
  font-size: 0.8rem;
  color: #bdc3c7;
}

.signal-meter {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.meter-label {
  font-size: 0.8rem;
  margin-bottom: 5px;
  color: #bdc3c7;
}

.meter {
  width: 150px;
  height: 25px;
  background-color: var(--meter-bg);
  overflow: hidden;
  border: 1px solid #4b6584;
}

.meter-bar {
  height: 100%;
  width: 70%;
  background: linear-gradient(to right, #4cd137, #e67e22, #e74c3c);
  transition: width 0.5s ease;
}

.radio-display {
  padding: 20px;
  background-color: var(--display-bg);
  margin: 20px;
  border-radius: 10px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.display-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #34495e;
}

.display-title {
  font-size: 1.2rem;
  color: #bdc3c7;
  letter-spacing: 1px;
}

.led {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--led-off);
  border: 1px solid #4b6584;
}

.led.on {
  background-color: var(--led-on);
  box-shadow: 0 0 5px var(--led-on);
}

.display-content {
  color: var(--display-text);
  font-family: "VT323", monospace;
}

#question-container {
  text-align: center;
  margin-bottom: 20px;
}

.q-code {
  font-size: 3rem;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(76, 209, 55, 0.5);
}

.question-text {
  font-size: 1.2rem;
}

#options-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.option {
  padding: 15px;
  background-color: var(--button-bg);
  border: 1px solid #4b6584;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.option:hover {
  background-color: var(--option-hover);
}

.option.correct {
  background-color: var(--correct);
  color: #1a2530;
}

.option.incorrect {
  background-color: var(--incorrect);
  color: #ecf0f1;
}

.radio-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #34495e;
  border-top: 2px solid #2c3e50;
}

.score-container,
.frequency-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.score-label,
.freq-label {
  font-size: 0.8rem;
  margin-bottom: 5px;
  color: #bdc3c7;
}

.score-display {
  font-family: "VT323", monospace;
  font-size: 1.8rem;
  color: var(--display-text);
  background-color: var(--display-bg);
  padding: 5px 15px;
  border-radius: 5px;
  min-width: 60px;
  text-align: center;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

  .score-display.error {
      color: red;
  }

.freq-value {
  font-family: "VT323", monospace;
  font-size: 1.2rem;
  color: var(--display-bg);
  background-color: #e67e22;
  padding: 5px 15px;
  border-radius: 5px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

.control-buttons {
  display: flex;
  gap: 10px;
}

.control-btn {
  padding: 10px 20px;
  background-color: var(--button-bg);
  border: none;
  border-radius: 5px;
  color: #ecf0f1;
  font-family: "Share Tech Mono", monospace;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.control-btn:hover {
  background-color: var(--button-hover);
}

.control-btn:active {
  background-color: var(--button-active);
  transform: translateY(2px);
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

/* Mejorar el diseño responsive */
@media (max-width: 768px) {
  .radio-header {
    flex-direction: column;
    gap: 15px;
    padding: 12px;
  }

  .signal-meter {
    width: 100%;
  }

  .meter {
    width: 100%;
    height: 18px;
  }

  .radio-controls {
    flex-direction: column;
    gap: 15px;
    padding: 12px;
  }

  .control-buttons {
    order: -1;
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
  }

  .control-btn {
    flex: 1;
    margin: 0 5px;
    padding: 12px 5px;
  }

  .score-container,
  .frequency-display {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .score-display,
  .freq-value {
    min-width: 100px;
    padding: 8px 15px;
  }

  .q-code {
    font-size: 2.5rem;
  }

  #options-container {
    grid-template-columns: 1fr;
  }

  .option {
    padding: 12px 10px;
    font-size: 0.9rem;
  }
}


@media (max-width: 360px) {
  .radio-brand h1 {
    font-size: 1.5rem;
  }

  .model {
    font-size: 0.7rem;
  }

  .q-code {
    font-size: 2rem;
  }

  .question-text {
    font-size: 1rem;
  }

  .option {
    padding: 10px 8px;
    font-size: 0.8rem;
  }
}
