/* ============================================================
   FÚTBOL SALA — LIGA ESCOLAR · DISEÑO RENOVADO (GLASSMORPISM)
   Adaptado del estilo Minivoley Moderno con Azul y Naranja
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Outfit:wght@300;400;500;600;700&display=swap');

body.theme-futbol {
  --c-blue:        #3498db;
  --c-blue-glow:   rgba(52, 152, 219, 0.35);
  --c-orange:      #f39c12;
  --c-orange-glow: rgba(243, 156, 18, 0.35);
  --c-accent:      #fdbb2d;
  --c-glass:       rgba(255,255,255,0.05);
  --c-glass-border:rgba(255,255,255,0.11);
  --c-text:        #f0f4ff;
  --c-muted:       rgba(240,244,255,0.5);
  --font-display:  'Bebas Neue', sans-serif;
  --font-body:     'Outfit', 'Segoe UI', sans-serif;

  font-family: var(--font-body);
  color: var(--c-text);
  margin: 0;
  padding: 10px;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 50% at 15% 10%, rgba(26, 42, 108, 0.3) 0%, transparent 55%),
    radial-gradient(ellipse 60% 45% at 85% 85%, rgba(243, 156, 18, 0.15) 0%, transparent 55%),
    linear-gradient(160deg, #07091c 0%, #0a0d25 40%, #0d1130 100%) !important;
}

/* CABECERA ESPECÍFICA PARA FÚTBOL SALA */
.clock-container-futbol {
  background: rgba(0,0,0,0.55) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
}

.clock-container-futbol #clock {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

.game-rules-futbol {
  color: var(--c-accent);
  font-size: 0.85rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  border-left: 3px solid var(--c-orange);
}

/* TIMER SECTION */
.timer-section {
  text-align: center;
  margin: 20px 0;
  background: var(--c-glass);
  backdrop-filter: blur(10px);
  padding: 25px;
  border-radius: 20px;
  border: 1px solid var(--c-glass-border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.main-timer {
  font-size: clamp(4.5rem, 15vw, 7rem);
  font-family: var(--font-display);
  color: var(--c-accent);
  text-align: center;
  text-shadow: 0 0 25px rgba(253, 187, 45, 0.4);
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.period-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ecf0f1;
    margin-top: -10px;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

.timer-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.btn-timer {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.15);
  background: linear-gradient(145deg, #2c3e50, #000);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-timer:hover {
  transform: scale(1.1);
  border-color: var(--c-accent);
  box-shadow: 0 0 15px rgba(253, 187, 45, 0.3);
}

.btn-reset {
  background: linear-gradient(145deg, #c0392b, #e74c3c);
}

.btn-next {
  background: linear-gradient(145deg, #27ae60, #2ecc71);
}

/* SCOREBOARD */
.scoreboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 25px 0;
}

.team {
  background: var(--c-glass);
  border: 1px solid var(--c-glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 18px;
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  transition: transform 0.25s ease;
  position: relative;
  overflow: hidden;
}

.team:hover {
  transform: translateY(-3px);
}

/* Bordes de color por equipo */
.team-local::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--c-blue), rgba(52, 152, 219, 0.4));
}

.team-visitor::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--c-orange), rgba(243, 156, 18, 0.4));
}

.team-name {
  font-size: clamp(0.85rem, 2.5vw, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 8px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.team-name:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.score {
  font-family: var(--font-display) !important;
  font-size: clamp(5rem, 18vw, 8.5rem);
  line-height: 1;
  margin: 10px 0;
  text-shadow: none;
}

.team-local .score {
  color: var(--c-blue);
  filter: drop-shadow(0 0 15px var(--c-blue-glow));
}

.team-visitor .score {
  color: var(--c-orange);
  filter: drop-shadow(0 0 15px var(--c-orange-glow));
}

.score-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 15px 0;
}

.btn-score {
  width: 60px;
  height: 60px;
  font-size: 1.8rem;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: bold;
}

.btn-score.add {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.btn-score.sub {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
}

.btn-score:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-score:active {
  transform: scale(0.95);
}

/* TEAM STATS MEJORADO CON BOTONES DE CORRECCIÓN */
.team-stats {
  margin: 20px 0;
  background: rgba(255,255,255,0.03);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
}

.stat-item {
  margin: 8px 0;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.stat-counter {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--c-accent);
}

.stat-item label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-muted);
}

.btn-stat {
  background: rgba(255,255,255,0.1);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s ease;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-stat.add {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  font-weight: bold;
}

.btn-stat.remove {
  background: rgba(255,255,255,0.05);
}

.btn-stat.recover {
  background: var(--warning);
  color: #000;
}

.btn-stat:hover:not(:disabled) {
  opacity: 0.9;
  transform: scale(1.05);
}

.btn-stat:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* CARD BUTTONS MEJORADO */
.card-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.btn-card {
  font-size: 1.5rem;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
}

.btn-card.yellow {
  background: #f1c40f;
  color: #000;
  flex: 1;
}

.btn-card.blue {
  background: #3498db;
  color: white;
  flex: 1;
}

.hidden-football-timeout {
  display: none !important;
}

.btn-card.remove {
  background: #7f8c8d;
  color: white;
  font-size: 1rem;
  padding: 10px;
  min-width: 40px;
  flex: 0.5;
}

.btn-card:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-card:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* EVENTS SECTION MEJORADO */
.events-section {
  margin: 30px 0;
  padding: 18px;
  background: var(--c-glass);
  border: 1px solid var(--c-glass-border);
  border-radius: 18px;
}

.events-section h3 {
  color: var(--c-muted);
  margin-bottom: 12px;
  font-size: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.events-section h3 .btn-clear-events {
  background: #c0392b;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.8rem;
}

.events-list {
  max-height: 250px;
  overflow-y: auto;
  background: rgba(0,0,0,0.2);
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.05);
}

.event-item {
  border-bottom: 1px solid #333;
  padding: 10px 0;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s ease;
}

.event-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.event-item:last-child {
  border-bottom: none;
}

.event-time {
  color: var(--c-accent);
  font-weight: bold;
  min-width: 70px;
  font-family: monospace;
}

.event-desc {
  flex: 1;
}

.btn-remove-event {
  background: transparent;
  border: none;
  color: #e74c3c;
  cursor: pointer;
  padding: 5px;
  border-radius: 3px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.btn-remove-event:hover {
  opacity: 1;
  background: rgba(231, 76, 60, 0.2);
}

.empty-events {
  text-align: center;
  padding: 20px;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

/* HISTORY SECTION MEJORADO */
.history {
  background: var(--c-glass);
  border: 1px solid var(--c-glass-border);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  padding: 22px;
}

.history h2 {
  color: var(--c-muted);
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.history-list {
  max-height: 300px;
  overflow-y: auto;
  background: #1e1e1e;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.history-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  border-left: 4px solid var(--c-accent);
  transition: transform 0.2s ease;
}

.history-item:hover {
  transform: translateX(5px);
  background: rgba(255, 255, 255, 0.08);
}

.history-teams {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.winner-badge {
  background: #27ae60;
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: normal;
}

.draw-badge {
  background: var(--c-orange);
  color: #000;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: normal;
}

.history-score {
  font-size: 1.8rem;
  font-weight: bold;
  font-family: var(--font-display);
  color: var(--c-accent);
  margin: 10px 0;
  text-align: center;
}

.history-info {
  font-size: 0.9rem;
  opacity: 0.8;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 5px;
  align-items: center;
  justify-content: space-between;
}

.history-actions {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}

.btn-small {
  background: var(--primary);
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: opacity 0.2s;
}

.btn-small:hover {
  opacity: 0.9;
}

.btn-small.btn-danger {
  background: #c0392b;
}

.empty-history {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.5);
}

.empty-history i {
  font-size: 3rem;
  margin-bottom: 15px;
  opacity: 0.5;
}

/* EXPORT CONTROLS */
.export-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* ACTION FOOTER */
.action-footer {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
}

.btn-action {
  padding: 14px 24px;
  border-radius: 16px;
  border: none;
  font-size: 1.1rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
  justify-content: center;
}

.btn-action.share {
  background: #25d366;
  color: white;
}

.btn-action.save {
  background: linear-gradient(135deg, #2c3e50, #000);
  color: white;
}

.btn-action:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* NOTIFICACIONES - SUPERIOR DERECHA */
.notification {
  background: linear-gradient(135deg, #27ae60, #2ecc71) !important;
  border-radius: 50px !important;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(46,204,113,0.4) !important;
  padding: 15px 25px;
  display: none;
  align-items: center;
  gap: 12px;
  z-index: 10000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  max-width: 350px;
  animation: slideInRight 0.3s ease forwards;
}

.notification.show {
  display: flex;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* TIMEOUT DISPLAY */
#timeout-display {
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 10px rgba(52, 152, 219, 0.8);
}

/* FOOTER GENERAL */
footer {
  text-align: center;
  margin-top: 30px;
  padding: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links {
  margin-top: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
  margin: 0 10px;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .scoreboard {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .main-timer {
    font-size: 3.5rem;
  }

  .score {
    font-size: 4.5rem;
  }

  .btn-action {
    min-width: 160px;
    padding: 12px 20px;
    font-size: 1rem;
  }

  .timer-controls {
    gap: 10px;
  }

  .btn-timer {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .export-controls {
    flex-direction: column;
    align-items: center;
  }

  .stat-item {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .correction-buttons {
    justify-content: center;
  }

  .card-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-card {
    width: 100%;
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .main-timer {
    font-size: 2.8rem;
  }

  .score {
    font-size: 3.5rem;
  }

  .team-name {
    font-size: 1.2rem;
  }

  .btn-score {
    width: 55px;
    height: 55px;
    font-size: 2rem;
  }

  .action-footer {
    flex-direction: column;
    align-items: center;
  }

  .btn-action {
    width: 100%;
    max-width: 300px;
  }

  .notification {
    left: 20px;
    right: 20px;
    max-width: none;
  }
}
/* BOTONES DE CORRECCIÓN */
.correction-buttons {
  display: flex;
  gap: 5px;
}

.btn-stat {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s ease;
  min-width: 40px;
}

.btn-stat.add {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  font-weight: bold;
}

.btn-stat.remove {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-stat.recover {
  background: var(--warning);
  color: #000;
}

.btn-stat:hover:not(:disabled) {
  opacity: 0.9;
  transform: scale(1.05);
}

.btn-stat:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* BOTONES DE TARJETAS CON CORRECCIÓN */
.card-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.btn-card {
  font-size: 1.5rem;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
}

.btn-card.yellow {
  background: #f1c40f;
  color: #000;
  flex: 1;
}

.btn-card.blue {
  background: #3498db;
  color: white;
  flex: 1;
}

.btn-card.remove {
  background: rgba(255,255,255,0.08);
  color: var(--c-muted);
  font-size: 0.8rem;
  border: 1px solid rgba(255,255,255,0.1);
  flex: 0.5;
}

.btn-card:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-card:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* BOTONES EN HISTORIAL */
.history-actions {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}

.btn-small {
  background: rgba(255,255,255,0.1);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: opacity 0.2s;
}

.btn-small:hover {
  opacity: 0.9;
}

.btn-small.btn-danger {
  background: var(--error);
}
/* BOTÓN FLOTANTE PWA */
.floating-pwa-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
  color: white;
  border-radius: 50%;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  display: none; /* Oculto por defecto */
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 9997;
  transition: all 0.3s ease;
}

.floating-pwa-btn:hover {
  transform: scale(1.1);
  background: linear-gradient(135deg, #8e44ad, #7d3c98);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* BARRA DE ESTADO DE TRANSMISIÓN EN VIVO */
.live-status-bar {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.live-status-content {
    display: flex;
    align-items: center;
    gap: 15px;
    overflow: hidden;
    min-width: 0;
    flex: 1;
}

.live-pulse {
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.live-pulse i {
    color: #fff;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0% { opacity: 1; text-shadow: 0 0 5px white; }
    50% { opacity: 0.5; }
    100% { opacity: 1; text-shadow: 0 0 5px white; }
}

.live-users {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.live-url {
    font-family: monospace;
    background: rgba(0,0,0,0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.live-status-actions {
    display: flex;
    gap: 8px;
    margin-left: 10px;
    flex-shrink: 0;
}

.btn-icon-small {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-icon-small:hover {
    background: rgba(255,255,255,0.4);
}

#qrcode-container {
    background: white;
    padding: 15px;
    border-radius: 10px;
    display: inline-block;
    margin: 15px auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
