/* ============================================
   I Ching Wisdom - Premium Dark Theme
   设计灵感: Glassmorphism + Gradient + Glow
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --bg-deep: #06060c;
  --bg-primary: #0a0a14;
  --bg-secondary: #0f0f1e;
  --bg-card: #12122a;
  --bg-card-hover: #181838;
  --text-primary: #f0ece4;
  --text-secondary: #a09888;
  --text-muted: #5c5660;
  --gold: #c8a45c;
  --gold-light: #e8cc8a;
  --gold-dim: #8a6d3b;
  --gold-glow: rgba(200, 164, 92, 0.25);
  --red: #d4353c;
  --red-light: #e8555c;
  --border: rgba(200, 164, 92, 0.12);
  --border-glow: rgba(200, 164, 92, 0.35);
  --glass-bg: rgba(18, 18, 42, 0.7);
  --glass-border: rgba(200, 164, 92, 0.15);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(200, 164, 92, 0.08);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.75;
  overflow-x: hidden;
}
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }
img { max-width: 100%; }

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--gold-dim), var(--gold)); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-light); }

/* ---------- Navigation - Glassmorphism ---------- */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  background: rgba(6, 6, 12, 0.8);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  transition: all var(--transition);
}
.navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
  background: rgba(6, 6, 12, 0.95);
}
.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 72px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.4rem; font-weight: 700;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; letter-spacing: 1px;
}
.nav-logo .logo-icon { font-size: 2rem; -webkit-text-fill-color: initial; }
.nav-links { display: flex; list-style: none; gap: 36px; }
.nav-links a {
  color: var(--text-secondary); font-size: 0.85rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 1.5px;
  position: relative; padding: 6px 0;
  transition: color var(--transition);
  display: flex; flex-direction: column; align-items: center; line-height: 1.2;
}
.nav-links a .nav-zh {
  font-size: 0.62rem; text-transform: none; letter-spacing: 0;
  color: var(--text-muted); font-weight: 400;
  font-family: 'STKaiti','KaiTi','Microsoft YaHei',serif;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 1px; transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-light); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-blog-link {
  background: linear-gradient(135deg, rgba(200, 164, 92, 0.15), rgba(200, 164, 92, 0.05));
  padding: 8px 18px !important; border-radius: 20px;
  border: 1px solid rgba(200, 164, 92, 0.3);
}
.nav-blog-link:hover { background: rgba(200, 164, 92, 0.25) !important; }
.nav-blog-link::after { display: none !important; }

/* Mobile Menu */
.menu-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 8px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--gold); border-radius: 1px; transition: all var(--transition); }
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---------- Hero - Premium ---------- */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; position: relative; overflow: hidden;
  background: var(--bg-deep);
}
.hero::before {
  content: ''; position: absolute; top: -30%; left: -20%; width: 140%; height: 160%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(200, 164, 92, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(212, 53, 60, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(200, 164, 92, 0.03) 0%, transparent 70%);
  animation: heroGlow 12s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  0% { transform: scale(1) rotate(0deg); opacity: 0.8; }
  100% { transform: scale(1.08) rotate(2deg); opacity: 1; }
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(200, 164, 92, 0.3), transparent),
    radial-gradient(1px 1px at 25% 45%, rgba(200, 164, 92, 0.2), transparent),
    radial-gradient(1px 1px at 40% 25%, rgba(200, 164, 92, 0.25), transparent),
    radial-gradient(1px 1px at 55% 65%, rgba(200, 164, 92, 0.15), transparent),
    radial-gradient(1px 1px at 70% 35%, rgba(200, 164, 92, 0.2), transparent),
    radial-gradient(1px 1px at 85% 55%, rgba(200, 164, 92, 0.25), transparent),
    radial-gradient(2px 2px at 15% 75%, rgba(200, 164, 92, 0.3), transparent),
    radial-gradient(2px 2px at 60% 10%, rgba(200, 164, 92, 0.2), transparent),
    radial-gradient(2px 2px at 90% 85%, rgba(200, 164, 92, 0.25), transparent);
  animation: starPulse 4s ease-in-out infinite alternate;
}
@keyframes starPulse { 0% { opacity: 0.6; } 100% { opacity: 1; } }
.hero-content { position: relative; z-index: 1; max-width: 800px; padding: 0 24px; }
.hero h1 {
  font-size: 4.5rem; font-weight: 800; margin-bottom: 12px; letter-spacing: 3px;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 40%, var(--gold-dim) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero .subtitle { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 8px; font-weight: 300; letter-spacing: 2px; }
.hero .chinese-title { font-size: 2.2rem; color: var(--red); font-family: 'STKaiti','KaiTi','Microsoft YaHei',serif; margin-bottom: 36px; opacity: 0.9; }
.cta-btn {
  display: inline-block; padding: 15px 42px;
  background: transparent; border: 2px solid var(--gold);
  color: var(--gold); font-size: 1rem; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition);
  position: relative; overflow: hidden;
}
.cta-btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  opacity: 0; transition: opacity var(--transition);
}
.cta-btn:hover { border-color: var(--gold-light); color: var(--bg-deep); box-shadow: 0 0 30px var(--gold-glow); }
.cta-btn:hover::before { opacity: 1; }
.cta-btn:hover span, .cta-btn:hover { color: var(--bg-deep); position: relative; z-index: 1; }
.scroll-indicator {
  position: absolute; bottom: 48px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--text-muted); font-size: 0.75rem; letter-spacing: 3px; text-transform: uppercase;
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(10px); } }
.scroll-line { width: 1px; height: 48px; background: linear-gradient(180deg, var(--gold), transparent); }

/* ---------- Section Common ---------- */
.section { padding: 110px 24px; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-header h2 {
  font-size: 2.6rem; margin-bottom: 14px; letter-spacing: 1px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.section-header .section-subtitle { color: var(--text-secondary); font-size: 1.1rem; max-width: 650px; margin: 0 auto; line-height: 1.7; }
.section-header .section-subtitle a { border-bottom: 1px dashed var(--gold-dim); }
.section-header .section-subtitle a:hover { border-color: var(--gold); }

/* ---------- I Ching Section ---------- */
#iching { background: var(--bg-primary); border-top: 1px solid rgba(200,164,92,0.06); border-bottom: 1px solid rgba(200,164,92,0.06); }
.iching-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 28px; }
.iching-card {
  background: var(--glass-bg); backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  padding: 36px 28px; text-align: center;
  transition: all var(--transition); position: relative; overflow: hidden;
}
.iching-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity var(--transition);
}
.iching-card:hover { transform: translateY(-10px); border-color: var(--border-glow); box-shadow: var(--shadow-glow); }
.iching-card:hover::before { opacity: 1; }
.iching-card h3 { font-size: 1.25rem; color: var(--gold); margin-bottom: 14px; }
.iching-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; }
.iching-card .card-link {
  display: inline-block; margin-top: 16px; font-size: 0.82rem; color: var(--gold);
  font-weight: 600; transition: all var(--transition);
}
.iching-card .card-link:hover { color: var(--gold-light); padding-left: 4px; }

/* ---------- Ba Gua Section ---------- */
#bagua { background: var(--bg-deep); }
.bagua-container { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; max-width: 1100px; margin: 0 auto; }
.bagua-item {
  width: 130px; text-align: center; padding: 24px 10px;
  background: var(--glass-bg); backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border); border-radius: var(--radius-md);
  transition: all var(--transition);
}
.bagua-item:hover { border-color: var(--border-glow); transform: translateY(-6px); box-shadow: var(--shadow-glow); }
.bagua-item .trigram { font-size: 2.6rem; display: block; margin-bottom: 10px; }
.bagua-item .trigram-name { color: var(--gold); font-weight: 700; font-size: 0.9rem; display: block; margin-bottom: 4px; letter-spacing: 1px; }
.bagua-item .trigram-element { color: var(--text-muted); font-size: 0.78rem; }

/* ---------- Quote Section ---------- */
.quote-section {
  background: linear-gradient(180deg, rgba(200,164,92,0.03), transparent, rgba(200,164,92,0.03));
  padding: 80px 24px; text-align: center; position: relative;
}
.quote-block { max-width: 800px; margin: 0 auto; }
.quote-text { font-size: 1.8rem; color: var(--text-primary); font-style: italic; line-height: 1.6; margin-bottom: 20px; font-weight: 300; }
.quote-author { color: var(--gold); font-size: 1rem; letter-spacing: 2px; }

/* ---------- Feng Shui Section ---------- */
#fengshui { background: var(--bg-primary); }
.fengshui-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 28px; }
.fengshui-card {
  background: var(--glass-bg); backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  padding: 36px 28px; text-align: center;
  transition: all var(--transition); position: relative; overflow: hidden;
}
.fengshui-card:hover { transform: translateY(-10px); border-color: var(--border-glow); box-shadow: var(--shadow-glow); }
.fengshui-card h3 { font-size: 1.2rem; color: var(--gold); margin-bottom: 14px; }
.fengshui-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; }
.fengshui-card .card-link {
  display: inline-block; margin-top: 16px; font-size: 0.82rem; color: var(--gold);
  font-weight: 600; transition: all var(--transition);
}
.fengshui-card .card-link:hover { color: var(--gold-light); padding-left: 4px; }

/* ---------- Five Elements ---------- */
#elements { background: var(--bg-deep); }
.elements-display { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-bottom: 56px; }
.element-circle { width: 90px; height: 90px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.05rem;
  transition: all var(--transition); cursor: default;
  border: 2px solid transparent;
  position: relative;
}
.element-circle::before {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  opacity: 0; transition: opacity var(--transition);
}
.element-circle:hover { transform: scale(1.15); z-index: 2; }
.element-circle:hover::before { opacity: 1; }
.element-circle.wood { background: rgba(76,175,80,0.1); border-color: rgba(76,175,80,0.4); color: #81c784; }
.element-circle.wood:hover { box-shadow: 0 0 30px rgba(76,175,80,0.2); }
.element-circle.fire { background: rgba(244,67,54,0.1); border-color: rgba(244,67,54,0.4); color: #e57373; }
.element-circle.fire:hover { box-shadow: 0 0 30px rgba(244,67,54,0.2); }
.element-circle.earth { background: rgba(255,193,7,0.1); border-color: rgba(255,193,7,0.4); color: #ffd54f; }
.element-circle.earth:hover { box-shadow: 0 0 30px rgba(255,193,7,0.2); }
.element-circle.metal { background: rgba(200,164,92,0.1); border-color: rgba(200,164,92,0.4); color: var(--gold-light); }
.element-circle.metal:hover { box-shadow: 0 0 30px var(--gold-glow); }
.element-circle.water { background: rgba(33,150,243,0.1); border-color: rgba(33,150,243,0.4); color: #64b5f6; }
.element-circle.water:hover { box-shadow: 0 0 30px rgba(33,150,243,0.2); }
.element-circle .element-emoji { font-size: 2rem; margin-bottom: 4px; }
.element-info { max-width: 800px; margin: 0 auto; text-align: center; }
.element-info h3 { color: var(--gold); font-size: 1.5rem; margin-bottom: 20px; }
.element-info p { color: var(--text-secondary); line-height: 1.9; margin-bottom: 10px; }

/* ---------- Newsletter CTA ---------- */
.newsletter {
  background: linear-gradient(135deg, rgba(200,164,92,0.04), rgba(200,164,92,0.02), rgba(200,164,92,0.04));
  border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border);
  padding: 72px 24px; text-align: center;
}
.newsletter h3 { font-size: 1.6rem; color: var(--gold-light); margin-bottom: 10px; }
.newsletter p { color: var(--text-secondary); margin-bottom: 24px; font-size: 1.05rem; }

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-deep); border-top: 1px solid rgba(200,164,92,0.08);
  padding: 56px 24px 28px; text-align: center;
}
.footer-content { max-width: 1200px; margin: 0 auto; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 36px; margin-bottom: 32px; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--gold); }
.footer-copy { color: var(--text-muted); font-size: 0.85rem; opacity: 0.5; }

/* ---------- Scroll Fade Animation ---------- */
.fade-in { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed; bottom: 32px; right: 32px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--glass-bg); backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--gold); font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: all var(--transition); z-index: 999;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--gold); color: var(--bg-deep); border-color: var(--gold); box-shadow: 0 0 20px var(--gold-glow); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; letter-spacing: 1px; }
  .hero .subtitle { font-size: 1rem; }
  .hero .chinese-title { font-size: 1.5rem; }
  .hero-bagua { font-size: 4rem; }
  .section-header h2 { font-size: 1.8rem; }
  .section { padding: 70px 16px; }
  .menu-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 72px; left: 0; width: 100%;
    flex-direction: column; gap: 12px;
    background: rgba(6,6,12,0.96); backdrop-filter: blur(20px);
    padding: 28px; text-align: center;
    transform: translateY(-120%); opacity: 0; visibility: hidden;
    transition: all var(--transition);
    border-bottom: 1px solid var(--glass-border);
  }
  .nav-links a { gap: 2px; }
  .nav-links.show { transform: translateY(0); opacity: 1; visibility: visible; }
  .element-circle { width: 85px; height: 85px; font-size: 0.85rem; }
  .element-circle .element-emoji { font-size: 1.5rem; }
  .bagua-item { width: 105px; padding: 18px 8px; }
  .bagua-item .trigram { font-size: 2rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .iching-grid, .fengshui-grid { grid-template-columns: 1fr; }
  .elements-display { gap: 10px; }
}
