/*
  Path: /static/css/style.css

  FineRide — Base Styles and Components

  This stylesheet contains the core styles for the FineRide application,
  including CSS variables, global layouts, component designs, and basic
  responsive elements. It provides the foundation for desktop and mobile
  experiences, with mobile-specific overrides handled in mobile.css.

  Key features:
  - CSS custom properties for branding and theming
  - Global body and typography styles
  - Component styles for cards, buttons, navigation, and widgets
  - Basic animations and transitions
  - Foundational responsive layouts (enhanced by mobile.css)

  Dependencies:
  - None (self-contained, with optional mobile.css for overrides)

  Browser Support:
  - Modern browsers (Chrome, Firefox, Safari, Edge)

  Last Updated: 2025-12-20
  Author: HowToolHelp/Intelligent
*/

/* CSS 變數：品牌色彩方案 */
:root {
  --primary-color: #00a8cc; /* 藍綠色主色 */
  --secondary-color: #005f73; /* 深藍綠 */
  --accent-color: #0a9396; /* 亮藍綠 */
  --light-bg: #f8f9fa;
  --dark-text: #2d3436;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

/* 全域樣式 */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  min-height: 100vh;
  color: var(--dark-text);
  margin: 0;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) 0;
}

/* 載入動畫 */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 卡片樣式 */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border-bottom: none;
  padding: 1rem 1.5rem;
}

/* 按鈕樣式 */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border: none;
  border-radius: var(--border-radius);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

/* 導航欄樣式 */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar .navbar-brand {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.5rem;
}

.navbar .navbar-brand:hover {
  color: var(--secondary-color);
}

.navbar .nav-link {
  color: var(--dark-text);
  font-weight: 500;
  transition: var(--transition);
}

.navbar .nav-link:hover {
  color: var(--primary-color);
}

/* 儀表板樣式 */
.dashboard-welcome {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.action-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.action-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.action-card i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

/* Quick Actions Scroller Styles */
.quick-actions-wrapper {
  position: relative;
  margin-bottom: 2rem;
}

.quick-actions-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
  z-index: 20;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.quick-actions-arrow:hover {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.quick-actions-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.quick-actions-arrow.left {
  left: -15px;
}

.quick-actions-arrow.right {
  right: -15px;
}

.quick-actions-arrow.arrow-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.quick-actions-indicator {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.quick-actions-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-actions-dot.active {
  background: var(--primary-color);
  transform: scale(1.2);
}

/* 環境資訊卡片 */
.env-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.env-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.env-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.env-card .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.env-card.aqi-good .icon { color: #28a745; }
.env-card.aqi-moderate .icon { color: #ffc107; }
.env-card.aqi-unhealthy-sensitive .icon { color: #fd7e14; }
.env-card.aqi-unhealthy .icon { color: #dc3545; }
.env-card.aqi-very-unhealthy .icon { color: #6f42c1; }
.env-card.aqi-hazardous .icon { color: #7e0023; }

/* 天氣圖示顏色 */
.env-card.weather-sunny .icon { color: #ffc107; }
.env-card.weather-cloudy .icon { color: #6c757d; }
.env-card.weather-foggy .icon { color: #adb5bd; }
.env-card.weather-rainy .icon { color: #0d6efd; }

/* 活動卡片樣式 */
.event-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.event-card .event-title {
  color: var(--primary-color);
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.event-card .event-meta {
  color: #6c757d;
  font-size: 0.9rem;
}

/* 篩選和排序 */
.filters {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* 動畫效果 */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-up {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* 載入狀態 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 168, 204, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-overlay.hidden {
  display: none;
}

/* 錯誤處理 */
.error-message {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.success-message {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

/* Weekly Forecast Action Button */
.forecast-action-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-top: 1px solid rgba(0, 168, 204, 0.2);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.forecast-action-btn:hover {
  background: var(--primary-color);
  color: white;
  border-top-color: var(--primary-color);
  box-shadow: 0 -4px 12px rgba(0, 168, 204, 0.3);
}

.forecast-action-btn:active {
  transform: scale(0.98);
}

/* Ensure button works well on all weather card backgrounds */
.env-card.weather-sunny .forecast-action-btn,
.env-card.weather-cloudy .forecast-action-btn,
.env-card.weather-foggy .forecast-action-btn,
.env-card.weather-rainy .forecast-action-btn {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}

/* Suitability Widget */
.suitability-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(245, 248, 255, 0.95));
  border: 1px solid rgba(15, 98, 254, 0.08);
  border-radius: var(--border-radius);
  box-shadow: 0 12px 30px rgba(15, 98, 254, 0.08);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.suitability-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(15, 98, 254, 0.12), transparent 55%);
  pointer-events: none;
}

.suitability-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.suitability-title {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.suitability-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #6f7d95;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  border-radius: 999px;
  background: rgba(15, 98, 254, 0.08);
  color: var(--primary-color);
  border: 1px solid rgba(15, 98, 254, 0.15);
  min-width: 140px;
  justify-content: center;
}

.suitability-subtitle {
  position: relative;
  z-index: 1;
  font-size: 0.9rem;
  color: #5c6b81;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.info-chip {
  border: none;
  background: rgba(15, 98, 254, 0.09);
  color: var(--primary-color);
  border-radius: 999px;
  padding: 0.15rem 0.4rem;
  font-size: 0.85rem;
  cursor: help;
}

.score-ring-container {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--score-color, #28a745) var(--score-percent, 0%), rgba(233, 236, 239, 0.4) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.6s ease, box-shadow 0.3s ease;
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.75), 0 8px 25px rgba(0, 0, 0, 0.08);
  z-index: 1;
}

.score-ring-container::after {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(245, 248, 255, 0.6));
}

.score-ring-inner {
  position: relative;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.score-value {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--dark-text);
  line-height: 1;
  letter-spacing: -0.02em;
}

.score-label {
  font-size: 0.85rem;
  color: #718096;
}

.score-ring-caption {
  text-align: center;
  color: #465162;
  font-weight: 600;
  margin-top: 0.75rem;
  letter-spacing: 0.02em;
}

.suitability-trend {
  background: rgba(15, 98, 254, 0.05);
  border: 1px dashed rgba(15, 98, 254, 0.2);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
}

.trend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.trend-title {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: #6f7d95;
  text-transform: uppercase;
}

.trend-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #465162;
}

.trend-label.positive {
  color: #1f9a5c;
}

.trend-label.negative {
  color: #d3424f;
}

.sparkline {
  width: 100%;
  height: 50px;
  display: block;
  border-radius: 0.65rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(240, 244, 255, 0.2));
}

.suitability-reasons {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.suitability-reasons li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  background: rgba(15, 98, 254, 0.06);
  color: #2f3b4b;
  font-size: 0.9rem;
}

.suitability-reasons li::before {
  content: '\2022';
  font-size: 1.3rem;
  line-height: 1;
  color: var(--score-color, var(--primary-color));
}

.suitability-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.suitability-cta.cta-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cta-btn {
  flex: 1;
  min-width: 140px;
  border-radius: 999px;
  border: none;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-btn.primary {
  background: linear-gradient(135deg, #0f62fe, #3db7ff);
  color: #fff;
  box-shadow: 0 12px 20px rgba(15, 98, 254, 0.2);
}

.cta-btn.secondary {
  background: rgba(255, 255, 255, 0.8);
  color: #0f62fe;
  border: 1px solid rgba(15, 98, 254, 0.3);
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px rgba(15, 98, 254, 0.25);
}

.cta-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Enhanced Card Styles */
.enhanced-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(245, 248, 255, 0.95));
  border: 1px solid rgba(15, 98, 254, 0.08);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.enhanced-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(15, 98, 254, 0.08), transparent 55%);
  pointer-events: none;
}

.card-header-enhanced {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.card-title-block {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.card-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #6f7d95;
}

.card-subtitle {
  position: relative;
  z-index: 1;
  font-size: 0.9rem;
  color: #5c6b81;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.env-card .env-city-badge {
  font-size: 1rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  background: linear-gradient(135deg, rgba(15, 98, 254, 0.85), rgba(61, 183, 255, 0.75));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(15, 98, 254, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.5);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.02em;
  transition: var(--transition);
}

.env-card .env-city-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15, 98, 254, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(15, 98, 254, 0.12), rgba(61, 183, 255, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(15, 98, 254, 0.15);
}

.icon-badge-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(15, 98, 254, 0.12), rgba(61, 183, 255, 0.08));
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(15, 98, 254, 0.15);
  cursor: pointer;
  transition: var(--transition);
}

.icon-badge-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(15, 98, 254, 0.25);
}

.data-display {
  text-align: center;
  padding: 1.5rem 0;
  position: relative;
  z-index: 1;
}

.primary-value {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--dark-text);
  line-height: 1;
  letter-spacing: -0.02em;
}

.value-label {
  font-size: 1rem;
  color: #718096;
  margin-top: 0.5rem;
}

.status-indicator {
  text-align: center;
  color: #465162;
  font-weight: 600;
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

.data-insight {
  position: relative;
  z-index: 1;
  background: rgba(15, 98, 254, 0.06);
  border: 1px dashed rgba(15, 98, 254, 0.2);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: #2f3b4b;
  text-align: center;
}

/* Weather Specific Styles */
.weather-icon {
  transition: transform 0.3s ease;
}

.weather-metrics {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 0.75rem;
  background: rgba(15, 98, 254, 0.05);
  border-radius: 0.75rem;
  position: relative;
  z-index: 1;
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #465162;
}

.metric-item i {
  color: var(--primary-color);
}

/* YouBike Specific Styles */
.station-info {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.station-label {
  font-size: 0.9rem;
  color: #6f7d95;
  text-align: center;
}

.station-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(135deg, rgba(15, 98, 254, 0.08), rgba(61, 183, 255, 0.05));
  border: 1px solid rgba(15, 98, 254, 0.2);
  border-radius: 999px;
  text-decoration: none;
  color: #2f3b4b;
  font-weight: 600;
  transition: var(--transition);
}

.station-link:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(15, 98, 254, 0.25);
}

.station-link i:first-child {
  color: #dc3545;
  font-size: 1.1rem;
}

.station-link:hover i:first-child {
  color: white;
}

.station-name {
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.station-link i:last-child {
  font-size: 0.85rem;
  opacity: 0.6;
}

/* Card Action Button */
.card-action-btn {
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 98, 254, 0.2);
  border-radius: 999px;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  position: relative;
  z-index: 1;
}

.card-action-btn:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(15, 98, 254, 0.25);
}

.card-action-btn:active {
  transform: translateY(0);
}

/* AQI Color Variants */
.enhanced-card.aqi-good .icon-badge,
.enhanced-card.aqi-good .icon-badge-btn {
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.15), rgba(40, 167, 69, 0.08));
  color: #28a745;
}

.enhanced-card.aqi-moderate .icon-badge,
.enhanced-card.aqi-moderate .icon-badge-btn {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 193, 7, 0.08));
  color: #ffc107;
}

.enhanced-card.aqi-unhealthy-sensitive .icon-badge,
.enhanced-card.aqi-unhealthy-sensitive .icon-badge-btn {
  background: linear-gradient(135deg, rgba(253, 126, 20, 0.15), rgba(253, 126, 20, 0.08));
  color: #fd7e14;
}

.enhanced-card.aqi-unhealthy .icon-badge,
.enhanced-card.aqi-unhealthy .icon-badge-btn {
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.15), rgba(220, 53, 69, 0.08));
  color: #dc3545;
}

.enhanced-card.aqi-very-unhealthy .icon-badge,
.enhanced-card.aqi-very-unhealthy .icon-badge-btn {
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.15), rgba(111, 66, 193, 0.08));
  color: #6f42c1;
}

.enhanced-card.aqi-hazardous .icon-badge,
.enhanced-card.aqi-hazardous .icon-badge-btn {
  background: linear-gradient(135deg, rgba(126, 0, 35, 0.15), rgba(126, 0, 35, 0.08));
  color: #7e0023;
}

/* -------------------------------------------------------------------------
   AQI Theme variables
   - Define per-AQI-class CSS variables so text (status, badges) can match
   - This lets elements like `#aqi-status` and `.env-city-badge` follow the
     same visual theme as the badge without repeating colors in many rules.
   ------------------------------------------------------------------------- */
.enhanced-card.aqi-good,
.env-card.aqi-good { --aqi-color: #28a745; --aqi-badge-foreground: #ffffff; }
.enhanced-card.aqi-moderate,
.env-card.aqi-moderate { --aqi-color: #ffc107; --aqi-badge-foreground: #222222; }
.enhanced-card.aqi-unhealthy-sensitive,
.env-card.aqi-unhealthy-sensitive { --aqi-color: #fd7e14; --aqi-badge-foreground: #222222; }
.enhanced-card.aqi-unhealthy,
.env-card.aqi-unhealthy { --aqi-color: #dc3545; --aqi-badge-foreground: #ffffff; }
.enhanced-card.aqi-very-unhealthy,
.env-card.aqi-very-unhealthy { --aqi-color: #6f42c1; --aqi-badge-foreground: #ffffff; }
.enhanced-card.aqi-hazardous,
.env-card.aqi-hazardous { --aqi-color: #7e0023; --aqi-badge-foreground: #ffffff; }

/* Make key text elements inherit the AQI color vars when present */
.enhanced-card .aqi-section .status-indicator,
.enhanced-card .aqi-section .value-label,
.enhanced-card .aqi-section .primary-value {
  color: var(--aqi-color, #465162);
}

/* YouBike Station List Styles */
.station-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.station-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(15, 98, 254, 0.15);
  border-radius: 12px;
  transition: var(--transition);
}

.station-item:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 98, 254, 0.1);
}

.station-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0; /* For text truncation */
}

.station-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.station-name {
  font-weight: 600;
  color: #2f3b4b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.station-dist {
  font-size: 0.75rem;
  color: #6f7d95;
  background: rgba(15, 98, 254, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.station-bikes {
  font-size: 0.85rem;
  color: #465162;
}

.bike-count {
  font-weight: 700;
  color: var(--primary-color);
}

.station-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: 1px solid rgba(15, 98, 254, 0.2);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-left: 0.75rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.station-nav-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Combined Environmental Card Styles */
.env-data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1rem 0;
}

.env-data-section {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 0.75rem;
  border: 1px solid rgba(15, 98, 254, 0.1);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.section-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6f7d95;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.combined-insights {
  margin: 1rem 0;
}

.env-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.env-actions .card-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  background: rgba(15, 98, 254, 0.1);
  border: 1px solid rgba(15, 98, 254, 0.2);
  border-radius: 0.5rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.env-actions .card-action-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

/* Mobile Responsive for Combined Card */
@media (max-width: 768px) {
  .env-data-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .env-actions {
    flex-direction: column;
  }

  .env-actions .card-action-btn {
    width: 100%;
  }
}

/* Hide quick-actions arrows on non-mobile devices */
@media (min-width: 768px) {
  .quick-actions-arrow {
    display: none !important;
  }
}

