@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=JetBrains+Mono:wght@400;500&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background-color: #000000;
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #000000;
  color: #c0c0c0;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin: 3rem auto 0.5rem;
  padding: 0 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #e0e0e0;
  max-width: 1400px;
  text-align: center;
  transition: color 0.4s ease, transform 0.3s ease;
}

#scorePercent,
#rhyScorePercent {
  margin: 0.25rem auto 2rem;
  font-size: clamp(0.875rem, 2vw, 1rem);
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
  padding: 0 1.5rem;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.4s ease;
}

#progressBarContainer,
#rhyProgressBarContainer {
  position: relative;
  width: min(75%, 1200px);
  height: clamp(24px, 3.5vw, 32px);
  background: rgba(255, 255, 255, 0.04);
  overflow: visible;
  margin: 1.25rem auto;
  transition: background 0.3s ease;
}

#progressBar,
#rhyProgressBar {
  height: 100%;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

#progressBar {
  background: #1565c0;
}

#rhyProgressBar {
  background: #c62828;
}

#progressBar::after,
#rhyProgressBar::after {
  display: none;
}

#thresholdMarker,
#rhyThresholdMarker {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
}

#thresholdMarker::before,
#rhyThresholdMarker::before {
  content: "";
  position: absolute;
  right: 0;
  width: 2px;
  height: 100%;
  background: #808080;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

#thresholdMarker span,
#rhyThresholdMarker span {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  transform: translateX(50%);
  color: rgba(255, 255, 255, 0.4);
  font-size: clamp(0.625rem, 1.5vw, 0.75rem);
  font-weight: 500;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.3s ease;
}

#desc {
  font-size: clamp(1.125rem, 2.8vw, 1.5rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: 900px;
  margin: 3rem auto 1rem;
  padding: 0 1.5rem;
  text-align: center;
  line-height: 1.6;
  font-weight: 400;
  transition: color 0.4s ease;
}

#lastUpdated {
  margin: 0.5rem auto 3rem;
  padding: 0 1.5rem;
  font-size: clamp(0.75rem, 1.8vw, 0.875rem);
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  font-weight: 400;
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.3s ease;
}

#range {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(3rem, 8vw, 6rem);
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  text-align: center;
}

#range > div {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: 32px;
  transition: background 0.3s ease, transform 0.3s ease;
}

#range h3 {
  font-size: clamp(0.75rem, 1.8vw, 0.875rem);
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  transition: color 0.3s ease;
}

#lowScore,
#highScore {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  transition: color 0.3s ease, transform 0.2s ease;
  letter-spacing: -0.02em;
  font-family: 'JetBrains Mono', monospace;
}

#streamStatus {
  margin: 3rem auto;
  padding: 1rem 1.5rem;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 500;
  text-align: center;
  transition: color 0.4s ease, background 0.3s ease, transform 0.3s ease;
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 32px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: high) {
  #progressBarContainer,
  #rhyProgressBarContainer {
    background: rgba(255, 255, 255, 0.1);
  }
  
  #thresholdMarker::before,
  #rhyThresholdMarker::before {
    opacity: 1;
  }
}

@media print {
  body::before {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  #progressBar,
  #rhyProgressBar {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}