/* ==========================================================================
   29岁生日专属航班 - Flight of Love (HB-29)
   Palette:
   - Primary Dark: #0A1128, #0F1B3D, #162447
   - Warm Gold: #F2C46D, #D4A347, #FFE8B6
   - Photo Base: #FFF8EC, #FFFFFF
   - Accent Rose: #E85D75, #FF758F
   ========================================================================== */

:root {
  --bg-deep: #090e20;
  --bg-main: #0F1B3D;
  --bg-card: #152248;
  --bg-card-glass: rgba(22, 36, 71, 0.75);
  --gold: #F2C46D;
  --gold-light: #FFE8B6;
  --gold-glow: rgba(242, 196, 109, 0.35);
  --cream: #FFF8EC;
  --text-primary: #FFFFFF;
  --text-muted: #B5C0D8;
  --text-dim: #7B8BA6;
  --rose: #FF758F;
  --font-serif: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "STSong", "SimSun", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "Roboto Mono", "Courier New", monospace;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 25px rgba(242, 196, 109, 0.25);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  font-size: 15px;
  line-height: 1.6;
  scroll-behavior: smooth;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* 电脑端居中预览适配框 */
.viewport-wrapper {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: linear-gradient(180deg, #090E20 0%, #0F1B3D 35%, #141C3A 75%, #0B0F24 100%);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

/* 背景动态星空 */
.star-canvas {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.85;
}

/* ==========================================================================
   Screen 1: 口令门 (Passcode Gate)
   ========================================================================== */
#screen-passcode {
  position: fixed;
  inset: 0;
  z-index: 1000;
  max-width: 440px;
  margin: 0 auto;
  background: radial-gradient(circle at 50% 30%, #172856 0%, #090e20 80%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px 24px;
  transition: opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1), transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

#screen-passcode.hidden {
  opacity: 0;
  transform: scale(1.08);
  pointer-events: none;
}

.passcode-box {
  width: 100%;
  max-width: 320px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.passcode-flight-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(242, 196, 109, 0.12);
  border: 1px solid var(--gold-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: var(--shadow-glow);
  animation: floatPlane 3s ease-in-out infinite;
}

@keyframes floatPlane {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.passcode-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: 2px;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.passcode-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.pin-display {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: transparent;
  transition: all 0.25s ease;
}

.pin-dot.filled {
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
  transform: scale(1.15);
}

.passcode-shake {
  animation: shake 0.45s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

.passcode-hint {
  font-size: 0.85rem;
  color: var(--rose);
  min-height: 24px;
  margin-bottom: 16px;
  transition: opacity 0.3s;
}

/* 数字九宫格按键 */
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 270px;
  margin: 0 auto;
}

.keypad-btn {
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 1.4rem;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  backdrop-filter: blur(8px);
}

.keypad-btn:active {
  background: var(--gold-glow);
  border-color: var(--gold);
  transform: scale(0.92);
}

.keypad-btn.action {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Screen 2: 登机牌 (Boarding Pass)
   ========================================================================== */
#screen-boarding {
  position: fixed;
  inset: 0;
  z-index: 900;
  max-width: 440px;
  margin: 0 auto;
  background: radial-gradient(circle at 50% 20%, #192955 0%, #0A1128 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 20px;
  transition: transform 0.9s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.8s ease;
}

#screen-boarding.hidden {
  opacity: 0;
  transform: translateY(-100vh) scale(0.9);
  pointer-events: none;
}

.ticket-container {
  width: 100%;
  max-width: 360px;
  background: #FFFBF2;
  color: #1A243B;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
  animation: cardAppear 1s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardAppear {
  from { opacity: 0; transform: translateY(40px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 顶部航空公司装饰 */
.ticket-header {
  background: linear-gradient(135deg, #0F1B3D 0%, #1F3369 100%);
  color: #FFF;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--gold);
}

.airline-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.airline-logo {
  font-size: 22px;
}

.airline-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--gold-light);
}

.ticket-type-badge {
  font-size: 0.68rem;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(242, 196, 109, 0.2);
  color: var(--gold);
  border: 1px solid var(--gold-glow);
  font-weight: bold;
}

/* 登机牌主要内容 */
.ticket-body {
  padding: 22px 20px 18px;
}

.flight-route-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #D0D6E2;
}

.route-city {
  text-align: left;
}

.route-city.destination {
  text-align: right;
}

.city-code {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: #0F1B3D;
  line-height: 1.1;
}

.city-label {
  font-size: 0.78rem;
  color: #727D92;
  margin-top: 4px;
}

.route-plane-anim {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--gold);
  flex: 1;
  padding: 0 14px;
}

.flight-path-line {
  width: 100%;
  height: 2px;
  background: repeating-linear-gradient(to right, #D4A347 0, #D4A347 4px, transparent 4px, transparent 8px);
  position: relative;
}

.flight-path-plane {
  font-size: 18px;
  transform: rotate(90deg);
  animation: planePulse 2s infinite ease-in-out;
}

@keyframes planePulse {
  0%, 100% { transform: rotate(90deg) scale(1); }
  50% { transform: rotate(90deg) scale(1.2); }
}

/* 登机信息网格 */
.ticket-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  margin-bottom: 18px;
}

.info-item {
  display: flex;
  flex-direction: column;
}

.info-label {
  font-size: 0.7rem;
  color: #8C96A8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-val {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: #121A30;
  margin-top: 2px;
}

.info-val.highlight {
  color: #D4A347;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
}

/* 虚线分割与锯齿撕角 */
.ticket-divider {
  position: relative;
  height: 20px;
  margin: 0 -20px;
  display: flex;
  align-items: center;
}

.ticket-divider::before,
.ticket-divider::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0F1B3D; /* 镂空圆孔 */
}

.ticket-divider::before { left: -10px; }
.ticket-divider::after { right: -10px; }

.ticket-divider-line {
  width: 100%;
  height: 0;
  border-top: 1.5px dashed #C5CBD8;
}

/* 票尾条形码与大字29 */
.ticket-footer {
  padding: 16px 20px 20px;
  background: #F8F4EA;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.barcode-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.barcode-bars {
  height: 38px;
  width: 140px;
  background: repeating-linear-gradient(
    to right,
    #111 0px, #111 2px,
    transparent 2px, transparent 4px,
    #111 4px, #111 7px,
    transparent 7px, transparent 9px,
    #111 9px, #111 10px,
    transparent 10px, transparent 13px,
    #111 13px, #111 16px,
    transparent 16px, transparent 18px
  );
}

.barcode-number {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 2px;
  color: #6C778B;
}

.giant-29-badge {
  text-align: right;
}

.giant-29-badge span {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1;
  color: #0F1B3D;
  background: linear-gradient(135deg, #0F1B3D 30%, #D4A347 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.giant-29-label {
  font-size: 0.65rem;
  letter-spacing: 1px;
  color: #9AA4B8;
  font-weight: bold;
}

/* 登机主按钮 */
.btn-board {
  margin-top: 28px;
  width: 100%;
  max-width: 320px;
  padding: 16px 0;
  border-radius: 30px;
  background: linear-gradient(135deg, #F2C46D 0%, #E5B85C 100%);
  color: #0A1128;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 3px;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(242, 196, 109, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-board::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shineSweep 2.5s infinite;
}

@keyframes shineSweep {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.btn-board:active {
  transform: scale(0.96);
  box-shadow: 0 5px 15px rgba(242, 196, 109, 0.3);
}

/* ==========================================================================
   Screen 3: 顶部固定状态栏 (Sticky Top Bar)
   ========================================================================== */
.top-flight-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  height: 54px;
  background: rgba(10, 17, 40, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(242, 196, 109, 0.18);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  transition: opacity 0.4s ease;
}

.bar-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar-plane-badge {
  color: var(--gold);
  font-size: 15px;
  animation: planeJiggle 2s infinite ease-in-out;
}

@keyframes planeJiggle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.bar-progress-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.bar-progress-num {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--gold-light);
  font-size: 0.95rem;
}

.bar-center-station {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  color: var(--cream);
  letter-spacing: 1px;
}

.bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 彩蛋触发徽章 29 */
.bar-easter-29 {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--gold-glow);
  background: rgba(242, 196, 109, 0.15);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.bar-easter-29:active {
  transform: scale(1.25);
  background: var(--gold);
  color: #000;
}

/* 音乐开关 */
.bar-music-btn {
  background: transparent;
  border: none;
  color: var(--gold);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.bar-music-btn.playing {
  animation: rotateCD 4s linear infinite;
}

@keyframes rotateCD {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   航线总览与主流程 (Flight Journey Main)
   ========================================================================== */
#screen-journey {
  padding-top: 60px;
  padding-bottom: 80px;
  position: relative;
  z-index: 2;
}

/* 航线进度曲线条 (Mini Route Track) */
.flight-timeline-track {
  padding: 18px 16px 20px;
  margin: 0 16px 24px;
  background: var(--bg-card-glass);
  border: 1px solid rgba(242, 196, 109, 0.15);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.track-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.track-title {
  font-size: 0.82rem;
  color: var(--gold-light);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.track-total {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.route-stations-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.route-stations-row::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 6px;
  right: 6px;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  z-index: 1;
}

.route-progress-line {
  position: absolute;
  top: 10px;
  left: 6px;
  width: 12%;
  height: 2px;
  background: linear-gradient(90deg, #F2C46D, #FF758F);
  z-index: 2;
  transition: width 0.4s ease;
}

.route-node {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.route-node-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #111D3B;
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #fff;
  transition: all 0.3s;
}

.route-node.active .route-node-dot {
  background: var(--gold);
  border-color: #FFF;
  color: #0A1128;
  font-weight: bold;
  box-shadow: 0 0 10px var(--gold);
  transform: scale(1.15);
}

.route-node-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 6px;
  white-space: nowrap;
}

.route-node.active .route-node-label {
  color: var(--gold-light);
  font-weight: 500;
}

/* ==========================================================================
   站点卡片与照片展示 (Stations Section)
   ========================================================================== */
.station-section {
  margin: 0 16px 44px;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.station-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 站点头部标题 */
.station-header {
  margin-bottom: 16px;
  padding-left: 6px;
  position: relative;
}

.station-index-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  color: var(--gold);
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.station-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: #FFF;
  letter-spacing: 1px;
}

.station-quote {
  font-size: 0.88rem;
  color: var(--gold-light);
  font-family: var(--font-serif);
  margin-top: 6px;
  font-style: italic;
  line-height: 1.5;
}

.station-story {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}

/* 照片通用包裹器 */
.photo-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0E162D;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.photo-card:hover img {
  transform: scale(1.03);
}

.photo-badge-num {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 27, 61, 0.75);
  backdrop-filter: blur(6px);
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid rgba(242, 196, 109, 0.25);
  z-index: 2;
}

/* 3D 翻转彩蛋卡片 */
.flip-card-wrap {
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card-wrap.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  width: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-md);
}

.flip-card-back {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #1C2D5C 0%, #111D3B 100%);
  border: 1px solid var(--gold-glow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.flip-whisper-icon {
  font-size: 26px;
  margin-bottom: 12px;
  color: var(--gold);
}

.flip-whisper-text {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--cream);
  line-height: 1.7;
}

.flip-hint-btn {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.65);
  color: var(--gold-light);
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 14px;
  border: 1px solid var(--gold-glow);
  backdrop-filter: blur(4px);
  z-index: 3;
}

/* --------------------------------------------------------------------------
   展示方式 1: 单张大图 (Hero) - 深圳01, 重庆16, 新加坡17
   -------------------------------------------------------------------------- */
.layout-hero {
  border-radius: var(--radius-lg);
  border: 2px solid rgba(242, 196, 109, 0.2);
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.layout-hero.landscape {
  aspect-ratio: 16 / 10;
}

/* --------------------------------------------------------------------------
   展示方式 2: 横向滑动卡片 (Scroll Cards) - 武汉02-06
   -------------------------------------------------------------------------- */
.layout-scroll-cards {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 8px 4px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.layout-scroll-cards::-webkit-scrollbar {
  display: none;
}

.scroll-card-item {
  flex: 0 0 76%;
  scroll-snap-align: center;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  aspect-ratio: 3 / 4;
}

.scroll-card-item.landscape {
  aspect-ratio: 16 / 11;
}

/* --------------------------------------------------------------------------
   展示方式 3: 2x2 拼贴 (Grid Collage) - 南澳07-10
   -------------------------------------------------------------------------- */
.layout-grid-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.grid-collage-item {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --------------------------------------------------------------------------
   展示方式 4: 并排两张 (Duo) - 深圳11-12
   -------------------------------------------------------------------------- */
.layout-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.duo-item {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* --------------------------------------------------------------------------
   展示方式 5: 拍立得风格 (Polaroid) - 日本13-15
   -------------------------------------------------------------------------- */
.layout-polaroid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 10px 0 20px;
}

.polaroid-frame {
  width: 86%;
  background: #FFFDF8;
  padding: 12px 12px 36px 12px;
  border-radius: 4px;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.5);
  position: relative;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.polaroid-frame:nth-child(1) { transform: rotate(-3deg); }
.polaroid-frame:nth-child(2) { transform: rotate(2.5deg); }
.polaroid-frame:nth-child(3) { transform: rotate(-1.5deg); }

.polaroid-frame:hover {
  transform: rotate(0) scale(1.03) !important;
  z-index: 10;
}

.polaroid-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #111;
}

.polaroid-photo.portrait {
  aspect-ratio: 3 / 4;
}

.polaroid-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.polaroid-tape {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 65px;
  height: 20px;
  background: rgba(242, 196, 109, 0.45);
  border: 1px dashed rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(2px);
}

.polaroid-caption {
  position: absolute;
  bottom: 10px;
  left: 14px;
  font-family: var(--font-serif);
  font-size: 0.8rem;
  color: #4A4A4A;
  font-style: italic;
}

/* --------------------------------------------------------------------------
   展示方式 8: 马来西亚全屏高潮相册 (Climax Album) - 马来西亚18-29
   -------------------------------------------------------------------------- */
.layout-climax-album {
  position: relative;
  width: 100%;
  background: var(--bg-card-glass);
  border-radius: var(--radius-lg);
  border: 2px solid var(--gold);
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 30px var(--gold-glow);
}

.climax-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  aspect-ratio: 3 / 4;
  position: relative;
}

.climax-slider::-webkit-scrollbar {
  display: none;
}

.climax-slide-item {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  position: relative;
  cursor: pointer;
}

.climax-slide-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.climax-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 16px 14px;
  background: linear-gradient(to top, rgba(9, 14, 32, 0.95) 0%, transparent 100%);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.climax-counter {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: bold;
}

.climax-dots-container {
  display: flex;
  gap: 6px;
  align-items: center;
}

.climax-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s;
}

.climax-dot.active {
  width: 18px;
  border-radius: 4px;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.climax-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 27, 61, 0.7);
  color: var(--gold-light);
  border: 1px solid var(--gold-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.climax-nav-arrow.prev { left: 10px; }
.climax-nav-arrow.next { right: 10px; }

/* ==========================================================================
   Screen 4: 终点生日页与烟花 (Grand Finale)
   ========================================================================== */
#section-finale {
  margin: 60px 16px 20px;
  padding: 40px 20px 30px;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 50% 20%, #20356E 0%, #0F1B3D 70%, #0A1128 100%);
  border: 1.5px solid var(--gold);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.finale-cake-icon {
  font-size: 42px;
  margin-bottom: 14px;
  animation: floatPlane 3s ease-in-out infinite;
}

.finale-h1 {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.2;
  margin-bottom: 6px;
  text-shadow: 0 0 20px rgba(242, 196, 109, 0.5);
  letter-spacing: 1px;
}

.finale-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.finale-constellation {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  max-width: 300px;
  margin: 0 auto 28px;
}

.star-point {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: pulseStar 1.8s infinite ease-in-out;
}

@keyframes pulseStar {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.2); }
}

.confession-card {
  background: rgba(10, 17, 40, 0.6);
  border: 1px solid rgba(242, 196, 109, 0.25);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  margin-bottom: 26px;
  text-align: center;
}

.confession-main {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: #FFF;
  margin-bottom: 12px;
  line-height: 1.6;
}

.confession-blessing {
  font-size: 0.86rem;
  color: var(--gold-light);
  white-space: pre-line;
  line-height: 1.7;
}

.btn-fireworks {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #F2C46D 0%, #FF758F 100%);
  color: #0A1128;
  border: none;
  border-radius: 25px;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(242, 196, 109, 0.4);
  transition: transform 0.2s;
}

.btn-fireworks:active {
  transform: scale(0.95);
}

.bottom-easter-whisper {
  margin-top: 40px;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-serif);
  letter-spacing: 2px;
  text-align: center;
  opacity: 0.65;
}

/* 烟花全屏 Canvas 遮罩 */
#fireworks-canvas {
  position: fixed;
  inset: 0;
  max-width: 440px;
  margin: 0 auto;
  pointer-events: none;
  z-index: 999;
}

/* ==========================================================================
   全屏灯箱查看 (Fullscreen Lightbox)
   ========================================================================== */
#lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  max-width: 440px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-header {
  position: absolute;
  top: 16px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.lightbox-title {
  font-size: 0.85rem;
  color: var(--gold-light);
  font-family: var(--font-mono);
}

.lightbox-close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap {
  width: 100%;
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.8);
  transition: transform 0.2s ease;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav-btn.prev { left: 12px; }
.lightbox-nav-btn.next { right: 12px; }

/* ==========================================================================
   隐藏长信弹窗 (Hidden Letter Modal)
   ========================================================================== */
#letter-modal {
  position: fixed;
  inset: 0;
  z-index: 2500;
  max-width: 440px;
  margin: 0 auto;
  background: rgba(5, 10, 25, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#letter-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.letter-paper {
  background: #FFFDF8;
  color: #222;
  border-radius: 16px;
  padding: 28px 22px;
  max-height: 82vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  border: 1px solid #EAE2D3;
  animation: letterSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes letterSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.letter-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: #0F1B3D;
  margin-bottom: 18px;
  text-align: center;
  border-bottom: 1.5px solid #EAE2D3;
  padding-bottom: 12px;
}

.letter-p {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  line-height: 1.85;
  color: #3D3D3D;
  margin-bottom: 14px;
  text-indent: 2em;
}

.letter-sign {
  margin-top: 24px;
  text-align: right;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: #6C5535;
  font-weight: bold;
}

.letter-close-btn {
  margin-top: 20px;
  width: 100%;
  padding: 12px;
  background: #0F1B3D;
  color: var(--gold-light);
  border: none;
  border-radius: 20px;
  font-size: 0.92rem;
  font-weight: bold;
  cursor: pointer;
}
