﻿:root {
  --teal: #34f5e0;
  --teal-dim: #1aa89c;
  --bg: #040a0a;
  --glow: 0 0 12px var(--teal), 0 0 30px rgba(52, 245, 224, 0.45);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Montserrat", sans-serif;
  color: #fff;
  background: var(--bg);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* Layout */
.screen {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
}

.bg {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.ui {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: clamp(48px, 8vw, 120px) clamp(16px, 5vw, 80px) clamp(24px, 4vw, 40px);
  overflow: auto;
}

/* Header */
.header {
  width: 100%;
  text-align: center;
  margin-bottom: clamp(20px, 4vw, 80px);
}

.title-box {
  width: max-content;
  max-width: 100%;
  margin: 0 auto 16px;
  padding: clamp(10px, 1.5vw, 15px) clamp(16px, 2.5vw, 30px);
  text-align: center;
  border: 3px solid var(--teal);
  border-radius: 14px;
  background: rgba(4, 10, 10, 0.35);
  box-shadow: var(--glow), inset 0 0 12px rgba(52, 245, 224, 0.4);
}

.title-box h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(18px, 4.5vw, 70px);
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 0 10px var(--teal), 0 0 22px rgba(52, 245, 224, 0.6);
}

.subtitle {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}

/* Map */
.map {
  width: 100%;
  margin: 0 auto 80px;
}

.map-graphic {
  position: relative;
  width: 80%;
  margin: 0 auto 80px;
}

.map-graphic img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.map-caption {
  margin: 0;
  text-align: center;
  font-size: 40px;
  font-weight: 600;
}

/* Routes */
.routes {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-bottom: 20px;
}

.routes.is-locked .route {
  pointer-events: none;
  cursor: default;
}

.route {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 220px;
  padding: 50px 40px;
  border: 2px solid var(--teal);
  border-radius: 16px;
  background: var(--bg);
  box-shadow: var(--glow), inset 0 0 16px rgba(52, 245, 224, 0.12);
  will-change: transform;
}

.route.is-active {
  background: rgba(26, 168, 156, 0.28);
  border-color: var(--teal);
  box-shadow:
    0 0 12px var(--teal),
    0 0 30px rgba(52, 245, 224, 0.55),
    inset 0 0 24px rgba(52, 245, 224, 0.2);
}

.route-kicker,
.route-name {
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: center;
}

.route-kicker {
  font-size: 40px;
}

.route-icon {
  width: 140px;
  margin: 30px 0;
  color: #fff;
  filter: drop-shadow(0 0 7px rgba(52, 245, 224, 0.9));
}

.route-name {
  font-size: clamp(0.75rem, 1.4vw, 0.95rem);
  line-height: 1.2;
}

.route-meta {
  margin-top: 0.4rem;
  font-size: clamp(0.68rem, 1.2vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-align: center;
  color: var(--teal-dim);
  text-shadow: 0 0 8px rgba(52, 245, 224, 0.45);
}

/* CTA */
.cta {
  position: absolute;
  bottom: 14%;
  left: 50%;
  z-index: 20;
  width: 350px;
  height: 350px;
  transform: translateX(-50%);
}

.cta-btn {
  width: 100%;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.cta-btn img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 18px rgba(52, 245, 224, 0.45));
}

.cta-btn:hover,
.cta-btn:focus-visible {
  transform: scale(1.03);
  outline: none;
}

.cta-btn.is-ready img {
  filter: drop-shadow(0 0 26px rgba(52, 245, 224, 0.75));
}

.cta-btn.is-press {
  transform: scale(0.96);
}

/* Popup */
.screen.is-blurred {
  filter: blur(100px);
  pointer-events: none;
  user-select: none;
}

body.popup-open {
  overflow: hidden;
}

.popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 10, 10, 0.35);
  pointer-events: none;
}

.popup[hidden] {
  display: none;
}

.popup-content {
  width: min(100%, 640px);
  text-align: center;
}

.popup-content p {
  margin: 0 auto;
  text-align: center;
  font-size: clamp(1.1rem, 3.5vw, 2.2rem);
  font-weight: 600;
  line-height: 1.5;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

/* Responsive */
@media (max-width: 1200px) {
  .ui {
    padding: clamp(40px, 6vw, 80px) clamp(20px, 4vw, 48px) 24px;
  }

  .routes {
    gap: 20px;
  }

  .route {
    min-height: 0;
    padding: 28px 16px;
  }

  .route-kicker {
    font-size: 36px;
  }

  .route-icon {
    width: 72px;
    margin: 18px 0;
  }

  .route-name {
    font-size: 14px;
  }

  .route-meta {
    font-size: 12px;
  }

  .cta {
    bottom: 12%;
    width: 240px;
    height: 240px;
  }
}

@media (max-width: 960px) {
  .title-box {
    padding: 14px 28px;
  }

  .title-box h1 {
    font-size: 42px;
  }

  .subtitle {
    font-size: 20px;
  }

  .map-caption {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .routes {
    gap: 12px;
  }

  .route {
    padding: 18px 10px;
  }

  .route-kicker {
    font-size: 20px;
  }

  .route-icon {
    width: 48px;
    margin: 12px 0;
  }

  .route-name {
    font-size: 11px;
  }

  .route-meta {
    font-size: 9px;
  }

  .cta {
    bottom: 10%;
    width: 170px;
    height: 170px;
  }
}

@media (max-width: 600px) {
  .title-box {
    border-width: 2px;
    border-radius: 10px;
  }

  .routes {
    gap: 8px;
  }

  .route {
    padding: 14px 6px;
    border-radius: 10px;
  }

  .route-kicker {
    font-size: 14px;
    letter-spacing: 0.02em;
  }

  .route-icon {
    width: 36px;
    margin: 10px 0;
  }

  .route-name {
    font-size: 9px;
  }

  .route-meta {
    margin-top: 4px;
    font-size: 8px;
  }

  .cta {
    bottom: 10%;
    width: 140px;
    height: 140px;
  }
}
