/* French Romance & Provence Chateau Theme Stylesheet - Bright Ivory & Champagne Luxe */
@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&family=Cinzel:wght@400;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Noto+Serif+SC:wght@300;400;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  /* French Provence & Bright Champagne Palette */
  --french-bg: #F8F5EE;
  --french-bg-card: #FFFFFF;
  --french-bg-subtle: #FAF6EF;
  --french-bg-accent: #F5EDE0;

  --french-text-main: #241F1C;
  --french-text-secondary: #584F49;
  --french-text-muted: #887E76;
  --french-text-gold: #987236;

  --french-gold: #B68D4C;
  --french-gold-dark: #8C6529;
  --french-gold-light: #EFE4D2;
  --french-gold-glow: rgba(182, 141, 76, 0.25);

  --french-rose-soft: #F4E7E3;
  --french-wax: #982229;
  --french-wax-glow: rgba(152, 34, 41, 0.45);

  --french-border: #E8DFD3;
  --french-border-gold: rgba(182, 141, 76, 0.45);

  /* Typography */
  --font-serif-title: "Cinzel", "Playfair Display", Georgia, serif;
  --font-serif-en: "Cormorant Garamond", Georgia, serif;
  --font-script: "Alex Brush", cursive;
  --font-serif-cn: "Noto Serif SC", "Songti SC", "SimSun", serif;

  /* Shadows */
  --shadow-gate: 0 30px 80px rgba(60, 45, 30, 0.25), 0 10px 30px rgba(60, 45, 30, 0.15);
  --shadow-card: 0 12px 35px rgba(60, 45, 30, 0.07);
  --shadow-photo: 0 14px 40px rgba(45, 35, 25, 0.12);
  --shadow-wax: 0 10px 25px rgba(152, 34, 41, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.45);

  /* Viewport Safe Areas */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  background-color: var(--french-bg);
  scroll-behavior: smooth;
}

body.french-chateau-theme {
  background-color: var(--french-bg);
  color: var(--french-text-main);
  font-family: var(--font-serif-cn);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: 
    radial-gradient(circle at 10% 10%, #FFFDF9 0%, transparent 40%),
    radial-gradient(circle at 90% 40%, rgba(245, 237, 224, 0.7) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(244, 231, 227, 0.5) 0%, transparent 50%),
    linear-gradient(180deg, #F8F5EE 0%, #FAF7F0 50%, #F5F1E8 100%);
  background-attachment: fixed;
}

body.french-locked {
  overflow: hidden !important;
  height: 100vh !important;
  touch-action: none;
}

/* Interactive Canvas for Rose Petal Physics */
#petalCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* ===================================================
   00. 3D FRENCH CHATEAU DOUBLE DOORS (法式双开大门启幕)
   =================================================== */
.chateau-gate-overlay {
  position: fixed;
  inset: 0;
  background-color: #F4EFE6;
  background-image: radial-gradient(circle at center, #FAF7F0 0%, #EFE8DA 100%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), visibility 1s ease;
  perspective: 1400px;
}

.chateau-gate-overlay.opened {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.chateau-gate-header {
  text-align: center;
  margin-bottom: 36px;
  position: relative;
  z-index: 5;
}

.gate-script-title {
  font-family: var(--font-script);
  font-size: clamp(2.8rem, 8vw, 3.4rem);
  color: var(--french-gold);
  line-height: 1;
  text-shadow: 0 2px 12px rgba(182, 141, 76, 0.2);
}

/* 3D Gate Doors Container */
.chateau-gate-frame {
  position: relative;
  width: 90vw;
  max-width: 350px;
  height: 250px;
  background: #FFF;
  border-radius: 8px;
  box-shadow: var(--shadow-gate);
  display: flex;
  transform-style: preserve-3d;
  cursor: pointer;
}

/* Inner Chateau Invitation Preview */
.chateau-gate-interior {
  position: absolute;
  inset: 0;
  background: #FFFDF9;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px;
  z-index: 1;
}

.interior-script {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--french-gold);
  line-height: 1;
}

.interior-names {
  font-size: clamp(1.1rem, 4.5vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--french-text-main);
  margin: 6px 0;
  white-space: nowrap;
}

.interior-date {
  font-family: var(--font-serif-title);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--french-gold-dark);
}

/* Left & Right 3D French Doors */
.gate-door-left, .gate-door-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: linear-gradient(135deg, #FAF6EE 0%, #F0E6D4 100%);
  border: 1px solid var(--french-border);
  box-shadow: inset 0 0 15px rgba(182, 141, 76, 0.1);
  transition: transform 1.1s cubic-bezier(0.4, 0, 0.1, 1);
  transform-style: preserve-3d;
  z-index: 4;
}

.gate-door-left {
  left: 0;
  border-radius: 8px 0 0 8px;
  border-right: 1px dashed rgba(182, 141, 76, 0.35);
  transform-origin: left center;
}

.gate-door-right {
  right: 0;
  border-radius: 0 8px 8px 0;
  border-left: 1px dashed rgba(182, 141, 76, 0.35);
  transform-origin: right center;
}

/* Inner Rococo Molding inside Doors */
.gate-door-left::before, .gate-door-right::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(182, 141, 76, 0.35);
  border-radius: 4px;
}

/* Open Doors Animation */
.chateau-gate-frame.opening .gate-door-left {
  transform: rotateY(-110deg);
}

.chateau-gate-frame.opening .gate-door-right {
  transform: rotateY(110deg);
}

/* 3D Wax Seal in Center */
.chateau-wax-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #BA2C33 0%, var(--french-wax) 60%, #6E1217 100%);
  box-shadow: var(--shadow-wax);
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #FFF2F4;
  font-family: var(--font-serif-cn);
  font-size: 1.55rem;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 235, 205, 0.8);
  transition: transform 0.4s ease, opacity 0.4s ease;
  animation: waxBreathing 2.6s infinite ease-in-out;
}

.chateau-gate-frame.opening .chateau-wax-seal {
  transform: translate(-50%, -50%) scale(1.2);
  opacity: 0;
}

@keyframes waxBreathing {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.06); }
}

.chateau-wax-seal::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.45);
}

.chateau-gate-hint {
  margin-top: 34px;
  font-size: 0.88rem;
  letter-spacing: 0.25em;
  color: var(--french-text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: floatHint 2.4s infinite ease-in-out;
}

@keyframes floatHint {
  0%, 100% { transform: translateY(0); opacity: 0.75; }
  50% { transform: translateY(4px); opacity: 1; }
}

/* ===================================================
   TOP NAVIGATION CONTROLS (切换风格 / 音乐开关)
   =================================================== */
.french-nav-bar {
  position: fixed;
  top: calc(var(--sat) + 14px);
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  pointer-events: none;
}

.french-nav-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--french-gold-light);
  padding: 7px 16px;
  border-radius: 30px;
  font-size: 0.78rem;
  font-family: var(--font-serif-cn);
  font-weight: 600;
  color: var(--french-text-main);
  letter-spacing: 0.1em;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(60, 45, 30, 0.08);
  transition: all 0.25s ease;
  cursor: pointer;
}

.french-nav-btn:active {
  transform: scale(0.96);
  background: #FFF;
}

.french-nav-btn .music-note {
  color: var(--french-gold-dark);
  font-size: 0.9rem;
}

.french-nav-btn.playing .music-note {
  animation: noteRotate 2.5s infinite ease-in-out;
}

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

/* ===================================================
   MAIN CONTENT SCROLL CONTAINER
   =================================================== */
.french-main-container {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: calc(var(--sat) + 60px) 18px calc(var(--sab) + 40px);
  display: flex;
  flex-direction: column;
  gap: 36px;
  position: relative;
  z-index: 10;
}

/* Luxury French Card Container */
.french-paper-card {
  background: var(--french-bg-card);
  border-radius: 8px;
  border: 1px solid var(--french-border);
  padding: 38px 22px;
  box-shadow: var(--shadow-card);
  position: relative;
  text-align: center;
}

.french-paper-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--french-border-gold);
  border-radius: 5px;
  pointer-events: none;
}

/* 01. HERO CARD */
.hero-script-lead {
  font-family: var(--font-script);
  font-size: 2.9rem;
  color: var(--french-gold);
  line-height: 1.1;
  margin-bottom: 6px;
}

.hero-subtitle-en {
  font-family: var(--font-serif-title);
  font-size: 0.76rem;
  letter-spacing: 0.35em;
  color: var(--french-gold-dark);
  margin-bottom: 22px;
  font-weight: 600;
  text-transform: uppercase;
}

.hero-names-primary {
  font-size: clamp(1.5rem, 6.5vw, 2.35rem);
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--french-text-main);
  margin-bottom: 8px;
  white-space: nowrap;
}

.hero-names-secondary {
  font-family: var(--font-serif-en);
  font-size: clamp(0.78rem, 3.5vw, 0.95rem);
  letter-spacing: 0.2em;
  color: var(--french-gold-dark);
  margin-bottom: 22px;
  font-weight: 600;
  white-space: nowrap;
}

.french-gold-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 16px auto 22px;
  color: var(--french-gold);
}

.french-gold-divider::before, .french-gold-divider::after {
  content: "";
  width: 45px;
  height: 1px;
  background: var(--french-gold-light);
}

.hero-poem-text {
  font-size: 0.95rem;
  line-height: 2.1;
  color: var(--french-text-secondary);
  letter-spacing: 0.12em;
}

/* ===================================================
   02. VINTAGE FRENCH CALENDAR & COUNTDOWN (手撕日历与倒计时)
   =================================================== */
.calendar-card {
  padding: 32px 18px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF7F0 100%);
}

.calendar-arch-window {
  width: 100%;
  max-width: 320px;
  margin: 0 auto 24px;
  background: #FFF;
  border: 1px solid var(--french-gold-light);
  border-radius: 120px 120px 8px 8px;
  padding: 28px 16px 20px;
  box-shadow: 0 6px 20px rgba(60, 45, 30, 0.05);
  position: relative;
}

.calendar-arch-window::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(182, 141, 76, 0.3);
  border-radius: 114px 114px 4px 4px;
  pointer-events: none;
}

.calendar-year {
  font-family: var(--font-serif-title);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--french-gold-dark);
}

.calendar-big-date {
  font-family: var(--font-serif-title);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--french-text-main);
  line-height: 1.1;
  margin: 4px 0;
}

.calendar-lunar {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--french-text-secondary);
}

/* 4 Countdown Blocks */
.french-countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.french-countdown-box {
  background: #FFF;
  border: 1px solid var(--french-border);
  border-radius: 6px;
  padding: 12px 2px;
  box-shadow: 0 4px 14px rgba(60, 45, 30, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.french-countdown-num {
  font-family: var(--font-serif-title);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--french-gold-dark);
  line-height: 1.1;
}

.french-countdown-unit {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--french-text-muted);
  margin-top: 3px;
  font-weight: 600;
}

/* ===================================================
   03. HAUTE COUTURE PHOTO SHOWCASES (画报画廊)
   =================================================== */
.chateau-gallery-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.chateau-showcase-card {
  background: #FFF;
  border-radius: 8px;
  border: 1px solid var(--french-border);
  padding: 16px 14px 22px;
  box-shadow: var(--shadow-photo);
  position: relative;
}

.chateau-showcase-header {
  text-align: center;
  margin-bottom: 12px;
}

.showcase-tag {
  font-family: var(--font-serif-title);
  font-size: 0.74rem;
  letter-spacing: 0.3em;
  color: var(--french-gold-dark);
  font-weight: 600;
}

.showcase-title {
  font-size: 1.35rem;
  letter-spacing: 0.2em;
  color: var(--french-text-main);
  font-weight: 600;
  margin-top: 2px;
}

/* Photo Frame Container */
.showcase-photo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(60, 45, 30, 0.1);
  border: 1px solid var(--french-gold-light);
  cursor: pointer;
}

.showcase-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.8s ease, transform 6s ease;
}

.showcase-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 10px;
}

.showcase-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--french-border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.showcase-dot.active {
  background: var(--french-gold);
  transform: scale(1.3);
}

.showcase-quote {
  text-align: center;
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  color: var(--french-text-secondary);
  line-height: 1.8;
  padding: 4px 10px;
}

.showcase-swipe-hint {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--french-text-muted);
  text-align: center;
  margin-top: 4px;
}

/* ===================================================
   04. PROVENCE BOTANICAL ITINERARY (婚礼当日流程)
   =================================================== */
.itinerary-card {
  text-align: center;
}

.itinerary-track {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 26px;
  position: relative;
  padding-left: 28px;
  text-align: left;
}

.itinerary-track::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 8px;
  width: 1.5px;
  background: linear-gradient(180deg, var(--french-gold), var(--french-gold-light));
}

.itinerary-node {
  position: relative;
}

.itinerary-node::before {
  content: "✦";
  position: absolute;
  left: -28px;
  top: 2px;
  width: 18px;
  height: 18px;
  color: var(--french-gold);
  font-size: 0.9rem;
}

.itinerary-time {
  font-family: var(--font-serif-title);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--french-gold-dark);
  letter-spacing: 0.1em;
}

.itinerary-name {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--french-text-main);
  margin-top: 2px;
}

.itinerary-desc {
  font-size: 0.82rem;
  color: var(--french-text-secondary);
  margin-top: 2px;
  line-height: 1.6;
}

/* ===================================================
   05. LOCATION & RECEPTION (盛宴席设与地图)
   =================================================== */
.location-card {
  text-align: center;
}

.location-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 24px 0 28px;
}

.location-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.location-label {
  font-size: 0.76rem;
  letter-spacing: 0.25em;
  color: var(--french-gold-dark);
  font-weight: 600;
}

.location-value {
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: var(--french-text-main);
  font-weight: 600;
}

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

.location-btn-group {
  display: flex;
  gap: 12px;
  width: 100%;
}

.btn-french {
  flex: 1;
  padding: 13px 10px;
  border-radius: 4px;
  font-size: 0.88rem;
  letter-spacing: 0.15em;
  font-family: var(--font-serif-cn);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-french-primary {
  background: var(--french-gold-dark);
  color: #FFF;
  border: 1px solid var(--french-gold-dark);
  box-shadow: 0 4px 16px var(--french-gold-glow);
}

.btn-french-secondary {
  background: #FFF;
  color: var(--french-text-main);
  border: 1px solid var(--french-border);
}

.btn-french:active {
  transform: scale(0.97);
}

/* ===================================================
   06. CLOSING & WISHES (尾声)
   =================================================== */
.chateau-footer {
  text-align: center;
  padding: 20px 10px 40px;
}

.footer-script-lead {
  font-family: var(--font-script);
  font-size: 3rem;
  color: var(--french-gold);
  line-height: 1;
  margin-bottom: 8px;
}

.footer-blessing-text {
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  color: var(--french-text-secondary);
  margin-bottom: 22px;
}

.footer-couple-sign {
  font-size: clamp(1.05rem, 4.5vw, 1.25rem);
  letter-spacing: 0.25em;
  color: var(--french-text-main);
  font-weight: 600;
  margin-bottom: 28px;
  white-space: nowrap;
}

.btn-scroll-top {
  background: transparent;
  border: 1px solid var(--french-border);
  color: var(--french-text-secondary);
  padding: 9px 26px;
  border-radius: 24px;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-scroll-top:active {
  background: var(--french-bg-subtle);
}

/* French Gold Toast */
.french-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(36, 31, 28, 0.95);
  color: #FFF;
  border: 1px solid var(--french-gold);
  padding: 13px 26px;
  border-radius: 4px;
  font-size: 0.88rem;
  letter-spacing: 0.15em;
  z-index: 100000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.french-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
