/* ============================================================
   堪舆正氣堂（香港）— 新中式典雅风主题
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --deep-navy: #0A1628;
  --dark-green: #1B3A2E;
  --dark-green-light: #234b3a;
  --gold: #C9A961;
  --gold-light: #e0c97a;
  --gold-glow: rgba(201, 169, 97, 0.3);
  --white: #FFFFFF;
  --text-muted: #8899aa;
  --text-dim: #5a6b7d;
  --card-bg: rgba(27, 58, 46, 0.5);
  --card-border: rgba(201, 169, 97, 0.15);
  --card-hover-border: rgba(201, 169, 97, 0.4);
  
  /* 五行色 */
  --wx-gold: #E8E8E8;
  --wx-wood: #27AE60;
  --wx-water: #2980B9;
  --wx-fire: #C0392B;
  --wx-earth: #D4AC6E;
  
  --transition: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Serif SC', 'Source Han Serif SC', 'STSong', 'SimSun', serif;
  background: var(--deep-navy);
  color: var(--white);
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--deep-navy);
}
::-webkit-scrollbar-thumb {
  background: var(--dark-green);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.4;
}

.calligraphy-font {
  font-family: 'Ma Shan Zheng', 'KaiTi', 'STKaiti', 'Kai', serif;
  letter-spacing: 0.05em;
}

.gold-text {
  color: var(--gold);
}

.text-muted {
  color: var(--text-muted);
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.98) 0%, rgba(10, 22, 40, 0.85) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201, 169, 97, 0.1);
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 22, 40, 0.98);
  box-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}

.navbar-brand .brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--dark-green));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.navbar-brand .brand-text {
  font-family: 'Ma Shan Zheng', serif;
  font-size: 22px;
  color: var(--gold);
  letter-spacing: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 15px;
  transition: var(--transition);
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  padding: 8px 24px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--deep-navy) !important;
  border-radius: 24px;
  font-weight: 700;
  font-size: 14px !important;
  transition: var(--transition);
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--gold-glow);
}

/* Mobile menu toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
  border-radius: 2px;
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 6s infinite;
}

@keyframes particleFloat {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  20% { opacity: 0.6; }
  80% { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-20vh) scale(1); }
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(27, 58, 46, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(10, 22, 40, 0.6) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 20px;
  border: 1px solid rgba(201, 169, 97, 0.3);
  border-radius: 20px;
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 24px;
  letter-spacing: 2px;
  animation: fadeInDown 0.8s ease;
}

.hero-title {
  font-family: 'Ma Shan Zheng', serif;
  font-size: clamp(48px, 8vw, 96px);
  color: var(--gold);
  margin-bottom: 8px;
  animation: fadeInUp 1s ease;
  text-shadow: 0 0 40px rgba(201, 169, 97, 0.15);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: clamp(14px, 2vw, 20px);
  color: var(--text-muted);
  margin-bottom: 16px;
  letter-spacing: 6px;
  animation: fadeInUp 1s ease 0.2s both;
}

.hero-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 16px auto;
  animation: fadeInUp 1s ease 0.3s both;
}

.hero-desc {
  font-size: clamp(14px, 1.6vw, 17px);
  color: var(--text-dim);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 1s ease 0.4s both;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease 0.5s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--deep-navy);
  box-shadow: 0 4px 24px var(--gold-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(201, 169, 97, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(201, 169, 97, 0.4);
}

.btn-outline:hover {
  background: rgba(201, 169, 97, 0.1);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 10px 24px;
  font-size: 14px;
}

/* --- Scroll Indicator --- */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 2px;
  animation: fadeInUp 1s ease 1s both;
}

.scroll-indicator .mouse {
  width: 22px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator .mouse::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: var(--gold);
  border-radius: 2px;
  animation: scrollMouse 2s infinite;
}

@keyframes scrollMouse {
  0% { transform: translateX(-50%) translateY(0); opacity: 1; }
  100% { transform: translateX(-50%) translateY(14px); opacity: 0; }
}

/* --- Section Common --- */
.section {
  padding: 100px 24px;
  position: relative;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-label {
  display: inline-block;
  padding: 4px 16px;
  border: 1px solid rgba(201, 169, 97, 0.2);
  border-radius: 12px;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 3px;
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Ma Shan Zheng', serif;
  font-size: clamp(32px, 5vw, 48px);
  color: var(--gold);
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Features / Service Cards --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--card-hover-border);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(201, 169, 97, 0.15), rgba(27, 58, 46, 0.5));
  border: 1px solid rgba(201, 169, 97, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: var(--transition);
}

.feature-card:hover .feature-icon {
  border-color: var(--gold);
  box-shadow: 0 0 30px var(--gold-glow);
  transform: scale(1.05);
}

.feature-card h3 {
  font-size: 20px;
  color: var(--gold);
  margin-bottom: 12px;
  font-family: 'Ma Shan Zheng', serif;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Cultural Heritage Section --- */
.culture-section {
  background: linear-gradient(180deg, transparent, rgba(27, 58, 46, 0.15), transparent);
}

.culture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 768px) {
  .culture-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.culture-visual {
  position: relative;
  aspect-ratio: 1;
  max-width: 450px;
  margin: 0 auto;
}

.culture-trigram {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(201, 169, 97, 0.05) 0%, transparent 70%);
  border: 1px solid rgba(201, 169, 97, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: slowSpin 60s linear infinite;
}

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

.trigram-center {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--gold), transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--deep-navy);
  font-weight: bold;
  animation: slowSpin 60s linear infinite reverse;
}

.trigram-ring {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  border: 1px dashed rgba(201, 169, 97, 0.1);
}

.trigram-item {
  position: absolute;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: bold;
  color: var(--gold);
  opacity: 0.7;
  transition: var(--transition);
  cursor: pointer;
}

.trigram-item:hover {
  opacity: 1;
  transform: scale(1.2);
  text-shadow: 0 0 20px var(--gold-glow);
}

.culture-text h2 {
  font-family: 'Ma Shan Zheng', serif;
  font-size: 36px;
  color: var(--gold);
  margin-bottom: 20px;
}

.culture-text p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 2;
  margin-bottom: 16px;
}

.culture-text .quote {
  padding: 20px 24px;
  border-left: 3px solid var(--gold);
  background: rgba(201, 169, 97, 0.03);
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
  font-style: italic;
  color: var(--gold);
  font-size: 15px;
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, rgba(27, 58, 46, 0.3), rgba(10, 22, 40, 0.8));
  text-align: center;
  padding: 80px 24px;
}

.cta-section h2 {
  font-family: 'Ma Shan Zheng', serif;
  font-size: clamp(28px, 4vw, 42px);
  color: var(--gold);
  margin-bottom: 16px;
}

.cta-section p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Footer --- */
.footer {
  background: rgba(10, 22, 40, 0.9);
  border-top: 1px solid rgba(201, 169, 97, 0.08);
  padding: 60px 24px 30px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.footer-brand .brand-text {
  font-family: 'Ma Shan Zheng', serif;
  font-size: 24px;
  color: var(--gold);
  letter-spacing: 4px;
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.8;
}

.footer h4 {
  color: var(--gold);
  font-size: 15px;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 8px;
}

.footer ul li a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  transition: var(--transition);
}

.footer ul li a:hover {
  color: var(--gold);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  font-size: 12px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Gold Glow Effect --- */
.gold-glow {
  position: relative;
}

.gold-glow::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(201, 169, 97, 0.2), transparent);
  opacity: 0;
  transition: var(--transition-slow);
  z-index: -1;
  filter: blur(20px);
}

.gold-glow:hover::after {
  opacity: 1;
}

/* --- Compass Loading Animation --- */
.compass-loader {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.compass {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(201, 169, 97, 0.2);
  position: relative;
  animation: compassSpin 1.5s ease-in-out infinite;
}

.compass-needle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 28px;
  background: linear-gradient(180deg, var(--gold) 50%, var(--gold-light) 50%);
  border-radius: 2px;
}

.compass-needle::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
}

@keyframes compassSpin {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(180deg); }
  50% { transform: rotate(180deg); }
  75% { transform: rotate(360deg); }
  100% { transform: rotate(360deg); }
}

/* --- Tai Chi Loading --- */
.taichi-loader {
  width: 48px;
  height: 48px;
  position: relative;
  animation: taichiSpin 2s linear infinite;
}

.taichi-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(var(--gold) 0deg 180deg, var(--deep-navy) 180deg 360deg);
  position: relative;
  box-shadow: 0 0 20px var(--gold-glow);
}

.taichi-circle::before,
.taichi-circle::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  width: 50%;
  height: 50%;
}

.taichi-circle::before {
  top: 0;
  left: 25%;
  background: var(--gold);
}

.taichi-circle::after {
  bottom: 0;
  left: 25%;
  background: var(--deep-navy);
}

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

/* --- Toast Notification --- */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: linear-gradient(135deg, var(--dark-green), var(--deep-navy));
  border: 1px solid rgba(201, 169, 97, 0.2);
  border-radius: 12px;
  padding: 14px 28px;
  color: var(--gold);
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   ANALYZE PAGE
   ============================================================ */

.analyze-page {
  padding-top: 88px;
  min-height: 100vh;
}

.analyze-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .analyze-layout {
    grid-template-columns: 1fr;
  }
}

/* --- Form Panel --- */
.form-panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 28px;
  position: sticky;
  top: 88px;
}

.form-panel h2 {
  font-family: 'Ma Shan Zheng', serif;
  font-size: 22px;
  color: var(--gold);
  margin-bottom: 20px;
  text-align: center;
}

.form-panel h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin: 8px auto 0;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.form-group .hint {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

input, select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--white);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

input:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.1);
}

select option {
  background: var(--deep-navy);
  color: var(--white);
}

/* Toggle buttons for calendar type */
.toggle-group {
  display: flex;
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-btn {
  flex: 1;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font-size: 13px;
  transition: var(--transition);
  user-select: none;
}

.toggle-btn:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.toggle-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--deep-navy);
  font-weight: 700;
}

.toggle-btn input {
  display: none;
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--deep-navy);
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  margin-top: 8px;
  letter-spacing: 2px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201, 169, 97, 0.3);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* --- Result Panel --- */
.result-panel {
  min-height: 400px;
}

.result-placeholder {
  height: 100%;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed rgba(201, 169, 97, 0.1);
  border-radius: 16px;
  padding: 40px;
}

.result-placeholder .placeholder-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.result-placeholder p {
  color: var(--text-dim);
  font-size: 14px;
}

/* --- Bazi Card --- */
.bazi-result-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  animation: fadeInUp 0.5s ease;
}

.bazi-grid {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.bazi-cell {
  text-align: center;
  padding: 12px 16px;
  border-radius: 12px;
  min-width: 72px;
  background: rgba(201, 169, 97, 0.06);
  border: 1px solid rgba(201, 169, 97, 0.08);
}

.bazi-cell .zhu {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 6px;
  letter-spacing: 2px;
}

.bazi-cell .gan {
  font-size: 26px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.2;
}

.bazi-cell .zhi {
  font-size: 26px;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.2;
}

.bazi-cell .ss {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: inline-block;
}

.bazi-info {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* --- Section Accordion --- */
.section-accordion {
  margin-top: 12px;
}

.section-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: var(--transition);
}

.section-item:hover {
  border-color: rgba(201, 169, 97, 0.15);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.2s;
  user-select: none;
}

.section-header:hover {
  background: rgba(201, 169, 97, 0.03);
}

.section-header .title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 1px;
}

.section-header .arrow {
  color: var(--text-dim);
  font-size: 12px;
  transition: var(--transition);
}

.section-header .arrow.open {
  transform: rotate(180deg);
  color: var(--gold);
}

.section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.section-content.open {
  max-height: 3000px;
  padding: 0 20px 16px;
}

.section-content-inner {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.9;
  white-space: pre-wrap;
}

/* --- Download Buttons --- */
.result-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.btn-download {
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--dark-green), var(--dark-green-light));
  color: var(--white);
  border: 1px solid rgba(201, 169, 97, 0.15);
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-download:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--deep-navy);
  border-color: var(--gold);
}

/* --- Loading State --- */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
  gap: 20px;
}

.loading-state p {
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 2px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ============================================================
   WUXING BAO PAN (五行聚宝盘)
   ============================================================ */

.wuxing-pan {
  width: 260px;
  height: 260px;
  margin: 20px auto;
  position: relative;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(201, 169, 97, 0.03), rgba(10, 22, 40, 0.8));
  border: 1px solid rgba(201, 169, 97, 0.15);
}

.wuxing-segment {
  position: absolute;
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 50%, 50% 0%, 100% 0%, 100% 50%);
  transform-origin: 50% 50%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  transition: var(--transition);
  cursor: default;
}

.wuxing-segment:hover {
  filter: brightness(1.3);
}

.wuxing-label {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================================
   BAGUA (八卦图)
   ============================================================ */

.bagua-container {
  width: 240px;
  height: 240px;
  margin: 20px auto;
  position: relative;
  border-radius: 50%;
}

.bagua-item {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(201, 169, 97, 0.1);
  background: rgba(10, 22, 40, 0.6);
  backdrop-filter: blur(4px);
}

.bagua-item:hover {
  transform: scale(1.15);
  border-color: var(--gold);
  box-shadow: 0 0 24px var(--gold-glow);
  z-index: 10;
}

.bagua-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark-green);
  border: 1px solid rgba(201, 169, 97, 0.3);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--gold);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.bagua-item:hover .bagua-tooltip {
  opacity: 1;
}

/* ============================================================
   ABOUT / FENGSHUI / CONTACT PAGES
   ============================================================ */

.page-hero {
  padding: 120px 24px 60px;
  text-align: center;
  background: linear-gradient(180deg, rgba(27, 58, 46, 0.2), transparent);
}

.page-hero h1 {
  font-family: 'Ma Shan Zheng', serif;
  font-size: clamp(36px, 5vw, 52px);
  color: var(--gold);
  margin-bottom: 12px;
  animation: fadeInUp 0.8s ease;
}

.page-hero p {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.content-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px;
}

.content-section h2 {
  font-family: 'Ma Shan Zheng', serif;
  font-size: 28px;
  color: var(--gold);
  margin-bottom: 20px;
}

.content-section h3 {
  font-size: 18px;
  color: var(--gold-light);
  margin-bottom: 12px;
  margin-top: 28px;
}

.content-section p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 2;
  margin-bottom: 16px;
}

/* --- Contact Form --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-info-item .icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(201, 169, 97, 0.1);
  border: 1px solid rgba(201, 169, 97, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.contact-info-item h4 {
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 4px;
}

.contact-info-item p {
  font-size: 13px;
  color: var(--text-dim);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 22, 40, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    border-bottom: 1px solid rgba(201, 169, 97, 0.1);
  }
  
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  
  .hero {
    padding: 100px 20px 60px;
  }
  
  .section {
    padding: 60px 20px;
  }
  
  .bazi-grid {
    gap: 6px;
  }
  
  .bazi-cell {
    min-width: 60px;
    padding: 8px 10px;
  }
  
  .bazi-cell .gan,
  .bazi-cell .zhi {
    font-size: 20px;
  }
}

/* ============================================================
   PRINT
   ============================================================ */

@media print {
  .navbar { display: none; }
  .analyze-page { padding-top: 0; }
  .form-panel { display: none; }
  .analyze-layout { grid-template-columns: 1fr; }
}

/* ============================================================
   MOBILE OPTIMIZATIONS (Added 2026-05-07)
   ============================================================ */

/* --- iOS/WeChat Font Size Fix --- */
/* Prevent iOS auto-zoom on input focus (min 16px) */
input, select, textarea, button {
  font-size: 16px;
}

/* --- Better Touch Targets & Feedback --- */
@media (hover: none) and (pointer: coarse) {
  .nav-links a,
  .feature-card,
  .btn,
  .toggle-btn,
  .submit-btn,
  button,
  .section-header {
    cursor: pointer;
  }
  
  .btn:active,
  .btn-primary:active,
  .submit-btn:active {
    transform: scale(0.97) !important;
    transition: transform 0.1s ease;
  }
  
  .feature-card:active {
    transform: scale(0.98) !important;
  }
  
  .nav-links a:active {
    opacity: 0.7;
  }
  
  .toggle-btn:active {
    opacity: 0.8;
  }
  
  /* Remove desktop hover on touch devices */
  .feature-card:hover {
    transform: none !important;
  }
  .btn:hover,
  .nav-cta:hover {
    transform: none !important;
  }
}

/* --- WeChat Browser Safe Area & Overflow Fixes --- */
@supports (padding-top: env(safe-area-inset-top)) {
  .nav-links.open {
    padding-top: calc(24px + env(safe-area-inset-top));
  }
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

body {
  -webkit-overflow-scrolling: touch;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* --- Small Screen: Navigation (320px-480px) --- */
@media (max-width: 480px) {
  .navbar-inner {
    padding: 0 12px;
    height: 56px;
  }
  
  .navbar-brand .brand-icon {
    width: 30px;
    height: 30px;
    font-size: 15px;
  }
  
  .navbar-brand .brand-text {
    font-size: 17px;
    letter-spacing: 2px;
  }
  
  .mobile-toggle span {
    width: 22px;
  }
}

/* --- Hero Section Mobile (<=600px) --- */
@media (max-width: 600px) {
  .hero {
    padding: 90px 16px 50px;
    min-height: 85vh;
  }
  
  .hero-title {
    font-size: clamp(28px, 12vw, 48px) !important;
    margin-bottom: 4px;
  }
  
  .hero-subtitle {
    font-size: 11px !important;
    letter-spacing: 2px;
    margin-bottom: 10px;
  }
  
  .hero-desc {
    font-size: 13px !important;
    margin-bottom: 20px;
    line-height: 1.7;
  }
  
  .hero-desc br {
    display: none;
  }
  
  .hero-badge {
    font-size: 11px;
    padding: 4px 14px;
    margin-bottom: 14px;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  
  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
    padding: 14px 24px;
    font-size: 15px;
    min-height: 48px;
  }
  
  .scroll-indicator {
    bottom: 14px;
  }
  
  .scroll-indicator .mouse {
    width: 18px;
    height: 28px;
  }
}

/* --- Section Common Mobile (<=600px) --- */
@media (max-width: 600px) {
  .section {
    padding: 40px 16px;
  }
  
  .section-header {
    margin-bottom: 28px;
  }
  
  .section-title {
    font-size: clamp(22px, 7vw, 36px) !important;
  }
  
  .section-desc {
    font-size: 14px;
    padding: 0 8px;
  }
  
  .section-label {
    font-size: 11px;
    padding: 3px 12px;
  }
  
  .feature-card {
    padding: 24px 20px;
  }
  
  .feature-card h3 {
    font-size: 18px;
  }
  
  .feature-icon {
    width: 60px;
    height: 60px;
    font-size: 24px;
    margin-bottom: 16px;
  }
  
  .culture-grid {
    gap: 24px !important;
  }
  
  .culture-visual {
    max-width: 280px;
  }
  
  .culture-text h2 {
    font-size: 22px !important;
  }
  
  .culture-text p {
    font-size: 14px;
  }
  
  .culture-text .quote {
    font-size: 13px;
    padding: 14px 16px;
  }
  
  .cta-section {
    padding: 50px 16px;
  }
  
  .cta-section h2 {
    font-size: clamp(20px, 6vw, 32px) !important;
  }
  
  .cta-section p {
    font-size: 14px;
  }
}

/* --- Footer Mobile (<=600px) --- */
@media (max-width: 600px) {
  .footer {
    padding: 40px 16px 24px;
  }
  
  .footer-inner {
    gap: 24px;
  }
  
  .footer-brand .brand-text {
    font-size: 20px;
  }
  
  .footer h4 {
    font-size: 14px;
  }
  
  .footer ul li a {
    font-size: 13px;
  }
  
  .footer-bottom {
    font-size: 11px;
  }
}

/* --- Analyze Page Form Mobile (<=900px) --- */
@media (max-width: 900px) {
  .analyze-layout {
    padding: 12px;
  }
  
  .form-panel {
    padding: 20px 16px;
  }
  
  .form-panel h2 {
    font-size: 20px;
  }
  
  .form-row-3 {
    gap: 8px;
  }
  
  .form-row {
    gap: 8px;
  }
  
  input, select {
    padding: 12px 12px;
    min-height: 44px;
  }
  
  .submit-btn {
    padding: 16px;
    min-height: 52px;
  }
  
  .toggle-btn {
    padding: 12px 8px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
  
  .form-row-3 .form-group label {
    font-size: 11px;
  }
  
  .form-group .hint {
    font-size: 10px;
  }
}

/* --- Bazi Grid Mobile (<=480px 4 columns too tight) --- */
@media (max-width: 480px) {
  .bazi-result-card {
    padding: 14px 10px;
  }
  
  .bazi-grid {
    gap: 4px !important;
  }
  
  .bazi-cell {
    min-width: 0 !important;
    flex: 1;
    padding: 6px 3px !important;
  }
  
  .bazi-cell .gan,
  .bazi-cell .zhi {
    font-size: 16px !important;
  }
  
  .bazi-cell .zhu {
    font-size: 10px !important;
  }
  
  .bazi-cell .ss {
    font-size: 9px !important;
    padding: 1px 3px !important;
  }
  
  .bazi-info {
    font-size: 12px !important;
  }
}

/* --- Wuxing Pan & Bagua SVG Responsive --- */
@media (max-width: 600px) {
  #wuxing-pan svg,
  #bagua-chart {
    max-width: 220px !important;
    width: 100% !important;
    height: auto !important;
  }
}

@media (max-width: 480px) {
  #wuxing-pan svg,
  #bagua-chart {
    max-width: 170px !important;
  }
  
  .bazi-result-card > div[style*="flex-wrap:wrap"] {
    gap: 16px !important;
  }
}

/* --- Section Accordion Mobile --- */
@media (max-width: 600px) {
  .section-item {
    margin-bottom: 6px;
  }
  
  .section-header {
    padding: 12px 14px !important;
  }
  
  .section-header .title {
    font-size: 13px !important;
  }
  
  .section-content.open {
    padding: 0 14px 12px !important;
  }
  
  .section-content-inner {
    font-size: 13px !important;
    line-height: 1.8 !important;
  }
  
  .result-actions {
    flex-direction: column;
  }
  
  .result-actions .btn-download {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
}

/* --- Page Hero & Content Mobile --- */
@media (max-width: 600px) {
  .page-hero {
    padding: 100px 16px 40px;
  }
  
  .page-hero h1 {
    font-size: clamp(24px, 7vw, 36px) !important;
  }
  
  .page-hero p {
    font-size: 14px;
  }
  
  .content-section {
    padding: 40px 16px;
  }
  
  .content-section h2 {
    font-size: 22px !important;
  }
  
  .content-section p {
    font-size: 14px;
  }
  
  .contact-grid {
    gap: 24px !important;
  }
  
  .contact-info-item .icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
  
  .contact-info-item h4 {
    font-size: 13px;
  }
  
  .contact-info-item p {
    font-size: 12px;
  }
}

/* ============================================================
   END MOBILE OPTIMIZATIONS
   ============================================================ */
