@font-face {
  font-family: "NeuzeitGro";
  src: url("../assets/fonts/NeuzeitGro-Reg.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NeuzeitGro";
  src: url("../assets/fonts/NeuzeitGro-Bol.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --background: 355 71% 94%;
  --foreground: 357 91% 46%;
  --card: 0 0% 100%;
  --card-foreground: 357 91% 46%;
  --primary: 357 91% 46%;
  --primary-foreground: 0 0% 100%;
  --accent: 199 83% 64%;
  --accent-foreground: 357 91% 46%;
  --muted: 45 89% 90%;
  --muted-foreground: 250 25% 28%;
  --border: 260 14% 86%;
  --shadow: 250 25% 28%;
  --radius: 18px;
  --font-sans: "NeuzeitGro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Goteru", "NeuzeitGro", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Dark mode disabled - always use light pink background for Valentine's theme */

html,
body {
  font-family: var(--font-sans);
  background: #fce6e7;
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  html,
  body {
    height: 100dvh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
  }
}

main {
  min-height: 100vh;
}

.main-content {
  margin-left: 2rem;
  margin-right: 2rem;
}

@media (max-width: 1024px) {
  .main-content {
    margin-left: 1rem;
    margin-right: 1rem;
  }
}


.surface {
  backdrop-filter: blur(16px);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.surface:hover {
  transform: scale(1.03);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.08),
    inset 0 2px 12px rgba(255, 245, 247, 1),
    inset 0 -4px 16px rgba(200, 130, 150, 0.5);
}

.card-heading {
  color: var(--RED, #E30613);
  text-align: left;
  font-family: Goteru, var(--font-display);
  font-size: 32px;
  font-style: normal;
  font-weight: 400;
  line-height: 100%;
}

.map-surface {
  background-color: #ffffff;
  position: relative;
}

#leaflet-map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.map-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.08), transparent);
  pointer-events: none;
  z-index: 2;
}


.train {
  position: absolute;
  left: 0%;
  top: 0%;
  width: auto;
  height: 48px;
  object-fit: contain;
  transform: translate(-50%, -50%);
  transition: left 1.8s ease, top 1.8s ease, transform 0.3s ease;
  z-index: 15;
  pointer-events: none;
}

.train.moving {
  transform: translate(-50%, -50%) scaleX(-1) scale(0.85);
}

.train-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 14;
}

.heart-particle {
  position: absolute;
  font-size: 12px;
  color: #E30613;
  opacity: 0;
  animation: heart-exhaust 1.5s ease-out forwards;
  pointer-events: none;
}

@keyframes heart-exhaust {
  0% {
    opacity: 1;
    transform: translateY(0) scale(0.8);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-20px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-40px) scale(0.6);
  }
}


.location {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.location-pin {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

/* Leaflet custom tooltip styling */
.leaflet-tooltip.custom-tooltip {
  background: #E30613 !important;
  color: white !important;
  border: none !important;
  padding: 14px 18px !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  white-space: nowrap !important;
  font-family: var(--font-sans) !important;
}

.leaflet-tooltip.custom-tooltip::before {
  border-top-color: #E30613 !important;
}

.custom-marker {
  background: transparent !important;
  border: none !important;
}

.location-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #E30613;
}

.tooltip-time {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  color: white;
}

.tooltip-location {
  font-size: 16px;
  font-weight: 700;
  margin: 4px 0 0 0;
  line-height: 1.2;
  color: white;
}

.location-pin {
  width: 30px;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  cursor: pointer;
  pointer-events: auto;
}

.route-number {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: #E30613;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  z-index: 11;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.location-card {
  min-width: 150px;
  max-width: 180px;
  background: hsl(var(--background) / 0.9);
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  text-align: center;
}

.location-time {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 9px;
}

.location-title {
  color: hsl(var(--foreground));
  font-weight: 600;
  font-size: 12px;
  margin-top: 4px;
}

.location-sub {
  font-size: 10px;
}

.heart {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
  width: var(--size, 28px);
  height: auto;
  filter: drop-shadow(0 8px 12px hsl(var(--shadow) / 0.2));
  opacity: 0.95;
  pointer-events: auto;
  z-index: 6;
}

/* Hide desktop-only hearts on mobile */
.heart-desktop {
  display: none;
}

/* Adjust heart positions on desktop - move them closer to content with more horizontal variation */
@media (min-width: 769px) {
  /* Add more variation offset - wider range for better scatter (2% to 8%) */
  .heart-field .heart:nth-child(1) { --x-offset: 3%; }
  .heart-field .heart:nth-child(2) { --x-offset: 7%; }
  .heart-field .heart:nth-child(3) { --x-offset: 2.5%; }
  .heart-field .heart:nth-child(4) { --x-offset: -3%; }
  .heart-field .heart:nth-child(5) { --x-offset: -7.5%; }
  .heart-field .heart:nth-child(6) { --x-offset: -2%; }
  .heart-field .heart:nth-child(7) { --x-offset: 8%; }
  .heart-field .heart:nth-child(8) { --x-offset: 4%; }
  .heart-field .heart:nth-child(9) { --x-offset: 6%; }
  .heart-field .heart:nth-child(10) { --x-offset: -8%; }
  .heart-field .heart:nth-child(11) { --x-offset: -3.5%; }
  .heart-field .heart:nth-child(12) { --x-offset: -6%; }
  .heart-field .heart:nth-child(13) { --x-offset: 2%; }
  .heart-field .heart:nth-child(14) { --x-offset: -2.5%; }
  .heart-field .heart:nth-child(15) { --x-offset: 7.5%; }
  .heart-field .heart:nth-child(16) { --x-offset: 3.5%; }
  .heart-field .heart:nth-child(17) { --x-offset: 8.5%; }
  .heart-field .heart:nth-child(18) { --x-offset: -7%; }
  .heart-field .heart:nth-child(19) { --x-offset: 2.5%; }
  .heart-field .heart:nth-child(20) { --x-offset: -4%; }
  .heart-field .heart:nth-child(21) { --x-offset: 6.5%; }
  .heart-field .heart:nth-child(22) { --x-offset: 4.5%; }
  .heart-field .heart:nth-child(23) { --x-offset: -8.5%; }
  .heart-field .heart:nth-child(24) { --x-offset: -2%; }
  .heart-field .heart:nth-child(25) { --x-offset: 7%; }
  .heart-field .heart:nth-child(26) { --x-offset: 2%; }
  .heart-field .heart:nth-child(27) { --x-offset: -6.5%; }
  .heart-field .heart:nth-child(28) { --x-offset: -4.5%; }
  .heart-field .heart:nth-child(29) { --x-offset: 7.5%; }
  .heart-field .heart:nth-child(30) { --x-offset: -8%; }
  .heart-field .heart:nth-child(31) { --x-offset: 3%; }
  .heart-field .heart:nth-child(32) { --x-offset: -2.5%; }
  .heart-field .heart:nth-child(33) { --x-offset: -7.5%; }
  .heart-field .heart:nth-child(34) { --x-offset: -3.5%; }
  .heart-field .heart:nth-child(35) { --x-offset: 5.5%; }
  .heart-field .heart:nth-child(36) { --x-offset: -6%; }
  .heart-field .heart:nth-child(37) { --x-offset: 4%; }
  .heart-field .heart:nth-child(38) { --x-offset: -7%; }
  .heart-field .heart:nth-child(39) { --x-offset: 6.5%; }
  .heart-field .heart:nth-child(40) { --x-offset: -5.5%; }
  .heart-field .heart:nth-child(41) { --x-offset: 3.5%; }
  .heart-field .heart:nth-child(42) { --x-offset: -8.5%; }
  
  /* Apply offset only to hearts that need adjustment (left/right sides) */
  .heart[data-side="left"] {
    left: calc(var(--x) + var(--x-offset, 5%)) !important;
  }
  .heart[data-side="right"] {
    left: calc(var(--x) + var(--x-offset, -5%)) !important;
  }
  
  /* Show desktop-only hearts */
  .heart-desktop {
    display: block !important;
  }
}

.heart-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

@media (max-width: 768px) {
  .heart-field {
    z-index: 5;
  }
}

.heart-float {
  pointer-events: auto;
  transition: transform 0.6s ease;
}

.heart-float:hover {
  animation: heart-wiggle 0.8s ease-in-out infinite;
}

@keyframes heart-wiggle {
  0% {
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
  }
  50% {
    transform: translate(-50%, -50%) rotate(calc(var(--rot, 0deg) + 10deg));
  }
  100% {
    transform: translate(-50%, -50%) rotate(calc(var(--rot, 0deg) - 10deg));
  }
}

@media (prefers-reduced-motion: reduce) {
  .train {
    transition: none;
  }
}

.heart-lg {
  display: none;
}

.heart-xl {
  display: none;
}

@media (min-width: 1280px) {
  .heart-lg {
    display: block;
  }
}

@media (min-width: 1536px) {
  .heart-xl {
    display: block;
  }
}

.start-btn {
  font-size: 18px;
}

.start-btn:hover:not(:disabled) {
  background: #B8050F;
}

.main-heading {
  font-size: 64px;
  position: relative;
  display: inline-block;
  text-shadow: 
    0 0 0 hsl(var(--foreground)),
    1px 1px 0 rgba(255, 255, 255, 0.35);
}

.main-heading::after {
  content: attr(data-text);
  position: absolute;
  top: 1px;
  left: 1px;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  color: transparent;
  text-shadow: 
    0 0 1px rgba(255, 255, 255, 0.35);
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.subtitle-text {
  margin-top: 4px;
}

main > section {
  margin-top: 12px;
}

.nav-arrow-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: none;
  background: #E30613;
  color: white;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
  padding: 0;
}

.nav-arrow-btn:hover:not(:disabled) {
  background: #B8050F;
}

.nav-arrow-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.nav-arrow-btn .material-symbols-rounded {
  font-size: 24px;
  font-variation-settings: "FILL" 1;
}

@media (max-width: 768px) {
  .map-surface {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    min-height: 0 !important;
  }
  .location-card {
    min-width: 130px;
  }
  .train-label {
    display: none;
  }
}

/* Intro Screen Styles */
.intro-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  background: #fce6e7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  animation: introFadeOut 0.8s ease-out 2.5s forwards;
}

@media (max-width: 768px) {
  .intro-screen {
    height: 100dvh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
  }
}

@keyframes introFadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    pointer-events: none;
  }
}

.intro-heart-container {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
}

.intro-main-heart {
  width: 80px;
  height: auto;
  animation: introHeartPulse 2s ease-in-out infinite;
  z-index: 2;
  position: relative;
}

@keyframes introHeartPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.9;
  }
}

.intro-heart-particles {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.intro-heart-particle {
  position: absolute;
  width: 30px;
  height: auto;
  opacity: 0;
  animation: introHeartFloat 2s ease-out forwards;
}

@keyframes introHeartFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0) rotate(0deg);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.5) rotate(360deg);
  }
}

