/* 启明轩 - 公共样式 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --gold: #d4a853;
  --gold-light: #e8c97a;
  --gold-dark: #b8922f;
  --text-primary: #e8e0d0;
  --text-secondary: #8a7e6b;
  --text-muted: #5a5347;
  --border: rgba(212, 168, 83, 0.15);
  --border-hover: rgba(212, 168, 83, 0.35);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 30px rgba(212, 168, 83, 0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
  --font-title: 'Noto Serif SC', serif;
  --font-body: 'Noto Sans SC', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-light); }

/* === 导航栏 === */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-title);
  font-size: 1.4rem; font-weight: 700;
  color: var(--gold);
  display: flex; align-items: center; gap: 8px;
}

.nav-logo svg { width: 28px; height: 28px; }

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

.nav-links a {
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: var(--transition);
}

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

.nav-user {
  display: flex; align-items: center; gap: 12px;
}

.nav-points {
  color: var(--gold);
  font-size: 0.85rem;
  background: var(--bg-card);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.nav-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.85rem; font-weight: 600;
  color: var(--bg-primary);
}

.nav-avatar:hover { box-shadow: 0 0 15px rgba(212, 168, 83, 0.4); }

/* 移动端菜单按钮 */
.nav-menu-btn {
  display: none;
  background: none; border: none;
  color: var(--text-primary); font-size: 1.5rem;
  cursor: pointer;
}

/* === 星空粒子背景 === */
#starfield {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* === 页面容器 === */
.page-container {
  position: relative; z-index: 1;
  padding-top: 64px;
  min-height: 100vh;
  display: flex; flex-direction: column;
}

main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  width: 100%;
}

/* === 卡片 === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* === 按钮 === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem; font-weight: 500;
  border: none; cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light));
  color: var(--bg-primary);
  box-shadow: 0 4px 15px rgba(212, 168, 83, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 25px rgba(212, 168, 83, 0.5);
  transform: translateY(-1px);
  color: var(--bg-primary);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--gold);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--gold);
  background: rgba(212, 168, 83, 0.1);
  color: var(--gold);
}

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* === 输入框 === */
.input-group { margin-bottom: 20px; }

.input-group label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.input-field {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.input-field:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.1);
}

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

/* === 标签 === */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.tag:hover, .tag.active {
  background: rgba(212, 168, 83, 0.15);
  color: var(--gold);
  border-color: var(--gold);
}

/* === 底部 === */
.footer {
  position: relative; z-index: 1;
  background: rgba(10, 14, 26, 0.9);
  border-top: 1px solid var(--border);
  padding: 30px 24px;
  text-align: center;
}

.footer-disclaimer {
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto 16px;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* === 标题 === */
.section-title {
  font-family: var(--font-title);
  font-size: 1.8rem;
  color: var(--gold);
  text-align: center;
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-secondary);
  text-align: center;
  font-size: 0.95rem;
  margin-bottom: 40px;
}

/* === 分割线 === */
.divider {
  width: 60px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 30px;
}

/* === 模态框 === */
.modal-overlay {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.show { opacity: 1; visibility: visible; }

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 440px; width: 90%;
  transform: scale(0.9);
  transition: var(--transition);
}

.modal-overlay.show .modal { transform: scale(1); }

.modal h3 {
  font-family: var(--font-title);
  color: var(--gold);
  margin-bottom: 16px;
}

.modal p { color: var(--text-secondary); margin-bottom: 24px; font-size: 0.9rem; }
.modal .btn-group { display: flex; gap: 12px; justify-content: flex-end; }

/* === Toast提示 === */
.toast {
  position: fixed; top: 80px; right: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  z-index: 3000;
  color: var(--text-primary);
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  transform: translateX(120%);
  transition: transform 0.4s ease;
  max-width: 320px;
}

.toast.show { transform: translateX(0); }
.toast.success { border-color: #4ade80; }
.toast.error { border-color: #f87171; }

/* === 太极旋转 === */
.taiji-container {
  position: relative;
  width: 120px; height: 120px;
  margin: 0 auto;
}

.taiji {
  width: 120px; height: 120px;
  animation: rotate 20s linear infinite;
}

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

.taiji::before {
  content: '';
  position: absolute;
  width: 56px; height: 56px;
  background: var(--gold);
  border-radius: 50%;
  top: 2px; left: 50%;
  transform: translateX(-50%);
}

.taiji::after {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  background: var(--bg-primary);
  border-radius: 50%;
  top: 25px; left: 50%;
  transform: translateX(-50%);
}

/* === 动画 === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.fade-in-up { animation: fadeInUp 0.6s ease forwards; }
.fade-in { animation: fadeIn 0.5s ease forwards; }

/* === 网格 === */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* === 工具类 === */
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }

/* === 响应式 === */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.show {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(10, 14, 26, 0.95);
    padding: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav-menu-btn { display: block; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  main { padding: 24px 16px; }
  .section-title { font-size: 1.4rem; }
  .hero-title { font-size: 1.8rem !important; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .btn-lg { padding: 14px 24px; font-size: 0.95rem; }
}
