/* ── Layout ─────────────────────────────────────────────── */
.streaming-main {
  max-width: 1800px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── Grid principal: vídeo | (timer/chat) ───────────────── */
.streaming-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1rem;
  height: calc(100vh - 2rem);
  min-height: 500px;
}

.streaming-sidebar {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 1rem;
  min-height: 0;
}

/* ── Vídeo (izquierda) ───────────────────────────────────── */
.stream-video {
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.stream-video iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.stream-video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 2rem;
}

/* ── Cronómetro (arriba derecha) ─────────────────────────── */
.stream-timer-wrap {
  text-align: center;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.stream-status {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.stream-status.corriendo {
  background: rgba(255,85,119,0.12);
  border-color: rgba(255,85,119,0.4);
  color: var(--red);
  animation: pulse-red 2s ease-in-out infinite;
}
@keyframes pulse-red {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,85,119,0); }
  50%     { box-shadow: 0 0 0 6px rgba(255,85,119,0.15); }
}
.stream-timer {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 40px rgba(245,197,24,0.25);
}

/* ── Chat de Twitch (abajo derecha) ──────────────────────── */
.stream-chat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 0;
}
.stream-chat iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Stream de Cabra (Radio Cabra: arriba derecha) ───────── */
.stream-cabra-wrap {
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.stream-cabra-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Intro de Radio Cabra ────────────────────────────────── */
.radio-intro {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}
.radio-intro h1 {
  margin: 0.6rem 0 0.4rem;
  font-size: clamp(1.4rem, 3vw, 2rem);
}
.radio-intro p {
  max-width: 60ch;
  margin: 0 auto;
  line-height: 1.5;
}

/* ── Panel de control ────────────────────────────────────── */
.stream-admin {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.stream-admin h2 {
  margin: 0 0 1.2rem;
  font-size: 1.1rem;
}

.stream-controls-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
}

.stream-control-block {
  min-width: 0;
}
.stream-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

/* Inputs del timer */
.stream-timer-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.stream-timer-controls input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: ui-monospace, 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.5rem 0.6rem;
  outline: none;
  width: 80px;
  text-align: center;
  transition: border-color 0.15s;
}
.stream-timer-controls input:focus { border-color: rgba(245,197,24,0.5); }
.stream-timer-controls input::-webkit-outer-spin-button,
.stream-timer-controls input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.stream-colon {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--muted);
}
.stream-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

/* Inputs del vídeo */
.stream-url-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.stream-url-controls input {
  flex: 1;
  min-width: 200px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  transition: border-color 0.15s;
}
.stream-url-controls input:focus { border-color: rgba(245,197,24,0.5); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .streaming-grid {
    grid-template-columns: 1fr;
    height: auto;
  }
  .streaming-sidebar {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .stream-chat { height: 400px; }
  .stream-controls-row { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .streaming-sidebar { grid-template-columns: 1fr; }
  .stream-actions .btn { flex: 1; }
}
