/* ============================================================
   OC Golf Course Tracker — Premium Dark Theme
   golf.tehw00t.net
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Backgrounds */
  --bg-primary: #0a0f0a;
  --bg-secondary: #141a14;
  --bg-tertiary: #1a241a;
  --bg-card: rgba(20, 30, 20, 0.8);
  --bg-card-hover: rgba(30, 45, 30, 0.9);

  /* Text */
  --text-primary: #f0f7f0;
  --text-secondary: #a3b8a3;
  --text-muted: #6b8a6b;

  /* Greens */
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-900: #14532d;

  /* Accent */
  --gold-400: #fbbf24;
  --gold-500: #f59e0b;
  --red-400: #f87171;

  /* Borders & Glass */
  --border-subtle: rgba(74, 222, 128, 0.1);
  --border-glow: rgba(74, 222, 128, 0.25);
  --glass-bg: rgba(10, 15, 10, 0.6);
  --glass-border: rgba(74, 222, 128, 0.15);

  /* Misc */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(74, 222, 128, 0.08);
  --transition-fast: 0.2s ease;
  --transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --max-width: 1320px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--green-400);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--green-500); }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul, ol { list-style: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

.hidden { display: none !important; }

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: var(--green-900);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover { background: var(--green-700); }

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--green-900) var(--bg-primary);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { color: var(--text-secondary); }

.text-gradient {
  background: linear-gradient(135deg, var(--green-400), var(--green-100));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.section { padding: clamp(3rem, 6vw, 5rem) 0; }

/* ---------- Glassmorphic Card Base ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base),
              box-shadow var(--transition-base),
              border-color var(--transition-base);
}
.glass:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.85rem 0;
  background: rgba(10, 15, 10, 0.82);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  transition: background var(--transition-base),
              box-shadow var(--transition-base);
}
.navbar.scrolled {
  background: rgba(10, 15, 10, 0.96);
  box-shadow: 0 2px 30px rgba(0, 0, 0, 0.5);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}
.nav-brand svg { flex-shrink: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.25rem 0;
  transition: color var(--transition-fast);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green-400);
  border-radius: 2px;
  transition: width var(--transition-base);
}
.nav-links a:hover,
.nav-links a.active { color: var(--green-400); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 5rem;
  overflow: hidden;
  background: 
    linear-gradient(to bottom, rgba(10, 15, 10, 0.7), rgba(10, 15, 10, 0.9)),
    url('../assets/images/hero_bg.jpg') center/cover no-repeat;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='g' patternUnits='userSpaceOnUse' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1' fill='rgba(74,222,128,0.04)'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='60' height='60' fill='url(%23g)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}
.hero-content .hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green-400);
  margin-bottom: 1.25rem;
  padding: 0.4rem 1rem;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.15);
  border-radius: var(--radius-pill);
}
.hero h1 { margin-bottom: 1rem; }
.hero .hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* -- Progress Ring -- */
.progress-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.progress-ring {
  position: relative;
  width: 200px;
  height: 200px;
}
.progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.progress-ring__track {
  fill: none;
  stroke: var(--border-subtle);
  stroke-width: 8;
}
.progress-ring__fill {
  fill: none;
  stroke: url(#progressGradient);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 565.48;
  stroke-dashoffset: 565.48;
  transition: stroke-dashoffset 1.8s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 6px rgba(74, 222, 128, 0.4));
}
.progress-ring__label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.progress-ring__number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.progress-ring__text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: -3rem;
  position: relative;
  z-index: 2;
}
.stat-card {
  padding: 1.5rem;
  text-align: center;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), border-color var(--transition-base);
}
.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
}
.stat-card .stat-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.stat-card .stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--green-400);
  line-height: 1.2;
}
.stat-card .stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 0;
  margin-bottom: 1rem;
}
.filter-pills {
  display: flex;
  gap: 0.5rem;
}
.filter-pill {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.filter-pill:hover {
  color: var(--green-400);
  border-color: var(--border-glow);
  background: rgba(74, 222, 128, 0.06);
}
.filter-pill.active {
  color: var(--bg-primary);
  background: var(--green-500);
  border-color: var(--green-500);
}

.filter-select {
  padding: 0.5rem 2rem 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b8a6b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.filter-select:hover,
.filter-select:focus {
  border-color: var(--border-glow);
  color: var(--text-primary);
  outline: none;
}

.filter-search {
  flex: 1;
  min-width: 200px;
  padding: 0.55rem 1rem 0.55rem 2.5rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
}
.filter-search::placeholder { color: var(--text-muted); }
.filter-search:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.search-wrap .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ============================================================
   SECTION HEADER (title + view switcher)
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* ============================================================
   VIEW SWITCHER (Grid / Timeline toggle)
   ============================================================ */
.view-switcher {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
}

.view-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.view-tab svg {
  width: 14px;
  height: 14px;
  display: inline;
  flex-shrink: 0;
}
.view-tab:hover {
  color: var(--text-secondary);
  background: rgba(74, 222, 128, 0.06);
}
.view-tab.active {
  color: var(--bg-primary);
  background: var(--green-500);
}

/* ============================================================
   COURSE TIMELINE (inline switcher view)
   ============================================================ */
.course-timeline {
  position: relative;
  padding-left: 2.5rem;
}
.course-timeline::before {
  content: '';
  position: absolute;
  left: 0.9rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--green-500), var(--border-subtle));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  cursor: pointer;
}

.timeline-item .timeline-dot {
  position: absolute;
  left: -2.15rem;
  top: 1.15rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green-500);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--green-500), 0 0 12px rgba(34, 197, 94, 0.4);
  z-index: 1;
}

.timeline-card {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}
.timeline-card:hover {
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
  transform: translateX(6px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.timeline-card-thumb {
  width: 100px;
  height: 68px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.timeline-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-card-body {
  flex: 1;
  min-width: 0;
}
.timeline-card-body .tl-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.timeline-card-body .tl-city {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.timeline-card-body .tl-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.timeline-card-body .tl-stats span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.timeline-date-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green-400);
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
  letter-spacing: 0.03em;
}

/* ============================================================
   JOURNEY TIMELINE (dedicated section)
   ============================================================ */
.journey-timeline {
  position: relative;
  padding-left: 3rem;
  max-width: 800px;
}
.journey-timeline::before {
  content: '';
  position: absolute;
  left: 1.1rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--green-400) 0%, var(--green-700) 60%, var(--border-subtle) 100%);
  border-radius: 2px;
}

.journey-item {
  position: relative;
  margin-bottom: 2.5rem;
  cursor: pointer;
}
.journey-item:last-child { margin-bottom: 0; }

.journey-item .journey-dot {
  position: absolute;
  left: -2.55rem;
  top: 1.25rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-500);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 3px var(--green-500), 0 0 16px rgba(34, 197, 94, 0.5);
  z-index: 1;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.journey-item:hover .journey-dot {
  transform: scale(1.2);
  box-shadow: 0 0 0 4px var(--green-400), 0 0 20px rgba(74, 222, 128, 0.6);
}

.journey-item .journey-date {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.journey-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}
.journey-card:hover {
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
  transform: translateX(8px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.journey-card-thumb {
  width: 140px;
  height: 95px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.journey-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.journey-card:hover .journey-card-thumb img {
  transform: scale(1.06);
}

.journey-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.journey-card-body .j-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}
.journey-card-body .j-city {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.journey-card-body .j-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.journey-card-body .j-stats span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.journey-card-body .j-commentary {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.journey-empty {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}
.journey-empty svg {
  margin: 0 auto 1rem;
  opacity: 0.3;
}
.journey-empty h3 {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* ============================================================
   COURSE GRID
   ============================================================ */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

/* ---------- Course Card ---------- */
.course-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.course-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  background: var(--bg-card-hover);
}

/* Thumbnail */
.card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-tertiary);
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.course-card:hover .card-thumb img { transform: scale(1.06); }

.card-thumb .played-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.9);
  border-radius: 50%;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 2px 12px rgba(34, 197, 94, 0.4);
}
.card-thumb .score-badge {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.65rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--bg-primary);
  background: var(--green-400);
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(74, 222, 128, 0.3);
}

/* Card Body */
.card-body {
  padding: 1rem 1.15rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-body .card-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}
.card-body .card-city {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.card-meta .card-date { color: var(--text-muted); }
.card-meta .card-stars { display: flex; gap: 2px; }
.card-meta .card-stars .star { color: var(--gold-400); font-size: 0.85rem; }
.card-meta .card-stars .star.empty { color: var(--text-muted); opacity: 0.35; }

/* -- Unplayed Card Variant -- */
.course-card.unplayed .card-thumb {
  filter: grayscale(0.7) brightness(0.5);
}
.course-card.unplayed .card-thumb .lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 15, 10, 0.55);
}
.course-card.unplayed .card-thumb .lock-overlay svg {
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  opacity: 0.5;
}
.course-card.unplayed .card-body .card-name { color: var(--text-secondary); }
.course-card.unplayed:hover { transform: translateY(-3px); }

/* Placeholder thumb for unplayed courses */
.card-thumb-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-thumb-placeholder svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  opacity: 0.2;
}

/* ============================================================
   MAP
   ============================================================ */
.map-section {
  padding: clamp(2rem, 4vw, 4rem) 0;
}
.map-section h2 {
  margin-bottom: 1.5rem;
}
#map {
  width: 100%;
  height: 500px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

/* Leaflet overrides */
.leaflet-popup-content-wrapper {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5) !important;
}
.leaflet-popup-tip { background: var(--bg-secondary) !important; }
.leaflet-popup-content { font-family: var(--font-body); font-size: 0.85rem; }
.leaflet-control-zoom a {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-subtle) !important;
}

/* ============================================================
   COURSE DETAIL PAGE
   ============================================================ */
.detail-header {
  padding-top: 6rem;
  padding-bottom: 2rem;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  transition: color var(--transition-fast);
}
.back-link:hover { color: var(--green-400); }

.detail-title { margin-bottom: 0.75rem; }
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.detail-meta a { color: var(--green-400); }

/* Photo Gallery */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.photo-gallery .gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}
.photo-gallery .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}
.photo-gallery .gallery-item:hover img { transform: scale(1.05); }

/* Detail Info Cards */
.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.detail-info-card {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}
.detail-info-card .info-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.detail-info-card .info-value {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.detail-commentary {
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  margin-bottom: 2rem;
}
.detail-commentary h3 { margin-bottom: 0.75rem; }
.detail-commentary p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* Coming Soon State */
.coming-soon {
  text-align: center;
  padding: 4rem 2rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}
.coming-soon svg { margin: 0 auto 1.5rem; color: var(--text-muted); opacity: 0.4; }
.coming-soon h3 {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.coming-soon p { color: var(--text-muted); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--transition-base);
}
.lightbox.active { display: flex; opacity: 1; }
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 60px rgba(0, 0, 0, 0.6);
}
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  transition: all var(--transition-fast);
}
.lightbox-close:hover { color: #fff; background: rgba(255, 255, 255, 0.15); }

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  transition: all var(--transition-fast);
}
.lightbox-arrow:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.lightbox-arrow.prev { left: 1.5rem; }
.lightbox-arrow.next { right: 1.5rem; }

/* ============================================================
   STAR RATING
   ============================================================ */
.star-rating {
  display: inline-flex;
  gap: 3px;
}
.star-rating .star {
  font-size: 1.1rem;
  color: var(--gold-400);
}
.star-rating .star.empty {
  color: var(--text-muted);
  opacity: 0.3;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.badge-public {
  color: var(--green-400);
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.2);
}
.badge-private {
  color: var(--gold-400);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
}
.badge-resort {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.2);
}
.badge-municipal {
  color: #c084fc;
  background: rgba(192, 132, 252, 0.1);
  border: 1px solid rgba(192, 132, 252, 0.2);
}
.badge-military {
  color: var(--red-400);
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
}
.badge-semi-private {
  color: #fb923c;
  background: rgba(251, 146, 60, 0.1);
  border: 1px solid rgba(251, 146, 60, 0.2);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}
.site-footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.site-footer .footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* ============================================================
   LOADING SKELETONS
   ============================================================ */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

/* ============================================================
   PLAYER PILLS
   ============================================================ */
.player-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  background: rgba(74, 222, 128, 0.1);
  color: var(--green-400);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}

.player-pill:hover {
  background: rgba(74, 222, 128, 0.2);
  color: #fff;
  border-color: rgba(74, 222, 128, 0.4);
}

.player-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s ease infinite;
  border-radius: var(--radius-sm);
}
.skeleton-card {
  height: 320px;
  border-radius: var(--radius-md);
}
.skeleton-text {
  height: 1rem;
  width: 60%;
  margin-bottom: 0.5rem;
}
.skeleton-thumb {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up {
  opacity: 0;
  transform: translateY(30px);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in {
  opacity: 0;
}
.fade-in.visible {
  opacity: 1;
  transition: opacity 0.6s ease;
}

/* Staggered children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   EMPTY / ERROR STATES
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state svg { margin: 0 auto 1rem; opacity: 0.35; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 0.5rem; }

.error-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 0.85rem 1.25rem;
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius-sm);
  color: var(--red-400);
  font-size: 0.85rem;
  z-index: 9000;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* 1200px */
@media (max-width: 1200px) {
  .course-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 1024px */
@media (max-width: 1024px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 768px */
@media (max-width: 768px) {
  .hero { min-height: 70vh; }
  .progress-ring { width: 160px; height: 160px; }
  .progress-ring__number { font-size: 2.25rem; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-pills { flex-wrap: wrap; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.82rem; }
  #map { height: 380px; }
  .photo-gallery { grid-template-columns: repeat(2, 1fr); }
  .detail-info-grid { grid-template-columns: 1fr 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .journey-card { flex-direction: column; }
  .journey-card-thumb { width: 100%; height: 160px; }
  .timeline-card { flex-direction: column; }
  .timeline-card-thumb { width: 100%; height: 140px; }
}

/* 480px */
@media (max-width: 480px) {
  .stats-bar { grid-template-columns: 1fr; gap: 0.75rem; }
  .course-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 0.6rem; }
  .stat-card .stat-value { font-size: 1.5rem; }
  .progress-ring { width: 140px; height: 140px; }
  .progress-ring__number { font-size: 2rem; }
  #map { height: 300px; }
  .lightbox-arrow { width: 36px; height: 36px; font-size: 1.2rem; }
  .photo-gallery { grid-template-columns: 1fr; }
  .detail-info-grid { grid-template-columns: 1fr; }
  .course-timeline { padding-left: 2rem; }
  .journey-timeline { padding-left: 2.25rem; }
  .journey-card-body .j-name { font-size: 0.95rem; }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--green-400);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .progress-ring__fill {
    transition: none !important;
  }
  .animate-on-scroll,
  .fade-up,
  .fade-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ============================================================
   PLAYER PILLS
   ============================================================ */
.player-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  background: rgba(74, 222, 128, 0.1);
  color: var(--green-400);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}

.player-pill:hover {
  background: rgba(74, 222, 128, 0.2);
  color: #fff;
  border-color: rgba(74, 222, 128, 0.4);
}

.player-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ============================================================
   FIREBALL PHOTO
   ============================================================ */
.fireball-photo-display {
  margin-top: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.fireball-photo-display h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.fireball-thumb {
  max-width: 300px;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.fireball-detail-img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: transform var(--transition-medium);
}

.fireball-detail-img:hover {
  transform: scale(1.03);
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  .navbar,
  .filter-bar,
  .site-footer,
  .view-switcher,
  .journey-timeline,
  .course-timeline,
  #map,
  .lightbox { display: none !important; }
  .hero { min-height: auto; padding: 2rem 0; }
  .course-card {
    break-inside: avoid;
    border: 1px solid #ccc;
    box-shadow: none;
    background: #fff;
  }
  .card-body .card-name { color: #000; }
  .glass { backdrop-filter: none; background: #f9f9f9; border-color: #ddd; }
  .stat-card .stat-value { color: #15803d; }
  a { color: #15803d; }
}
