body {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #0b1220;
  color: #e2e8f0;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

header {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 2rem;
  align-items: start;
}

.title-row h1 {
  margin: 0;
  font-size: 2.3rem;
}

.title-row p {
  margin: 0.4rem 0 0;
  color: #cbd5e1;
}

.year-column {
  background: linear-gradient(145deg, #0f172a, #111827);
  border: 1px solid #1f2937;
  border-radius: 10px;
  padding: 1rem;
}

.year-label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 0.6rem;
}

.year-selector {
  position: relative;
}

.year-selected {
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: #0f172a;
  border: 1px solid #334155;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #e2e8f0;
}

.year-selected::after {
  content: "▾";
  font-size: 0.85rem;
  color: #94a3b8;
}

.year-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 0.5rem;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
  z-index: 5;
}

.year-dropdown.hidden {
  display: none;
}

.year-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 220px;
  overflow-y: auto;
}

.year-item {
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  color: #e2e8f0;
  transition: all 0.12s ease;
}

.year-item:hover {
  border-color: #334155;
  background: #111827;
}

.year-item.active {
  border-color: #38bdf8;
  background: #0f172a;
  color: #e0f2fe;
  box-shadow: 0 0 0 1px #0ea5e9;
}

.year-total {
  margin-bottom: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  background: #0f172a;
  color: #cbd5e1;
  font-size: 0.95rem;
  border: 1px dashed #334155;
  cursor: pointer;
}

.year-total.active {
  border-color: #38bdf8;
  color: #e0f2fe;
  box-shadow: 0 0 0 1px #0ea5e9;
}

main {
  margin-top: 1.5rem;
}

.top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.card {
  background: linear-gradient(145deg, #0f172a, #0b1220);
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 1rem 1rem 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.card-header p {
  margin: 0.25rem 0 0;
  color: #94a3b8;
}

.card-body.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: center;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 240px;
}

.pillars {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pillar {
  background: #0b1220;
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 0.75rem;
}

.pillar .label {
  display: block;
  color: #cbd5e1;
  margin-bottom: 0.25rem;
}

.pillar .value {
  font-size: 1.6rem;
  font-weight: 700;
}

.stub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.placeholder {
  text-align: center;
  color: #94a3b8;
  border-style: dashed;
}

.strava-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.stat-box {
  background: #0b1220;
  border: 1px solid #1f2937;
  border-radius: 10px;
  padding: 0.8rem;
}

.stat-box .label {
  display: block;
  color: #94a3b8;
  margin-bottom: 0.3rem;
}

.stat-box .value {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
}

.stat-box .subvalue {
  display: block;
  color: #cbd5e1;
  margin-top: 0.25rem;
}

.steam-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.steam-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.steam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.steam-body {
  background: #0b1220;
  border: 1px solid #1f2937;
  border-radius: 10px;
  padding: 0.75rem;
}

.steam-series {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.steam-series-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.steam-estimate-note {
  font-size: 0.75rem;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.steam-series-chart {
  height: 170px;
}

.steam-series-chart canvas {
  width: 100%;
  height: 100%;
}

.steam-subtitle {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.steam-series-header .steam-subtitle {
  margin-bottom: 0;
}

.steam-game-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.steam-game {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem;
  border-radius: 10px;
  border: 1px solid #1f2937;
  background: linear-gradient(145deg, #0f172a, #0b1220);
}

.steam-game .rank {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #111827;
  border: 1px solid #1f2937;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #cbd5e1;
  flex-shrink: 0;
}

.steam-game .thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: #111827;
  border: 1px solid #1f2937;
}

.steam-game .thumb.placeholder {
  background: linear-gradient(145deg, #0f172a, #111827);
  border-style: dashed;
}

.steam-game .meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.steam-game .name {
  font-weight: 700;
}

.steam-empty {
  color: #94a3b8;
  padding: 0.4rem 0.2rem;
}

@media (max-width: 640px) {
  .steam-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .steam-game {
    align-items: flex-start;
  }
}

@media (max-width: 900px) {
  header {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .card-body.split {
    grid-template-columns: 1fr;
  }
}
