/* Estilos modernos para a Agenda Esportiva */
:root {
  --primary-color: #0d47a1;
  --secondary-color: #1565c0;
  --background-color: #0a1929;
  --card-bg: #1a365d;
  --text-color: #ffffff;
  --text-secondary: #b3e5fc;
  --highlight-color: #ff9800;
  --live-color: #f44336;
  --ended-color: #78909c;
  --dark-bg: #0a0a0a;
  --dark-gray: #1c2526;
  --primary-blue: #00b7eb;
  --neon-green: #39ff14;
  --soft-orange: #ff9500;
  --light-text: #e0e0e0;
  --dark-text: #fff;
  --shadow-color: rgba(0, 0, 0, 0.5);
  --gradient-primary: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
  --gradient-secondary: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  --gradient-highlight: linear-gradient(135deg, #ff416c, #ff4b2b);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--dark-bg);
  color: var(--text-color);
  background-image: linear-gradient(to bottom, #0f0c29, #302b63, #24243e);
  background-attachment: fixed;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Cabeçalho do site */
.site-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  padding: 20px 0;
}

.site-title {
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 15px;
  color: var(--text-color);
  letter-spacing: 3px;
  text-transform: uppercase;
  background: linear-gradient(to right, #ff8a00, #da1b60, #00b7eb);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradient-shift 8s ease infinite;
  background-size: 200% auto;
  text-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.site-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 1.5px;
  position: relative;
  display: inline-block;
}

.site-subtitle::after {
  content: '';
  position: absolute;
  width: 50%;
  height: 2px;
  bottom: -10px;
  left: 25%;
  background: linear-gradient(to right, transparent, var(--primary-blue), transparent);
}

/* Área de busca */
.search-container {
  margin-bottom: 40px;
  text-align: center;
  position: relative;
}

.search-container input {
  width: 100%;
  max-width: 600px;
  padding: 15px 25px;
  font-size: 16px;
  border: none;
  border-radius: 30px;
  background-color: rgba(255,255,255,0.08);
  color: var(--text-color);
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.05);
}

.search-container input:focus {
  background-color: rgba(255,255,255,0.12);
  box-shadow: 0 0 20px rgba(0, 183, 235, 0.3);
  transform: scale(1.02);
  border: 1px solid rgba(0, 183, 235, 0.3);
}

.search-container::before {
  content: '🔍';
  position: absolute;
  right: calc(50% - 280px);
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-secondary);
  pointer-events: none;
}

.search-container input::placeholder {
  color: rgba(255,255,255,0.5);
  transition: all 0.3s ease;
}

.search-container input:focus::placeholder {
  opacity: 0.7;
  transform: translateX(10px);
}

/* Cabeçalho de data */
.date-header {
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  padding-bottom: 15px;
  text-align: center;
}

.date-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-color);
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.date-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-blue);
  border-radius: 3px;
}

.date-display { 
  display: inline-block; 
  background: var(--primary-blue); 
  color: var(--dark-text); 
  padding: 0.5rem 1.5rem; 
  border-radius: 1.5rem; 
  font-size: calc(1rem + 0.3vw); 
  font-weight: 600; 
  box-shadow: 0 0 10px var(--shadow-color); 
  margin-bottom: 1rem;
}

/* Cards de jogos */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.match-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  margin-bottom: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
  position: relative;
  background-image: var(--gradient-secondary);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
}

.match-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

.match-card.search-match { 
  border-color: var(--soft-orange); 
  box-shadow: 0 0 20px var(--soft-orange); 
  animation: glow 1.5s infinite alternate;
}

.match-live { 
  animation: livePulse 2s infinite; 
  border-color: var(--neon-green); 
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.5);
}

.match-ended { 
  animation: none; 
  border-color: rgba(255, 51, 51, 0.5); 
  opacity: 0.85;
}

.match-highlight { 
  transform: scale(1.02); 
  border-color: var(--soft-orange); 
  background-image: var(--gradient-highlight);
  box-shadow: 0 8px 25px rgba(255, 75, 43, 0.4);
}

.match-header {
  padding: 15px;
  text-align: center;
  background-color: rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  position: relative;
}

.competition-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  margin-right: 10px;
  filter: drop-shadow(0 0 2px rgba(255,255,255,0.5));
}

.competition-name {
  font-weight: 700;
  font-size: 14px;
  flex-grow: 1;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.match-time {
  font-size: 18px;
  font-weight: bold;
  color: var(--highlight-color);
  background-color: rgba(0,0,0,0.3);
  padding: 5px 10px;
  border-radius: 5px;
  text-align: center;
  min-width: 70px;
  margin-top: 10px;
  display: inline-block;
}

.status-indicator {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background-color: rgba(0,0,0,0.5);
  z-index: 10;
}

.status-live {
  background-color: var(--neon-green);
  color: #000;
  animation: blink 1s infinite;
}

.status-ended {
  background-color: var(--ended-color);
  color: var(--dark-text);
}

.teams-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 20px 15px;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 40%;
}

.team-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 10px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  transition: transform 0.3s;
}

.match-card:hover .team-logo {
  transform: scale(1.1);
}

.team-name {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: var(--text-color);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-score {
  font-size: 24px;
  font-weight: bold;
  padding: 0 15px;
  color: white;
  background-color: rgba(0,0,0,0.4);
  border-radius: 8px;
  padding: 5px 15px;
  position: relative;
}

.match-vs {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: bold;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
}

.channels { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 0.8rem; 
  justify-content: center; 
  padding: 0.8rem; 
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.channel { 
  text-align: center; 
  cursor: pointer;
  transition: all 0.3s ease;
}

.channel:hover { 
  transform: translateY(-3px);
  filter: brightness(1.2);
}

.channel-logo { 
  width: 30px; 
  height: 30px; 
  border-radius: 50%; 
  margin-bottom: 0.3rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.1);
}

.channel-name { 
  font-size: calc(0.6rem + 0.2vw); 
  color: var(--light-text);
}

/* Modal e Player */
#playerModal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: var(--dark-bg);
  margin: 5% auto;
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 15px;
  width: 80%;
  height: 80%;
  position: relative;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--text-color);
  background-color: rgba(0,0,0,0.5);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  z-index: 100;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background-color: var(--live-color);
  transform: rotate(90deg);
}

#playerContainer {
  width: 100%;
  height: 100%;
}

#player {
  width: 100%;
  height: 100%;
}

/* Footer */
.footer {
  margin-top: 50px;
  text-align: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0.8rem; 
  border: 1px solid rgba(255, 255, 255, 0.1); 
}

.footer p { 
  margin: 0.5rem 0; 
  color: var(--light-text); 
  font-size: calc(0.8rem + 0.2vw);
}

.footer a { 
  color: var(--primary-blue); 
  text-decoration: none;
  transition: all 0.3s ease;
}

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

/* Animações */
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes glow {
  from {
    box-shadow: 0 0 10px var(--soft-orange);
  }
  to {
    box-shadow: 0 0 20px var(--soft-orange), 0 0 30px var(--soft-orange);
  }
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(57, 255, 20, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(57, 255, 20, 0); }
  100% { box-shadow: 0 0 0 0 rgba(57, 255, 20, 0); }
}

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Estilos adicionais */
.date-display { 
  display: inline-block; 
  background: var(--primary-blue); 
  color: var(--dark-text); 
  padding: 0.5rem 1.5rem; 
  border-radius: 1.5rem; 
  font-size: calc(1rem + 0.3vw); 
  box-shadow: 0 0 10px var(--shadow-color); 
  text-transform: uppercase; 
}

.footer { 
  text-align: center; 
  margin-top: 2rem; 
  padding: 1.5rem; 
  background: rgba(0, 0, 0, 0.3); 
  border-radius: 0.8rem; 
  border: 1px solid rgba(255, 255, 255, 0.1); 
}

.footer p { 
  margin: 0.5rem 0; 
  color: var(--light-text); 
  font-size: calc(0.8rem + 0.2vw); 
}

.close-btn { 
  position: absolute; 
  top: 10px; 
  right: 10px; 
  background: #ff3333; 
  border: none; 
  color: var(--dark-text); 
  padding: 8px; 
  cursor: pointer; 
  z-index: 10000; 
  border-radius: 5px; 
  font-size: calc(0.7rem + 0.2vw); 
}

/* Animações */
@keyframes livePulse { 
  0% { box-shadow: 0 0 5px var(--neon-green); } 
  50% { box-shadow: 0 0 15px var(--neon-green); } 
  100% { box-shadow: 0 0 5px var(--neon-green); } 
}

@keyframes redPulse { 
  0% { box-shadow: 0 0 0 0 rgba(255, 51, 51, 0.7); } 
  70% { box-shadow: 0 0 0 10px rgba(255, 51, 51, 0); } 
  100% { box-shadow: 0 0 0 0 rgba(255, 51, 51, 0); } 
}

@keyframes heartbeatSync { 
  0% { transform: scale(1); } 
  25% { transform: scale(1.2); } 
  50% { transform: scale(1); } 
  75% { transform: scale(1.2); } 
  100% { transform: scale(1); } 
}

/* Media Queries para Responsividade */
@media (max-width: 600px) {
  .matches-grid { 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 0.8rem; 
  }
  .site-title { 
    font-size: calc(1.5rem + 2vw); 
  }
  .search-container input { 
    width: 95%; 
    font-size: calc(0.7rem + 0.5vw); 
  }
  .competition-logo { 
    width: 40px; 
    height: 40px; 
  }
  .team-logo { 
    width: 35px; 
    height: 35px; 
  }
  .match-score { 
    font-size: calc(1rem + 0.3vw); 
  }
  .match-time { 
    font-size: calc(0.7rem + 0.3vw); 
  }
  .modal-content { 
    width: 100%; 
    height: 90%; 
    margin: 2% auto; 
  }
}

@media (max-width: 400px) {
  .teams-container {
    flex-direction: column;
    gap: 15px;
  }
  .team {
    width: 100%;
  }
  .match-score {
    margin: 10px 0;
  }
}
