:root {
  --bg: #0f1220;
  --bg-soft: #171b2e;
  --card-bg: #1e2338;
  --accent: #7dd3fc;
  --accent-strong: #38bdf8;
  --text: #f4f6fb;
  --text-dim: #9aa3c0;
  --border: #2c3252;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: radial-gradient(circle at 50% -10%, #232a4d 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.5;
}

.site-header {
  text-align: center;
  padding: 32px 16px 8px;
}

.site-header h1 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
}

.particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.particles span {
  position: absolute;
  bottom: -12px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  animation: floatUp 9s linear infinite;
}

.particles span:nth-child(1) { left: 4%; animation-delay: 0s; animation-duration: 8s; }
.particles span:nth-child(2) { left: 14%; animation-delay: 1.2s; animation-duration: 11s; width: 3px; height: 3px; }
.particles span:nth-child(3) { left: 24%; animation-delay: 2.5s; animation-duration: 9s; }
.particles span:nth-child(4) { left: 36%; animation-delay: 0.6s; animation-duration: 12s; width: 5px; height: 5px; }
.particles span:nth-child(5) { left: 48%; animation-delay: 3.4s; animation-duration: 8.5s; }
.particles span:nth-child(6) { left: 58%; animation-delay: 1.8s; animation-duration: 10.5s; width: 3px; height: 3px; }
.particles span:nth-child(7) { left: 68%; animation-delay: 4s; animation-duration: 9.5s; }
.particles span:nth-child(8) { left: 78%; animation-delay: 0.3s; animation-duration: 11.5s; width: 5px; height: 5px; }
.particles span:nth-child(9) { left: 88%; animation-delay: 2.2s; animation-duration: 8.8s; }
.particles span:nth-child(10) { left: 94%; animation-delay: 3.8s; animation-duration: 10s; width: 3px; height: 3px; }

@keyframes floatUp {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 0.7; }
  90% { opacity: 0.2; }
  100% { transform: translateY(-100vh); opacity: 0; }
}

.clock-icon {
  color: var(--accent);
  flex-shrink: 0;
}

.clock-hand {
  transform-origin: 20px 20px;
}

.clock-hand.hour {
  animation: spinHand 6s linear infinite;
}

.clock-hand.minute {
  animation: spinHand 2.4s linear infinite;
}

@keyframes spinHand {
  to { transform: rotate(360deg); }
}

.time-machine {
  position: relative;
  max-width: 640px;
  margin: 24px auto;
  padding: 20px 20px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 20px;
  text-align: center;
}

.time-machine::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 26px;
  background: conic-gradient(from 0deg, transparent, var(--accent-strong) 6%, transparent 18%, transparent 82%, var(--accent-strong) 94%, transparent);
  opacity: 0.7;
  filter: blur(5px);
  animation: rotateRing 6s linear infinite;
  z-index: -1;
}

@keyframes rotateRing {
  to { transform: rotate(360deg); }
}

.dial-readout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.dial-icon {
  font-size: 22px;
}

.era-label {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  min-width: 160px;
  transition: opacity 0.15s ease;
}

.time-slider {
  width: 100%;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--border), var(--accent-strong));
  outline: none;
  margin: 10px 0 6px;
}

.time-slider::-webkit-slider-thumb {
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(125, 211, 252, 0.2);
  cursor: pointer;
}

.time-slider::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(125, 211, 252, 0.2);
  cursor: pointer;
}

.tick-row {
  position: relative;
  height: 18px;
  margin: 0 4px;
}

.tick-row span {
  position: absolute;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}

.now-btn {
  margin-top: 14px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

.now-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 16px 48px;
}

.trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.category-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  animation: fadeIn 0.25s ease;
}

.category-section h2 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--accent);
}

.item-card {
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.item-card:first-of-type {
  border-top: none;
  padding-top: 0;
}

.item-card .item-name {
  font-weight: 600;
  font-size: 14px;
}

.item-card .item-desc {
  margin-top: 3px;
  font-size: 13px;
  color: var(--text-dim);
}

.empty-note {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
  padding: 24px 0;
}

.insights {
  max-width: 960px;
  margin: 40px auto 0;
  padding: 24px 4px 0;
  border-top: 1px solid var(--border);
}

.insights-title {
  margin: 8px 0 4px;
  font-size: 20px;
}

.insights-sub {
  margin: 0 0 18px;
  color: var(--text-dim);
  font-size: 13px;
}

.reveal-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto 22px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.reveal-btn:hover {
  border-color: var(--accent);
  transform: scale(1.03);
}

.reveal-btn:active {
  transform: scale(0.97);
}

.reveal-icon {
  display: inline-block;
  font-size: 20px;
  animation: floatIcon 2.2s ease-in-out infinite;
}

.reveal-btn.opened .reveal-icon {
  animation: none;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-5px) rotate(4deg); }
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.insight-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.insight-card.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.insight-card h3 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--accent);
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}

.bar-label {
  width: 84px;
  flex-shrink: 0;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-track {
  flex: 1;
  background: var(--bg);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
  border-radius: 999px;
}

.bar-value {
  width: 34px;
  text-align: right;
  color: var(--text-dim);
  flex-shrink: 0;
}

.spark-row {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 60px;
  margin-bottom: 6px;
}

.spark-bar {
  flex: 1;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  opacity: 0.5;
}

.spark-bar.spark-current {
  background: var(--accent-strong);
  opacity: 1;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.spark-bar.spark-future {
  background: var(--border);
  opacity: 0.4;
}

.spark-caption {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

.fact-stack .fact-item {
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.fact-stack .fact-item:first-child {
  border-top: none;
  padding-top: 0;
}

.fact-number {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.fact-desc {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.site-footer {
  text-align: center;
  padding: 16px;
  color: var(--text-dim);
  font-size: 12px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .site-header h1 { font-size: 24px; }
  .time-machine { margin: 16px 12px; padding: 16px; }
  .tick-1990s, .tick-2000s { display: none; }
}
