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

body {
    font-family: system-ui, -apple-system, sans-serif;
    padding: 1rem 2rem;
    background: #f5f5f5;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.nav-links .nav-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.nav-links a {
    background: #fff;
    color: #333;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap; /* Prevent text wrapping */
}

.nav-links a:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.nav-links a.active {
    background: #2563eb;
    color: white;
}

#wrapper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* CHANGED: Back to flexible columns */
    gap: 2rem;
    margin: 0 auto 0.5rem auto;
    max-width: 2400px;
    padding: 0 1rem;
}

.video-container {
    text-align: center;
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-width: 3px;
    border-style: solid;
    border-color: #ccc;
}

h3 {
    margin-bottom: 1rem;
    color: #1f2937;
    font-size: 1.25rem;
}

video {
    width: auto;
    height: 300px;
    max-width: 100%;
    border-radius: 0.5rem;
    background: transparent; /* CHANGED: from #000 to transparent */
    object-fit: contain;
    display: block;
    margin: 0 auto;
}


/* Video control overlay styles */
video {
  position: relative;
}

video::-webkit-media-controls-panel {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background: rgba(0, 0, 0, 0.5) !important;
  opacity: 0;
  transition: opacity 0.3s ease;
}

video:hover::-webkit-media-controls-panel {
  opacity: 1;
}

/* Firefox */
video::-moz-media-controls {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background: rgba(0, 0, 0, 0.3) !important;
  opacity: 0;
  transition: opacity 0.3s ease;
}

video:hover::-moz-media-controls {
  opacity: 1;
}

@media (max-width: 1200px) {
    #wrapper {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    video {
        height: 250px;
    }
}

@media (max-width: 1000px) {
    #wrapper {
        grid-template-columns: minmax(0, 1fr);
    }
    
    video {
        height: 200px;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-links .nav-row {
        flex-wrap: wrap;
    }
    
    .nav-links a {
        text-align: center;
    }
}


/* Timeline container styles */
.timeline-container {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  padding: 0;
  margin: 0;
}

.timeline-container h3 {
  margin-top: 0;
  margin-bottom: 0;
  text-align: center;
}

.timeline-container video {
  width: 50%;
  height: auto;
  margin: 0 auto; /* ensures it's centered */
  display: block;
}

/* Progress bar styles */
.progress-container {
  grid-column: 1 / -1;
  width: 100%;
  height: 20px;
  background-color: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #45a049);
  width: 0%;
  transition: width 0.1s ease;
  border-radius: 10px;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: bold;
  color: #333;
  z-index: 1;
}


.instructions {
  text-align: center;
  margin: 0rem auto;
  max-width: 800px;
  padding: 0 0rem;
  font-family: system-ui, sans-serif;
  color: #1f2937;
}

.instructions h3 {
  font-size: 1rem;
  font-weight: 500;
  color: #374151;
}


.scene-selector {
  text-align: center;
  margin-bottom: 20px;
}

.method-selector {
  text-align: center;
  margin-bottom: 20px;
}

.nav-pills {
  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0 auto;
}

.nav-pills li {
  margin: 2px;
}

.nav-pills a {
  display: block;
  padding: 8px 16px;
  background-color: #f0f0f0;
  color: #333;
  text-decoration: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.nav-pills li.active a {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.nav-pills a:hover {
  background-color: #ddd;
}

.nav-pills li.active a:hover {
  background-color: #0056b3;
}