/* Allgemeine Tabellen */
table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  background-color: var(--color-border);
  color: white;
}

tr:nth-child(even) {
  background-color: #202240;
}

/* Ranking-Tabelle nebeneinander */
.ranking-table {
  flex: 1 1 350px;
  max-width: 100%;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--spacing-md);
}

/* Layout für Leaderboards + KPIs */
.stats-layout {
  display: flex;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
  align-items: flex-start;
  margin-top: var(--spacing-lg);
}

.stats-left {
  flex: 2 1 750px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  min-width: 300px;
}

.stats-right {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}


.kpi-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  border-left: 4px solid var(--color-accent);
  min-height: 100px;
  transition: transform 0.2s ease;
}

.gain-box {
  border-left-color: #00e676;
}

.loss-box {
  border-left-color: #ff4c4c;
}

/* Investierte Coins stilisieren */
.center-kpi {
  border-left-color: #f9d342;
  background: linear-gradient(to right, #1e1f30, #151527);
}

.center-kpi .glitter-text {
  font-size: 2rem;
  font-weight: 800;
  margin: 0.3rem 0 0 0;
  text-align: left;
}
.center-kpi .glitter-text {
  font-size: 2.2rem;
  font-weight: bold;
  margin-top: 0.3rem;
  margin-bottom: 0.2rem;
  background-image:
    radial-gradient(circle at 40% 0%, white 15%, transparent 45%),
    linear-gradient(120deg, #f9d342, #f7b733, #f9d342);
  background-size: 100% 100%, 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: glitterMove 3s linear infinite;
}

@keyframes glitterMove {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* Überschriften und Absätze */
.stats-section h3 {
  font-size: var(--font-size-lg);
  color: white;
  margin-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.5rem;
}

.stats-section p,
.kpi-box p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--color-muted);
}
.kpi-box:hover {
  transform: scale(1.02);
}
/* Hilfsklassen */
.center-text {
  text-align: center;
}

.mt-md {
  margin-top: var(--spacing-md);
}

.button {
  padding: 0.75rem 2rem;
  background-color: var(--color-accent);
  color: white;
  font-weight: bold;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
}

.button:hover {
  background-color: var(--color-accent-strong);
}

th:first-child,
td:first-child {
  text-align: center;
  width: 2rem;
}

.ranking-table table tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.kpi-box h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: var(--color-text);
  border: none;
}

.kpi-box strong {
  color: white;
}

.stats-right {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

/* KPI-Kästchen gestylt */
.kpi-box,
.stats-section.gain-box,
.stats-section.loss-box,
.stats-section.center-kpi {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border-left: 4px solid var(--color-accent);
  min-height: 100px;
  transition: transform 0.2s ease;
}

.kpi-box:hover,
.stats-section.gain-box:hover,
.stats-section.loss-box:hover,
.stats-section.center-kpi:hover {
  transform: scale(1.015);
}

.stats-section h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: var(--color-text);
  border-bottom: none;
}

.stats-section p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--color-muted);
}

/* Farbliche Unterscheidung */
.gain-box {
  border-left-color: #00e676;
}

.loss-box {
  border-left-color: #ff4c4c;
}

.center-kpi {
  border-left-color: #f9d342;
  background: linear-gradient(to right, #1e1f30, #151527);
}

.center-kpi .glitter-text {
  font-size: 2.4rem;
  font-weight: 900;
  margin: 0.3rem 0 0 0;
  text-align: left;
  background-image:
    radial-gradient(circle at 40% 0%, white 15%, transparent 45%),
    linear-gradient(120deg, #f9d342, #f7b733, #f9d342);
  background-size: 100% 100%, 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: glitterMove 3s linear infinite;
}

@keyframes glitterMove {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

th:first-child,
td:first-child {
  text-align: center;
  width: 2rem;
}

.ranking-table table tr:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

/* supporter shimmer animation */
.supporter-shimmer {
  background: linear-gradient(90deg, #ffd700, #fffbe6, #ffd700);
  background-size: 200% 100%;
  color: #222;
  font-weight: bold;
  border-radius: 4px;
  padding: 2px 8px;
  animation: shimmer 2s infinite linear;
  box-shadow: 0 0 8px #ffd70088;
}

@keyframes shimmer {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

#topPredictorsTable th, #topPredictorsTable td {
  padding: 4px 8px;
  text-align: center;
}
