/* ===== Theme ===== */
body {
  background: #0d0d0d;
  color: #d0d0d0;
  overflow-x: hidden;
}

/* Add subtle noise/grain texture to avoid flat black */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.02) 1px, transparent 0),
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.02) 1px, transparent 0);
  background-size: 20px 20px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 1;
}

/* ===== Game Wrapper ===== */
#game-wrapper {
  height: 100vh;
  padding-top: 100px;
  margin-top: 60px; /* Add margin to account for fixed navbar on 2025 page */
}

#game {
  position: sticky;
  top: 120px;
  height: 80vh;
}

/* ===== Mario ===== */
#mario {
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
  background: url("/images/mario.svg") center / contain no-repeat;
  transition: left 0.1s ease-out;
  z-index: 30;
  /* Add idle animations - only when Mario is stationary */
  animation:
    mario-bobbing 4s ease-in-out infinite alternate,
    mario-blink 10s ease-in-out infinite;
  transform-origin: bottom center;
}

/* Mario bobbing animation - subtle up and down movement with slight tilt */
@keyframes mario-bobbing {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-2px) rotate(0.3deg);
  }
  75% {
    transform: translateY(-2px) rotate(-0.3deg);
  }
}

/* Mario blink animation - occasional eye blink */
@keyframes mario-blink {
  0%, 85%, 100% {
    filter: brightness(1);
  }
  92% {
    /* Create blink effect by temporarily darkening the eyes */
    filter: brightness(0.7);
  }
}

/* ===== Dots ===== */
.dot {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: all 0.3s ease-out;
  z-index: 20;
}

.dot.active {
  background-color: #fff;
  box-shadow: 0 0 15px 5px rgba(255, 255, 255, 0.7);
  transform: scale(1.5);
  animation: pulse 1s ease-out;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
  }
  50% {
    box-shadow: 0 0 20px 10px rgba(255, 255, 255, 0.9);
    transform: scale(1.8);
  }
  100% {
    box-shadow: 0 0 15px 5px rgba(255, 255, 255, 0.7);
    transform: scale(1.5);
  }
}

.dot.passed {
  background-color: rgba(255, 255, 255, 0.5);
}

/* ===== Highlights ===== */
.highlight {
  position: absolute;
  right: 100px;
  width: 300px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-left: 4px solid #1DB954;
  color: #fff;
  opacity: 0;
  transform: translateY(-50%) translateX(50px) scale(0.97);
  transition:
    opacity 0.35s cubic-bezier(0.25, 0.1, 0.25, 1),
    transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1),
    box-shadow 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(5px);
}

/* Different colors for each month's highlight */
.highlight.january {
  border-left-color: #e6b026;
}

.highlight.february {
  border-left-color: #e6b026;
}

.highlight.march {
  border-left-color: #e6b026;
}

.highlight.april {
  border-left-color: #e6b026;
}

.highlight.may {
  border-left-color: #e6b026;
}

.highlight.june {
  border-left-color: #e6b026;
}

.highlight.july {
  border-left-color: #e6b026;
}

.highlight.august {
  border-left-color: #e6b026;
}

.highlight.september {
  border-left-color: #e6b026;
}

.highlight.october {
  border-left-color: #e6b026;
}

.highlight.november {
  border-left-color: #e6b026;
}

.highlight.december {
  border-left-color: #e6b026;
}

.highlight.visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.highlight h3 {
  margin-top: 0;
  color: #de0f0f;
  font-family: 'Arial Black', 'Arial Bold', Gadget, sans-serif;
  font-size: 28px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 10px;
}

.highlight h3:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #e6b026, #de0f0f);
}

.highlight p {
  margin: 0;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}

.highlight ul {
  margin: 0;
  padding-left: 15px;
}

.highlight li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 15px;
  color: rgba(255, 255, 255, 0.8);
}

.highlight li:before {
  content: '□';
  position: absolute;
  left: 0;
  color: #e6b026;
  font-size: 8px;
  top: 4px;
}

/* ===== Connecting Line ===== */
#connecting-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

#connecting-line path {
  stroke: #FF6B6B;
  stroke-width: 3;
  stroke-dasharray: 5,5;
  fill: none;
}

/* ===== Desktop ===== */
@media (min-width: 769px) {
  /* Desktop layout - center the dots and Mario */
  .dot {
    left: 50%;
    transform: translateX(-50%);
  }

  /* Position Mario closer to the center */
  #mario {
    left: 40%;
  }

  /* Position highlight more separated from the dots */
  .highlight {
    right: 100px;
  }

  /* Adjust connecting line for centered dots */
  #connecting-line path {
    stroke-dasharray: 5,5;
  }
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  #mario {
    width: 45px;
    height: 60px;
    /* Adjust animations for mobile - slightly faster and more subtle */
    animation:
      mario-bobbing 3s ease-in-out infinite alternate,
      mario-blink 7s ease-in-out infinite;
  }
  
  .dot {
    width: 8px;
    height: 8px;
  }
  
  .highlight {
    right: 20px;
    width: 200px;
    padding: 10px;
    transform: translateY(-50%) translateX(30px) scale(0.97);
  }
  
  .highlight.visible {
    transform: translateY(-50%) translateX(0) scale(1);
  }
  
  .highlight h3 {
    font-size: 22px;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }
  
  .highlight h3:after {
    width: 30px;
    height: 2px;
  }
  
  .highlight li {
    font-size: 12px;
    margin-bottom: 8px;
    line-height: 1.6;
  }
  
  /* Adjust line for mobile */
  #connecting-line path {
    stroke-width: 1;
    stroke-dasharray: 3,3;
  }
}

