html,
body {
  text-align: center;
}
canvas {
  background: #4d4167;
  margin: 0;
  display: block;
  position: relative;
  left: 0;
  top: 0;
  z-index: -1 !important;
}
.first-section {
  background-image: linear-gradient(
    to bottom,
    #fff0bb 0px,
    #ffffff 50px,
    #ffffff 50px
  );
}
.foreground {
  margin: 0;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}
.hero-body {
  margin-bottom: 20vh;
}
.has-text-white {
  color: #fffefd !important;
}
.has-text-blue {
  color: #1a1a3e !important;
}

.footbutton,
a.coc {
  color: #1a1a3e !important;
  background: none;
  border: none;
}
.footbutton:hover,
a.coc:hover {
  color: #7188a3 !important;
}

.subscribe {
  border-radius: 10px;
  border-top-left-radius: 0px;
}

.mentor {
  border-radius: 10px;
  border-top-left-radius: 0px;
}

.main {
  margin-top: 5vh;
}

.is-blue {
  background-color: #7188a3;
  border: none;
}

.is-dark-blue {
  background-color: #1a1a3e;
  border: none;
}

.notification {
  margin: 0 auto;
  display: inline-block;
  overflow: hidden;
}

.tier {
  margin: 5vh;
}
.star {
  height: 7vh;
}
.planet {
  height: 7vh;
}
.comet {
  height: 5vh;
}
img {
  max-height: 100%;
}

.cardsubtitle {
  margin-bottom: 3vh;
}
.showcase {
  margin-top: 3vh;
  height: 40vh;
}
.showcase img {
  border-radius: 10px;
  border-top-left-radius: 0px;
}

hr {
  border: 2px solid #d1697d;
  width: 25%;
  margin-left: auto;
  margin-right: auto;
}

.addMargin {
  margin: 1vh;
}

.sponsor-logo-base44 {
  padding: 1.8rem 1rem;
}

.sponsor-logo-statefarm {
  padding: 3.9rem 1rem;
}

.sponsor-logo-amazon {
  padding: 1rem;
}

.sponsor-logo-gdms {
  padding: 6.1rem 1rem;
}

.partner-logo-mlh {
  margin: 1rem;
}

.partner-logo-purebuttons {
  margin: 1rem;
}

.timeline {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding-left: 40px; /* space for vertical line */
}

/* vertical line */
.timeline::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(#f0ecec, #f0ecec);
  opacity: 0.7;
  z-index: 1; /* sit behind markers */
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 44px; /* more space so content aligns nicely */
}

/* marker is a white outer ring with a colored inner dot */
.timeline-marker {
  position: absolute;
  left: calc(16px - 12px);
  top: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff; /* outer ring */
  border: 2px solid rgba(255,255,255,0.95);
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4; /* sit above the vertical line */
}

/* inner dot */
.timeline-marker::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e6e6e6 34%);
  box-shadow: 0 2px 0 rgba(0,0,0,0.04) inset;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

/* current state: colored inner dot + subtle lift */
.timeline-item.current .timeline-marker {
  /* slight lift for current marker but don't shift horizontally */
  transform: translateY(-2px);
}
.timeline-item.current .timeline-marker::before {
  background: radial-gradient(circle at 30% 30%, #ffd6dd 0%, #d1697d 36%);
  transform: scale(1.22);
  box-shadow: 0 6px 18px rgba(209,105,125,0.22);
}

/* Pulse animation for current marker */
.timeline-item.current .timeline-marker::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(209,105,125,0.12);
  z-index: 2; /* behind the marker */
  pointer-events: none;
  animation: pulse 1400ms infinite ease-out;
}

@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  70% { transform: scale(1.25); opacity: 0.25; }
  100% { transform: scale(1.5); opacity: 0; }
}

.timeline-content {
  margin-left: 0;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid rgba(26,26,62,0.06);
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}

.timeline-header {
  text-align: left;
  margin: 1.5rem 0 0.75rem 40px;
}

.timeline-header .tag {
  font-size: 0.95rem;
  padding: 0.6rem 1rem;
  background-color: #1a1a3e;
  color: #fff;
  border-radius: 6px;
}

.timeline-content .heading {
  color: #d1697d;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-content h4 {
  margin: 0.25rem 0 0.5rem 0;
  font-size: 1.15rem;
  color: #1a1a3e;
}

.timeline-content p {
  color: #6b6b6b;
  font-size: 0.95rem;
  margin: 0;
}

#countdown {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a3e;
  background: linear-gradient(180deg, rgba(255,240,187,0.95), rgba(255,245,215,0.9));
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.75rem;
  border: 1px solid rgba(209,105,125,0.9);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* Layout for the new timeline structure */
.timeline-wrapper {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 2rem;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto 3rem auto;
}

.timeline-column {
  padding: 0 0.5rem;
}

.timeline-list {
  position: relative;
  padding-left: 40px;
}

.timeline-list::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(26,26,62,0.05);
}

.timeline-details {
  position: sticky;
  top: 100px;
}

.detail-card {
  background: #fff;
  padding: 1.25rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  border: 1px solid rgba(26,26,62,0.04);
}

/* Fade-in animation for details */
.detail-card {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 260ms ease, transform 260ms cubic-bezier(.2,.9,.3,1);
}
.detail-card.show {
  opacity: 1;
  transform: translateY(0);
}

/* Category icon placeholder: add SVG inside .category.tag later */
.category.tag svg {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-right: 6px;
}

.detail-card.empty {
  opacity: 0.95;
}

.detail-title {
  margin: 0 0 0.5rem 0;
  color: #1a1a3e;
}

.detail-body {
  color: #666;
  margin: 0;
}

/* Make timeline responsive: stack column on mobile */
@media (max-width: 880px) {
  .timeline-wrapper {
    grid-template-columns: 1fr;
  }
  .timeline-details {
    position: relative;
    top: auto;
  }
}

/* Mobile touch optimizations */
@media (max-width: 600px) {
  .timeline-item {
    margin-bottom: 1.5rem;
  }
  .timeline-marker {
    width: 18px;
    height: 18px;
    left: 6px;
    top: 10px;
  }
  .timeline-content {
    padding: 0.9rem 1rem;
  }
  .timeline-content h4 {
    font-size: 1rem;
  }
  .timeline-item {
    padding-left: 40px;
  }
  .timeline-header .tag {
    display: inline-block;
    padding: 0.5rem 0.9rem;
  }
}

/* Increase hit area for timeline items for comfortable tapping */
.timeline-item .timeline-content {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Category chips and icons */
.meta-row {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.category.tag {
  background: rgba(26,26,62,0.06);
  color: #1a1a3e;
  border: none;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.78rem;
}

/* Simple icon indicator using pseudo-element */
.category.tag::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* Color-coding by category text (fallback if categories match exact strings) */
.category.tag.category-food::before { background: #f6a623; }
.category.tag.category-judging::before { background: #7b61ff; }
.category.tag.category-main-stage::before { background: #1a1a3e; }
.category.tag.category-checkpoint::before { background: #3bb6a1; }

/* Cheap CSS micro-animations */
.timeline-item .timeline-content {
  transition: transform 180ms cubic-bezier(.2,.9,.3,1), box-shadow 180ms ease, border-color 180ms ease;
}
.timeline-item.current .timeline-content {
  transform: translateX(4px) scale(1.01);
}
.timeline-item .timeline-marker {
  transition: transform 220ms ease, box-shadow 220ms ease, background-color 160ms ease;
}
.timeline-item.current .timeline-marker {
  transform: scale(1.12);
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .timeline {
    padding-left: 28px;
  }
  .timeline-header {
    margin-left: 28px;
  }
  .timeline-item {
    padding-left: 30px;
  }
  .timeline-marker {
    left: 8px;
  }
  #countdown {
    font-size: 1.05rem;
    padding: 0.85rem 1rem;
  }
}

@media (max-width: 480px) {
  .timeline {
    max-width: 100%;
    padding-left: 22px;
  }
  .timeline-header {
    margin-left: 22px;
  }
  .timeline-content h4 {
    font-size: 1rem;
  }
  .timeline-content .heading {
    font-size: 0.75rem;
  }
}

/* Timeline item interaction styles */
.timeline-item {
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.timeline-item:focus,
.timeline-item:hover {
  transform: translateX(6px);
  outline: none;
}

.timeline-item.current .timeline-content {
  border-color: rgba(209,105,125,0.25);
  box-shadow: 0 12px 30px rgba(209,105,125,0.08);
}

.timeline-item.current .timeline-marker {
  outline: none;
}

.timeline-item .timeline-content p + p {
  margin-top: 0.5rem;
}

.site-countdown {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.inline-button-link {
  padding: 0.25rem 0.5rem !important;
  border: 1px solid #1a1a3e !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  transition: background-color 0.2s ease !important;
}

.inline-button-link:hover {
  background-color: #f5f5f5 !important;
  text-decoration: none !important;
}
