/* Charts Page Specific Styles */

.charts-container {
  max-width: 1400px;
  margin: 0 auto;
}

.scatter-section {
  background: var(--card-bg);
  border-radius: 15px;
  padding: 25px;
  box-shadow: var(--shadow);
}

.section-title {
  font-size: 1.1rem;
  font-family: 'Press Start 2P', cursive;
  color: var(--text-primary);
  margin-bottom: 20px;
  text-align: center;
}

/* Chart Controls */
.chart-controls {
  margin-bottom: 20px;
  max-width: 100%;
  overflow: visible;
}

.axis-controls {
  display: flex;
  gap: 30px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.axis-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.axis-control label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Press Start 2P', cursive;
}

.axis-select {
  padding: 8px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: white;
  cursor: pointer;
  transition: border-color 0.2s;
}

.axis-select:focus {
  outline: none;
  border-color: #667eea;
}

.pokemon-counter {
  padding: 8px 16px;
  background: #f7fafc;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #4a5568;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.pokemon-counter strong {
  color: #667eea;
  font-size: 0.9rem;
  font-weight: 700;
}

/* Range Sliders */
.range-sliders {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  padding: 12px 15px;
  background: #f7fafc;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  max-width: 100%;
  box-sizing: border-box;
}

.range-slider-section {
  flex: 1;
}

.range-slider-title {
  font-size: 0.7rem;
  color: #2d3748;
  font-weight: 600;
  margin-bottom: 6px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.range-slider-title span {
  color: #667eea;
  font-weight: 700;
}

.range-slider-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.range-values {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: #667eea;
  font-weight: 700;
  margin-bottom: 2px;
}

.range-slider-container {
  position: relative;
  height: 6px;
  margin: 8px 0;
  background: #e2e8f0;
  border-radius: 3px;
}

.range-slider-track {
  position: absolute;
  height: 6px;
  background: #667eea;
  border-radius: 3px;
  pointer-events: none;
  z-index: 1;
  top: 0;
}

.range-slider {
  position: absolute;
  width: 100%;
  height: 6px;
  background: transparent;
  outline: none;
  -webkit-appearance: none;
  pointer-events: none;
  margin: 0;
  padding: 0;
  top: 0;
  z-index: 2;
}

.range-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  background: transparent;
  border-radius: 3px;
}

.range-slider::-moz-range-track {
  width: 100%;
  height: 6px;
  background: transparent;
  border-radius: 3px;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
  margin-top: -5px;
}

.range-slider::-webkit-slider-thumb:hover {
  background: #5568d3;
  transform: scale(1.15);
}

.range-slider::-webkit-slider-thumb:active {
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.range-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
}

.range-slider::-moz-range-thumb:hover {
  background: #5568d3;
  transform: scale(1.15);
}

.range-slider::-moz-range-thumb:active {
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.range-slider-min {
  z-index: 4;
}

.range-slider-max {
  z-index: 3;
}

.reset-zoom-button {
  padding: 8px 16px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.reset-zoom-button:hover {
  background: #5568d3;
}

.reset-zoom-button:active {
  transform: scale(0.98);
}

/* Chart Layout */
.chart-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
}

.chart-area {
  background: white;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  min-height: 600px;
  position: relative;
}

#scatter-chart {
  max-height: 600px;
}

.chart-instructions {
  margin-top: 12px;
  padding: 10px;
  background: #f7fafc;
  border-radius: 8px;
  font-size: 0.75rem;
  color: #4a5568;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.chart-instructions strong {
  color: #2d3748;
  font-weight: 700;
}

/* Filters Sidebar */
.filters-sidebar {
  background: #edf2f7;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #cbd5e0;
  max-height: 640px;
  overflow-y: auto;
}

.filters-title {
  font-size: 0.8rem;
  font-family: 'Press Start 2P', cursive;
  color: var(--text-primary);
  margin-bottom: 15px;
  text-align: center;
}

.filter-section {
  margin-bottom: 20px;
}

.filter-section-title {
  font-size: 0.7rem;
  font-family: 'Press Start 2P', cursive;
  color: var(--text-primary);
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 2px solid #cbd5e0;
}

.filter-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--text-primary);
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.filter-checkbox:hover {
  background-color: rgba(102, 126, 234, 0.1);
}

.filter-checkbox input[type="checkbox"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.reset-button {
  width: 100%;
  padding: 10px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.7rem;
  font-family: 'Press Start 2P', cursive;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-bottom: 20px;
}

.reset-button:hover {
  background: #5568d3;
}

/* Pokemon Tooltip */
.pokemon-tooltip {
  position: fixed;
  background: white;
  border: 3px solid #667eea;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  pointer-events: auto;
  width: 320px;
  max-height: 500px;
  display: flex;
  flex-direction: column;
}

.tooltip-scroll-container {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 450px;
  padding: 15px;
  pointer-events: auto;
}

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

.tooltip-scroll-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.tooltip-scroll-container::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 4px;
}

.tooltip-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #5568d3;
}

.tooltip-pokemon-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
}

.tooltip-pokemon-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.tooltip-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
}

.tooltip-sprite {
  width: 60px;
  height: 60px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.tooltip-name-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.tooltip-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tooltip-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tooltip-dex {
  font-size: 0.7rem;
  color: #718096;
  font-weight: 700;
}

.tooltip-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: capitalize;
}

.tooltip-type {
  font-size: 0.65rem;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.tooltip-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tooltip-footer {
  padding: 10px 15px;
  background: #f7fafc;
  border-top: 2px solid #e2e8f0;
  border-radius: 0 0 9px 9px;
  text-align: center;
  font-size: 0.7rem;
  color: #667eea;
  font-weight: 600;
}

.tooltip-stat-row {
  display: grid;
  grid-template-columns: 65px 35px 1fr;
  align-items: center;
  gap: 8px;
}

.tooltip-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: #4a5568;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
}

.tooltip-stat-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: #2d3748;
  text-align: right;
}

.tooltip-stat-bar {
  background: #e2e8f0;
  border-radius: 10px;
  height: 18px;
  overflow: hidden;
  position: relative;
}

.tooltip-stat-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.3s ease;
}

/* Stat Fill Colors - matching Today page */
.hp-fill {
  background: linear-gradient(90deg, #ff6b6b 0%, #ee5a52 100%);
}

.attack-fill {
  background: linear-gradient(90deg, #f06548 0%, #e74c3c 100%);
}

.defense-fill {
  background: linear-gradient(90deg, #f9ca24 0%, #f0b90b 100%);
}

.spatk-fill {
  background: linear-gradient(90deg, #667eea 0%, #5a67d8 100%);
}

.spdef-fill {
  background: linear-gradient(90deg, #48bb78 0%, #38a169 100%);
}

.speed-fill {
  background: linear-gradient(90deg, #ed64a6 0%, #d53f8c 100%);
}

/* Responsive */
@media (max-width: 1024px) {
  .chart-layout {
    grid-template-columns: 1fr;
  }
  
  .filters-sidebar {
    max-height: none;
  }
}

@media (max-width: 768px) {
  .axis-controls {
    flex-direction: column;
    gap: 15px;
  }
  
  .axis-control {
    flex-direction: column;
    text-align: center;
  }
  
  .chart-area {
    min-height: 400px;
  }
  
  #scatter-chart {
    max-height: 400px;
  }
}
