/* Betting Stats Page Styling */

:root {
  --primary-color: #50C878;
  --primary-dark: #3ca95f;
  --primary-light: #e0f5e9;
  --text-color: #333;
  --light-text: #777;
  --border-color: #e0e0e0;
  --background-color: #f5f5f5;
  --card-bg: #ffffff;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --danger-color: #f44336;
  --info-color: #2196f3;
  --border-radius: 8px;
  --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Header Styling */
.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.stats-header h1 {
  margin: 0;
  color: var(--text-color);
  font-size: 24px;
  font-weight: 600;
}

/* Stats Content Container */
.stats-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}

/* Stats Cards */
.stats-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 24px;
}

.stats-card h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 18px;
  color: var(--text-color);
  font-weight: 600;
}

/* Stats Row - Horizontal Layout */
.stats-row {
  display: flex;
  gap: 24px;
  width: 100%;
}

.stats-row .stats-card {
  flex: 1;
  min-width: 0; /* Prevents overflow on narrow screens */
}

/* Overall Performance Summary */
.stats-summary {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 24px;
}

.stat-item {
  flex: 1;
  min-width: 100px;
  background-color: var(--background-color);
  padding: 16px;
  border-radius: var(--border-radius);
  text-align: center;
}

.stat-item.highlight {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

.win-rate {
  margin: auto;
  min-width: 33%;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-label {
  display: block;
  font-size: 14px;
  color: var(--light-text);
}


/* Ranked Lists */
.ranked-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ranked-list li {
  margin-bottom: 16px;
}

.ranked-list li:last-child {
  margin-bottom: 0;
}

.rank-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.rank-name {
  font-weight: 500;
}

.rank-value {
  color: var(--light-text);
}

/* Stats Table */
.stats-table {
  width: 100%;
  border-collapse: collapse;
}

.stats-table th,
.stats-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.stats-table th {
  font-weight: 600;
  color: var(--text-color);
  background-color: var(--background-color);
}

.stats-table tbody tr:hover {
  background-color: var(--primary-light);
}

.win-percentage {
  font-weight: 600;
}

.win-percentage.positive {
  color: var(--success-color);
}

.win-percentage.negative {
  color: var(--danger-color);
}

/* Empty State */
.empty-state {
  color: var(--light-text);
  text-align: center;
  font-style: italic;
  padding: 16px 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .stats-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .stats-row {
    flex-direction: column;
  }
  
  .stats-summary {
    gap: 10px;
  }
  
  .stat-item {
    min-width: 80px;
    padding: 12px;
  }
  
  .stat-value {
    font-size: 20px;
  }
  
  .stats-table {
    display: block;
    overflow-x: auto;
  }
}

/* Animation for bars - optional enhancement */
@keyframes barGrow {
  from { width: 0; }
  to { width: var(--final-width); }
}

.rank-bar, .progress-fill {
  animation: barGrow 1s ease-out forwards;
}