/* =================================
   HARMONIZED MATCH SCHEDULE CSS
   Dark Theme with Salmon Accents
   ================================= */

/* =================================
   RESET & BASE STYLES
   ================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 10px;
  color: #ffffff;
  background-color: #1a1a1a;
  line-height: 1.4;
}

.clear {
  clear: both;
}

/* =================================
   SEARCH COMPONENTS
   ================================= */
.search-container {
  margin-bottom: 20px;
  padding: 10px;
  background: #333;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.search-box {
  width: 100%;
  padding: 12px 20px;
  font-size: 16px;
  border: 2px solid #555;
  border-radius: 25px;
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  background: #444;
  color: #ffffff;
}

.search-box:focus {
  border-color: #fa8072;
  box-shadow: 0 0 0 3px rgba(250, 128, 114, 0.2);
}

.search-box::placeholder {
  color: #aaa;
  font-style: italic;
}

.search-stats {
  text-align: center;
  margin-bottom: 15px;
  color: #aaa;
  font-size: 14px;
}

.no-results {
  text-align: center;
  padding: 40px 20px;
  color: #aaa;
  font-size: 18px;
  background: #333;
  border-radius: 8px;
  margin: 20px 0;
}

.no-results-icon {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.5;
  color: #aaa;
}

/* =================================
   SECTION HEADERS
   ================================= */
.section-header {
  background: #fa8072;
  color: #ffffff;
  padding: 12px 20px;
  margin: 20px 0 10px 0;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  font-size: 16px;
  box-shadow: 0 2px 4px rgba(250, 128, 114, 0.3);
}

.section-header.live {
  background: #ff4444;
  animation: pulse 2s infinite;
  box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.8; }
  100% { opacity: 1; }
}

/* =================================
   MATCH COMPONENTS
   ================================= */
.match-link {
  text-decoration: none;
  color: inherit;
  display: block;
  margin-bottom: 10px;
}

.match-container {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  color: inherit;
  border: 1px solid #3d3d3d;
  background-color: #333;
  transition: all 0.3s ease;
}

.match-container:hover {
  background-color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.match-container.active {
  background-color: #000000;
  border-color: #fa8072;
}

.match-container.hidden {
  display: none;
}

.match-container.live-match {
  border: 2px solid #ff4444;
  background: linear-gradient(135deg, #2a1a1a, #1a1a1a);
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
  position: relative;
}

.match-container.live-match::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(45deg, #ff4444, #ff6666, #ff4444);
  border-radius: 8px;
  z-index: -1;
  animation: borderGlow 2s ease-in-out infinite alternate;
}

@keyframes borderGlow {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* =================================
   EVENT HEADER
   ================================= */
.event-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  position: relative;
  color: #fa8072;
  font-weight: 600;
}

.event-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, #fa8072, transparent);
}

.event-logo {
  width: 35px;
  height: 35px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid #fa8072;
  padding: 2px;
  background: #ffffff;
  transition: transform 0.3s ease;
}

.event-logo:hover {
  transform: scale(1.1);
}

/* =================================
   TEAM COMPONENTS
   ================================= */
.team-images {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
  gap: 15px;
}

.team-images img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid #fa8072;
  padding: 2px;
  background: #ffffff;
  transition: transform 0.3s ease;
}

.team-images img:hover {
  transform: scale(1.1);
}

.matchup {
  text-align: center;
  font-weight: bold;
  margin: 10px 0;
  color: #fa8072;
  font-size: 1.1em;
}

/* =================================
   MATCH DETAILS
   ================================= */
.details {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 10px 0;
  flex-wrap: wrap;
}

.details .date,
.details .time {
  background-color: #444;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #ffffff;
  border: 1px solid #555;
  transition: background-color 0.3s ease;
}

.details .date:hover,
.details .time:hover {
  background-color: #555;
}

/* =================================
   STATUS INDICATORS
   ================================= */
.status {
  text-align: center;
  padding: 5px;
  border-radius: 4px;
  font-weight: bold;
  margin: 5px 0;
}

.status.Online {
  background-color: #2ecc71;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(46, 204, 113, 0.3);
  animation: statusGlow 2s ease-in-out infinite alternate;
}

@keyframes statusGlow {
  0% { box-shadow: 0 2px 4px rgba(46, 204, 113, 0.3); }
  100% { box-shadow: 0 2px 8px rgba(46, 204, 113, 0.6); }
}

.live-icon {
  color: #ff4500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px;
  font-weight: bold;
}

.live-icon svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  animation: pulse 1.5s ease-in-out infinite;
}

.countdown {
  color: #ffd700;
  font-weight: bold;
  padding: 5px;
  text-align: center;
  background: rgba(255, 215, 0, 0.1);
  border-radius: 4px;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

/* =================================
   SEPARATOR STYLING
   ================================= */
.separator {
  margin: 15px 0;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.separator:hover {
  transform: scale(1.02);
}

.separator img {
  width: 100%;
  height: auto;
  display: block;
  transition: filter 0.3s ease;
}

.separator:hover img {
  filter: brightness(1.1);
}

/* =================================
   RESPONSIVE DESIGN
   ================================= */
@media (max-width: 768px) {
  body {
    padding: 5px;
  }
  
  .search-container {
    margin: 10px 5px 20px 5px;
    padding: 8px;
  }
  
  .search-box {
    padding: 10px 15px;
    font-size: 14px;
  }
  
  .section-header {
    margin: 15px 0 8px 0;
    padding: 10px 15px;
    font-size: 14px;
  }
  
  .match-container {
    padding: 8px;
  }
  
  .event-header {
    font-size: 0.9em;
  }
  
  .event-logo {
    width: 30px;
    height: 30px;
  }

  .team-images img {
    width: 45px;
    height: 45px;
  }

  .details {
    gap: 10px;
  }

  .details .date,
  .details .time {
    font-size: 0.8em;
    padding: 4px 8px;
  }
  
  .matchup {
    font-size: 1em;
  }
}

@media (max-width: 480px) {
  .team-images {
    gap: 10px;
  }
  
  .team-images img {
    width: 40px;
    height: 40px;
  }
  
  .event-logo {
    width: 25px;
    height: 25px;
  }
  
  .details {
    flex-direction: column;
    gap: 5px;
    align-items: center;
  }
  
  .details .date,
  .details .time {
    display: inline-block;
  }
}

/* =================================
   ACCESSIBILITY IMPROVEMENTS
   ================================= */
.match-container:focus-within {
  outline: 2px solid #fa8072;
  outline-offset: 2px;
}

.search-box:focus {
  outline: none;
}

/* Ensure sufficient contrast for all text */
.search-stats,
.no-results,
.countdown {
  color: #cccccc;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .match-container {
    border: 2px solid #ffffff;
  }
  
  .event-header::after {
    background: #ffffff;
  }
  
  .search-box {
    border: 2px solid #ffffff;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =================================
   UTILITY CLASSES
   ================================= */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-20 {
  margin-bottom: 20px;
}

.p-10 {
  padding: 10px;
}

.hidden {
  display: none;
}

.visible {
  display: block;
}

/* =================================
   LOADING STATES
   ================================= */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #fa8072;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
