:root {
  --bg: #0b0f13;
  --card: #12171d;
  --muted: #8fa0b2;
  --text: #e7eef6;
  --accent: #4cc38a;
  --accent-2: #3e63dd;
  --danger: #ef4444;
  --header-bg: #032d56;
  --border-color: #1e2630;
  --hover-color: #1a2433;
  --time-bg: #0b0f13;
}

#agendaFrame {
  margin: auto;
}

* {
  box-sizing: border-box;
}

a {
  color: white;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.container {
  width: 90%;
  margin: 0 auto;
  padding: 16px;
}

.site-header {
  z-index: 20;
  background: rgba(11, 15, 19, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #1e2630;
}

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

.brand .logo {
  font-size: 20px;
}

.brand h1 {
  font-size: 32px;
  margin: 0;
  font-weight: 700;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 16px;
}

.site-nav a.active {
  color: var(--text);
  font-weight: 600;
}

.intro {
  margin: 12px 0 8px;
}

.intro h2 {
  margin: 0 0 4px 0;
  font-size: 22px;
}

.intro p {
  margin: 0;
  color: var(--muted);
}

.day-banner {
  width: 100%;
  background: var(--header-bg);
  color: #e9ffef;
  padding: 8px 12px;
  border-radius: 0;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0;
}

.agenda {
  display: grid;
  gap: 0;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.competition {
  background: var(--card);
  border: 1px solid #1e2630;
  border-radius: 12px;
  overflow: hidden;
}

.competition-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #1e2630;
  background: #10151b;
}

.competition-title {
  font-weight: 700;
}

.competition-country {
  color: var(--muted);
  font-size: 12px;
}

.matches {
  padding: 8px;
  display: grid;
  gap: 8px;
}

.agenda.compact .match-card {
  display: grid;
  grid-template-columns: 60px 1fr;
  align-items: center;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--border-color);
  background: var(--card);
  cursor: pointer;
  margin-bottom: 0;
  transition: background 0.2s ease;
}

.agenda.compact .match-card:hover {
  background: var(--hover-color);
}

.agenda.compact .match-card:last-child {
  border-bottom: none;
}

.time-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  background-color: var(--bg);
  height: 100%;
  padding: 10px 0;
  border-right: 1px solid var(--border-color);
}

.time-badge {
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  text-align: center;
}

.status.badge {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid #293142;
  color: #a8b3c5;
  background: #0c1116;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.match-main {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px;
}

.teams {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta {
  color: var(--muted);
  font-size: 11px;
  display: none;
}

.status {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #293142;
  color: #a8b3c5;
  font-size: 11px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  appearance: none;
  border: 1px solid #2b3546;
  background: #151b23;
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dropdown {
  margin-top: 4px;
  display: none;
  gap: 6px;
  align-items: center;
  grid-column: 1 / -1;
  background: var(--bg);
  border-radius: 4px;
  padding: 4px;
}

.dropdown.open {
  display: block;
}

.dropdown select {
  background: #0f141a;
  border: 1px solid #2b3546;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
}

/* Lista de canales (dropdown tipo menú) */
.channel-menu {
  list-style: none;
  padding: 0;
  margin: 4px 0 0 0;
  display: grid;
  gap: 4px;
  width: 100%;
}

.channel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  background: #0f141a;
  border: 1px solid #2b3546;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: border-color 0.2s ease;
}

.channel-item:hover {
  border-color: #3552a3;
}

.channel-item .left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.play-icon {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid #2c3e50;
}

.channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px solid #2b3546;
  border-radius: 999px;
  font-size: 11px;
  color: #bdc9d7;
}

.agenda.compact .channel-pill {
  font-size: 0;
  padding: 0;
  border: none;
}

.channel-logos {
  display: flex;
  align-items: center;
  gap: 6px;
}

.channel-pill img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: block;
}

.site-footer {
  border-top: 1px solid #1e2630;
  margin-top: 24px;
  color: var(--muted);
}

.site-footer a {
  color: var(--muted);
}

/* Transmisión layout */
.layout-player {
  display: grid;
  grid-template-columns: 2fr .75fr;
  gap: 12px;
}

.player-card,
.chat-card {
  background: var(--card);
  border: 1px solid #1e2630;
  border-radius: 12px;
  overflow: hidden;
}

.card-header {
  padding: 10px 12px;
  border-bottom: 1px solid #1e2630;
  background: #10151b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-body {
  padding: 12px;
}

.card-body iframe {
  width: 100%;
  height: 62vh;
  border: 0;
  border-radius: 8px;
  background: #000;
}

.option-select {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.option-select select {
  background: #0f141a;
  border: 1px solid #2b3546;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
}

.channel-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-head img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.channel-head .name {
  font-weight: 600;
}

@media (max-width: 900px) {
  .layout-player {
    grid-template-columns: 1fr;
  }

  .card-body iframe {
    height: 48vh;
  }
}

/* Canales grid */
.channels-section {
  margin-top: 20px;
}

.section-title {
  margin: 8px 0 8px;
  font-size: 16px;
  color: #bcd0e6;
}

.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.channel-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--card);
  border: 1px solid #1e2630;
  border-radius: 10px;
  cursor: pointer;
}

.channel-card img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.channel-card .name {
  font-weight: 600;
  font-size: 14px;
}