/**
 * 鲁氏族谱系统 v2.4.50 前端视觉升级层
 * 设计语言：中国红 × 鎏金 · 大气 · 典雅 · 流畅
 * 独立新层，不影响旧样式，可整体移除回退
 */
/* ========== 全局背景 ========== */
body {
  background: var(--grad-bg, #F5EFE3);
}

/* ========== 容器与卡片升级 ========== */
.container { max-width: var(--content-max-width, 1200px); }

/* 通用卡片：细腻阴影 + 悬停上浮 */
.card, .panel, .box, .admin-card,
.member-card, .post-card, .notice-card {
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.12);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover, .panel:hover, .box:hover,
.member-card:hover, .post-card:hover, .notice-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(212, 175, 55, 0.35);
}

/* ========== 标题：鎏金渐变（不支持 background-clip 时回退实色，防白茫茫） ========== */
.page-title, .section-title, h1.page-title,
.hero-title, .module-title {
  color: #8B6914;
  background: var(--grad-gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  letter-spacing: 1px;
}
@supports not ((background-clip: text) or (-webkit-background-clip: text)) {
  .page-title, .section-title, h1.page-title,
  .hero-title, .module-title {
    background: none;
    -webkit-text-fill-color: initial;
    color: #8B6914;
  }
}
/* 正文文字对比兜底（防浅色背景 + 浅色文字） */
body, .container, .content, main,
.page-content, p { color: #3D2E2E; }
a { color: #8B0000; }
a:hover { color: #C8102E; }

/* ========== 金色分隔线 ========== */
.title-divider, .section-divider {
  height: 2px;
  background: var(--gold-line);
  border: none;
  margin: 12px 0 20px;
}

/* ========== 按钮：红金渐变 + 光泽 ========== */
.btn, button[type="submit"] {
  transition: all 0.25s ease;
  border-radius: 8px;
}
/* 仅渐变按钮启用 position/overflow（光泽不越界、文字恒白） */
.btn-primary, .btn-gold, .btn-danger,
button[type="submit"]:not(.btn-outline):not(.btn-default):not(.btn-light):not(.btn-secondary) {
  position: relative;
  overflow: hidden;
  color: #fff !important;
}
.btn-primary, .btn-danger,
button[type="submit"]:not(.btn-outline):not(.btn-default):not(.btn-light):not(.btn-secondary) {
  background: var(--grad-primary) !important;
  box-shadow: 0 4px 14px rgba(139, 0, 0, 0.22);
}
.btn-gold {
  background: var(--grad-gold) !important;
  color: #fff !important;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(184, 134, 11, 0.25);
}
.btn-primary:hover, .btn-danger:hover, .btn-gold:hover,
button[type="submit"]:not(.btn-outline):not(.btn-default):not(.btn-light):not(.btn-secondary):hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 0, 0, 0.30);
}
/* 次要按钮保持浅色底 + 深色文字（防被 submit 规则误染成红底看不清） */
.btn-outline, .btn-default, .btn-light, .btn-secondary {
  background: transparent !important;
  border: 1px solid #D8CFC0 !important;
  color: #4A2B2B !important;
}
.btn-outline:hover, .btn-default:hover, .btn-light:hover, .btn-secondary:hover {
  border-color: #C8102E !important;
  color: #C8102E !important;
  background: rgba(200, 16, 46, 0.04) !important;
}
/* 光泽扫过动画 */
.btn-primary::after, .btn-gold::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
  pointer-events: none;
}
.btn-primary:hover::after, .btn-gold:hover::after { left: 140%; }

/* ========== 导航：毛玻璃（仅浅色导航；深红渐变导航 .header 保持原红金设计，另做质感强化） ========== */
.navbar, .site-header, .top-nav {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
}
/* 深红渐变主导航：红金质感 + 文字清晰（杜绝发白） */
.header {
  background: linear-gradient(135deg, #8B0000 0%, #6B0F0F 55%, #8B0000 100%) !important;
  box-shadow: 0 3px 18px rgba(139, 0, 0, 0.35);
}
.header .nav-item { color: rgba(255, 255, 255, 0.92) !important; }
.header .nav-item:hover { color: #FFE9A0 !important; }
.header .nav-item.active { color: #FFE9A0 !important; }
.header .logo-text h1 { color: #F0E4A6 !important; }
.header .logo-text p { color: rgba(240, 228, 166, 0.6) !important; }

/* ========== 表格：斑马纹 + 悬停高亮 ========== */
table thead th {
  background: linear-gradient(135deg, rgba(200,16,46,0.06), rgba(212,175,55,0.10));
  color: #7A1F1F;
  font-weight: 600;
  letter-spacing: 0.5px;
}
tbody tr:nth-child(even) td { background: rgba(245, 240, 232, 0.55); }
tbody tr:hover td {
  background: rgba(212, 175, 55, 0.08) !important;
  transition: background 0.2s ease;
}

/* ========== 输入框聚焦 ========== */
input:focus, textarea:focus, select:focus {
  border-color: rgba(212, 175, 55, 0.7) !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
  transition: all 0.2s ease;
}

/* ========== 链接 hover ========== */
a { transition: color 0.2s ease, opacity 0.2s ease; }

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: rgba(245, 240, 232, 0.6); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #C8102E, #8B0000);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #E63946, #8B0000); }

/* ========== 徽章/标签质感 ========== */
.badge, .tag, .label {
  border-radius: 6px;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ========== 首页 Hero 强化 ========== */
.hero, .jumbotron {
  background: linear-gradient(135deg, rgba(139,0,0,0.92), rgba(139,0,0,0.82)), var(--grad-bg);
  border-bottom: 3px solid var(--gold-line);
}
.hero h1, .hero .hero-title { color: #fff; -webkit-text-fill-color: #fff; }
.hero p { color: rgba(255, 255, 255, 0.85); }

/* ========== 列表项 hover ========== */
.list-group-item, .news-item, .item-row {
  transition: all 0.2s ease;
}
.list-group-item:hover, .news-item:hover, .item-row:hover {
  background: rgba(212, 175, 55, 0.07);
  padding-left: 12px;
}

/* ========== 移动端微调 ========== */
@media (max-width: 768px) {
  .card, .panel, .box { border-radius: 12px; }
  .btn { border-radius: 8px; }
  body { background: #FBF8F3; }
}
