@import url("https://fonts.googleapis.com/css2?family=Alegreya:wght@400;500;600;700&family=Alegreya+Sans:wght@300;400;500;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #050608;
  --bg-soft: #0d1117;
  --panel: rgba(14, 20, 32, 0.78);
  --panel-strong: rgba(14, 20, 32, 0.92);
  --border: rgba(115, 131, 158, 0.18);
  --accent: #6ae4ff;
  --accent-2: #ffb86c;
  --accent-3: #62f2c8;
  --text: #e6edf7;
  --muted: #9aa7bd;
  --shadow: 0 25px 60px rgba(4, 9, 18, 0.55);
}

body {
  background: radial-gradient(circle at top, rgba(32, 42, 70, 0.25), transparent 60%),
    linear-gradient(160deg, #050608 0%, #0b111b 45%, #050608 100%);
  font-family: "Alegreya Sans", system-ui, sans-serif;
  letter-spacing: 0.2px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.1'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

h1,
h2,
h3 {
  font-family: "Alegreya", serif;
  letter-spacing: 0.4px;
}

.page-shell {
  position: relative;
  z-index: 1;
}

input[type="range"] {
  accent-color: var(--accent);
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 1.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(10, 16, 27, 0.65);
  border: 1px solid rgba(121, 143, 176, 0.3);
  color: var(--text);
  font-weight: 500;
}

.chip-muted {
  background: rgba(10, 16, 27, 0.45);
  color: var(--muted);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(106, 228, 255, 0.9), rgba(106, 228, 255, 0.4));
  color: #0c121b;
  border: 1px solid rgba(106, 228, 255, 0.6);
  box-shadow: 0 12px 30px rgba(43, 134, 173, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(15, 23, 36, 0.8);
  border: 1px solid rgba(135, 156, 189, 0.25);
}

.stat-pill {
  background: rgba(255, 184, 108, 0.08);
  border: 1px solid rgba(255, 184, 108, 0.35);
  color: #ffd2a3;
}

.wheel {
  position: relative;
  height: 240px;
  border-radius: 1.25rem;
  border: 1px solid rgba(115, 131, 158, 0.25);
  background: rgba(9, 14, 22, 0.8);
  overflow: hidden;
}

.wheel-list {
  height: 100%;
  overflow-y: scroll;
  padding: 100px 0;
  scroll-padding: 100px 0;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}

.wheel-list::-webkit-scrollbar {
  display: none;
}

.wheel-item {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  font-size: 0.95rem;
  color: var(--muted);
  transition: all 0.2s ease;
}

.wheel-item.is-selected {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
}

.wheel-highlight {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: 44px;
  transform: translateY(-50%);
  border-radius: 999px;
  border: 1px solid rgba(106, 228, 255, 0.45);
  background: rgba(106, 228, 255, 0.08);
  pointer-events: none;
}

.wheel-fade {
  position: absolute;
  left: 0;
  right: 0;
  height: 70px;
  pointer-events: none;
  z-index: 1;
}

.wheel-fade-top {
  top: 0;
  background: linear-gradient(180deg, rgba(5, 6, 8, 0.95), rgba(5, 6, 8, 0));
}

.wheel-fade-bottom {
  bottom: 0;
  background: linear-gradient(0deg, rgba(5, 6, 8, 0.95), rgba(5, 6, 8, 0));
}

.chart-wrap {
  height: 220px;
}

.chart-wrap canvas {
  height: 100% !important;
}

@media (max-width: 1024px) {
  .chart-wrap {
    height: 240px;
  }
}

@media (max-width: 768px) {
  .page-shell {
    padding: 1.5rem 1rem !important;
  }

  .card {
    padding: 1.25rem;
    border-radius: 1.25rem;
  }

  .chip {
    font-size: 0.7rem;
  }

  .wheel {
    height: 200px;
  }

  .wheel-list {
    padding: 88px 0;
    scroll-padding: 88px 0;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .wheel-item {
    height: 40px;
    font-size: 0.9rem;
  }

  .wheel-item.is-selected {
    font-size: 1.05rem;
  }

  .wheel-highlight {
    height: 40px;
  }

  .chart-wrap {
    height: 260px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.85rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .chart-wrap {
    height: 280px;
  }
}
