body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9fafb;
  background-image: linear-gradient(rgba(249, 250, 251, 0.78), rgb(249 250 251 / 56%)), url(background.jpg);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-attachment: fixed, fixed;
  color: #111827;
}

@media (max-width: 640px) {
  body {
    background-attachment: scroll, scroll;
  }
}

header {
  background: radial-gradient(circle at center, #172711 0%, #111827 100%);
  color: white;
  padding: 20px;
  text-align: center;
}

header h1,
header h2 {
  margin-left: auto;
  margin-right: auto;
}

main {
  max-width: 980px;
  margin: 30px auto;
  padding: 0 16px;
}

h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.concert-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
  backdrop-filter: blur(4px);
  transition: transform 0.2s ease;
}

.concert-card:hover {
  transform: translateY(-3px);
}

.info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.details h3 {
  margin: 0;
  font-size: 22px;
}

.details p {
  margin: 2px 0 0;
  color: #4b5563;
}

.date {
  font-weight: 600;
  color: #374151;
  font-size: 14px;
  margin-top: 4px;
}

.countdown {
  font-size: 18px;
  font-weight: bold;
  text-align: right;
  min-width: 160px;
  transition: color 0.5s linear;
}

.countdown.finished {
  color: #a39f9d;
}

.overview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
  margin-bottom: 16px;
}

.toggle-button {
  cursor: pointer;
  background: rgba(229, 231, 235, 0.94);
  padding: 10px 16px;
  border-radius: 45px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  transition: background 0.2s ease, transform 0.2s ease;
  margin: 0;
}

.toggle-button:hover {
  background: rgba(209, 213, 219, 0.98);
  transform: translateY(-1px);
}

.stats-button {
  margin-left: auto;
}

.arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.collapsible-panel {
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.5s ease, margin 0.5s ease;
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
}

.collapsible-panel.expanded {
  opacity: 1;
  max-height: 200000px;
  margin-bottom: 28px;
}

.stats-panel {
  background: rgba(238, 242, 247, 0.95);
  border: 1px solid rgba(219, 227, 239, 0.95);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(4px);
}

.stats-panel h2 {
  margin-top: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 18px 0 18px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.stat-card .label {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 8px;
}

.stat-card .value {
  font-weight: 800;
  font-size: 24px;
  line-height: 1.15;
}

.stat-card .sub {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
}

.stats-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.heatmap-wide-box {
  margin-bottom: 18px;
}

.main-stats-sections {
  align-items: start;
}

.extra-stats-sections {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.stats-box {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.stats-box h3 {
  margin-top: 0;
  margin-bottom: 14px;
}

.stats-list {
  margin: 0;
  padding-left: 18px;
}

.stats-list li {
  margin-bottom: 7px;
}

.bar-row {
  display: grid;
  grid-template-columns: 92px 1fr 42px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
}

.bar-track {
  background: #e5e7eb;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  background: linear-gradient(90deg, #111827, #4b5563);
  height: 100%;
  border-radius: 999px;
  min-width: 3px;
}

.month-heatmap {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
}

.month-cell {
  border-radius: 14px;
  padding: 12px 6px;
  text-align: center;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  font-size: 13px;
  min-width: 0;
}

.month-cell strong {
  display: block;
  font-size: 18px;
  margin-top: 4px;
}

.heat-0 { background: #f9fafb; }
.heat-1 { background: #e5e7eb; }
.heat-2 { background: #cbd5e1; }
.heat-3 { background: #94a3b8; color: #ffffff; }
.heat-4 { background: #475569; color: #ffffff; }
.heat-5 { background: #111827; color: #ffffff; }

.chart-note {
  margin-top: 10px;
  font-size: 12px;
  color: #6b7280;
}

@media (max-width: 820px) {
  .stats-sections,
  .extra-stats-sections,
  .full-stats-grid {
    grid-template-columns: 1fr;
  }
}

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

  .countdown {
    text-align: left;
    min-width: 0;
  }

  .overview-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .stats-button {
    margin-left: 0;
  }

  .toggle-button {
    width: auto;
    justify-content: center;
  }

  .month-heatmap {
    gap: 5px;
  }

  .month-cell {
    padding: 9px 3px;
    font-size: 11px;
    border-radius: 10px;
  }

  .month-cell strong {
    font-size: 15px;
  }

  .bar-row {
    grid-template-columns: 78px 1fr 34px;
  }
}

.full-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.full-width-box,
.full-ranking-box {
  width: auto;
}

.stats-box-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.stats-box-header h3 {
  margin-bottom: 4px;
}

.stats-box-header p {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
}

.pill {
  flex: 0 0 auto;
  background: #111827;
  color: #ffffff;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
}

.ranking-bar-list {
  display: grid;
  gap: 10px;
}

.ranking-bar-row {
  display: grid;
  grid-template-columns: 38px minmax(110px, 1.25fr) minmax(90px, 1fr) 50px;
  align-items: center;
  gap: 10px;
  background: rgba(249, 250, 251, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 14px;
  padding: 10px 12px;
}

.ranking-position {
  color: #4b5563;
  font-weight: 800;
  text-align: center;
}

.ranking-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 650;
}

.ranking-count {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 13px;
  text-align: center;
}

.ranking-share {
  display: none;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.ranking-wide-track {
  height: 12px;
}

.ranking-wide-fill {
  background: linear-gradient(90deg, #111827, #4b5563);
}

.ranking-bar-row.top-1 .ranking-wide-fill {
  background: linear-gradient(90deg, #92400e, #f59e0b);
}

.ranking-bar-row.top-2 .ranking-wide-fill {
  background: linear-gradient(90deg, #4b5563, #cbd5e1);
}

.ranking-bar-row.top-3 .ranking-wide-fill {
  background: linear-gradient(90deg, #78350f, #d97706);
}

@media (max-width: 640px) {
  .stats-box-header {
    flex-direction: column;
  }

  .pill {
    align-self: flex-start;
  }

  .ranking-bar-row {
    grid-template-columns: 34px 1fr 72px;
    gap: 8px;
  }

  .ranking-bar-row .ranking-wide-track {
    grid-column: 2 / 4;
  }

  .ranking-share {
    display: none;
  }
}

@media (max-width: 820px) {
  .stats-sections,
  .extra-stats-sections,
  .full-stats-grid {
    grid-template-columns: 1fr;
  }
}

.rankings-stats-sections {
  margin-top: 18px;
  align-items: start;
}

.first-last-block {
  display: grid;
  gap: 14px;
}

.first-last-label {
  font-weight: 700;
  color: #374151;
  margin-bottom: 4px;
}

.nested-stats-list {
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 20px;
}
