/* === GENERAL === */
body {
  margin: 0;
  padding: 0;
  font-family: 'Courier New', monospace;
  background-image: url('background.jpg');
  background-size: cover;
  background-attachment: fixed;
  color: #00FF00;
  text-shadow: 0 0 2px #00ff00;
  animation: crt-flicker 3s infinite alternate;
  position: relative;
  overflow-x: hidden;
}

/* === EFECTO DE ESCANEO CRT === */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 255, 0, 0.05),
    rgba(0, 255, 0, 0.05) 1px,
    transparent 2px,
    transparent 4px
  );
  pointer-events: none;
  z-index: 999;
  animation: scan 4s linear infinite;
}

/* === ANIMACIÓN CRT FLICKER === */
@keyframes crt-flicker {
  0% { opacity: 1; filter: brightness(100%); }
  100% { opacity: 0.97; filter: brightness(105%) contrast(110%); }
}

@keyframes scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* === CABECERA === */
.header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
  z-index: 1;
  position: relative;
}

#logo {
  width: 60px;
  margin-right: 10px;
  animation: float 3s ease-in-out infinite;
}

h1 {
  font-size: 2.2rem;
  margin: 0;
  text-shadow: 0 0 4px #00ff00;
}

/* === BANNER DE ADVERTENCIA === */
.warning-banner {
  background-color: black;
  color: #FFA500;
  text-align: center;
  padding: 6px;
  font-weight: bold;
  font-size: 1rem;
  border-top: 1px solid #FFA500;
  border-bottom: 1px solid #FFA500;
  animation: blink 1.5s infinite alternate;
  position: relative;
  z-index: 1;
}

@keyframes blink {
  0% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* === ZONA DE GRÁFICOS === */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 40px auto;
  width: 95%;
  max-width: 1400px;
  z-index: 1;
  position: relative;
}

.chart-box {
  display: flex;
  flex-direction: column;
  height: 400px;
  background-color: rgba(0, 0, 0, 0.4);
  border: 2px solid #00ff99;
  border-radius: 8px;
  padding: 10px;
  overflow: hidden;
  font-family: 'Courier New', Courier, monospace;
  color: #00ff99;
}

.chart-box select {
  margin-bottom: 8px;
  padding: 4px;
  background-color: #000;
  color: #00ff99;
  border: 1px solid #00ff99;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9rem;
}

.chart-iframe,
.chart-box iframe {
  flex-grow: 1;
  width: 100%;
  height: 100%;
  border: none;
}

/* === TABLA === */
table {
  width: 95%;
  max-width: 1000px;
  margin: 1rem auto;
  border-collapse: collapse;
  background-color: rgba(0, 0, 0, 0.8);
  font-size: 0.95rem;
  border: 1px solid #00FF00;
  box-shadow: 0 0 10px #00FF00;
  position: relative;
  z-index: 1;
}

th, td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #00FF00;
}

th {
  background-color: rgba(0, 0, 0, 0.95);
  color: #FFA500;
  font-size: 1rem;
  border-bottom: 2px solid #FFA500;
}

td img {
  vertical-align: middle;
  margin-right: 6px;
  width: 20px;
  height: 20px;
}

tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
  transition: background-color 0.3s;
}

/* === ANIMACIONES === */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  table {
    font-size: 0.8rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  #logo {
    width: 50px;
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .chart-box {
    height: 300px;
  }

  /* Reducir tamaño fuente de Volumen y Capitalización */
td:nth-child(4),
td:nth-child(5) {
  font-size: 0.8rem;
  opacity: 0.85;
}
  
/* === PANEL DE CONTROL === */
.control-panel {
  background-color: rgba(0, 0, 0, 0.6);
  border: 2px dashed #00FF00;
  padding: 12px 20px;
  margin: 20px auto;
  width: 90%;
  max-width: 1200px;
  font-family: 'Courier New', Courier, monospace;
  color: #00FF00;
  box-shadow: 0 0 10px #00ff00aa;
  border-radius: 8px;
  position: relative;
  z-index: 2;
}

.analog-dial {
  display: flex;
  align-items: center;
  gap: 12px;
}

.analog-dial label {
  font-size: 1rem;
  text-shadow: 0 0 2px #00FF00;
}

.analog-dial select {
  background-color: #000;
  color: #00FF00;
  border: 1px solid #00FF00;
  padding: 4px 8px;
  font-family: inherit;
  font-size: 0.9rem;
  border-radius: 4px;
}

}
