:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(31, 41, 55, 0.9);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(59, 130, 246, 0.4);
  
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-violet: #8b5cf6;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;

  --font-display: 'Outfit', 'Pretendard', sans-serif;
  --font-body: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 35px -5px rgba(59, 130, 246, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(139, 92, 246, 0.06) 0px, transparent 60%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1.5rem;
}

.dashboard-container {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Header */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #fff;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #d1d5db);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.badge-live::before {
  content: '';
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Primary Metric Cards */
.hero-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.metric-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.metric-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;
}

.card-rides::after {
  background: rgba(6, 182, 212, 0.18);
}

.card-stations::after {
  background: rgba(16, 185, 129, 0.18);
}

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

.metric-label-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.metric-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.card-rides .metric-icon-box {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
}

.card-stations .metric-icon-box {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.metric-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.metric-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-value-container {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.metric-number {
  font-family: var(--font-display);
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.card-rides .metric-number {
  background: linear-gradient(135deg, #38bdf8, #06b6d4, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card-stations .metric-number {
  background: linear-gradient(135deg, #34d399, #10b981, #059669);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-unit {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.metric-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-footer strong {
  color: var(--text-primary);
}

/* Secondary Analysis Grid */
.secondary-grid {
  display: grid;
  grid-template-columns: 1.5fr 1.1fr;
  gap: 1.5rem;
}

@media (max-width: 920px) {
  .secondary-grid {
    grid-template-columns: 1fr;
  }
}

.panel-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.btn-reset-chart {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.btn-reset-chart:hover {
  background: rgba(59, 130, 246, 0.3);
  color: #fff;
}

.chart-wrapper {
  position: relative;
  height: 290px;
  width: 100%;
}

/* Top Stations Interactive List */
.station-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.station-wrapper {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.25s ease;
  overflow: hidden;
}

.station-wrapper.active {
  border-color: rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.06);
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.12);
}

.station-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.station-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.station-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rank-badge {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.rank-1 {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-amber);
}

.station-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.station-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.station-count {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

.station-chevron {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.station-wrapper.active .station-chevron {
  transform: rotate(180deg);
  color: var(--accent-cyan);
}

/* Accordion Detail Panel (클릭 시 피크 시간대 표시) */
.station-detail {
  display: none;
  padding: 0.85rem 1rem 1rem 1rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  animation: fadeInDown 0.3s ease;
}

.station-wrapper.active .station-detail {
  display: block;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.peak-main-highlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.25);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.peak-main-title {
  font-size: 0.82rem;
  color: #fda4af;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

.peak-main-value {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.peak-breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.peak-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.peak-chip-label {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.peak-chip-val {
  color: var(--text-primary);
  font-weight: 600;
}

.top3-hours-container {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.top3-tag {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
}

/* Footer */
.dashboard-footer {
  text-align: center;
  padding-top: 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}
