/* ==========================================================================
   PIRATEN-PASS-ARCHIV - STYLESHEET
   Asphaltpiraten Theme: Dark Alpine Biker Aesthetic
   ========================================================================== */

:root {
  --bg-dark: #0a0c10;
  --bg-surface: #12161f;
  --bg-surface-elevated: #1a202c;
  --bg-card: rgba(22, 28, 40, 0.85);
  --bg-card-hover: rgba(28, 36, 52, 0.95);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 93, 0, 0.5);
  
  --pirate-orange: #ff5d00;
  --pirate-orange-light: #ff7a29;
  --pirate-orange-dark: #d44b00;
  --pirate-orange-glow: rgba(255, 93, 0, 0.25);
  --pirate-orange-subtle: rgba(255, 93, 0, 0.12);

  --gold: #fbbf24;
  --gold-glow: rgba(251, 191, 36, 0.3);
  --silver: #38bdf8;
  --bronze: #f97316;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #64748b;

  --font-marker: 'Permanent Marker', cursive, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px var(--pirate-orange-glow);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(255, 93, 0, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(255, 93, 0, 0.04) 0%, transparent 45%),
    linear-gradient(180deg, #07090c 0%, #0d1017 100%);
  background-attachment: fixed;
}

/* ==========================================================================
   TOP BAR & NAVIGATION (Matches asphaltpiraten.de)
   ========================================================================== */
.top-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 12, 16, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

.top-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.brand-logo-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #2a1508 0%, #151820 100%);
  border: 2px solid var(--pirate-orange);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--pirate-orange-glow);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.brand-container:hover .brand-logo-icon {
  transform: rotate(-8deg) scale(1.08);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-marker);
  font-size: 1.45rem;
  color: #ffffff;
  letter-spacing: 1px;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.brand-subtitle {
  font-family: var(--font-marker);
  font-size: 0.85rem;
  color: var(--pirate-orange);
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-marker);
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
  position: relative;
}

.nav-links a:hover {
  color: var(--pirate-orange);
}

.nav-links a.active {
  color: var(--pirate-orange);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0.6rem;
  right: 0.6rem;
  height: 2px;
  background: var(--pirate-orange);
  box-shadow: 0 0 8px var(--pirate-orange);
}

.nav-badge-pill {
  background: var(--pirate-orange);
  color: #fff !important;
  padding: 0.25rem 0.65rem !important;
  border-radius: var(--radius-full) !important;
  font-size: 0.78rem !important;
  box-shadow: 0 2px 10px var(--pirate-orange-glow);
}

/* ==========================================================================
   HERO BANNER & SCORE TICKER
   ========================================================================== */
.hero-section {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
}

.hero-banner-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 380px;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-subtle);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  filter: brightness(0.85) contrast(1.08);
  transition: transform 6s cubic-bezier(0.1, 1, 0.1, 1);
}

.hero-banner-wrapper:hover .hero-image {
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg, 
    rgba(10, 12, 16, 0.25) 0%, 
    rgba(10, 12, 16, 0.7) 65%, 
    rgba(10, 12, 16, 0.96) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem;
}

.hero-badge-tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid var(--pirate-orange);
  color: var(--pirate-orange);
  font-family: var(--font-marker);
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
  backdrop-filter: blur(8px);
}

.hero-title {
  font-family: var(--font-marker);
  font-size: 3rem;
  color: #ffffff;
  line-height: 1.05;
  margin-bottom: 0.5rem;
  text-shadow: 0 4px 16px rgba(0,0,0,0.9);
}

.hero-title span {
  color: var(--pirate-orange);
  text-shadow: 0 0 20px rgba(255, 93, 0, 0.6);
}

.hero-desc {
  font-size: 1.1rem;
  color: #cbd5e1;
  max-width: 750px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9);
}

/* ==========================================================================
   SCOREBOARD KPI GRID (The Scoreboard Header)
   ========================================================================== */
.scoreboard-kpi-container {
  max-width: 1400px;
  margin: -3rem auto 2rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 10;
}

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

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.1rem;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  cursor: default;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--pirate-orange), transparent);
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

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

.kpi-card:hover::before {
  opacity: 1;
}

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

.kpi-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.kpi-icon {
  font-size: 1.35rem;
}

.kpi-value {
  font-family: var(--font-marker);
  font-size: 2.15rem;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 0.35rem;
  letter-spacing: 0.5px;
}

.kpi-value.highlight-orange {
  color: var(--pirate-orange);
  text-shadow: 0 0 15px var(--pirate-orange-glow);
}

.kpi-value.highlight-gold {
  color: var(--gold);
  text-shadow: 0 0 15px var(--gold-glow);
}

.kpi-subtext {
  font-size: 0.8rem;
  color: var(--text-dark);
  font-weight: 500;
}

/* ==========================================================================
   NAVIGATION VIEW TABS (Scoreboard, Pass-Archiv, Touren, Statistiken)
   ========================================================================== */
.view-tabs-container {
  max-width: 1400px;
  margin: 0 auto 1.5rem;
  padding: 0 1.5rem;
}

.view-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  padding: 0.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-marker);
  font-size: 1.05rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  color: #fff;
  background: var(--pirate-orange);
  box-shadow: 0 4px 16px var(--pirate-orange-glow);
}

.tab-btn .tab-count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.3);
  color: inherit;
}

/* ==========================================================================
   SEARCH & FILTER CONTROL CENTER
   ========================================================================== */
.filter-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.search-bar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-input-wrapper {
  flex: 1;
  min-width: 280px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1.1rem;
  color: var(--text-dark);
  font-size: 1.1rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 3rem 0.85rem 2.85rem;
  font-size: 1rem;
  color: #fff;
  font-family: var(--font-body);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--pirate-orange);
  box-shadow: 0 0 0 3px var(--pirate-orange-subtle);
}

.search-clear-btn {
  position: absolute;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  font-size: 1.1rem;
  display: none;
  padding: 0.2rem;
}

.search-clear-btn:hover {
  color: #fff;
}

.quick-action-btns {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.action-btn:hover {
  border-color: var(--pirate-orange);
  color: var(--pirate-orange);
  background: var(--pirate-orange-subtle);
}

.action-btn.primary {
  background: var(--pirate-orange);
  border-color: var(--pirate-orange);
  color: #fff;
  box-shadow: 0 2px 10px var(--pirate-orange-glow);
}

.action-btn.primary:hover {
  background: var(--pirate-orange-light);
}

/* Filter Sections */
.filter-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  padding-bottom: 1.1rem;
}

.filter-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

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

.filter-row-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.filter-pill:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.filter-pill.active {
  background: var(--pirate-orange);
  border-color: var(--pirate-orange);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 10px var(--pirate-orange-glow);
}

.filter-pill .pill-count {
  font-size: 0.72rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.3);
  font-family: var(--font-mono);
}

/* Active Filter Summary Bar */
.filter-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.active-filters-chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 93, 0, 0.15);
  border: 1px solid rgba(255, 93, 0, 0.4);
  color: var(--pirate-orange-light);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
}

.chip-remove {
  cursor: pointer;
  opacity: 0.7;
}

.chip-remove:hover {
  opacity: 1;
}

.reset-filters-btn {
  background: transparent;
  border: none;
  color: var(--text-dark);
  font-size: 0.82rem;
  text-decoration: underline;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.reset-filters-btn:hover {
  color: #fff;
}

.results-stats-text {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.results-stats-text strong {
  color: var(--pirate-orange);
}

/* Sort Controls & View Toggle */
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.sort-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sort-label {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.sort-select {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-family: var(--font-body);
  cursor: pointer;
}

.sort-select:focus {
  outline: none;
  border-color: var(--pirate-orange);
}

.view-mode-toggle {
  display: flex;
  align-items: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.2rem;
}

.view-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.view-toggle-btn.active {
  background: var(--pirate-orange);
  color: #fff;
  box-shadow: 0 2px 6px var(--pirate-orange-glow);
}

/* ==========================================================================
   PASS CARDS GRID
   ========================================================================== */
.passes-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.pass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  backdrop-filter: blur(14px);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
}

.pass-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-lg), 0 0 20px var(--pirate-orange-glow);
  background: var(--bg-card-hover);
}

.pass-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.pass-title-group {
  flex: 1;
}

.pass-name {
  font-family: var(--font-marker);
  font-size: 1.25rem;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 0.35rem;
}

.pass-badges-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.badge-country {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-type {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--pirate-orange-subtle);
  color: var(--pirate-orange-light);
  border: 1px solid rgba(255, 93, 0, 0.25);
}

/* Height Tag Badge */
.height-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.height-number {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
}

.height-unit {
  font-size: 0.68rem;
  color: var(--text-dark);
  text-transform: uppercase;
  font-weight: 700;
}

.height-badge.club-2000 {
  border-color: var(--gold);
  background: rgba(251, 191, 36, 0.1);
}

.height-badge.club-2000 .height-number {
  color: var(--gold);
  text-shadow: 0 0 10px var(--gold-glow);
}

.height-badge.club-1500 {
  border-color: var(--silver);
  background: rgba(56, 189, 248, 0.1);
}

.height-badge.club-1500 .height-number {
  color: var(--silver);
}

/* Altitude Progress Bar */
.altitude-bar-wrapper {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 0.4rem 0;
}

.altitude-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #ff5d00, #fbbf24);
  transition: width 0.6s ease;
}

/* Card Bottom Info */
.pass-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
}

.ridden-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--pirate-orange-light);
  background: rgba(255, 93, 0, 0.15);
  border: 1px solid rgba(255, 93, 0, 0.3);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.ridden-count-badge.high-frequency {
  background: var(--pirate-orange);
  color: #fff;
  box-shadow: 0 2px 8px var(--pirate-orange-glow);
}

.tour-info-preview {
  color: var(--text-dark);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

/* ==========================================================================
   PASS TABLE VIEW
   ========================================================================== */
.passes-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
  margin-bottom: 2.5rem;
}

.passes-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.passes-table th {
  background: var(--bg-surface-elevated);
  padding: 0.9rem 1.1rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.passes-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.passes-table th.sortable:hover {
  color: var(--pirate-orange);
}

.passes-table td {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
}

.passes-table tr:hover td {
  background: rgba(255, 93, 0, 0.06);
}

.passes-table tr {
  cursor: pointer;
}

.table-pass-name {
  font-weight: 600;
  color: #fff;
}

/* ==========================================================================
   SCOREBOARD & HALL OF FAME VIEW
   ========================================================================== */
.scoreboard-section-wrapper {
  margin-bottom: 3rem;
}

.section-headline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.section-headline h2 {
  font-family: var(--font-marker);
  font-size: 1.85rem;
  color: #fff;
  letter-spacing: 0.5px;
}

.section-headline span {
  color: var(--pirate-orange);
}

/* Top 3 Podium */
.podium-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
  align-items: flex-end;
}

.podium-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(14px);
  position: relative;
  transition: transform var(--transition-fast);
}

.podium-card:hover {
  transform: translateY(-6px);
}

.podium-card.first {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.12) 0%, var(--bg-card) 60%);
  box-shadow: 0 0 35px rgba(251, 191, 36, 0.2);
  order: 2;
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;
}

.podium-card.second {
  border-color: #94a3b8;
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.1) 0%, var(--bg-card) 60%);
  order: 1;
}

.podium-card.third {
  border-color: #d97706;
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.1) 0%, var(--bg-card) 60%);
  order: 3;
}

.podium-rank-badge {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.podium-pass-name {
  font-family: var(--font-marker);
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.podium-score {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  color: var(--pirate-orange);
  margin-bottom: 0.35rem;
}

.podium-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Leaderboard Ranking Table */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.leaderboard-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.leaderboard-item:hover {
  border-color: var(--border-focus);
  transform: translateX(6px);
  background: var(--bg-card-hover);
}

.leaderboard-left {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.leaderboard-rank {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-dark);
  min-width: 32px;
}

.leaderboard-name {
  font-family: var(--font-marker);
  font-size: 1.15rem;
  color: #fff;
}

.leaderboard-details {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.leaderboard-score-badge {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--pirate-orange-light);
  background: rgba(255, 93, 0, 0.15);
  border: 1px solid rgba(255, 93, 0, 0.3);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   TOURS CHRONICLE VIEW
   ========================================================================== */
.tours-timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.tour-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.1rem;
  position: relative;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.tour-card:hover {
  transform: translateY(-4px);
  border-color: var(--pirate-orange);
  box-shadow: var(--shadow-md), 0 0 20px var(--pirate-orange-glow);
}

.tour-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.tour-year-badge {
  font-family: var(--font-marker);
  font-size: 1.6rem;
  color: var(--pirate-orange);
  line-height: 1;
}

.tour-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-top: 0.35rem;
  line-height: 1.3;
}

.tour-subtitle {
  font-style: italic;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.tour-stats-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  text-align: center;
}

.tour-mini-stat-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}

.tour-mini-stat-lbl {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--text-dark);
  font-weight: 600;
}

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

/* ==========================================================================
   STATISTICS CHARTS & DISTRIBUTIONS
   ========================================================================== */
.stats-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(14px);
}

.stat-box-title {
  font-family: var(--font-marker);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dist-bar-item {
  margin-bottom: 0.9rem;
}

.dist-bar-item:last-child {
  margin-bottom: 0;
}

.dist-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.dist-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.dist-bar-prog {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--pirate-orange), var(--gold));
  transition: width 1s ease-out;
}

/* ==========================================================================
   MODAL WINDOW (PASS DETAILS)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(5, 7, 10, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-focus);
  box-shadow: var(--shadow-lg), 0 0 50px var(--pirate-orange-glow);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95);
  transition: transform var(--transition-fast);
}

.modal-backdrop.open .modal-dialog {
  transform: scale(1);
}

.modal-header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--pirate-orange);
  color: #fff;
}

.modal-body {
  padding: 1.75rem;
}

.modal-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.tour-history-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
}

.history-item {
  background: var(--bg-surface-elevated);
  border-left: 3px solid var(--pirate-orange);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #07080b;
  padding: 3rem 1.5rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.75rem;
}

.social-links-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.social-link {
  font-family: var(--font-marker);
  color: var(--pirate-orange);
  text-decoration: none;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.social-link:hover {
  color: #fff;
  transform: translateY(-2px);
  text-shadow: 0 0 12px var(--pirate-orange-glow);
}

.footer-copy {
  color: var(--text-dark);
  font-size: 0.85rem;
}

/* ==========================================================================
   RESPONSIVENESS
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.3rem;
  }
  .podium-container {
    grid-template-columns: 1fr;
  }
  .podium-card.first {
    order: 1;
  }
  .podium-card.second {
    order: 2;
  }
  .podium-card.third {
    order: 3;
  }
}

@media (max-width: 768px) {
  .top-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.35rem;
  }
  .hero-banner-wrapper {
    height: 300px;
  }
  .hero-title {
    font-size: 1.85rem;
  }
  .hero-overlay {
    padding: 1.25rem;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .search-bar-row {
    flex-direction: column;
  }
  .search-input-wrapper {
    width: 100%;
  }
  .passes-cards-grid {
    grid-template-columns: 1fr;
  }
  .tours-timeline-grid {
    grid-template-columns: 1fr;
  }
}

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