/**
 * Statistics Graphs Styles
 */

/* Graph container */
.stats-graphs-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
  padding: 10px 0;
}

.stats-graph-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.stats-graph-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.1);
}

.stats-graph-card canvas {
  width: 100%;
  height: 180px;
  border-radius: 4px;
}

/* Enhanced stats tabs */
.stats-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.stats-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 13px;
}

.stats-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.stats-tab.active {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(0, 136, 255, 0.2));
  border-color: #00d4ff;
  color: #fff;
}

/* Stats sections */
.stats-section {
  margin-bottom: 20px;
}

.stats-section-title {
  font-size: 14px;
  color: #00d4ff;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.stat-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.stat-value {
  color: #ffd700;
  font-weight: bold;
  font-size: 13px;
}

/* Multiplier stats */
.multiplier-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 10px;
  border-left: 3px solid;
  margin-bottom: 5px;
  background: rgba(255, 255, 255, 0.02);
}

.multiplier-item.production { border-color: #4caf50; }
.multiplier-item.click { border-color: #ffd700; }
.multiplier-item.prestige { border-color: #9c27b0; }
.multiplier-item.other { border-color: #00d4ff; }

.multiplier-source {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.multiplier-value {
  color: #4caf50;
  font-weight: bold;
  font-size: 12px;
}

/* Graph tab specific */
.stats-graph-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.stats-graph-row .stats-graph-card {
  flex: 1;
  min-width: 280px;
}

/* Real-time indicator */
.realtime-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 10px;
}

.realtime-dot {
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
  animation: pulse-dot 1s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* Time Range Selector */
.time-range-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}

.time-range-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.time-range-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  padding: 6px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 12px;
  font-weight: 600;
}

.time-range-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(0, 212, 255, 0.3);
}

.time-range-btn.active {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(0, 136, 255, 0.2));
  border-color: #00d4ff;
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Statistics Container Styling */
.statistics-container {
  max-height: 500px;
  overflow-y: auto;
  padding: 10px 0;
}

.statistics-container::-webkit-scrollbar {
  width: 8px;
}

.statistics-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.statistics-container::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.3);
  border-radius: 4px;
}

.statistics-container::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.5);
}

/* Stat Cards for Overview */
.stat-card {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 136, 255, 0.05));
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
  transform: translateY(-2px);
}

.stat-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.stat-card-icon {
  font-size: 32px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

.stat-card-title {
  font-size: 16px;
  font-weight: bold;
  color: #00d4ff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.stat-card-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-card-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card-value {
  font-size: 18px;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Stat Rows for Detailed Stats */
.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.stat-row:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(5px);
}

.stat-row span:first-child {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.stat-row span:last-child {
  color: #ffd700;
  font-weight: 600;
  font-size: 13px;
}

/* Section Headers */
.stats-section {
  margin-bottom: 25px;
}

.stats-section h3 {
  font-size: 16px;
  color: #00d4ff;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(0, 212, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Mobile/Tablet responsive */
@media (max-width: 768px) {
  .stats-graphs-container {
    grid-template-columns: 1fr;
  }

  .stats-graph-card canvas {
    height: 150px;
  }

  .stats-tabs {
    justify-content: center;
  }

  .stats-tab {
    padding: 6px 12px;
    font-size: 12px;
  }

  .time-range-selector {
    flex-wrap: wrap;
  }

  .stat-card-grid {
    grid-template-columns: 1fr;
  }
}
