/* ==========================================================================
   Seoul Bike Master Dashboard - Ultra High-End Aesthetic Style
   ========================================================================== */

:root {
  --bg-deep: #080c14;
  --bg-surface: rgba(15, 23, 42, 0.65);
  --bg-surface-card: rgba(22, 33, 58, 0.55);
  --bg-hover: rgba(30, 41, 69, 0.75);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(56, 189, 248, 0.4);
  --border-active: rgba(16, 185, 129, 0.45);

  --cyan: #38bdf8;
  --cyan-glow: rgba(56, 189, 248, 0.35);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.35);
  --purple: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.3);
  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.4);

  --gold: #fbbf24;
  --gold-glow: rgba(251, 191, 36, 0.45);
  --silver: #cbd5e1;
  --bronze: #d97706;

  --text-pure: #ffffff;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-base: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-num: 'Outfit', 'Pretendard', sans-serif;
}

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

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-base);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  padding: 2.5rem 1.5rem 4rem 1.5rem;
  line-height: 1.5;
}

/* Ambient Floating Lights */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.glow-cyan {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.22) 0%, transparent 70%);
  top: -120px;
  left: 5%;
}

.glow-emerald {
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
  bottom: 5%;
  right: 5%;
}

.glow-purple {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 1;
}

/* Container */
.dashboard-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1160px;
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}

/* Header */
.dashboard-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.header-top-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 0.35rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.header-time-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.title-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.main-title {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.035em;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: linear-gradient(135deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.title-icon {
  -webkit-text-fill-color: initial;
  display: inline-block;
  transform: rotate(-6deg);
  filter: drop-shadow(0 6px 14px rgba(56, 189, 248, 0.45));
}

.main-description {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 680px;
  line-height: 1.6;
}

.main-description strong {
  color: #f1f5f9;
}

/* ==========================================================================
   Hero Metrics Section (Top 2 Cards)
   ========================================================================== */
.hero-metrics-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (max-width: 820px) {
  .hero-metrics-section {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .main-title {
    font-size: 1.95rem;
  }
}

.hero-card {
  position: relative;
  background: var(--bg-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 2.25rem 2rem;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.55);
}

.hero-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 35px rgba(56, 189, 248, 0.12);
}

.card-rentals:hover {
  border-color: var(--border-focus);
}

.card-stations:hover {
  border-color: var(--border-active);
}

.card-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.icon-avatar {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.hero-card:hover .icon-avatar {
  transform: scale(1.08) rotate(4deg);
}

.rentals-avatar {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(56, 189, 248, 0.05));
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--cyan);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.25);
}

.stations-avatar {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(16, 185, 129, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--emerald);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
}

.card-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-sub {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.badge-accent {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.28rem 0.65rem;
  border-radius: 8px;
}

.cyan-glow {
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.emerald-glow {
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.hero-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hero-label {
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text-muted);
}

.number-display {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0.2rem 0;
}

.big-number {
  font-family: var(--font-num);
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
}

.card-rentals .big-number {
  background: linear-gradient(135deg, #ffffff 45%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 35px var(--cyan-glow);
}

.card-stations .big-number {
  background: linear-gradient(135deg, #ffffff 45%, var(--emerald) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 35px var(--emerald-glow);
}

.number-unit {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dim);
}

.hero-subtext {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Ratio Bar in Card 1 */
.hero-card-footer {
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ratio-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ratio-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.text-cyan { color: var(--cyan); }
.text-purple { color: #c084fc; }
.text-emerald { color: var(--emerald); }

.dual-progress-bar {
  width: 100%;
  height: 9px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
  display: flex;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.seg-weekday {
  background: linear-gradient(90deg, #0284c7, var(--cyan));
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.seg-weekend {
  background: linear-gradient(90deg, #9333ea, #c084fc);
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.6);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.station-stat-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.stat-mini-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sm-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
}

.sm-val {
  font-size: 0.92rem;
  font-weight: 700;
  color: #e2e8f0;
}

/* ==========================================================================
   NEW ADVANCED SECTION: TOP 10 Honor Board
   ========================================================================== */
.ranking-board-section {
  background: var(--bg-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: 28px;
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.6);
}

.board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.board-title-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.trophy-badge {
  font-size: 2.2rem;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(251, 191, 36, 0.04));
  border: 1px solid rgba(251, 191, 36, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(251, 191, 36, 0.2);
}

.board-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.board-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Filter Tabs */
.tab-filters {
  display: inline-flex;
  background: rgba(10, 16, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 0.3rem;
  gap: 0.35rem;
}

.filter-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-base);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.25s ease;
}

.filter-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.filter-tab.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(56, 189, 248, 0.1));
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.2);
}

/* TOP 10 Items List */
.ranking-list-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .ranking-list-container {
    grid-template-columns: 1fr;
  }
}

.rank-item-card {
  background: var(--bg-surface-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.rank-item-card:hover {
  background: var(--bg-hover);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateX(4px) translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.1);
}

/* Medals for TOP 3 */
.rank-badge {
  font-family: var(--font-num);
  font-size: 1.05rem;
  font-weight: 800;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rank-1 {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(251, 191, 36, 0.08));
  color: var(--gold);
  border: 1px solid rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 18px var(--gold-glow);
}

.rank-2 {
  background: linear-gradient(135deg, rgba(203, 213, 225, 0.22), rgba(203, 213, 225, 0.06));
  color: var(--silver);
  border: 1px solid rgba(203, 213, 225, 0.45);
  box-shadow: 0 0 14px rgba(203, 213, 225, 0.3);
}

.rank-3 {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.25), rgba(217, 119, 6, 0.08));
  color: #fb923c;
  border: 1px solid rgba(217, 119, 6, 0.5);
  box-shadow: 0 0 14px rgba(217, 119, 6, 0.3);
}

.rank-other {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.rank-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rank-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.station-name {
  font-size: 0.96rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-area-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.rank-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #0ea5e9, var(--cyan));
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.rank-1 .bar-fill, .rank-card-1 .bar-fill {
  background: linear-gradient(90deg, #d97706, #fbbf24);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

.rental-count-text {
  font-family: var(--font-num);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--cyan);
  white-space: nowrap;
}

.rank-card-1 .rental-count-text {
  color: var(--gold);
}

/* Footer bottom bar */
.dashboard-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.75rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  flex-wrap: wrap;
  gap: 1rem;
}

.dataset-meta-info {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.dataset-meta-info code {
  background: rgba(255, 255, 255, 0.06);
  color: var(--cyan);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.82rem;
}

.btn-replay {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(56, 189, 248, 0.1);
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.6rem 1.15rem;
  border-radius: 12px;
  font-family: var(--font-base);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-replay:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.3);
}

.btn-replay:active {
  transform: translateY(0);
}
