/* ============================================
   梅花易数 - 共享样式 (Vue3 重构版)
   深色金铜主题 - 电脑端优化
   ============================================ */

:root {
  --bg: #1a1a2e;
  --bg2: #16213e;
  --surface: #0f1629;
  --gold: #d4a574;
  --gold-light: #f0d6b8;
  --gold-dim: rgba(212, 165, 116, 0.6);
  --text: #e0d5c1;
  --text-dim: #8a8078;
  --accent-red: #c44545;
  --accent-jade: #5a9e8f;
  --border: rgba(212, 165, 116, 0.15);
  --shadow: rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 50% 20%, rgba(212, 165, 116, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 80%, rgba(90, 158, 143, 0.04) 0%, transparent 50%);
  font-family: 'Noto Serif SC', 'SimSun', 'STSong', 'Songti SC', 'KaiTi', serif;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ===== 顶部导航 ===== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(26, 26, 46, 0.95) 100%);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
  height: 64px;
}

.nav-brand {
  position: absolute;
  left: 40px;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-shadow: 0 0 16px rgba(212, 165, 116, 0.35);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 8px 20px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  letter-spacing: 0.05em;
}

.nav-link:hover {
  color: var(--gold-light);
  background: rgba(212, 165, 116, 0.08);
  border-color: rgba(212, 165, 116, 0.2);
}

.nav-link.active {
  color: var(--gold);
  background: rgba(212, 165, 116, 0.12);
  border-color: rgba(212, 165, 116, 0.3);
}

/* ===== 页面主体 ===== */
.page-content {
  padding-top: 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* ===== 标题 ===== */
.page-title {
  text-align: center;
  margin-bottom: 40px;
}

.page-title h1 {
  font-size: 2.4rem;
  color: var(--gold);
  letter-spacing: 0.2em;
  text-shadow: 0 0 40px rgba(212, 165, 116, 0.3);
  margin-bottom: 8px;
}

.page-title .subtitle {
  font-size: 0.95rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
}

/* ===== 卡片 ===== */
.card {
  background: linear-gradient(135deg, rgba(22, 33, 62, 0.8) 0%, rgba(15, 22, 41, 0.9) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 8px 40px var(--shadow), 0 0 30px rgba(212, 165, 116, 0.05);
}

/* ===== 按钮 ===== */
.btn {
  padding: 10px 28px;
  border-radius: 24px;
  font-family: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s;
  border: 1.5px solid var(--gold);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.25), rgba(212, 165, 116, 0.1));
  color: var(--gold-light);
}

.btn-primary:hover {
  background: rgba(212, 165, 116, 0.3);
  color: #fff;
  box-shadow: 0 0 20px rgba(212, 165, 116, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--gold);
}

.btn-ghost:hover {
  background: rgba(212, 165, 116, 0.1);
}

/* ===== 表单 ===== */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.88rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(212, 165, 116, 0.2);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s;
}

.form-input:focus {
  border-color: var(--gold);
}

.form-input::placeholder {
  color: var(--text-dim);
  opacity: 0.6;
}

/* ===== 网格 ===== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ===== 标签页 ===== */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab {
  padding: 10px 24px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.05em;
  margin-bottom: -1px;
}

.tab:hover {
  color: var(--gold-light);
}

.tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ===== 结果展示 ===== */
.result-box {
  background: rgba(22, 33, 62, 0.6);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
}

.result-symbol {
  font-size: 5rem;
  color: var(--gold);
  text-shadow: 0 0 40px rgba(212, 165, 116, 0.4);
  line-height: 1.2;
  margin-bottom: 12px;
}

.result-name {
  font-size: 1.8rem;
  color: var(--gold-light);
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}

.result-meta {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.result-desc {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.9;
  text-align: left;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ===== 高亮文字 ===== */
.hl-good {
  color: var(--accent-jade);
  font-weight: 600;
}

.hl-warn {
  color: var(--accent-red);
}

.hl-gold {
  color: var(--gold-light);
  font-weight: 600;
}

/* ===== 分割线 ===== */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ===== 加载状态 ===== */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-dim);
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* ===== 首页功能卡片 ===== */
.feature-card {
  background: linear-gradient(135deg, rgba(22, 33, 62, 0.8) 0%, rgba(15, 22, 41, 0.9) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 165, 116, 0.4);
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(212, 165, 116, 0.1);
}

.feature-card .icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  color: var(--gold);
  font-size: 1.3rem;
  margin-bottom: 10px;
  letter-spacing: 0.1em;
}

.feature-card p {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ===== 响应式（保留电脑端为主） ===== */
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  .top-nav {
    padding: 0 20px;
  }
  .nav-link {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}

@media (max-width: 600px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  .page-title h1 {
    font-size: 1.8rem;
  }
}


.nav-auth {
  position: absolute;
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-login-btn {
  background: rgba(212,167,116,0.12);
  border: 1px solid rgba(212,167,116,0.3);
  color: #d4a574;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  letter-spacing: 2px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  font-family: inherit;
}
.nav-login-btn:hover {
  background: rgba(212,167,116,0.22);
  border-color: #d4a574;
}

.nav-user-info {
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(232,213,181,0.6);
}
.nav-user-info .username { color: #d4a574; }

.nav-logout-btn {
  background: none;
  border: 1px solid rgba(212,167,116,0.2);
  color: rgba(232,213,181,0.4);
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.nav-logout-btn:hover {
  border-color: #d45a5a;
  color: #d45a5a;
}
