/* rqsismic — pensado para verse bien tanto en una TV/monitor a distancia
   como en el celular: letras grandes, alto contraste, layout simple. */

:root {
  --bg: #0b0f14;
  --panel: #131a22;
  --panel-2: #182430;
  --text: #eef3f8;
  --muted: #9fb1c1;
  --accent: #3aa7ff;
  --green: #35c17a;
  --orange: #ff9f30;
  --red: #ff3b3b;
  --border: #24313d;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  height: 100%;
}

.banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--red);
  color: #fff;
  font-size: clamp(24px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: 1px;
  padding: 18px 10px;
  text-align: center;
  animation: pulse 1.6s infinite;
}
.banner.hidden { display: none; }
.banner-icon { font-size: 1.2em; }

@keyframes pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.35); }
}

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.topbar h1 {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 32px);
  color: var(--accent);
  letter-spacing: 0.5px;
}
.status {
  font-size: clamp(14px, 1.4vw, 18px);
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  padding: 16px;
  min-height: 70vh;
}

.map-panel, .list-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.map-panel { min-height: 420px; }
#map { width: 100%; height: 100%; min-height: 420px; }

.list-panel {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
}
.list-panel h2 {
  margin: 4px 0 12px;
  font-size: clamp(18px, 2vw, 24px);
  color: var(--text);
}

.events-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.events-list .empty {
  color: var(--muted);
  font-size: 16px;
}

.event-item {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-left: 6px solid var(--green);
  border-radius: 8px;
  padding: 10px 12px;
}
.event-item.mag-mid { border-left-color: var(--orange); }
.event-item.mag-high { border-left-color: var(--red); }

.event-item .mag {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 800;
}
.event-item .place {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--text);
  margin-top: 2px;
}
.event-item .meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.event-item a {
  color: var(--accent);
  text-decoration: none;
}
.event-item a:hover { text-decoration: underline; }

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 10px;
}

/* Pantalla ancha / TV: dar aún más espacio al texto */
@media (min-width: 1400px) {
  .event-item .mag { font-size: 30px; }
  .event-item .place { font-size: 20px; }
}

/* Celular: apilar en una sola columna */
@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .map-panel { min-height: 300px; }
  #map { min-height: 300px; }
}
