* {
  box-sizing: border-box;
}

:root {
  --bg: #030713;
  --panel: rgba(7, 13, 29, 0.88);
  --panel-2: rgba(14, 22, 41, 0.78);
  --border: rgba(166, 130, 255, 0.22);
  --border-strong: rgba(169, 113, 255, 0.56);
  --purple: #a567ff;
  --purple-2: #d1a2ff;
  --white: #f8f6ff;
  --muted: rgba(239, 235, 255, 0.58);
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: var(--bg);
  color: var(--white);
  font-family:
    Inter,
    "Noto Sans SC",
    "Microsoft YaHei",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

body {
  overflow: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.travel-page {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  background:
    radial-gradient(circle at 66% 35%, rgba(100, 57, 199, 0.09), transparent 32%),
    radial-gradient(circle at 22% 78%, rgba(108, 76, 212, 0.06), transparent 30%),
    linear-gradient(180deg, #020611 0%, #050917 48%, #030712 100%);
}

/* subtle stars */
.travel-page::before,
.travel-page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.travel-page::before {
  opacity: 0.42;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.75) 0 1px, transparent 1.2px),
    radial-gradient(circle, rgba(174,137,255,.75) 0 1px, transparent 1.25px);
  background-position: 13px 17px, 58px 91px;
  background-size: 96px 96px, 151px 151px;
}

.travel-page::after {
  background:
    linear-gradient(90deg, rgba(2,6,17,.5), transparent 26%, transparent 74%, rgba(2,6,17,.48)),
    linear-gradient(180deg, rgba(2,6,17,.12), transparent 28%, rgba(2,6,17,.38));
}

.map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.route-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 4;
}

.route-base {
  fill: none;
  stroke: rgba(173, 154, 218, 0.16);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 4 9;
}

.route-active {
  fill: none;
  stroke: #a873ff;
  stroke-width: 2.6;
  stroke-linecap: round;
  filter:
    drop-shadow(0 0 4px rgba(168, 115, 255, 0.98))
    drop-shadow(0 0 12px rgba(122, 74, 255, 0.60));
}

/* HERO */
.hero-copy {
  position: absolute;
  top: 142px;
  left: clamp(28px, 4vw, 70px);
  z-index: 7;
  pointer-events: none;
}

.hero-cn {
  font-family: "Noto Serif SC", "Songti SC", serif;
  color: rgba(255, 255, 255, .70);
  font-size: 19px;
  letter-spacing: .28em;
}

.hero-en {
  margin-top: 12px;
  color: rgba(215, 204, 238, .29);
  font-size: 9px;
  letter-spacing: .42em;
}

/* =========================================
   BUTTERFLY
========================================= */

.butterfly {
    position: absolute;
    left: 0;
    top: 0;
    width: 76px;
    height: 76px;
    z-index: 10;
    pointer-events: none;

    /*
      JS 会控制整个蝴蝶：
      translate + rotate
    */
    transform-origin: center center;

    will-change: transform;

    filter:
        drop-shadow(
            0 0 5px
            rgba(195, 145, 255, 0.95)
        )
        drop-shadow(
            0 0 13px
            rgba(145, 82, 255, 0.55)
        );
}


.butterfly-art {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 180px;
	
	transform: scaleX(1.18);
    transform-origin: center center;
}


/*
   三层全部使用同一张 butterfly.png
*/
.butterfly-part {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    backface-visibility: hidden;
}


/* =========================================
   LEFT WING
========================================= */

.butterfly-left {

    /*
       只显示左边
    */
    clip-path:
        polygon(
            0 0,
            51% 0,
            51% 100%,
            0 100%
        );

    /*
       从身体中央开始拍
    */
    transform-origin:
        51% 53%;

    animation:
        butterflyLeftFlap
        0.42s
        ease-in-out
        infinite
        alternate;

    z-index: 1;
}


/* =========================================
   RIGHT WING
========================================= */

.butterfly-right {

    clip-path:
        polygon(
            49% 0,
            100% 0,
            100% 100%,
            49% 100%
        );

    transform-origin:
        49% 53%;

    animation:
        butterflyRightFlap
        0.42s
        ease-in-out
        infinite
        alternate;

    z-index: 1;
}


/* =========================================
   BODY
========================================= */

.butterfly-center {

    /*
       只留下中间区域。

       身体不会跟着翅膀压缩。
    */
    clip-path:
        polygon(
            44% 0,
            56% 0,
            56% 100%,
            44% 100%
        );

    z-index: 3;
}


/* =========================================
   WING ANIMATION
========================================= */

@keyframes butterflyLeftFlap {

    from {
        transform:
            rotateY(0deg);
    }

    to {
        transform:
            rotateY(52deg);
    }

}


@keyframes butterflyRightFlap {

    from {
        transform:
            rotateY(0deg);
    }

    to {
        transform:
            rotateY(-52deg);
    }

}

/* CARD */
.destination-card {
  position: absolute;
  z-index: 14;

  width: min(360px, calc(100vw - 36px));
  max-height: calc(100vh - 116px);
  padding: 26px;

  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color:
    rgba(177, 119, 255, 0.42)
    transparent;

  border: 1px solid rgba(159, 126, 238, 0.24);
  border-radius: 19px;

  background:
    linear-gradient(180deg, rgba(8, 14, 31, 0.93), rgba(4, 9, 23, 0.96));

  box-shadow:
    0 30px 90px rgba(0,0,0,.42),
    inset 0 1px 0 rgba(255,255,255,.04);

  backdrop-filter: blur(18px);

  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(.985);

  transition:
    opacity 260ms ease,
    transform 260ms ease,
    visibility 260ms ease;
}

.destination-card.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.card-eyebrow {
  margin-bottom: 9px;
  color: #b984ff;
  font-size: 11px;
  letter-spacing: .31em;
  font-weight: 700;
}

.destination-name {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 38px;
  line-height: 1.05;
}

.destination-english {
  margin-top: 5px;
  color: rgba(255,255,255,.38);
  font-size: 11px;
  letter-spacing: .22em;
  font-weight: 700;
}

.city-visual {
  position: relative;
  height: 128px;
  margin: 17px 0 15px;
  overflow: hidden;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,.09);
  background:
    linear-gradient(180deg, #775b8e 0%, #d19f96 45%, #372f46 46%, #131728 100%);
}

.city-visual.city-beijing {
  background:
    linear-gradient(180deg, #6a638b 0%, #dd9e91 44%, #423243 45%, #10172a 100%);
}

.city-visual.city-kualalumpur {
  background:
    linear-gradient(180deg, #392e67 0%, #b06684 42%, #1b243c 43%, #09111f 100%);
}

.city-visual.city-chongqing {
  background:
    linear-gradient(180deg, #283a67 0%, #d47d79 43%, #24314b 44%, #0a101f 100%);
}

.city-visual-sun {
  position: absolute;
  top: 25px;
  right: 42px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 213, 170, .77);
  filter: blur(.4px);
  box-shadow: 0 0 44px rgba(255, 190, 157, .45);
}

.city-visual-skyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 69px;
  opacity: .88;
  background:
    linear-gradient(90deg,
      transparent 0 4%,
      #101425 4% 10%,
      transparent 10% 13%,
      #121628 13% 20%,
      transparent 20% 23%,
      #0c1121 23% 27%,
      transparent 27% 32%,
      #101525 32% 39%,
      transparent 39% 43%,
      #111629 43% 46%,
      transparent 46% 51%,
      #0a1020 51% 59%,
      transparent 59% 64%,
      #0d1324 64% 72%,
      transparent 72% 77%,
      #111728 77% 85%,
      transparent 85% 89%,
      #0c1222 89% 97%,
      transparent 97%);
  clip-path: polygon(
    0 64%, 5% 64%, 5% 38%, 10% 38%, 10% 58%,
    17% 58%, 17% 21%, 23% 21%, 23% 55%, 30% 55%,
    30% 44%, 35% 44%, 35% 69%, 42% 69%, 42% 28%,
    47% 28%, 47% 50%, 54% 50%, 54% 12%, 60% 12%,
    60% 61%, 67% 61%, 67% 34%, 74% 34%, 74% 57%,
    81% 57%, 81% 26%, 87% 26%, 87% 62%, 94% 62%,
    94% 44%, 100% 44%, 100% 100%, 0 100%
  );
}

.city-visual-glow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30px;
  background:
    radial-gradient(circle at 20% 60%, #ffcf8d 0 1px, transparent 2px),
    radial-gradient(circle at 42% 40%, #f7b892 0 1px, transparent 2px),
    radial-gradient(circle at 67% 58%, #e0b17b 0 1px, transparent 2px),
    radial-gradient(circle at 82% 35%, #f8c78e 0 1px, transparent 2px);
  background-size: 30px 17px, 37px 20px, 41px 18px, 34px 19px;
  opacity: .9;
}

.destination-description {
  margin: 14px 0 20px;
  color: rgba(255,255,255,.72);
  font-size: 14px;
  line-height: 1.65;
}

.details-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 41px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, #9257ff, #ae60ff);
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 28px rgba(135, 76, 237, .26);
}

.card-footer {
  margin-top: 21px;
  color: rgba(255,255,255,.33);
  font-size: 10px;
}

.progress-track {
  height: 2px;
  margin-top: 8px;
  overflow: hidden;
  background: rgba(255,255,255,.10);
}

.progress-bar {
  width: 100%;
  height: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #8157ff, #d193ff);
}

/* ROUTE TIMELINE */
.route-timeline {
  position: absolute;
  left: clamp(28px, 4vw, 70px);
  bottom: 26px;
  z-index: 10;
  width: min(520px, 45vw);
  pointer-events: none;
}

.route-timeline-title {
  margin-bottom: 16px;
  color: #a879ff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .28em;
}

.route-timeline-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.route-timeline-line {
  position: absolute;
  top: 6px;
  left: 7px;
  right: 7px;
  height: 1px;
  background: linear-gradient(90deg, rgba(174,121,255,.68), rgba(174,121,255,.25), rgba(255,255,255,.11));
}

.timeline-stop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  color: rgba(255,255,255,.52);
}

.timeline-stop i {
  width: 13px;
  height: 13px;
  margin-bottom: 8px;
  border-radius: 50%;
  border: 1px solid rgba(201,185,236,.42);
  background: #050916;
  box-shadow: 0 0 0 2px rgba(9, 13, 28, .6);
}

.timeline-stop.active i,
.timeline-stop.visited i {
  border-color: #b88cff;
  background: #8c5cff;
  box-shadow:
    0 0 0 3px rgba(139, 93, 255, .13),
    0 0 16px rgba(164, 105, 255, .52);
}

.timeline-stop strong {
  color: rgba(255,255,255,.80);
  font-size: 12px;
}

.timeline-stop small {
  color: rgba(212,203,232,.38);
  font-size: 8px;
  letter-spacing: .12em;
}

.signature {
  position: absolute;
  right: 54px;
  bottom: 30px;
  z-index: 8;
  color: rgba(171,111,255,.49);
  font-family: Georgia, serif;
  font-size: 13px;
  line-height: 1.55;
  font-style: italic;
  letter-spacing: .08em;
  text-align: right;
  transform: rotate(-4deg);
  pointer-events: none;
}

.brand {
  display: none;
}

/* MOBILE */


/* =========================================================
   SHORT DESKTOP / BROWSER ZOOM
   Keep the destination card fully visible below the navbar.
   ========================================================= */

@media (min-width: 761px) and (max-height: 760px) {

  .destination-card {
    width: min(338px, calc(100vw - 32px));
    padding: 20px;
  }

  .destination-name {
    font-size: 32px;
  }

  .city-visual {
    height: 96px;
    margin: 12px 0 11px;
  }

  .destination-description {
    margin: 10px 0 14px;
    font-size: 13px;
    line-height: 1.55;
  }

  .details-button {
    height: 37px;
    padding: 0 17px;
    font-size: 13px;
  }

  .card-footer {
    margin-top: 14px;
  }

}


@media (min-width: 761px) and (max-height: 620px) {

  .destination-card {
    width: min(320px, calc(100vw - 28px));
    padding: 16px;
  }

  .card-eyebrow {
    margin-bottom: 6px;
    font-size: 9px;
  }

  .destination-name {
    font-size: 28px;
  }

  .destination-english {
    font-size: 9px;
  }

  .city-visual {
    height: 78px;
    margin: 9px 0;
  }

  .destination-description {
    margin: 8px 0 11px;
    font-size: 12px;
    line-height: 1.45;
  }

  .details-button {
    height: 34px;
    padding: 0 15px;
    font-size: 12px;
  }

  .card-footer {
    margin-top: 10px;
    font-size: 9px;
  }

}

@media (max-width: 760px) {
  body {
    overflow: hidden;
  }

  .travel-page {
    min-height: 100dvh;
    height: 100dvh;
  }

  .hero-copy {
    top: 124px;
    left: 24px;
  }

  .hero-cn {
    width: 200px;
    font-size: 15px;
    line-height: 1.75;
    letter-spacing: .20em;
  }

  .hero-en {
    width: 180px;
    margin-top: 6px;
    font-size: 7px;
    line-height: 1.7;
    letter-spacing: .30em;
  }

  .butterfly {
    width: 48px;
    height: 37px;
  }

  .destination-card {
    left: 14px !important;
    right: 14px;
    bottom: 18px;
    top: auto !important;

    width: auto;
    max-height: min(57dvh, 530px);
    padding: 20px 20px 17px;

    border-radius: 19px;
    overflow: auto;

    background:
      linear-gradient(180deg, rgba(7,14,31,.94), rgba(4,9,22,.985));

    box-shadow:
      0 -12px 70px rgba(0,0,0,.28),
      0 22px 70px rgba(0,0,0,.46);
  }

  .destination-card.show {
    transform: translateY(0);
  }

  .destination-name {
    font-size: 34px;
  }

  .city-visual {
    height: 118px;
    margin: 14px 0;
  }

  .destination-description {
    margin: 12px 0 16px;
    font-size: 13px;
  }

  .details-button {
    height: 40px;
  }

  .card-footer {
    margin-top: 17px;
  }

  .route-timeline {
    left: 22px;
    right: 22px;
    bottom: 30px;
    width: auto;
    transition: opacity 180ms ease, transform 180ms ease;
  }

  body.card-visible .route-timeline {
    opacity: 0;
    transform: translateY(12px);
  }

  .route-timeline-title {
    margin-bottom: 14px;
  }

  .timeline-stop {
    align-items: flex-start;
  }

  .timeline-stop strong {
    font-size: 10px;
  }

  .timeline-stop small {
    max-width: 72px;
    font-size: 6px;
    line-height: 1.35;
  }

  .signature {
    right: auto;
    left: 25px;
    bottom: 30px;
    font-size: 11px;
    text-align: left;
  }

  body:not(.final-world) .signature {
    display: none;
  }
}

@media (max-width: 420px) {
.hero-copy {
    left: 20px;
    top: 116px;
  }

  .destination-card {
    left: 11px !important;
    right: 11px;
    bottom: 10px;
    padding: 18px 18px 15px;
    max-height: 58dvh;
  }

  .city-visual {
    height: 105px;
  }

  .route-timeline {
    left: 18px;
    right: 18px;
  }
}
