:root {
  --bg: #050816;
  --bg-card: #0b1020;
  --text: #e5e7eb;
  --text-soft: #9ca3af;
  --border: #1f2937;
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.4);
  --accent-strong: #6366f1;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
}

/* Reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 45%, #000 100%);
  color: var(--text);
}

/* Layout */

.page {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 24px 16px 40px;
}

/* Header */

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  gap: 16px;
}

.header h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: 0.03em;
}

.subtitle {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 14px;
}

.season-info {
  text-align: right;
  font-size: 14px;
}

.season-name {
  font-weight: 600;
}

.season-dates {
  color: var(--text-soft);
}

/* Controls */

.controls {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.control-group {
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-group label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

.control-group select,
.control-group input {
  background: #020617;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.control-group select:focus,
.control-group input:focus {
  border-color: var(--accent);
}

/* Content Layout */

.main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
  gap: 18px;
}

@media (max-width: 900px) {
  .content {
    grid-template-columns: 1fr;
  }
}

/* Calendar Panel */

.calendar-panel {
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius-lg);
  padding: 14px 16px 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

/* Month header */

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}

.month-title {
  text-align: center;
  flex: 1;
}

.month-label {
  font-size: 18px;
  font-weight: 700;
}

.month-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
}

/* Nav arrows */

.month-nav {
  background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.28), #020617);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #e5e7eb;
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.8);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.month-nav:hover {
  transform: translateY(-1px);
  border-color: var(--accent-strong);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.95);
  background: radial-gradient(circle at top left, rgba(129, 140, 248, 0.5), #020617);
}

.month-nav:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.8);
}

/* Calendar grid */

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.calendar-day {
  aspect-ratio: 4 / 3;
  border-radius: 13px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(31, 41, 55, 0.9);
  padding: 4px 6px;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: default;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease;
}

.calendar-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calendar-day-number {
  font-weight: 600;
}

.calendar-day-forts {
  font-size: 11px;
  color: var(--text-soft);
}

/* In-season base */

.calendar-day.in-season {
  background: linear-gradient(145deg, #020617, #020617);
}

/* Out-of-season days */

.calendar-day-out {
  opacity: 0.18;
  cursor: default;
}

/* No forts */

.calendar-day-empty {
  opacity: 0.18;
}

/* Standard forts (0–9) */


/* Standard forts (0–9) */
.calendar-day.has-forts {
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.45), #020617);
  border-color: rgba(129, 140, 248, 0.95);
}

/* Requirement cleared (10–23) */
.calendar-day.requirement-cleared {
  background: radial-gradient(circle at top left, rgba(220, 247, 102, 0.45), #f7fa4e);
  border-color: rgb(211, 252, 32);
}

/* Raffle tier (24+) – shiny */
.calendar-day.raffle-tier {
  background: radial-gradient(circle at 10% 0%, rgba(216, 255, 44, 0.65), rgba(62, 170, 0, 0.55) 40%, #004b19 85%);
  border-color: #00fd00;
  box-shadow:
    0 0 12px rgba(106, 253, 37, 0.7),
    0 0 24px rgba(50, 158, 0, 0.55);
  position: relative;
  overflow: hidden;
}

.calendar-day.raffle-tier::after {
  content: "";
  position: absolute;
  top: -30%;
  left: -30%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.45), transparent 60%);
  opacity: 0.9;
  pointer-events: none;
}


/* Selected day */

.calendar-day.selected {
  box-shadow:
    0 0 0 1px var(--accent),
    0 0 0 4px rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}

/* Hover only in season */

.calendar-day.in-season:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8);
}

.calendar-day-out:hover {
  transform: none;
  box-shadow: none;
}

/* Legend */

.legend {
  margin-top: 10px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-soft);
  align-items: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.legend-low {
  background: #374151;
}

.legend-req {
  background: #ebff34;
}

.legend-raffle {
  background: #00cc4e;
}

/* Sidebar */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.summary-card,
.day-details-card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius-lg);
  padding: 14px 14px 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.summary-card h2,
.day-details-card h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.summary-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-top: 3px;
}

.summary-row span:last-child {
  font-weight: 500;
}

hr {
  border: none;
  border-top: 1px solid #111827;
  margin: 8px 0;
}

/* Requirement colors */

.positive {
  color: #22c55e;
}

.negative {
  color: #c6f300d7;
}

/* Avatar in summary */

.summary-avatar {
  margin: 4px 0 8px;
  width: 72px;
  height: 72px;
  position: relative;
}

.summary-avatar-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.summary-avatar-inner img.avatar {
  position: absolute;
  z-index: 1;
  inset: 14px;
  width: calc(100% - 28px);
  height: calc(100% - 28px);
  border-radius: 50%;
  object-fit: cover;
}

.summary-avatar-inner img.frame {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.summary-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 600;
  color: var(--text-soft);
}

/* Season overview panel */

.overview-panel {
  margin-top: 18px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius-lg);
  padding: 14px 16px 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.overview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.overview-header h2 {
  margin: 0;
  font-size: 16px;
}

.overview-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-soft);
}

.overview-layout {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: 18px;
}

@media (max-width: 900px) {
  .overview-layout {
    grid-template-columns: 1fr;
  }
}

.overview-section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
  margin: 0 0 6px;
}

.overview-chart-container {
  min-height: 220px;
}

.overview-chart-container canvas {
  width: 100%;
  max-height: 260px;
}

.overview-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* --- Podium: no clipping, more space --- */

.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
  margin-top: 12px;
}

.podium-item {
  flex: 1 1 0;
  min-width: 0;
  box-sizing: border-box;
  border-radius: 24px 24px 12px 12px;
  padding: 14px 16px 20px;
  background: linear-gradient(135deg, #020617, #0d132c);
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.podium-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 52px rgba(15, 23, 42, 1);
}

.podium-1 {
  height: 210px;
  background: radial-gradient(circle at top, rgba(251, 191, 36, 0.55), #020617);
}

.podium-2 {
  height: 185px;
  background: radial-gradient(circle at top, rgba(156, 163, 175, 0.45), #020617);
}

.podium-3 {
  height: 180px;
  background: radial-gradient(circle at top, rgba(248, 113, 113, 0.45), #020617);
}

.podium-rank {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.podium-avatar {
  margin-top: 10px;
  margin-bottom: 8px;
  width: 76px;
  height: 76px;
  position: relative;
}

.podium-avatar-main {
  width: 88px;
  height: 88px;
}

.podium-avatar-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.podium-avatar-inner img.avatar {
  position: absolute;
  z-index: 1;
  inset: 9px;
  width: calc(100% - 18px);
  height: calc(100% - 18px);
  border-radius: 50%;
  object-fit: cover;
}

.podium-avatar-inner img.frame {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.podium-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  color: var(--text-soft);
}

.podium-name {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  max-width: 100%;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
  max-height: 2.3em; /* zwei Zeilen */
}

.podium-score {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
}

/* Ranking table */

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 4px;
}

.ranking-table thead {
  background: #020617;
}

.ranking-table th,
.ranking-table td {
  padding: 4px 6px;
  border-bottom: 1px solid #111827;
  text-align: right;
}

.ranking-table th:first-child,
.ranking-table td:first-child {
  text-align: left;
  width: 30px;
}

.ranking-table th:nth-child(2),
.ranking-table td:nth-child(2) {
  text-align: left;
}

.ranking-table th {
  font-weight: 600;
  color: var(--text-soft);
}

.ranking-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.7);
}

/* Table avatars */

.table-player-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-avatar {
  width: 24px;
  height: 24px;
  position: relative;
  flex-shrink: 0;
}

.table-avatar-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.table-avatar-inner img.avatar {
  position: absolute;
  z-index: 1;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  border-radius: 50%;
  object-fit: cover;
}

.table-avatar-inner img.frame {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.table-player-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Rewards banner */

.rewards-banner {
  margin-top: 8px;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.7);
  background:
    radial-gradient(circle at top left, rgba(250, 250, 210, 0.18), transparent),
    rgba(17, 24, 39, 0.96);
  padding: 4px 0;
  overflow: hidden;
  font-size: 11px;
  color: #facc15;
  position: relative;
  white-space: nowrap;
}

.rewards-track {
  display: inline-block;
  padding-left: 100%;
  animation: rewards-scroll 28s linear infinite;
}

@keyframes rewards-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}
/* Unknown accounts block */

.unknown-accounts {
  margin-top: 14px;
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent),
    rgba(15, 23, 42, 0.96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
}

.unknown-accounts-subtitle {
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 8px;
}

.unknown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.unknown-table th,
.unknown-table td {
  padding: 4px 6px;
  text-align: left;
  border-bottom: 1px solid rgba(31, 41, 55, 0.75);
}

.unknown-table th {
  font-weight: 500;
  color: #9ca3af;
}

.unknown-table tbody tr:last-child td {
  border-bottom: none;
}

.unknown-table td:nth-child(1) {
  width: 26px;
}
