/* ========================================
   婚姻测试 - 中国风落地页样式
   ======================================== */

/* Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700;900&family=Noto+Sans+SC:wght@300;400;500;700&display=swap");

/* CSS Variables */
:root {
  --red-primary: #ba1a31;
  --red-dark: #8b0a1e;
  --red-light: #d4344a;
  --red-bg: #c41e35;
  --gold: #ffd700;
  --gold-dark: #daa520;
  --cream: #fef8ec;
  --cream-dark: #f5ecd7;
  --text-dark: #333;
  --text-red: #ba1a31;
  --text-gray: #999;
  --shadow: rgba(0, 0, 0, 0.15);
  --font-serif: "Noto Serif SC", "STSong", "SimSun", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: #f5f0e8;
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* App Container - Mobile First */
.app {
  max-width: 450px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: url('assets/hero-bg.jpg') top center / cover no-repeat;
  background-color: var(--red-bg);
  overflow: hidden;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  position: relative;
  width: 100%;
  padding-top: 30px;
  text-align: center;
  background: transparent;
  overflow: hidden;
}

/* Decorative lanterns & clouds via CSS */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(
      ellipse at 20% 10%,
      rgba(255, 215, 0, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 10%,
      rgba(255, 215, 0, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 50% 30%,
      rgba(255, 255, 255, 0.08) 0%,
      transparent 60%
    );
  pointer-events: none;
}

/* Floating particles */
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(2px 2px at 10% 20%, rgba(255, 215, 0, 0.6), transparent),
    radial-gradient(2px 2px at 30% 40%, rgba(255, 215, 0, 0.4), transparent),
    radial-gradient(2px 2px at 50% 15%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(2px 2px at 70% 35%, rgba(255, 215, 0, 0.5), transparent),
    radial-gradient(2px 2px at 90% 25%, rgba(255, 215, 0, 0.3), transparent),
    radial-gradient(
      1.5px 1.5px at 15% 50%,
      rgba(255, 215, 0, 0.4),
      transparent
    ),
    radial-gradient(1.5px 1.5px at 85% 55%, rgba(255, 215, 0, 0.4), transparent);
  animation: sparkle 4s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes sparkle {
  0% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}


/* Title */
.hero-title {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow:
    2px 2px 4px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 215, 0, 0.3);
  letter-spacing: 8px;
  margin-bottom: 15px;
  position: relative;
  z-index: 3;
}

/* Couple Image */
.hero-couple {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 0 20px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.hero-couple img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

/* CSS fallback couple illustration */
.couple-fallback {
  font-size: 120px;
  line-height: 1;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

/* ========================================
   FORM SECTION
   ======================================== */
.form-section {
  padding: 0 20px 20px;
  position: relative;
  z-index: 5;
  margin-top: -20px;
}

.form-card {
  background: var(--cream);
  border-radius: 20px;
  padding: 30px 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  position: relative;
}

.form-card::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    135deg,
    var(--gold) 0%,
    transparent 30%,
    transparent 70%,
    var(--gold) 100%
  );
  border-radius: 22px;
  z-index: -1;
  opacity: 0.3;
}

/* Form Groups */
.form-group {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e8dcc8;
  padding-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.form-label {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dark);
  min-width: 110px;
  flex-shrink: 0;
}

.form-label .required {
  color: var(--red-primary);
}

.form-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  color: var(--text-dark);
  font-family: var(--font-sans);
  outline: none;
}

.form-input::placeholder {
  color: #c0b8a8;
}

/* Gender toggle */
.gender-toggle {
  display: flex;
  gap: 12px;
}

.gender-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #d4c9b5;
  background: white;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gender-btn.active {
  background: var(--red-primary);
  border-color: var(--red-primary);
  color: white;
  box-shadow: 0 3px 10px rgba(186, 26, 49, 0.3);
}

.gender-btn:not(.active):hover {
  border-color: var(--red-primary);
  color: var(--red-primary);
}

/* Date picker trigger */
.date-trigger {
  flex: 1;
  font-size: 0.95rem;
  color: #c0b8a8;
  cursor: pointer;
  padding: 4px 0;
  user-select: none;
}

.date-trigger.has-value {
  color: var(--text-dark);
}

/* ========================================
   HINT TEXT
   ======================================== */
.hint-text {
  text-align: center;
  color: var(--gold);
  font-size: 0.82rem;
  margin-top: 16px;
  padding: 0 20px;
}

/* ========================================
   CTA BUTTON (Ribbon Style)
   ======================================== */
.cta-section {
  padding: 20px 15px 10px;
  text-align: center;
}

.cta-btn {
  position: relative;
  display: inline-block;
  width: 90%;
  max-width: 340px;
  padding: 18px 40px;
  background: linear-gradient(180deg, #e8392f 0%, #c41e35 50%, #a01528 100%);
  border: 2px solid var(--gold);
  border-radius: 12px;
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 6px;
  cursor: pointer;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -2px 0 rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  overflow: visible;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

.cta-btn:active {
  transform: translateY(0);
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* Ribbon wings */
.cta-btn::before,
.cta-btn::after {
  content: "❖";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--gold);
  opacity: 0.8;
}

.cta-btn::before {
  left: 12px;
}

.cta-btn::after {
  right: 12px;
}

/* ========================================
   AGREEMENT
   ======================================== */
.agreement {
  text-align: center;
  padding: 14px 20px;
  font-size: 0.82rem;
  color: #666;
}

.agreement label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.agreement input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--red-primary);
  cursor: pointer;
}

.agreement a {
  color: var(--red-primary);
  text-decoration: none;
  font-weight: 500;
}

.agreement a:hover {
  text-decoration: underline;
}

/* ========================================
   ORDER BUTTON
   ======================================== */
.order-btn-wrap {
  text-align: center;
  padding: 5px 20px 30px;
}

.order-btn {
  display: inline-block;
  padding: 10px 36px;
  border: 2px solid var(--gold);
  border-radius: 25px;
  background: transparent;
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.3s ease;
  letter-spacing: 2px;
}

.order-btn:hover {
  background: rgba(255, 215, 0, 0.15);
  transform: translateY(-1px);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: rgba(0, 0, 0, 0.2);
  padding: 24px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  line-height: 1.8;
}

.footer-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
}

.footer .company {
  font-weight: 700;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 6px;
}

.footer-disclaimer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 215, 0, 0.8);
  font-weight: 500;
  font-size: 0.82rem;
}

/* ========================================
   FLOATING BUTTONS (Customer Service, Complaint)
   ======================================== */
.float-btns {
  position: fixed;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.float-btn {
  width: 50px;
  padding: 8px 4px;
  border-radius: 10px;
  border: none;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
  font-family: var(--font-sans);
}

.float-btn:hover {
  transform: scale(1.05);
}

.float-btn-icon {
  font-size: 1.2rem;
}

.float-btn.service {
  background: linear-gradient(180deg, #ffb800, #ff9500);
  color: white;
}

.float-btn.complaint {
  background: linear-gradient(180deg, #ff6b6b, #ee4444);
  color: white;
}

/* ========================================
   DATE PICKER MODAL
   ======================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.date-picker {
  background: white;
  width: 100%;
  max-width: 450px;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #eee;
}

.picker-cancel,
.picker-confirm {
  font-size: 0.95rem;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-sans);
  padding: 4px 8px;
}

.picker-cancel {
  color: var(--text-gray);
}

.picker-confirm {
  color: var(--red-primary);
  font-weight: 700;
}

/* Calendar tabs */
.picker-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 0 20px;
  margin-top: 10px;
}

.picker-tab {
  padding: 8px 24px;
  font-size: 0.9rem;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
  color: var(--text-gray);
}

.picker-tab:first-child {
  border-radius: 6px 0 0 6px;
}

.picker-tab:last-child {
  border-radius: 0 6px 6px 0;
}

.picker-tab.active {
  background: var(--red-primary);
  border-color: var(--red-primary);
  color: white;
}

/* Wheel columns */
.picker-wheels {
  display: flex;
  padding: 20px 10px;
  gap: 0;
  height: 220px;
  overflow: hidden;
}

.picker-column {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  text-align: center;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.picker-column::-webkit-scrollbar {
  display: none;
}

.picker-item {
  height: 44px;
  line-height: 44px;
  font-size: 1rem;
  color: #ccc;
  scroll-snap-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.picker-item.selected {
  color: var(--text-dark);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Selection highlight bar */
.picker-wheels-wrapper {
  position: relative;
}

.picker-highlight {
  position: absolute;
  top: 50%;
  left: 10px;
  right: 10px;
  height: 44px;
  transform: translateY(-50%);
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
  pointer-events: none;
  z-index: 1;
}

/* ========================================
   ORDER QUERY MODAL
   ======================================== */
.order-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.order-modal.active {
  display: flex;
}

.order-modal-content {
  background: white;
  width: 85%;
  max-width: 360px;
  border-radius: 16px;
  padding: 30px 24px;
  animation: popIn 0.3s ease;
  position: relative;
}

@keyframes popIn {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.order-modal-title {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.order-modal-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.2s;
}

.order-modal-input:focus {
  border-color: var(--red-primary);
}

.order-modal-btn {
  width: 100%;
  padding: 12px;
  background: var(--red-primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.2s;
}

.order-modal-btn:hover {
  background: var(--red-dark);
}

.order-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

/* ========================================
   TOAST / ALERT
   ======================================== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  z-index: 9999;
  animation: fadeInOut 2s ease forwards;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* ========================================
   PRIVACY MODAL
   ======================================== */
.privacy-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.privacy-modal.active {
  display: flex;
}

.privacy-modal-content {
  background: white;
  width: 90%;
  max-width: 380px;
  max-height: 70vh;
  border-radius: 16px;
  overflow: hidden;
  animation: popIn 0.3s ease;
}

.privacy-modal-header {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 1.05rem;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.privacy-modal-body {
  padding: 20px;
  font-size: 0.85rem;
  line-height: 1.8;
  color: #555;
  overflow-y: auto;
  max-height: calc(70vh - 110px);
}

.privacy-modal-footer {
  padding: 12px 20px;
  text-align: center;
  border-top: 1px solid #eee;
}

.privacy-modal-footer button {
  padding: 8px 32px;
  background: var(--red-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: var(--font-sans);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 450px) {
  .app {
    max-width: 100%;
  }
}

@media (min-width: 451px) {
  body {
    display: flex;
    justify-content: center;
    background: linear-gradient(135deg, #2d0a0a 0%, #4a1020 50%, #2d0a0a 100%);
  }

  .app {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  }

  .float-btns {
    right: calc(50% - 225px + 10px);
  }
}
