:root {
  --dotted-border: 1px dotted rgba(255, 255, 255, 0.5);
}

/* Base Styles */
body {
  font-family: 'Playfair Display', serif;
  background-image: url("images/background.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  font-size: 16px; /* reduced from 18px for more screen space */
  color: white;
  margin: 0;
  scroll-behavior: smooth;
}

h1 {
  font-size: clamp(3.5rem, 8vw, 4rem);
  animation: fadeInUp 1s ease 0.5s forwards;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
  margin-left: auto;
  margin-right: auto;
}

/* h1 {
  font-size: 64px;
  text-align: center;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
} */

h3 {
  font-size: 26px; /* instead of 30px */
  color: white;
  margin-top: 40px;
}

/* Content Block */
.content {
  position: relative;
  z-index: 1;
  padding: 40px 5vw;
  margin: 0 auto;
  width: 90vw;
  max-width: 1400px;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent for readability */
  color: white;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.viz-wrapper {
  min-width: 900px;
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

svg {
  overflow: visible; /* prevent clipping of foreignObject panels */
}

.controls {
  margin-bottom: 40px;
}

/* Paragraphs & Lists */
p {
  margin-bottom: 20px;
  line-height: 1.6;
}

ul {
  padding-left: 20px;
  margin-bottom: 30px;
}

/* Checkbox Styling for Critical Reception */
#visualization-wrapper-critical {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#critical {
  display: flex;
  justify-content: center;
  width: 100%;
}

.checkbox-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 15px 0;
  gap: 10px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  margin: 0 8px;
}

.checkbox-item input[type="checkbox"] {
  margin-right: 5px;
}

/* Video Styling */
.video-container {
  display: flex;
  justify-content: center;
  margin: 30px 0;
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 10px;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Fade-in Animation */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  h1 {
    font-size: 48px;
  }

  h3 {
    font-size: 24px;
  }

  .content {
    padding: 40px 20px;
  }
}

/* Section Styling */
.section {
  padding: 60px 0;
  position: relative;
}

.section-header {
  text-align: center;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 1rem;
  transform: translateY(30px);
  transition: all 0.8s ease;
  opacity: 0;
}

.section-text {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 800px;
  margin: 0 auto;
  transform: translateY(30px);
  transition: all 0.8s ease 0.2s;
  opacity: 0;
}

.section.in-view .section-title,
.section.in-view .section-text {
  opacity: 1;
  transform: translateY(0);
}

/* Visualization Containers */
.viz-container {
  background: transparent;
  border-radius: 15px;
  padding: 40px;
  margin: 40px 0;
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s ease 0.5s;
  border: var(--dotted-border);
}

.section.in-view .viz-container {
  opacity: 1;
  transform: translateY(0);
}

/* Insight Panel */
.insight-panel {
  border: 1px dotted rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  padding: 25px 30px;
  margin: 30px auto;
  position: relative;
  background-color: rgba(0, 0, 0, 0.4);
  max-width: 900px;
  width: 90%;
  text-align: center;
}

.insight-panel::before,
.insight-panel::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.insight-panel::before {
  top: -6px;
  left: -6px;
}

.insight-panel::after {
  bottom: -6px;
  right: -6px;
}

.insight-panel h2 {
  font-size: 1.3rem;
  margin-top: 0;
  margin-bottom: 7px;
  font-weight: 700;
}

.insight-panel p {
  line-height: 1.6;
  margin-bottom: 0;
}

/* Timeline button styles */
.controls button {
  background: transparent;
  color: white;
  border: 2px solid white;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  margin: 0 5px;
  font-family: 'Futura', sans-serif;
  transition: all 0.5s ease;
  position: relative;
  overflow: hidden;
}

.controls button:hover {
  background: white;
  color: black;
}

.controls button:active {
  transform: scale(0.7);
  box-shadow: 0 0 10px rgba(255,255,255,0.5);
}
