/* =====================================================
   Huracán TV - Web deportiva estable + moderna
   ===================================================== */

:root {
  --bg: #0b0f14;
  --card: #141a22;
  --glass: rgba(255, 255, 255, 0.05);
  --txt: #e8eef5;
  --muted: #a7b3c2;
  --acc: #22c55e;
  --danger: #ef4444;
  --radius: 18px;
  --font: "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
}

/* ==== Reset general ==== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--txt);
  overflow-x: hidden;
  line-height: 1.5;
}

a {
  color: var(--acc);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: #40df7a; }

/* ==== Header ==== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #0e1420;
  border-bottom: 1px solid #1f2733;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.escudo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
nav a {
  color: var(--muted);
  margin-left: 16px;
  font-weight: 500;
  transition: color 0.2s;
}
nav a:hover { color: var(--acc); }

/* ==== Layout principal ==== */
.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 30px;
  max-width: 1400px;
  margin: 30px auto;
  padding: 0 24px;
}
.sidebar {
  background: var(--glass);
  border-radius: var(--radius);
  padding: 16px;
  height: fit-content;
  max-height: 85vh;
  overflow-y: auto;
}
.main {
  width: 100%;
}

/* ==== Hero central ==== */
.hero-main {
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  box-shadow: 0 0 25px rgba(0,0,0,0.4);
  margin-bottom: 30px;
}
.teams-big {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin-bottom: 15px;
}
.escudo-big {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  padding: 10px;
  object-fit: contain;
  transition: transform 0.2s;
}
.escudo-big:hover { transform: scale(1.08); }
.vs-big {
  font-size: 28px;
  color: var(--muted);
  font-weight: 700;
}
.match-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
}
.match-info {
  color: var(--muted);
  margin-bottom: 14px;
}
.badge-live {
  background: rgba(239,68,68,0.25);
  color: #ff7878;
  padding: 6px 14px;
  border-radius: 12px;
  margin-bottom: 10px;
  display: inline-block;
  font-weight: bold;
}
.badge-soon {
  background: rgba(255,255,255,0.1);
  color: #ffce47;
  padding: 6px 14px;
  border-radius: 12px;
  margin-bottom: 10px;
  display: inline-block;
  font-weight: bold;
}

/* ==== Botones ==== */
.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--acc);
  color: #031306;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.btn:hover { opacity: 0.9; transform: scale(1.03); }
.btn.muted {
  background: #1e2633;
  color: var(--txt);
}
.btn-mini {
  font-size: 13px;
  padding: 5px 9px;
}

/* ==== Tarjetas ==== */
.grid {
  display: grid;
  gap: 16px;
}
.grid.cards {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.card {
  background: var(--card);
  border: 1px solid #1f2632;
  border-radius: var(--radius);
  padding: 16px;
  transition: background 0.2s, transform 0.2s;
}
.card:hover {
  background: rgba(255,255,255,0.05);
  transform: translateY(-3px);
}
.card h3 { margin-bottom: 8px; }

.replay-card {
  text-align: center;
  background: var(--card);
  border: 1px solid #1f2632;
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
  transition: background 0.2s;
}
.replay-card:hover {
  background: rgba(255,255,255,0.06);
}

/* ==== Scrollbar ==== */
.scrollable::-webkit-scrollbar {
  width: 8px;
}
.scrollable::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
}

/* ==== Footer ==== */
.footer {
  padding: 20px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid #1f2733;
  margin-top: 40px;
  font-size: 14px;
}

/* ==== Responsivo ==== */
@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }
  .sidebar {
    order: 2;
    max-height: none;
    margin-top: 24px;
  }
  .hero-main {
    padding: 30px 20px;
  }
  .escudo-big {
    width: 90px;
    height: 90px;
  }
  .match-title {
    font-size: 22px;
  }
}

/* Sidebar de repeticiones gratis */
.sidebar {
  background: var(--glass);
  border-radius: var(--radius);
  padding: 16px;
  height: 85vh;
  overflow-y: auto;
  position: sticky;
  top: 20px;
}

/* Mini tarjetas dentro del sidebar */
.replay-card {
  background: var(--card);
  border: 1px solid #1f2632;
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 14px;
  text-align: center;
  transition: background 0.2s;
}
.replay-card:hover {
  background: rgba(255,255,255,0.06);
}
.replay-card h4 {
  font-size: 15px;
  margin: 6px 0;
}

.teams-mini {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.escudo-small {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.vs-mini {
  color: var(--muted);
  font-weight: bold;
  font-size: 14px;
}

/* Ajuste de layout */
.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 30px;
  max-width: 1400px;
  margin: 30px auto;
  padding: 0 24px;
}

/* Scroll bonito */
.scrollable::-webkit-scrollbar {
  width: 8px;
}
.scrollable::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
}

/* ===== LAYOUT PRINCIPAL ===== */
.layout-grid {
  display: grid;
  grid-template-columns: 280px 1fr;  /* un poco más angosta para mejor proporción */
  gap: 24px;
  padding: 20px 20px 40px 0;         /* sin margen izquierdo extra */
  width: 100%;
  margin: 0;
}

/* ===== SIDEBAR IZQUIERDA ===== */
.sidebar {
  background: var(--card);
  padding: 16px;
  border-radius: 0 12px 12px 0;       /* pegado a la izquierda, solo redondea el lado derecho */
  overflow-y: auto;
  height: calc(100vh - 120px);
  border-right: 1px solid rgba(255,255,255,0.08);  /* línea separadora sutil */
  box-shadow: 4px 0 12px rgba(0,0,0,0.3);          /* leve sombra para efecto TV */
}
.scrollable {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.replay-card {
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.2s, background 0.2s;
}
.replay-card:hover {
  transform: scale(1.03);
  background: rgba(255,255,255,0.05);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-right: 20px; /* margen respirable a la derecha */
}

/* ===== HERO ===== */
.hero-tv {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 380px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
  margin-right: 10px; /* evita que pegue directo al borde derecho */
}
.hero-tv .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.25));
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-bottom: 40px;
}
.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}
.btn-lg {
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 14px;
  transition: all 0.2s;
}
.btn-lg.live {
  background: #00e676;
  color: #011b0a;
}
.btn-lg.live:hover {
  transform: scale(1.05);
  background: #1aff84;
}
.btn-lg.muted {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .layout-grid {
    grid-template-columns: 1fr;
    padding: 10px;
  }
  .sidebar {
    border-radius: 12px;
    border-right: none;
    height: auto;
    box-shadow: none;
  }
}

/* ==== Carrusel con flechas ==== */
.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.next-carousel {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 10px 14px;
  scrollbar-width: none; /* ocultamos scrollbar */
  scroll-behavior: smooth;
}
.next-carousel::-webkit-scrollbar { display: none; }

.next-carousel .match-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.2s, background 0.2s;
}
.next-carousel .match-card:hover {
  transform: scale(1.03);
  background: rgba(255,255,255,0.08);
}

/* ==== Flechas laterales ==== */
.carousel-btn {
  background: rgba(0,0,0,0.4);
  color: var(--txt);
  border: none;
  border-radius: 50%;
  font-size: 26px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}
.carousel-btn:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-50%) scale(1.1);
}
.carousel-btn.prev { left: -10px; }
.carousel-btn.next { right: -10px; }

/* ==== Responsive flechas ==== */
@media (max-width: 600px) {
  .carousel-btn {
    display: none;
  }
}

/* =====================================================
   AJUSTES VISUALES EXCLUSIVOS PARA partido.php
   ===================================================== */

body.partido-page {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* === Contenedor principal === */
.layout.layout-partido {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 1600px;
  padding: 40px 20px;
}

/* === Bloque principal === */
body.partido-page .main.glass {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 50px 60px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 18px;
  box-shadow: 0 0 35px rgba(0,0,0,0.6);
}

/* === Hero === */
body.partido-page .hero-main {
  text-align: center;
  margin: 0 auto;
  width: 100%;
}

body.partido-page .teams-big {
  justify-content: center;
  gap: 70px;
}

body.partido-page .escudo-big {
  width: 150px;
  height: 150px;
}

body.partido-page .match-title {
  font-size: 34px;
  margin-bottom: 12px;
}

body.partido-page .match-info {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 25px;
}

/* === Formulario === */
body.partido-page .buy-access {
  max-width: 600px;
  margin: 30px auto 0 auto;
  padding: 30px;
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  text-align: left;
}

/* === Video === */
body.partido-page .video-frame iframe {
  width: 100%;
  height: 720px;
  border-radius: 14px;
  border: none;
  margin-top: 25px;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
}

/* === Responsivo === */
@media (max-width: 960px) {
  body.partido-page .main.glass {
    padding: 25px 20px;
  }

  body.partido-page .escudo-big {
    width: 100px;
    height: 100px;
  }

  body.partido-page .match-title {
    font-size: 24px;
  }

  body.partido-page .video-frame iframe {
    height: 400px;
  }
}
/* =====================================================
   MODO CINE PARA partido.php
   ===================================================== */
body.partido-page {
  background: radial-gradient(circle at center, #10161f 0%, #06090d 100%);
}

body.partido-page .main.glass {
  background: rgba(10, 14, 20, 0.85);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 0 50px rgba(0,0,0,0.7);
  max-width: 100%;
  width: 90%;
}

body.partido-page .hero-main {
  max-width: 1100px;
  background: url('/assets/bg_estadio_blur.jpg') center/cover no-repeat;
  background-blend-mode: overlay;
  padding: 60px 40px;
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
}

body.partido-page .video-frame iframe {
  width: 100%;
  height: 720px;
  border-radius: 14px;
  border: none;
  margin-top: 30px;
  box-shadow: 0 0 40px rgba(0,0,0,0.7);
}

@media (max-width: 960px) {
  body.partido-page .main.glass {
    width: 100%;
    padding: 25px 16px;
  }
  body.partido-page .hero-main {
    padding: 30px 20px;
    background-position: top;
  }
  body.partido-page .video-frame iframe {
    height: 400px;
  }
}
