@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

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

h1,
h2 {
  color: #333;
}

.countdown {
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  margin: 20px 0;
}

.streaming-options {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.streaming-options button {
  background-color: #0073aa;
  color: white;
  border: none;
  padding: 10px 20px;
  margin: 0 10px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.streaming-options button:hover {
  background-color: #005177;
}

.live-stream-wrapper {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  background-color: #f8f9fa; /* A very light neutral background */
  padding: 2rem 1.5rem; /* Add horizontal padding */
  text-align: center;
  width: 100%; /* Take full width */
  margin: 2rem 0; /* Margin top and bottom, no horizontal margin */
  box-sizing: border-box; /* Ensure padding is included in the width */
}

.live-stream-wrapper h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #2d2d2d; /* Secondary Color */
  margin-bottom: 0.5rem;
}

.live-stream-wrapper p {
  color: #484848; /* Text Color */
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  max-width: 600px; /* Keep text lines from becoming too long */
  margin-left: auto;
  margin-right: auto;
}

/* Stream Choice Buttons */
.stream-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.stream-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.75rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  background-color: #4cadc5; /* Primary Color */
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stream-button:hover {
  background-color: #34495e; /* Accent Color on hover */
  transform: translateY(-2px);
}

.stream-button svg {
  fill: #ffffff;
}

/* Player and Loader */
#stream-player-wrapper {
  position: relative;
  min-height: 200px;
  max-width: 800px; /* Set a max-width for the video player for large screens */
  margin: 0 auto;
}

#stream-player iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.stream-loader {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #4cadc5; /* Primary Color */
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 4rem auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Cancel/Switch Button */
.cancel-button {
  display: none; /* Hidden by default */
  margin: 0 auto 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid #dcdfe3;
  background-color: #f0f2f5;
  color: #34495e; /* Accent Color */
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.cancel-button:hover {
  background-color: #e4e6eb;
}

/* Countdown Timer */
.countdown-timer .next-stream-date {
  font-size: 1.2rem;
  color: #34495e; /* Accent Color */
  margin-bottom: 2rem;
  font-weight: 600;
}

#countdown {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.countdown-item {
  background-color: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  min-width: 90px;
  font-weight: 600;
  color: #484848; /* Text Color */
}

.countdown-item span {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  color: #4cadc5; /* Primary Color */
}

.countdown-ended {
  background-color: #e7f3ff;
  color: #1877f2;
  padding: 1rem;
  border-radius: 6px;
  font-weight: 500;
}

.come-back-notice {
  margin-top: 2rem;
  font-style: italic;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  .live-stream-wrapper {
    padding: 1.5rem 1rem;
  }

  .live-stream-wrapper h2 {
    font-size: 1.8rem;
  }

  .stream-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .countdown-item span {
    font-size: 2.2rem;
  }

  .countdown-item {
    /* This ensures each item takes up nearly half the space, forcing a 2x2 grid */
    flex-basis: 40%;
    flex-grow: 1;
  }
}
