/* Reset and base styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 2rem;
    background-color: #f4f7fa;
    max-width: 1400px;
    color: #333;
}

/* Ensure h1 is explicitly centered */
h1 {
  text-align: center;
  margin-top: 0;
}

h2 { 
    margin-bottom: 1.5rem; 
    text-align: center;
    color: #2c3e50;
}

/* Force two columns for the main container of Sets */
#sets-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* Fixed to 2 columns */
    gap: 2.5rem; 
    max-width: 1400px; /* Optional: prevent it from getting too wide on ultra-wide screens */
    margin: 0 auto;
}

/* Individual Set Card (Collection) */
.set {
    border: 1px solid #e0e0e0;
    padding: 1.5rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
}

.set h3 { 
    color: #2c3e50; 
    margin-top: 0; 
    font-size: 1.2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

/* Description Text */
.set p {
    color: #555;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    flex-grow: 0; /* Prevent description from pushing videos down too much */
}

/* Force Videos inside each set to be ONE column (stacked) */
.videos-wrapper {
    display: flex;
    flex-direction: column; /* Stacks video cards vertically */
    gap: 1.5rem;
    margin-top: inherit; 
}

.video-container {
  display: inline-block;
  max-width: 100%;
  /* Ensures container shrinks to content but doesn’t overflow */
}

.video-container video {
  width: 100%;
  height: auto;
  display: block;
}

/* Center the sticky nav itself (not just its content) */
.sticky-nav {
  position: -webkit-sticky; /* Safari */
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgb(246, 245, 244);
  border-bottom: 1px solid #ddd;
  padding: 0.5rem 1rem;
  overflow-x: auto;
  white-space: nowrap;
  width: 200%;
  max-width: 1400px; /* match #sets-container max-width for visual alignment */
  margin: 0 auto; /* horizontally center the nav itself */
  padding-left: 1rem;
  padding-right: 1rem;
}

.sticky-nav a {
  display: inline-block;
  margin-right: 1rem;
  text-decoration: none;
  color: #2c3e50;
  font-weight: 600;
  white-space: nowrap;
}

.sticky-nav a:hover,
.sticky-nav a.active {
  color: #3498db;
}

/* Status Bar Styles */
.status-bar {
  position: sticky;
  top: 0;
  z-index: 1200; /* higher than nav and sets */
  background-color: #fff8e6;
  border-bottom: 1px solid #ffd54f;
  padding: 0.5rem 1rem;
  text-align: center;
}

.status-bar p {
  margin: 0;
  font-weight: 500;
  color: #e65100;
  font-size: 0.9rem;
}

.meta {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 0.25rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.error-msg, .no-playlists {
    grid-column: 1 / -1; /* Make errors span full width across the 2 columns */
    text-align: center;
    color: #e74c3c;
    font-style: italic;
    margin-top: 2rem;
}

/* Responsive adjustments for smaller screens (Mobile/Tablet) */
@media (max-width: 768px) {
    body { 
        margin: 1rem; 
    }
    
    /* Switch to a single column on mobile devices */
    #sets-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    video {
        max-height: 40vh; /* Allow slightly taller videos on small screens */
    }
}

@media (max-width: 1200px) and (min-width: 769px) {
    /* Optional: Switch to 3 columns if you want flexibility, 
       but strictly keeping to your request for "2 columns" */
}