/* ==================== 皇甫氏族 - 全局样式 ==================== */

/* CSS Variables */
:root {
  --bg-primary: #000000;
  --bg-secondary: #0a0a1a;
  --accent-gold: #C9A961;
  --accent-white: #F0F4FF;
  --text-dark: #1A1A2E;
  --text-muted: rgba(240, 244, 255, 0.55);
  --card-bg: rgba(20, 20, 45, 0.5);
  --card-border: rgba(201, 169, 97, 0.12);
  --transition-fast: 250ms;
  --transition-normal: 500ms;
  --transition-slow: 700ms;
  --easing: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: radial-gradient(ellipse at 50% 0%, #0a0a2a 0%, #000000 60%, #000000 100%);
  background-attachment: fixed;
  color: var(--accent-white);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  color: inherit;
}

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

/* ==================== Header / 导航栏 ==================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0 40px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 22, 40, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  transition: background var(--transition-fast) var(--easing);
}

.header.scrolled {
  background: rgba(10, 22, 40, 0.95);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 2px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border: 2px solid var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  position: relative;
}

.logo-icon::before {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent-gold);
  border-radius: 50%;
  top: 4px;
  right: 6px;
  box-shadow: 0 0 6px var(--accent-gold);
}

.nav-menu {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-menu a {
  font-size: 15px;
  color: var(--accent-white);
  opacity: 0.8;
  transition: all var(--transition-fast) var(--easing);
  position: relative;
  padding: 4px 0;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: width var(--transition-fast) var(--easing);
}

.nav-menu a:hover,
.nav-menu a.active {
  opacity: 1;
  color: var(--accent-gold);
}

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

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-login {
  padding: 8px 22px;
  border: 1px solid var(--accent-gold);
  border-radius: 24px;
  font-size: 14px;
  color: var(--accent-gold);
  transition: all var(--transition-fast) var(--easing);
}

.btn-login:hover {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent-white);
  transition: all var(--transition-fast) var(--easing);
}

/* ==================== 移动端菜单 ==================== */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: rgba(10, 22, 40, 0.98);
  backdrop-filter: blur(20px);
  z-index: 1001;
  padding: 80px 32px 32px;
  transition: right var(--transition-normal) var(--easing);
  border-left: 1px solid var(--card-border);
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu a {
  display: block;
  padding: 16px 0;
  font-size: 18px;
  border-bottom: 1px solid var(--card-border);
  color: var(--accent-white);
  opacity: 0.8;
  transition: all var(--transition-fast) var(--easing);
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--accent-gold);
  opacity: 1;
  padding-left: 12px;
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast) var(--easing);
}

.mobile-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-close {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 28px;
  color: var(--accent-white);
  cursor: pointer;
}

/* ==================== Hero 区域 ==================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  background: linear-gradient(180deg, #000000 0%, #0a0a1a 40%, #000000 100%);
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  border: 1px solid var(--accent-gold);
  border-radius: 20px;
  font-size: 13px;
  color: var(--accent-gold);
  letter-spacing: 3px;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeInUp 0.8s var(--easing) 0.2s forwards;
}

.hero-title {
  font-size: 64px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: 6px;
  background: linear-gradient(135deg, var(--accent-white) 0%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fadeInUp 0.8s var(--easing) 0.4s forwards;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-muted);
  margin-bottom: 40px;
  letter-spacing: 4px;
  opacity: 0;
  animation: fadeInUp 0.8s var(--easing) 0.6s forwards;
}

.hero-zibei {
  font-size: 18px;
  color: var(--accent-gold);
  letter-spacing: 8px;
  margin-bottom: 40px;
  padding: 16px 32px;
  border: 1px solid rgba(201, 169, 97, 0.3);
  border-radius: 8px;
  background: rgba(201, 169, 97, 0.05);
  opacity: 0;
  animation: fadeInUp 0.8s var(--easing) 0.8s forwards;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.8s var(--easing) 1s forwards;
}

.btn-primary {
  padding: 14px 36px;
  background: var(--accent-gold);
  color: var(--bg-primary);
  font-size: 16px;
  font-weight: 600;
  border-radius: 30px;
  transition: all var(--transition-fast) var(--easing);
  letter-spacing: 2px;
}

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

.btn-secondary {
  padding: 14px 36px;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  font-size: 16px;
  font-weight: 600;
  border-radius: 30px;
  transition: all var(--transition-fast) var(--easing);
  letter-spacing: 2px;
}

.btn-secondary:hover {
  background: rgba(201, 169, 97, 0.1);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 2px;
  animation: bounce 2s infinite;
}

.hero-scroll span {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-gold), transparent);
}

/* ==================== 信任背书区 ==================== */
.trust-section {
  padding: 80px 40px;
  position: relative;
  z-index: 2;
}

.trust-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto 60px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 48px;
  font-weight: 700;
  color: var(--accent-gold);
  line-height: 1;
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
  letter-spacing: 2px;
}

/* ==================== Bento Grid 核心价值区 ==================== */
.value-section {
  padding: 80px 40px;
  position: relative;
  z-index: 2;
}

.section-title {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 4px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 60px;
  font-size: 16px;
  letter-spacing: 2px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 220px);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.bento-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all var(--transition-fast) var(--easing);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.bento-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(201, 169, 97, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-fast) var(--easing);
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 169, 97, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

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

.bento-card:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-card:nth-child(2) {
  grid-column: span 2;
}

.bento-card:nth-child(3) {
  grid-column: span 1;
}

.bento-card:nth-child(4) {
  grid-column: span 1;
}

.bento-icon {
  width: 56px;
  height: 56px;
  border: 1px solid rgba(201, 169, 97, 0.3);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent-gold);
  font-size: 24px;
}

.bento-card h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--accent-white);
}

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

.bento-card:nth-child(1) h3 {
  font-size: 28px;
}

.bento-card:nth-child(1) p {
  font-size: 16px;
}

/* ==================== Footer ==================== */
.footer {
  padding: 60px 40px 30px;
  border-top: 1px solid var(--card-border);
  position: relative;
  z-index: 2;
  background: rgba(10, 22, 40, 0.5);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand .logo {
  margin-bottom: 16px;
}

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

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

.footer-links a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  padding: 6px 0;
  transition: color var(--transition-fast) var(--easing);
}

.footer-links a:hover {
  color: var(--accent-white);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid var(--card-border);
  font-size: 13px;
  color: var(--text-muted);
}

/* ==================== 内页通用布局 ==================== */
.page-header {
  padding: 140px 40px 60px;
  text-align: center;
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, rgba(26, 15, 61, 0.5) 0%, transparent 100%);
}

.page-header h1 {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 6px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--accent-white) 0%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  font-size: 16px;
  color: var(--text-muted);
  letter-spacing: 2px;
}

.page-content {
  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  min-height: 50vh;
}

/* ==================== 族谱查询页 ==================== */
.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.search-input {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
  padding: 14px 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 30px;
  font-size: 15px;
  color: var(--accent-white);
  outline: none;
  transition: all var(--transition-fast) var(--easing);
}

.search-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 20px rgba(201, 169, 97, 0.1);
}

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

.search-select {
  padding: 14px 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 30px;
  font-size: 15px;
  color: var(--accent-white);
  outline: none;
  cursor: pointer;
  min-width: 120px;
}

.search-select option {
  background: var(--bg-primary);
  color: var(--accent-white);
}

.btn-search {
  padding: 14px 32px;
  background: var(--accent-gold);
  color: var(--bg-primary);
  font-size: 15px;
  font-weight: 600;
  border-radius: 30px;
  transition: all var(--transition-fast) var(--easing);
}

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

/* 成员卡片列表 */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.member-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
  transition: all var(--transition-fast) var(--easing);
  cursor: pointer;
}

.member-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 169, 97, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.member-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-secondary), var(--accent-gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-white);
  margin-bottom: 16px;
}

.member-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.member-zibei {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(201, 169, 97, 0.15);
  border: 1px solid rgba(201, 169, 97, 0.3);
  border-radius: 12px;
  font-size: 12px;
  color: var(--accent-gold);
  margin-bottom: 10px;
}

.member-info {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

.member-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.member-actions button {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  transition: all var(--transition-fast) var(--easing);
}

.btn-outline {
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
}

.btn-outline:hover {
  background: rgba(201, 169, 97, 0.1);
}

/* ==================== 血脉关系图页 ==================== */
.tree-container {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 40px;
  min-height: 500px;
  position: relative;
  overflow: auto;
}

.tree-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tree-legend {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.legend-line {
  width: 24px;
  height: 2px;
  border-radius: 1px;
}

.legend-line.parent { background: var(--accent-gold); }
.legend-line.spouse { background: var(--accent-white); border: 1px dashed var(--accent-white); }
.legend-line.sibling { background: var(--bg-secondary); }

/* 简化的关系图节点 */
.tree-node {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 24px;
  background: rgba(45, 27, 105, 0.5);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  margin: 8px;
  cursor: pointer;
  transition: all var(--transition-fast) var(--easing);
}

.tree-node:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 0 20px rgba(201, 169, 97, 0.15);
}

.tree-node.active {
  border-color: var(--accent-gold);
  background: rgba(201, 169, 97, 0.1);
}

/* 女性节点样式 */
.tree-node.female {
  border-color: rgba(206, 107, 154, 0.4);
  background: rgba(206, 107, 154, 0.1);
}

.tree-node.female:hover {
  border-color: rgba(206, 107, 154, 0.7);
  box-shadow: 0 0 20px rgba(206, 107, 154, 0.15);
}

.tree-node.female .tree-node-zibei {
  color: #ce6b9a;
}

/* 支系终止节点样式 */
.tree-node.terminated {
  border-style: dashed;
  border-color: rgba(150, 150, 150, 0.4);
  background: rgba(100, 100, 100, 0.08);
  opacity: 0.7;
}

.tree-node.terminated:hover {
  border-color: rgba(150, 150, 150, 0.6);
}

.tree-node.terminated .tree-node-name {
  color: rgba(240, 244, 255, 0.6);
}

.tree-node.terminated .tree-node-zibei {
  color: rgba(150, 150, 150, 0.8);
}

/* 节点徽章 */
.tree-node-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.tree-node-badge.female {
  background: rgba(206, 107, 154, 0.9);
  color: #fff;
}

.tree-node-badge.terminated {
  background: rgba(150, 150, 150, 0.8);
  color: #fff;
  font-size: 9px;
}

/* 成员卡片性别标记 */
.member-gender {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  margin-left: 6px;
  vertical-align: middle;
}

.member-gender.male {
  background: rgba(107, 140, 206, 0.15);
  color: #6b8cce;
  border: 1px solid rgba(107, 140, 206, 0.3);
}

.member-gender.female {
  background: rgba(206, 107, 154, 0.15);
  color: #ce6b9a;
  border: 1px solid rgba(206, 107, 154, 0.3);
}

/* 支系状态标记 */
.lineage-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  margin-top: 8px;
}

.lineage-status.continue {
  background: rgba(107, 203, 119, 0.15);
  color: #6bcb77;
  border: 1px solid rgba(107, 203, 119, 0.3);
}

.lineage-status.terminated {
  background: rgba(150, 150, 150, 0.15);
  color: rgba(200, 200, 200, 0.7);
  border: 1px solid rgba(150, 150, 150, 0.3);
}

/* 子节点关系标注 */
.child-relation-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: center;
  white-space: nowrap;
}

.child-relation-note.follow-mother {
  color: #ce6b9a;
}

.child-relation-note.not-royal {
  color: rgba(150, 150, 150, 0.7);
}

.tree-node-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.tree-node-zibei {
  font-size: 12px;
  color: var(--accent-gold);
}

.tree-level {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.tree-connector {
  width: 1px;
  height: 30px;
  background: var(--accent-gold);
  margin: 0 auto;
}

/* ==================== 地理分布页 ==================== */
.map-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

.map-area {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  min-height: 500px;
  overflow: hidden;
}

.map-placeholder {
  width: 100%;
  height: 100%;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--text-muted);
  gap: 16px;
}

.map-placeholder svg {
  width: 80px;
  height: 80px;
  opacity: 0.3;
}

.map-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
}

.panel-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--accent-gold);
  letter-spacing: 2px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--card-border);
  font-size: 14px;
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-row span:first-child {
  color: var(--text-muted);
}

.stat-row span:last-child {
  font-weight: 600;
  color: var(--accent-white);
}

/* ==================== 家族资讯页 ==================== */
.news-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.news-tab {
  padding: 10px 24px;
  border-radius: 24px;
  font-size: 14px;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  transition: all var(--transition-fast) var(--easing);
}

.news-tab:hover,
.news-tab.active {
  background: var(--accent-gold);
  color: var(--bg-primary);
  border-color: var(--accent-gold);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all var(--transition-fast) var(--easing);
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 169, 97, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.news-image {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--bg-secondary), rgba(201, 169, 97, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  font-size: 48px;
}

.news-body {
  padding: 24px;
}

.news-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(201, 169, 97, 0.15);
  border-radius: 12px;
  font-size: 12px;
  color: var(--accent-gold);
  margin-bottom: 12px;
}

.news-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

.news-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

/* 资讯发布按钮 */
.news-publish-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.news-publish-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent-gold), rgba(201, 169, 97, 0.8));
  color: var(--bg-primary);
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast) var(--easing);
}
.news-publish-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 169, 97, 0.3);
}
.news-publish-btn svg {
  width: 18px;
  height: 18px;
}

/* 发布编辑器弹窗 */
.publish-editor {
  max-width: 640px;
}
.publish-type-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 12px;
}
.publish-type-tab {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast) var(--easing);
}
.publish-type-tab.active,
.publish-type-tab:hover {
  background: rgba(201, 169, 97, 0.15);
  border-color: rgba(201, 169, 97, 0.4);
  color: var(--accent-gold);
}
.publish-cover-preview {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, var(--bg-secondary), rgba(201, 169, 97, 0.1));
  border: 2px dashed var(--card-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast) var(--easing);
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
}
.publish-cover-preview:hover {
  border-color: var(--accent-gold);
}
.publish-cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}
.publish-cover-preview .cover-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.publish-cover-preview.has-image .cover-placeholder {
  display: none;
}
.publish-textarea {
  width: 100%;
  min-height: 120px;
  background: rgba(10, 22, 40, 0.5);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  color: var(--accent-white);
  font-size: 15px;
  line-height: 1.7;
  resize: vertical;
  font-family: inherit;
}
.publish-textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
}
.publish-textarea::placeholder {
  color: var(--text-muted);
}
.publish-image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.publish-image-item {
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--bg-secondary), rgba(201, 169, 97, 0.1));
  border: 2px dashed var(--card-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast) var(--easing);
  overflow: hidden;
  position: relative;
}
.publish-image-item:hover {
  border-color: var(--accent-gold);
}
.publish-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.publish-image-item .remove-img {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  z-index: 2;
}
.publish-video-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(10, 22, 40, 0.5);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--accent-white);
  font-size: 14px;
}
.publish-video-input:focus {
  outline: none;
  border-color: var(--accent-gold);
}
.publish-video-input::placeholder {
  color: var(--text-muted);
}
.publish-video-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}
.publish-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

/* 信息流卡片样式（今日头条式） */
.news-feed-card {
  display: flex;
  gap: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px;
  transition: all var(--transition-fast) var(--easing);
  cursor: pointer;
}
.news-feed-card:hover {
  border-color: rgba(201, 169, 97, 0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.news-feed-card.has-cover {
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.news-feed-card.has-cover .feed-cover {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.news-feed-card.has-cover .feed-body {
  padding: 20px;
}
.news-feed-card .feed-left {
  flex: 1;
  min-width: 0;
}
.news-feed-card .feed-right {
  width: 140px;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.news-feed-card .feed-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-feed-card .feed-tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.news-feed-card .feed-tag {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(201, 169, 97, 0.12);
  border-radius: 10px;
  font-size: 12px;
  color: var(--accent-gold);
}
.news-feed-card .feed-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
}
.news-feed-card .feed-status.pending {
  background: rgba(255, 183, 77, 0.15);
  color: #ffb74d;
}
.news-feed-card .feed-status.approved {
  background: rgba(107, 203, 119, 0.15);
  color: #6bcb77;
}
.news-feed-card .feed-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.news-feed-card .feed-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 10px;
}
.news-feed-card .feed-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.news-feed-card .feed-meta .author {
  color: var(--accent-gold);
  font-weight: 500;
}
.news-feed-card .feed-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}
.news-feed-card .feed-images img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}
.news-feed-card .feed-video-thumb {
  width: 100%;
  height: 200px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  margin-top: 10px;
}
.news-feed-card .feed-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-feed-card .feed-video-thumb .play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}

.news-feed-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 600px) {
  .news-feed-card {
    flex-direction: column;
    padding: 16px;
  }
  .news-feed-card .feed-right {
    width: 100%;
    height: 160px;
    order: -1;
    margin-bottom: 12px;
  }
  .publish-image-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==================== 成员认证页 ==================== */
.auth-container {
  max-width: 480px;
  margin: 0 auto;
}

.auth-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 48px 40px;
}

.auth-card h2 {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.auth-card .auth-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--accent-white);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: rgba(10, 22, 40, 0.5);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  font-size: 15px;
  color: var(--accent-white);
  outline: none;
  transition: all var(--transition-fast) var(--easing);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 20px rgba(201, 169, 97, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.btn-submit {
  width: 100%;
  padding: 16px;
  background: var(--accent-gold);
  color: var(--bg-primary);
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  transition: all var(--transition-fast) var(--easing);
  letter-spacing: 2px;
}

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

.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--accent-gold);
  transition: opacity var(--transition-fast) var(--easing);
}

.auth-switch a:hover {
  opacity: 0.8;
}

.auth-info {
  margin-top: 32px;
  padding: 20px;
  background: rgba(201, 169, 97, 0.05);
  border: 1px solid rgba(201, 169, 97, 0.15);
  border-radius: 12px;
}

.auth-info h4 {
  font-size: 14px;
  color: var(--accent-gold);
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.auth-info ul {
  list-style: none;
}

.auth-info li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.auth-info li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--accent-gold);
  font-size: 10px;
}

/* ==================== 弹窗 ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast) var(--easing);
}

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

.modal {
  background: var(--bg-primary);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  max-width: 560px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 40px;
  transform: scale(0.95);
  transition: transform var(--transition-fast) var(--easing);
}

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

.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast) var(--easing);
}

.modal-close:hover {
  color: var(--accent-white);
}

.modal-header {
  margin-bottom: 24px;
}

.modal-header h3 {
  font-size: 22px;
  font-weight: 600;
}

.modal-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-muted);
}

.modal-body p {
  margin-bottom: 12px;
}

/* ==================== 滚动动画 ==================== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-normal) var(--easing);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

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

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 1023px) {
  .header {
    padding: 0 24px;
  }
  .nav-menu {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .hero-title {
    font-size: 48px;
  }
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }
  .bento-card:nth-child(1) {
    grid-column: span 2;
    grid-row: span 1;
  }
  .bento-card:nth-child(2),
  .bento-card:nth-child(3),
  .bento-card:nth-child(4) {
    grid-column: span 1;
  }
  .map-wrapper {
    grid-template-columns: 1fr;
  }
  .map-panel {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .panel-card {
    flex: 1;
    min-width: 280px;
  }
}

@media (max-width: 767px) {
  .header {
    padding: 0 16px;
    height: 60px;
  }
  .logo {
    font-size: 18px;
  }
  .logo-icon {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  .hero {
    padding: 100px 16px 60px;
  }
  .hero-title {
    font-size: 32px;
    letter-spacing: 3px;
  }
  .hero-subtitle {
    font-size: 15px;
    letter-spacing: 2px;
  }
  .hero-zibei {
    font-size: 14px;
    letter-spacing: 4px;
    padding: 12px 20px;
  }
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 280px;
  }
  .trust-section {
    padding: 60px 16px;
  }
  .trust-stats {
    gap: 32px;
  }
  .stat-number {
    font-size: 36px;
  }
  .value-section {
    padding: 60px 16px;
  }
  .section-title {
    font-size: 28px;
  }
  .bento-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .bento-card:nth-child(1),
  .bento-card:nth-child(2),
  .bento-card:nth-child(3),
  .bento-card:nth-child(4) {
    grid-column: span 1;
  }
  .footer {
    padding: 40px 16px 20px;
  }
  .footer-content {
    flex-direction: column;
    gap: 32px;
  }
  .page-header {
    padding: 100px 16px 40px;
  }
  .page-header h1 {
    font-size: 28px;
  }
  .page-content {
    padding: 24px 16px;
  }
  .search-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .search-input,
  .search-select,
  .btn-search {
    max-width: none;
    width: 100%;
  }
  .member-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }
  .auth-card {
    padding: 32px 24px;
  }
  .tree-container {
    padding: 20px;
  }
  .map-panel {
    flex-direction: column;
  }
}

/* ==================== 加载动画 ==================== */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 2px solid var(--card-border);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

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

/* ==================== 空状态 ==================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--accent-white);
}

.empty-state p {
  font-size: 14px;
}
