/* 
   2027 UCI TRIALS WORLD YOUTH GAMES - DOLANY
   Clean Neutral Grey Theme with Lively Athletic Accents (No Blue Overload)
*/

:root {
  /* UCI Official Strip Accents */
  --uci-blue: #0078c8;
  --uci-red: #c8143c;
  --uci-black: #1e2530;
  --uci-yellow: #f59e0b;
  --uci-green: #10b981;

  /* Neutral Grey & Charcoal Palette (No Blue Tint) */
  --bg-primary: #151921;       /* Deep neutral charcoal */
  --bg-secondary: #1d232e;     /* Mid grey background */
  --bg-tertiary: #252d3a;      /* Elevated container grey */
  --bg-card: #202733;          /* Neutral card grey */
  --bg-card-hover: #283141;
  --bg-glass: rgba(29, 35, 46, 0.94);

  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-light: rgba(148, 163, 184, 0.22);
  --border-focus: rgba(234, 88, 12, 0.5);

  /* Lively Athletic Sports Accents (Energetic Orange, Gold & Emerald) */
  --accent-primary: #ea580c;   /* Vibrant Athletic Orange */
  --accent-primary-hover: #f97316;
  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;
  --accent-cyan: #0ea5e9;
  --accent-purple: #8b5cf6;

  --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.55);

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --transition: all 0.22s ease-in-out;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 75px;
  font-size: 16px;
  color-scheme: dark;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  -webkit-font-smoothing: antialiased;
}

/* Rainbow Strip Header */
.uci-rainbow-bar {
  display: flex;
  height: 5px;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1001;
}
.rainbow-stripe {
  flex: 1;
  height: 100%;
}
.rainbow-stripe.blue { background-color: var(--uci-blue); }
.rainbow-stripe.red { background-color: var(--uci-red); }
.rainbow-stripe.black { background-color: #f1f5f9; }
.rainbow-stripe.yellow { background-color: var(--uci-yellow); }
.rainbow-stripe.green { background-color: var(--uci-green); }

/* Navigation */
.navbar {
  position: sticky;
  top: 5px;
  z-index: 1000;
  background: rgba(21, 25, 33, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.nav-container {
  max-width: 1420px;
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  flex-shrink: 0;
}

.uci-nav-logo {
  height: 44px;
  width: auto;
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 3px 8px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.uci-nav-logo img {
  height: 100%;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.15;
}
.brand-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}

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

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  transition: var(--transition);
  padding: 0.35rem 0.2rem;
  position: relative;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2.5px;
  background: var(--accent-primary);
  transition: var(--transition);
  border-radius: var(--radius-full);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Flag Icons */
.flag-icon {
  width: 22px;
  height: 15px;
  border-radius: 2px;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

/* Language Selector */
.lang-selector {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  min-width: 190px;
  z-index: 1010;
  animation: fadeIn 0.15s ease;
}

.lang-dropdown.show {
  display: flex;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.8rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: var(--transition);
}

.lang-option:hover {
  background: var(--bg-card);
  color: #ffffff;
}

.lang-option.active {
  background: rgba(234, 88, 12, 0.2);
  color: #ffedd5;
  font-weight: 600;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.3rem;
}

/* Hero Section with Neutral Darkened Background */
.hero {
  position: relative;
  padding: 5.5rem 1.5rem 4.5rem;
  background: linear-gradient(180deg, rgba(21, 25, 33, 0.72) 0%, rgba(21, 25, 33, 0.86) 75%, #151921 100%),
              url('hero-bg.jpg') center 22% / cover no-repeat;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

.hero-content {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

.event-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1.1rem;
  border-radius: var(--radius-full);
  background: rgba(21, 25, 33, 0.88);
  border: 1px solid var(--border-light);
  color: #ffedd5;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.event-badge::before {
  content: '★';
  color: var(--accent-gold);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0.9rem;
}

.hero-title .title-top {
  display: block;
  color: #ffffff;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

.hero-title .title-highlight {
  display: block;
  color: #ffedd5;
  background: linear-gradient(120deg, #ffffff 20%, #fde68a 60%, #fdba74 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto 2.25rem;
  font-weight: 400;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

/* Key Info Pills */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.info-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(29, 35, 46, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.65rem 1.15rem;
  text-align: left;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}
.info-pill:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
}

.pill-icon {
  font-size: 1.35rem;
}
.pill-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}
.pill-val {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
}
.pill-val.green-badge {
  color: #34d399;
}
.pill-val.map-link {
  color: #fdba74;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Countdown */
.countdown-box {
  background: rgba(29, 35, 46, 0.92);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  max-width: 620px;
  margin: 0 auto 2.5rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.countdown-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--uci-blue), var(--uci-red), #ffffff, var(--uci-yellow), var(--uci-green));
}

.countdown-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 1rem;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.countdown-unit {
  background: rgba(21, 25, 33, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.5rem;
}

.count-val {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  display: block;
  margin-bottom: 0.3rem;
}

.count-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Energetic Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #ea580c, #f97316);
  color: #ffffff;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.4);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #c2410c, #ea580c);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.55);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(37, 45, 58, 0.9);
  color: var(--text-main);
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid var(--border-light);
  transition: var(--transition);
  cursor: pointer;
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-secondary);
  transform: translateY(-2px);
}

/* Stats Ribbon */
.stats-ribbon {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 2.25rem 1.5rem;
}

.stats-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.stat-card {
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent-primary);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  transition: var(--transition);
}
.stat-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: var(--accent-gold);
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.2rem;
}
.stat-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Common Section Layout */
.section {
  padding: 5rem 1.5rem;
  position: relative;
}
.section.alt-bg {
  background-color: var(--bg-secondary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: #fdba74;
  background: rgba(234, 88, 12, 0.12);
  border: 1px solid rgba(234, 88, 12, 0.3);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.section-lead {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* About Event Section */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.75rem;
  align-items: center;
}

.about-text p {
  margin-bottom: 1.15rem;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.65;
}

.about-highlight-box {
  background: rgba(37, 45, 58, 0.7);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
}
.about-highlight-box h4 {
  font-family: var(--font-heading);
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}
.about-highlight-box p {
  margin-bottom: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.features-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  transition: var(--transition);
}
.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}

.feature-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(234, 88, 12, 0.12);
  border: 1px solid rgba(234, 88, 12, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}
.feature-info h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: #ffffff;
  margin-bottom: 0.25rem;
}
.feature-info p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* About Dolany Section with Real Village Photo */
.dolany-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.75rem;
  align-items: stretch;
}

.dolany-text p {
  margin-bottom: 1.15rem;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.65;
}

.dolany-badges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.dolany-badge-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
}

.dolany-visual-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.dolany-visual-img {
  width: 100%;
  height: 270px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.dolany-visual-card:hover .dolany-visual-img {
  transform: scale(1.03);
}

.dolany-visual-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.dolany-caption-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: #ffffff;
  margin-bottom: 0.4rem;
}
.dolany-caption-text {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
}

/* Schedule Section with Vibrant Race Highlights */
.schedule-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.25rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  transition: var(--transition);
}
.tab-btn:hover {
  color: #ffffff;
  background: var(--bg-card-hover);
}
.tab-btn.active {
  background: linear-gradient(135deg, #ea580c, #f97316);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

.schedule-pane {
  display: none;
  animation: fadeIn 0.25s ease;
}
.schedule-pane.active {
  display: block;
}

.pane-header-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}
.pane-header-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: #ffffff;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 24px;
  width: 2px;
  background: var(--border-subtle);
}

.timeline-item {
  display: flex;
  gap: 1.25rem;
  position: relative;
}

.timeline-marker {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2.5px solid #64748b;
  position: relative;
  top: 1.4rem;
  left: 18px;
  z-index: 2;
  flex-shrink: 0;
}

.timeline-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-left: 1.25rem;
  transition: var(--transition);
  position: relative;
}
.timeline-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

/* Colorful Race Highlighting in Schedule */
.timeline-card.race-card {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

/* Friday Nations Cup - Vibrant Gold/Orange */
.timeline-card.race-nations {
  border-left: 4px solid #f59e0b;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.12), rgba(32, 39, 52, 0.95));
}
.timeline-card.race-nations .timeline-time {
  background: rgba(245, 158, 11, 0.2);
  color: #fde047;
  border-color: rgba(245, 158, 11, 0.4);
}

/* Friday Welcome Ceremony - Purple */
.timeline-card.race-ceremony {
  border-left: 4px solid #a855f7;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.1), rgba(32, 39, 52, 0.95));
}
.timeline-card.race-ceremony .timeline-time {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.4);
}

/* Saturday Semifinals Younger - Sky Blue/Cyan */
.timeline-card.race-semi-young {
  border-left: 4px solid #0ea5e9;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.12), rgba(32, 39, 52, 0.95));
}
.timeline-card.race-semi-young .timeline-time {
  background: rgba(14, 165, 233, 0.2);
  color: #7dd3fc;
  border-color: rgba(14, 165, 233, 0.4);
}

/* Saturday Semifinals Older - Emerald Green */
.timeline-card.race-semi-older {
  border-left: 4px solid #10b981;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12), rgba(32, 39, 52, 0.95));
}
.timeline-card.race-semi-older .timeline-time {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
}

/* Sunday Morning Finals - Fiery Orange/Coral */
.timeline-card.race-finals-morning {
  border-left: 4px solid #f97316;
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.14), rgba(32, 39, 52, 0.95));
}
.timeline-card.race-finals-morning .timeline-time {
  background: rgba(249, 115, 22, 0.2);
  color: #fdba74;
  border-color: rgba(249, 115, 22, 0.4);
}

/* Sunday Main Finals - Championship Gold Glow */
.timeline-card.race-finals-main {
  border-left: 4px solid #eab308;
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.18), rgba(32, 39, 52, 0.95));
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.15);
}
.timeline-card.race-finals-main .timeline-time {
  background: rgba(234, 179, 8, 0.25);
  color: #fef08a;
  border-color: rgba(234, 179, 8, 0.5);
  font-weight: 800;
}

/* Sunday Medal Ceremony - Emerald Victory */
.timeline-card.race-podium {
  border-left: 4px solid #10b981;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.15), rgba(32, 39, 52, 0.95));
}
.timeline-card.race-podium .timeline-time {
  background: rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
  border-color: rgba(16, 185, 129, 0.5);
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}
.timeline-time {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
}

.race-badge-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}
.race-badge-tag.gold { background: #fef08a; color: #854d0e; }
.race-badge-tag.cyan { background: #bae6fd; color: #0369a1; }
.race-badge-tag.green { background: #bbf7d0; color: #166534; }
.race-badge-tag.orange { background: #fed7aa; color: #9a3412; }
.race-badge-tag.purple { background: #e9d5ff; color: #6b21a8; }

.timeline-title {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.timeline-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Venue Section & Diagram */
.venue-wrapper {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.25rem;
  align-items: stretch;
}

.venue-map-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.map-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.map-card-header h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: #ffffff;
}
.map-badge {
  font-size: 0.72rem;
  background: rgba(234, 88, 12, 0.12);
  border: 1px solid rgba(234, 88, 12, 0.3);
  color: #fdba74;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.venue-svg-container {
  width: 100%;
  height: 400px;
  background: #11151c;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  position: relative;
  transition: var(--transition);
}

.venue-svg-container.clickable-plan {
  cursor: pointer;
}

.venue-svg-container.clickable-plan:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(234, 88, 12, 0.25);
  transform: translateY(-2px);
}

.plan-expand-hint {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(21, 25, 33, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(234, 88, 12, 0.4);
  color: #fdba74;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  z-index: 5;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

.venue-svg-container.clickable-plan:hover .plan-expand-hint {
  background: #ea580c;
  color: #ffffff;
  border-color: #ea580c;
}

.venue-svg-container svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Fullscreen Venue Plan Modal Lightbox */
.plan-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.plan-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 23, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.plan-modal-dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1300px;
  height: 92vh;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85);
}

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

.plan-modal-titles h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: #ffffff;
  margin-bottom: 0.15rem;
}

.plan-modal-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.plan-modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.plan-modal-close:hover {
  background: #ea580c;
  border-color: #ea580c;
  transform: scale(1.08);
  color: #ffffff;
}

.plan-modal-body {
  flex: 1;
  padding: 1.5rem;
  background: #090d15;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plan-modal-svg-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plan-modal-svg-wrap svg {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

.venue-details-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.venue-info-box h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: #ffffff;
  margin-bottom: 0.4rem;
}
.venue-address {
  font-size: 0.9rem;
  color: #fdba74;
  margin-bottom: 0.2rem;
}
.venue-address a {
  color: inherit;
  text-decoration: underline;
}
.venue-gps {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: monospace;
  margin-bottom: 1.25rem;
}

.camp-highlights-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1.25rem 0;
}
.camp-highlights-list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.camp-highlights-list li::before {
  content: '✓';
  color: var(--accent-emerald);
  font-weight: 800;
  background: rgba(16, 185, 129, 0.15);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.venue-nav-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

/* Accommodation Section with Real Photos */
.acc-filters {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.25rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover {
  color: #ffffff;
  background: var(--bg-card-hover);
}
.filter-btn.active {
  background: linear-gradient(135deg, #ea580c, #f97316);
  color: #ffffff;
  border-color: transparent;
}

.accommodation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.75rem;
}

.acc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  padding: 1.5rem 1.6rem;
}
.acc-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.acc-card-badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(234, 88, 12, 0.92);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

.acc-card-header {
  padding: 0 0 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1rem;
}

.acc-top-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.acc-bed-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(234, 88, 12, 0.14);
  border: 1px solid rgba(234, 88, 12, 0.28);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.acc-type {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--accent-gold);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.acc-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.acc-distance {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.acc-distance::before {
  content: '📍';
}

.acc-body {
  padding: 0.75rem 1.5rem 1.25rem;
  flex: 1;
}

.acc-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
  line-height: 1.55;
}

.acc-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.feat-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  color: #cbd5e1;
}

.acc-footer {
  padding: 1.1rem 1.5rem;
  background: rgba(0, 0, 0, 0.15);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 0.65rem;
}

.btn-book {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: #003580;
  color: #ffffff;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.btn-book:hover {
  background: #004cb8;
}

.btn-web {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.9rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}
.btn-web:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

/* Surroundings & Tourism with Real Photos */
.sights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.75rem;
}

.sight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.sight-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
}

.sight-img-wrapper {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #11151c;
  position: relative;
}
.sight-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}
.sight-card:hover .sight-img-wrapper img {
  transform: scale(1.05);
}

.sight-header {
  padding: 1.25rem 1.5rem 0.5rem;
}

.sight-top-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.sight-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.sight-loc {
  font-size: 0.78rem;
  color: var(--accent-gold);
  font-weight: 600;
  text-transform: uppercase;
  display: block;
}

.sight-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: #ffffff;
  font-weight: 700;
}

.sight-body {
  padding: 0.5rem 1.5rem 1.5rem;
  flex: 1;
}

.sight-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Practical Guide */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition);
}
.guide-card:hover {
  border-color: var(--border-light);
}

.guide-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.guide-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.guide-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Contact & Organizers */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.org-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.org-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.org-detail-group {
  margin-bottom: 1.1rem;
}
.org-lbl {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
  display: block;
  margin-bottom: 0.15rem;
}
.org-val {
  font-size: 0.95rem;
  color: #ffffff;
  font-weight: 500;
}
.org-val a {
  color: #fdba74;
  text-decoration: none;
}
.org-val a:hover {
  text-decoration: underline;
}

.partner-badges {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.partner-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
}
.partner-logo-box {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  color: #111827;
  flex-shrink: 0;
}
.partner-logo-box.uamk-box {
  background: #ffcc00;
  color: #000000;
}
.partner-logo-box.dolany-box {
  background: #ea580c;
  color: #ffffff;
}
.partner-name {
  font-weight: 600;
  color: #ffffff;
  font-size: 0.9rem;
}

/* Footer */
.footer {
  background: #0d1017;
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 1.5rem 1.75rem;
  position: relative;
}

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

.footer-logo img {
  height: 38px;
  background: #ffffff;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
}
.footer-links a:hover {
  color: #ffffff;
}

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

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Media Queries */
@media (max-width: 1080px) {
  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-light);
    color: #ffffff;
    font-size: 1.35rem;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: var(--transition);
  }
  .mobile-toggle:hover, .mobile-toggle:active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
  }

  .nav-links {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(21, 25, 33, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 2px solid var(--accent-primary);
    padding: 1.25rem 1.25rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    transform: translateY(-130%);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    z-index: 999;
    box-sizing: border-box;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
  }
  .nav-links .nav-link {
    display: block;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-main);
  }
  .nav-links .nav-link:hover, .nav-links .nav-link.active {
    background: rgba(234, 88, 12, 0.15);
    border-color: rgba(234, 88, 12, 0.3);
    color: #ffedd5;
  }
}

@media (max-width: 1024px) {
  .about-grid, .dolany-grid, .venue-wrapper, .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .countdown-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .section {
    padding: 3rem 1rem;
  }
  .venue-svg-container {
    height: 280px;
  }
  .nav-container {
    padding: 0.45rem 0.85rem;
    gap: 0.5rem;
  }
  .nav-brand {
    flex-shrink: 0;
  }
  .brand-text {
    display: none !important;
  }
  .uci-nav-logo {
    height: 35px;
    padding: 2px 6px;
  }
  .nav-actions {
    margin-left: auto;
    gap: 0.4rem;
  }
  .lang-btn {
    padding: 0.35rem 0.55rem;
    font-size: 0.82rem;
    gap: 0.35rem;
  }
  .hero {
    padding: 3.5rem 1rem 2.75rem;
  }
  .hero-pills {
    gap: 0.65rem;
  }
  .info-pill {
    width: 100%;
    max-width: 360px;
  }
  .hero-cta {
    flex-direction: column;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }
  .hero-cta .btn-primary, .hero-cta .btn-secondary {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  .auth-form {
    flex-direction: column;
    align-items: stretch;
  }
  .auth-field {
    flex-direction: column;
    align-items: stretch;
  }
  .auth-field input {
    width: 100%;
  }
  .auth-btns {
    width: 100%;
  }
  .auth-btns button {
    flex: 1;
  }
  .hra-stage {
    padding: 0.85rem;
  }
  .hud-stats {
    gap: 0.85rem;
  }
  .accommodation-grid {
    grid-template-columns: 1fr;
  }
  .camp-highlights-list li {
    font-size: 0.84rem;
  }
  .footer-links {
    gap: 0.85rem 1rem;
  }
}

@media (max-width: 480px) {
  .countdown-grid {
    gap: 0.6rem;
  }
  .count-box {
    padding: 0.85rem 0.5rem;
  }
  .count-number {
    font-size: 1.75rem;
  }
  .count-label {
    font-size: 0.68rem;
  }
  .hero-title {
    font-size: 2rem;
  }
  .section-title {
    font-size: 1.65rem;
  }
  .hra-controls button {
    font-size: 0.92rem;
    padding: 0.85rem 0.75rem;
  }
  .board-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   Embedded Biketrial Game Section (#hra)
   ========================================================================== */
.game-section {
  position: relative;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.game-container {
  max-width: 960px;
  margin: 0 auto;
}

/* Auth Bar */
.hra-auth-bar {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.auth-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-field label {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.auth-field input {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-primary);
  color: #ffffff;
  font-size: 0.92rem;
  font-family: inherit;
  transition: var(--transition);
}

.auth-field input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.25);
}

.auth-btns {
  display: flex;
  gap: 0.5rem;
}

.auth-btns button {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.88rem;
  transition: var(--transition);
}

.auth-btn-login {
  background: var(--accent-primary);
  color: #ffffff;
}
.auth-btn-login:hover {
  background: var(--accent-primary-hover);
}

.auth-btn-reg {
  background: #334155;
  color: #f1f5f9;
}
.auth-btn-reg:hover {
  background: #475569;
}

.auth-btn-logout {
  background: #dc2626;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.88rem;
  transition: var(--transition);
}
.auth-btn-logout:hover {
  background: #b91c1c;
}

.auth-status-logged {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--accent-emerald);
}
.auth-user-badge strong {
  color: #ffffff;
  font-size: 1.05rem;
}
.auth-user-badge.admin-badge {
  color: var(--accent-gold);
}
.auth-user-badge.admin-badge strong {
  color: #fde68a;
}

.auth-msg {
  width: 100%;
  font-size: 0.85rem;
  margin-top: 0.35rem;
}
.auth-msg.error { color: #ef4444; }
.auth-msg.success { color: #22c55e; }

/* Guest warning banner */
.unauth-warning-banner {
  background: rgba(127, 29, 29, 0.4);
  border: 1px solid #ef4444;
  color: #fecaca;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.unauth-warning-banner.hidden {
  display: none;
}
.unauth-warning-banner a {
  color: #ffffff;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 700;
}

/* Game Stage & Canvas */
.hra-stage {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-lg);
  transition: all 0.2s ease;
}

.hra-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.hud-stats {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.hud-lbl {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  font-weight: 600;
  margin-right: 0.4rem;
}
.hud-stats strong {
  font-size: 1.2rem;
  color: #ffffff;
  font-family: var(--font-heading);
}

.btn-game-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  white-space: nowrap;
}
.btn-game-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  color: #ffffff;
}
.btn-game-toggle:active {
  transform: scale(0.96);
}

.hra-canvas-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #1b2029;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hra-canvas-wrap.is-landscape {
  max-width: 800px;
  margin: 0 auto;
}
.hra-canvas-wrap.is-landscape #cv {
  aspect-ratio: 2 / 1;
}

.hra-canvas-wrap.is-portrait {
  max-width: 480px;
  margin: 0 auto;
}
.hra-canvas-wrap.is-portrait #cv {
  aspect-ratio: 480 / 640;
  max-height: 72vh;
}

#cv {
  width: 100%;
  height: auto;
  display: block;
  touch-action: none;
  background: #1b2029;
  transition: aspect-ratio 0.15s ease;
}

/* Fullscreen Game Mode */
/* Fullscreen Game Mode */
.hra-stage.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  z-index: 999999 !important;
  background: #000000 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  margin: 0 !important;
}

.hra-stage.is-fullscreen .hra-hud {
  padding: 0.45rem 0.85rem !important;
  margin-bottom: 0 !important;
  background: rgba(15, 20, 29, 0.92) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  flex-shrink: 0 !important;
  z-index: 20 !important;
}

.hra-stage.is-fullscreen .hra-canvas-wrap {
  flex: 1 1 auto !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-width: none !important;
  border-radius: 0 !important;
  background: #000000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  position: relative !important;
}

.hra-stage.is-fullscreen #cv,
.hra-stage.is-fullscreen .hra-canvas-wrap #cv {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  aspect-ratio: auto !important;
  display: block !important;
}

.hra-stage.is-fullscreen .hra-controls {
  margin: 0 !important;
  padding: 0.5rem 1rem !important;
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px)) !important;
  background: rgba(15, 20, 29, 0.92) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  flex-shrink: 0 !important;
  z-index: 20 !important;
}

.hra-stage.is-fullscreen .hra-controls button {
  width: 100% !important;
  max-width: 600px !important;
  padding: 0.9rem 1.4rem !important;
  font-size: 1.05rem !important;
}

body.game-fs-active {
  overflow: hidden !important;
}

.hra-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 29, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  gap: 0.85rem;
  backdrop-filter: blur(4px);
  z-index: 10;
}
.hra-overlay.hidden {
  display: none;
}
.hra-overlay h2 {
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  font-family: var(--font-heading);
  color: #ffffff;
}
.hra-overlay p {
  max-width: 520px;
  color: var(--text-secondary);
  white-space: pre-line;
  line-height: 1.55;
  font-size: 0.95rem;
}

.hra-controls {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}
.hra-controls button {
  width: 100%;
  max-width: 520px;
  padding: 1rem 1.75rem;
  font-size: 1.05rem;
  font-weight: 800;
  font-family: var(--font-heading);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: linear-gradient(135deg, #ea580c, #c2410c);
  color: #ffffff;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.hra-controls button:active {
  transform: scale(0.98);
  background: #ea580c;
}

/* Scoreboard */
.hra-board {
  margin-top: 2.25rem;
}
.board-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.board-head h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: #ffffff;
  margin-bottom: 0.3rem;
}
.board-mode-badge {
  display: inline-block;
  font-size: 0.78rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.board-mode-badge.public {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}
.board-mode-badge.admin {
  background: #854d0e;
  color: #fef08a;
  border: 1px solid var(--accent-gold);
}

.board-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.btn-admin-act {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-admin-act:hover {
  background: var(--bg-card-hover);
}
.btn-admin-act.btn-danger {
  background: rgba(185, 28, 28, 0.85);
  border-color: #ef4444;
}
.btn-admin-act.btn-danger:hover {
  background: #dc2626;
}

.board-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.board-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
}
.board-card-head h4 {
  font-size: 1.05rem;
  color: #ffffff;
  font-family: var(--font-heading);
}

.board-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.board-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}
.board-item:first-child {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}
.board-item:first-child .board-pts {
  color: var(--accent-gold);
}
.board-rank {
  font-weight: 800;
  color: var(--text-dim);
  width: 30px;
  font-size: 0.92rem;
}
.board-item:first-child .board-rank {
  color: var(--accent-gold);
}
.board-name {
  flex: 1;
  font-weight: 600;
  margin-left: 0.4rem;
  color: #ffffff;
}
.board-pts {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-right: 0.5rem;
  font-family: var(--font-heading);
}

.btn-del-user {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid #ef4444;
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  cursor: pointer;
  font-weight: 700;
  transition: var(--transition);
}
.btn-del-user:hover {
  background: #ef4444;
  color: #ffffff;
}
.board-list .empty {
  color: var(--text-muted);
  font-style: italic;
  padding: 1.25rem 0;
  text-align: center;
}
