/* Reset custom styles to restore default appearance */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base font and page background */
body {
  font-family: Arial, sans-serif;
  background: #F1F5F9;
  color: #111827;
}

/* Main layout container */
main.container {
  max-width: 100%;
  margin: 2rem;
  padding: 2rem;
  background: #FFFFFF;
  border-radius: 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Section card styling */
section,
.calendar-widget,
.player-section,
.status-controls,
.podcast-section {
  background: #F9FAFB;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}
/* .calendar-section {
  margin-top: 20px;
} */

/* Section headings */
section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #E5E7EB;
  padding-bottom: 0.5rem;
}
section h3 {
  font-size: 1.2rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

/* Default link styling */
a {
  color: #1D4ED8;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Header styling */
header {
  background: linear-gradient(135deg, #1E3A8A, #1E40AF);
  color: #FFFFFF;
  padding: 1rem;
  text-align: center;
}
header h1 {
  margin-bottom: 0.5rem;
  font-size: 2rem;
}
header p,
header a {
  color: #D1D5DB;
  font-size: 0.9rem;
}
header a:hover {
  color: #FFFFFF;
}

/* Button styling */
button {
  background: #1D4ED8;
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 0.25rem;
  cursor: pointer;
}
button:hover {
  background: #2563EB;
}

/* Audio controls layout */
.custom-audio-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

/* AllStar users list cards */
.allstar-section ul {
  list-style: none;
  padding: 0;
}
.allstar-section li {
  padding: 0.75rem;
  margin: 0.5rem 0;
  background: #FFFFFF;
  border-radius: 0.25rem;
  transition: background 0.3s;
}
.allstar-section li:hover {
  background: #E5E7EB;
}
.allstar-section li a {
  display: block;
  color: #1D4ED8;
  font-weight: 500;
  text-decoration: none;
}
.allstar-section li a:hover {
  text-decoration: underline;
}

/* Dark mode overrides */
body.dark-mode {
  background: #111827;
  color: #E5E7EB;
}
body.dark-mode header {
  background: linear-gradient(135deg, #111827, #1F2937);
}
body.dark-mode a {
  color: #93C5FD;
}
body.dark-mode button {
  background: #2563EB;
}
body.dark-mode section,
body.dark-mode .calendar-widget,
body.dark-mode .player-section,
body.dark-mode .status-controls,
body.dark-mode .podcast-section,
body.dark-mode .calendar-section {
  background: #1F2937;
  box-shadow: none;
}
body.dark-mode section h2 {
  border-color: #374151;
}
body.dark-mode .allstar-section li {
  background: #1F2937;
}
body.dark-mode .allstar-section li:hover {
  background: #374151;
}

/* Desktop: three-column layout with podcast on the right and calendar below podcast */
@media (min-width: 1024px) {
  .grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-areas:
      "clock info podcast"
      "clock player podcast"
      "clock status podcast"
      "clock allstar podcast";
    gap: 1rem;
  }
  .clock-section    { grid-area: clock; }
  .info-section     { grid-area: info; }
  .player-section   { grid-area: player; }
  .status-controls  { grid-area: status; }
  .allstar-section  { grid-area: allstar; }
  .podcast-section  { grid-area: podcast; }
  .grid > section {
    margin-bottom: 0;
  }
  #menu-toggle {
    display: none;
  }
  /* .calendar-section { grid-area: calendar; } */
}

/* Mobile: show only player and users, others hidden until menu toggled */
@media (max-width: 1023px) {
  #menu-toggle {
    display: inline-block;
  }
  .grid > .clock-section,
  .grid > .info-section,
  .grid > .status-controls,
  .grid > .podcast-section {
    display: none;
  }
  .grid > .player-section,
  .grid > .allstar-section {
    display: block;
  }
  /* When menu is open, reveal hidden sections */
  .grid.menu-open > .clock-section,
  .grid.menu-open > .info-section,
  .grid.menu-open > .status-controls,
  .grid.menu-open > .podcast-section {
    display: block;
  }
}

/* Ensure the player section is visible and occupies its grid area */
@media (min-width: 1024px) {
  .grid > .player-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    grid-area: player !important;
  }
}
