.polar-exercise-container {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  /* max-width: 1200px; */
  margin: 0 auto;
}

.polar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  margin-top: 2rem;
  padding: 1rem;
  background: linear-gradient(270deg, #FA5A04 3.55%, #EA0913 52.14%, #73053A 96.39%), #2c2c2c;
  color: white;
  border-radius: 10px;
}

.polar-header h2 {
  margin: 0;
  font-size: 1.8rem;
  color: white !important;
}

.summary-stats {
  display: flex;
  gap: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.9rem;
}

.stat strong {
  font-size: 1.4rem;
}

.polar-exercise-container .exercises-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0px !important;
}

.exercise-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

.dark-theme .exercise-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

.exercise-card.expanded {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.exercise-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
}

.dark-theme .exercise-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.exercise-header:hover {
  background: #f1f5f9;
}

.dark-theme .exercise-header:hover {
  background: rgba(255, 255, 255, 0.08);
}


.sport-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sport-icon {
  font-size: 2rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  padding: 4px;
}

.sport-name {
  margin: 0;
  font-size: 1.2rem;
  color: #2d3748;
}

.exercise-time {
  margin: 0.3rem 0 0 0;
  color: #718096;
  font-size: 0.9rem;
}

.club-badge {
  background: #4299e1;
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

.toggle-details-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #718096;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 5px;
}

.toggle-details-btn:hover {
  background: #e2e8f0;
}

.basic-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1.2rem;
  border-bottom: 1px solid #e2e8f0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  padding: 0.8rem;
  background: #f8fafc;
  border-radius: 8px;
}

.stat-label {
  font-size: 0.9rem;
  color: #718096;
  margin-bottom: 0.3rem;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: bold;
  color: #2d3748;
}

.stat-subtext {
  font-size: 0.8rem;
  color: #718096;
  margin-top: 0.2rem;
}

.detailed-view {
  padding: 1.2rem;
  background: #f8fafc;
}

.dark-theme .detailed-view {
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.05);
}


.detail-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark-theme .detail-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.detail-section h4 {
  margin: 0 0 1rem 0;
  color: #2d3748;
  font-size: 1.1rem;
}

.device-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

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

.zone-item {
  padding: 1rem;
  background: #edf2f7;
  border-radius: 6px;
  border-left: 4px solid #4299e1;
}

.zone-header {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.dark-theme .zone-header {
  color: #718096;
}

.zone-time {
  font-size: 0.9rem;
  color: #718096;
}

.nutrition-bars {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.nutrition-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.bar-label {
  width: 80px;
  font-weight: 500;
}

.bar-container {
  flex: 1;
  height: 20px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
}

.bar-fill.fat {
  background: #4299e1;
}

.bar-fill.carbs {
  background: #48bb78;
}

.bar-fill.protein {
  background: #ed8936;
}

.bar-value {
  width: 50px;
  text-align: right;
  font-weight: bold;
}

.training-load-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.load-item {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: #edf2f7;
  border-radius: 6px;
  text-align: center;
}

.load-label {
  font-size: 0.9rem;
  color: #718096;
  margin-bottom: 0.5rem;
}

.load-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2d3748;
  margin-bottom: 0.3rem;
}

.load-interpretation {
  font-size: 0.8rem;
  color: #718096;
  text-transform: capitalize;
}

.route-preview {
  background: #f7fafc;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.route-sample {
  margin-top: 1rem;
}

.route-point {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.route-point:last-child {
  border-bottom: none;
}

.point-time {
  font-size: 0.9rem;
  color: #718096;
}

.more-points {
  text-align: center;
  padding: 0.5rem;
  color: #718096;
  font-style: italic;
}

.running-index {
  text-align: center;
  padding: 2rem;
}

.index-value {
  font-size: 3rem;
  font-weight: bold;
  color: #4299e1;
  margin-bottom: 0.5rem;
}

.index-label {
  color: #718096;
  font-size: 0.9rem;
}

.sample-data {
  padding: 1rem;
  background: #f7fafc;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.sample-data:last-child {
  margin-bottom: 0;
}

.data-preview {
  font-family: 'Courier New', monospace;
  background: #2d3748;
  color: #e2e8f0;
  padding: 0.8rem;
  border-radius: 4px;
  overflow-x: auto;
}

.polar-exercise-empty {
  text-align: center;
  padding: 3rem;
  color: #718096;
}

.no-data {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.help-text {
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .polar-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .summary-stats {
    justify-content: center;
  }
  
  .basic-stats {
    grid-template-columns: 1fr;
  }
  
  .device-info {
    grid-template-columns: 1fr;
  }
}

/* Add these styles to your CSS file */

.speed-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.speed-stat {
  text-align: center;
  padding: 1rem;
  background: white;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.speed-stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #4a6fa5;
  margin-bottom: 0.25rem;
}

.speed-stat-label {
  font-size: 0.9rem;
  color: #666;
}

.speed-chart-container {
  margin-top: 1rem;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.distance-summary {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.distance-summary h5 {
  margin-bottom: 0.75rem;
  color: #555;
}

.distance-stats {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
}

.distance-stats span {
  padding: 0.5rem 1rem;
  background: #f0f7ff;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #4a6fa5;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.toggle-chart-btn,
.view-data-btn {
  padding: 0.5rem 1rem;
  background: #4a6fa5;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.toggle-chart-btn:hover,
.view-data-btn:hover {
  background: #3a5a8a;
}

.view-data-btn {
  margin-top: 0.5rem;
  background: #6c757d;
}

.view-data-btn:hover {
  background: #5a6268;
}

.sample-data {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  border-left: 4px solid #4a6fa5;
}

.sample-data p {
  margin: 0.25rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .speed-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .distance-stats {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .toggle-chart-btn {
    align-self: flex-start;
  }
}

/* Charts and Statistics Styles */
.chart-container {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  margin-top: 1rem;
}

.chart-subtitle {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  font-style: italic;
}

.chart-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chart-tabs {
  display: flex;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

.chart-tab {
  padding: 0.5rem 1rem;
  border: none;
  background: #f8f9fa;
  color: #666;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.chart-tab:hover {
  background: #e9ecef;
}

.chart-tab.active {
  background: #4a6fa5;
  color: white;
}

.stats-panel {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.stats-section {
  margin-bottom: 1.5rem;
}

.stats-section:last-child {
  margin-bottom: 0;
}

.stats-section h5 {
  margin-bottom: 1rem;
  color: #495057 !important;
  font-size: 1rem;
  border-bottom: 2px solid #4a6fa5;
  padding-bottom: 0.5rem;
}

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

.stat-item {
  background: white;
  padding: 1rem;
  border-radius: 6px;
  border-left: 4px solid #4a6fa5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-box {
  text-align: center;
  padding: 0.75rem;
  background: white;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.25rem;
}

.stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: bold;
  color: #4a6fa5;
  margin-bottom: 0.25rem;
}

.stat-subvalue {
  display: block;
  font-size: 0.85rem;
  color: #888;
}

.charts-container {
  margin-top: 1.5rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
  .chart-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .chart-tabs {
    overflow-x: auto;
  }
  
  .chart-tab {
    flex-shrink: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-item {
    padding: 0.75rem;
  }
  
  .stat-value {
    font-size: 1.1rem;
  }
}

.sample-data {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  border-left: 4px solid #4a6fa5;
}

.sample-data p {
  margin: 0.25rem 0;
}

.hr-summary, .speed-summary, .distance-summary {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: #e9ecef;
  border-radius: 4px;
  font-size: 0.85rem;
}

.hr-summary {
  border-left: 3px solid #dc3545;
}

.speed-summary {
  border-left: 3px solid #007bff;
}

.distance-summary {
  border-left: 3px solid #28a745;
}

.distance-stats-summary {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 6px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.chart-interpretation {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

.chart-interpretation h6 {
  margin-bottom: 0.75rem;
  color: #495057;
}

.interpretation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.75rem;
}

.interpretation-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 4px;
}

.color-indicator {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
}

.pattern-indicator {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid #ff7300;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .interpretation-grid {
    grid-template-columns: 1fr;
  }
  
  .chart-container {
    padding: 1rem;
  }
  
  .chart-interpretation {
    font-size: 0.9rem;
  }
}

.dark-theme .recharts-default-tooltip {
  background-color: rgba(40, 44, 52, 0.80) !important;
  border: 1px solid #555 !important;
  border-radius: 6px !important;
}

.dark-theme .recharts-tooltip-label {
  color: #f0f0f0 !important;
}

.dark-theme .recharts-tooltip-item {
  color: #f0f0f0 !important;
}