body {
  background: #f4f1ec;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: sans-serif;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
}

#introOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #f4f1ec;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 1s ease;
}

#introText {
  font-size: 50px;
  font-weight: bold;
  text-align: center;
  color: #333;
  padding: 20px;
}

#mainTitle {
  margin-top: 30px;
  font-size: 50px;
  font-weight: bold;
  text-align: center;
  font-family: monospace;
}

#envelopeHint {
  margin-top: 5px;
  margin-bottom: 0px;
  font-size: 30px;
  font-weight: 500;
  text-align: center;
  font-family: monospace;
}

#envelope-container {
  position: relative;
  width: 300px;
  height: 300px;
}

#envelopeAnim {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Sliding decorative image */
#letterImage {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(3deg);
  opacity: 0;
  width: min(95vw, 95vh);  /* Allow scaling based on screen size */
  max-width: none;         /* Remove the cap so it can go larger */
  transition: all 1s ease;
  z-index: 10;
}

#letterImage.show {
  opacity: 1;
}

/* Text box */
#letterText {
  position: fixed;
  top: calc(50vh + 60vw * 0.65); /* below the image */
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  width: 80vw;
  max-width: 400px;
  background: white;
  border: 1px solid #ccc;
  padding: 24px;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.8s ease;
  z-index: 20;
  font-family: monospace;
  font-size: 18px;
}

#letterText.show {
  opacity: 1;
}

.hidden {
  display: none;
}

#closeLetter {
  margin-top: 15px;
  padding: 6px 12px;
}

#countdownWrapper {
  margin-top: 40px;
  text-align: center;
  color: #333;
  font-family: monospace;
}

#countdownWrapper h2 {
  margin-bottom: 8px;
  font-size: 40px;
}

#countdown {
  font-size: 36px;
  font-weight: bold;
  letter-spacing: 2px;
}

#music-section {
  margin-top: 10px;
  text-align: center;
  font-family: monospace;
}

#music-section p {
  font-size: 30px;
  font-weight: 500;
  margin-bottom: 15px;
  font-weight: bold;
}

.spotify-widgets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

#songList {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.songRow {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.songText {
  font-size: 24px;
  max-width: 200px;
  text-align: right;
}

#timelineWrapper {
      margin-top: 20px;
      width: 100%;
      display: flex;
      justify-content: flex-start;
      position: relative;
      padding-left: 100px;
    }

#timeline {
  width: calc(100vw - 40px); /* full screen minus a little padding */
  height: 6px;
  background: black;
  position: relative;
  border-radius: 2px;
  margin-left: auto;
  margin-right: 0;
}

.timeline-endcap {
  position: absolute;
  top: -6px; /* Same as .event */
  width: 4px;
  height: 80px; /* Match .event for perfect alignment */
  background: black;
  border-radius: 1px;
}

.event {
  position: absolute;
  top: -6px; /* Aligns vertically centered on 8px timeline */
  width: 2px;
  height: 80px; /* was 40px, now 50% shorter */
  background: hotpink;
  border-radius: 2px;
}

#cursorDot {
  position: absolute;
  top: 50%;                        /* center vertically */
  left: 0;
  transform: translate(-50%, -50%);
  width: 64px;                     /* was 20px, 20% smaller */
  height: 64px;                    /* same here */
  background: purple;
  border: 1px solid white;         /* thin white outline */
  border-radius: 50%;
  cursor: grab;
  transition: background 0.2s ease;
  z-index: 10;
}

#cursorDot:active {
  background: rebeccapurple;
  cursor: grabbing;
}

/* Hide image if not needed */
#popup {
  position: absolute;
  bottom: 100%;
  transform: translateX(-30%) translateY(-16px);
  background: white;
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  text-align: center;
  max-width: 200px;
  z-index: 100;
}

#popup img {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 8px;
  display: none;
}

#popup img.shown {
  display: block;
}

#popup p {
  margin: 0;
  font-size: 24px;
  font-family: monospace;
  word-break: break-word;
}
.hidden {
  opacity: 0;
  visibility: hidden;
}

.event,
.timeline-endcap {
  top: 50%;
  transform: translateY(-50%);
}

#timelineIntro {
  text-align: center;
  font-size: 28px;
  margin-bottom: 20px;
  line-height: 1.4;
  font-family: monospace;
}

#socialSection {
  margin-top: 60px;
  text-align: center;
  padding: 0 20px;
}

.sectionIntro {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 20px;
  font-family: monospace;
  font-weight: bold;
}

.socialEmbeds {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.embedBox {
  width: 300px;
  max-width: 100%;
  background-color: transparent;
  border-radius: 12px;
  overflow: hidden;
}

/* Pizza styles */
#pizzaTitle {
  text-align: center;
  font-family: monospace;
  font-size: 24px;
  margin-bottom: 20px;
  font-weight: bold;
}

#pizzaSubtitle {
  text-align: center;
  font-family: monospace;
  font-size: 16px;
  margin-top: -10px;
  margin-bottom: 10px;
  color: #444;
}

#pizzaContainer {
  position: relative;
  width: 400px;
  height: 400px;
  margin: 0px auto;
}
.pizza-slice {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  transition: opacity 0.4s ease;
}

.pizza-slice.hidden {
  opacity: 0;
  pointer-events: none;
}

#pizzaMessage {
  font-family: monospace;
  font-size: 24px;
  margin-top: 0px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.5s ease;
  text-align: center;
  pointer-events: none;
  color: blue;
  text-decoration: underline;
  /*margin-top: -25vh;  or tweak to -15vh, etc. */
}


#pizzaMessage.show {
  opacity: 1;
  pointer-events: auto;
}

/* Make sure it doesn't go off screen on mobile */
@media (max-width: 768px) {
  #popup {
    max-width: 180px;
    font-size: 13px;
    top: -80px;
  }
}