:root {
  --chinese-red: #DE2910;        /* 故宫红 */
  --chinese-gold: #FFD700;       /* 金色 */
  --chinese-dark: #8B0000;       /* 深红 */
  --chinese-light: #FFE4E1;      /* 浅红 */
  --chinese-border: #B8860B;     /* 金边色 */
  --gradient-light: #FFE259;     /* 渐变浅色 - 亮金色 */
  --gradient-dark: #FF512F;      /* 渐变深色 - 鲜红橙色 */
  --mouse-x: 50%;                /* 鼠标X坐标 */
  --mouse-y: 50%;                /* 鼠标Y坐标 */
  --font-normal: 400;            /* 正常字重 */
  --font-medium: 500;            /* 中等字重 */
  --font-bold: 700;              /* 粗体字重 */
}

/* 通用样式 */
html, body {
  height: 100%; /* 确保 html 和 body 高度占满视口 */
  margin: 0;    /* 去除默认的外边距 */
}
body {
  position: relative;
  background-color: #FDF5E6;
  font-family: "Noto Sans SC", "Microsoft YaHei", "SimSun", sans-serif;
  min-height: 100%; /* 确保内容区域至少有页面高度 */
  overflow-x: hidden; /* 防止横向溢出 */
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), 
              var(--gradient-light) 0%, 
              var(--gradient-dark) 65%);
  opacity: 0.25; /* 调高透明度 */
  z-index: -1; /* 使背景在内容下方 */
  transition: background 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 添加鼠标跟随效果 */
body::after {
  content: '';
  position: fixed;
  display: block;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.4; /* 调高透明度 */
  background: radial-gradient(
    circle at var(--mouse-x) var(--mouse-y), 
    rgba(255, 226, 89, 0.3) 0%, 
    rgba(255, 81, 47, 0.15) 25%, 
    rgba(253, 245, 230, 0) 60%
  );
  transition: background 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
  font-family: "Noto Sans SC", sans-serif;
  letter-spacing: -0.02em;
}

h1 {
  font-weight: var(--font-bold);
}

h2 {
  font-family: "Noto Sans SC", sans-serif;
  color: var(--chinese-dark);
  text-align: center;
  padding: 20px 0;
  margin-bottom: 30px;
  position: relative;
  font-weight: var(--font-bold);
}

h2::before, h2::after {
  content: "";
  color: var(--chinese-red);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

h2::before {
  left: 20%;
}

h2::after {
  right: 20%;
}

/* 总管理员导航栏样式 */
.navbar.navbar-dark.bg-primary {
  background-color: var(--chinese-red) !important;
  border-bottom: 2px solid var(--chinese-gold) !important;
}

/* 分会管理员导航栏样式 */
.navbar.navbar-dark.bg-success {
  background-color: var(--chinese-red) !important;
  border-bottom: 2px solid var(--chinese-gold) !important;
}

/* 导航链接样式 */
.navbar-dark .navbar-nav .nav-link {
  font-family: "Noto Sans SC", sans-serif;
  color: rgba(255, 255, 255, 0.9) !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: var(--chinese-gold) !important;
  transform: translateY(-2px);
}

.navbar-dark .navbar-nav .nav-link.active {
  color: var(--chinese-gold) !important;
  position: relative;
}

.navbar-dark .navbar-nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background-color: var(--chinese-gold);
}

/* 下拉菜单样式 */
.dropdown-menu {
  font-family: "Noto Sans SC", sans-serif;
  background-color: var(--chinese-red);
  border: 1px solid var(--chinese-gold);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  animation: slideDown 0.3s ease;
  transform-origin: top;
}

.dropdown-item {
  font-family: "Noto Sans SC", sans-serif;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}

.dropdown-item:hover {
  background-color: var(--chinese-dark);
  color: var(--chinese-gold);
  transform: translateX(5px);
}

/* 按钮样式 */
.btn-primary {
  font-family: "Noto Sans SC", sans-serif;
  font-weight: var(--font-medium);
  background-color: var(--chinese-red);
  border-color: var(--chinese-dark);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--chinese-dark);
  border-color: var(--chinese-red);
  transform: scale(1.05);
}

.btn-outline-primary {
  color: var(--chinese-red);
  border-color: var(--chinese-red);
}

.btn-outline-primary:hover {
  background-color: var(--chinese-red);
  color: white;
}

/* 表格样式 */
.table {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table thead {
  background-color: var(--chinese-red);
  color: white;
}

.table tbody tr {
  transition: all 0.3s ease;
}

.table tbody tr:hover {
  background-color: var(--chinese-light);
  transform: scale(1.01);
}

/* 徽章样式 */
.badge {
  transition: all 0.3s ease;
}

.badge:hover {
  transform: scale(1.1);
}

/* 搜索框样式 */
.form-control {
  border: 2px solid var(--chinese-border);
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--chinese-red);
  box-shadow: 0 0 0 0.2rem rgba(222, 41, 16, 0.25);
}

/* 动画效果 */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: scaleY(0);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

.container {
  animation: fadeIn 0.5s ease-out;
}

/* 选中标签样式 */
.badge.bg-primary {
  background-color: var(--chinese-red) !important;
  margin: 2px;
  padding: 8px 12px;
  border-radius: 15px;
  transition: all 0.3s ease;
}

.badge.bg-primary:hover {
  background-color: var(--chinese-dark) !important;
}

/* 日期筛选组件样式 */
.date-filter {
  background: white;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid var(--chinese-border);
  margin-bottom: 20px;
}

/* 加载动画 */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading-content {
  text-align: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--chinese-light);
  border-top: 5px solid var(--chinese-red);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

.loading-content p {
  color: var(--chinese-red);
  font-size: 1.2em;
  margin: 0;
}

/* Alert 消息样式 */
.alert {
  border-radius: 8px;
  border-left: 5px solid var(--chinese-red);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.5s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 页面过渡动画 */
.animate__fadeIn {
  animation-duration: 0.5s;
}

.animate__fadeOut {
  animation-duration: 0.3s;
}

/* 按钮悬浮效果增强 */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.btn:hover::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

/* 表单控件样式优化 */
.form-control:focus {
  border-color: var(--chinese-red);
  box-shadow: 0 0 0 0.25rem rgba(222, 41, 16, 0.25);
}

/* 动画相关样式优化 */
.animate__animated {
    animation-duration: 0.5s !important;
}

.animate__fadeIn {
    animation-delay: 0.1s;
}

.animate__fadeOut {
    animation-duration: 0.3s !important;
}

/* Flash 消息容器 */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    max-width: 350px;
}

/* 加载动画优化 */
.loading {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* 主内容区域 */
main {
    min-height: 100vh;
    opacity: 0; /* 初始隐藏 */
}

main.animate__fadeIn {
    opacity: 1;
}

/* 导航栏样式 */
.navbar {
    background: var(--chinese-red) !important;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.2);
    padding: 0.5rem 1rem;
    border-bottom: 2px solid var(--chinese-gold);
    font-family: "Noto Sans SC", sans-serif;
}

.navbar-brand {
    padding: 0;
    margin-right: 2rem;
    font-family: "Noto Sans SC", sans-serif;
    font-weight: var(--font-bold);
}

.navbar-brand img {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* 导航栏链接样式 */
.navbar-light .navbar-nav .nav-link {
    color: white !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus {
    color: var(--chinese-gold) !important;
    transform: translateY(-2px);
}

.navbar-light .navbar-nav .active > .nav-link,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--chinese-gold) !important;
    position: relative;
}

.navbar-light .navbar-nav .active > .nav-link::after,
.navbar-light .navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background-color: var(--chinese-gold);
}

/* 导航栏折叠按钮 */
.navbar-light .navbar-toggler {
    border-color: rgba(255,255,255,0.5);
}

.navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* 导航栏装饰元素 */
.navbar::before,
.navbar::after {
    content: '❖';
    color: var(--chinese-gold);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.8;
}

.navbar::before {
    left: 10px;
}

.navbar::after {
    right: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 首页包装器样式 */
.index-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.index-wrapper .navbar {
  background: transparent !important;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding-top: 15px;
  padding-bottom: 15px;
  border: none;
  box-shadow: none;
}

.index-container {
    flex: 1;
    min-height: 100vh; /* 改为100vh，确保填满整个视口高度 */
    display: flex;
    align-items: center;
    position: relative;
    z-index: 0;
    padding: 4rem 0;
    overflow: hidden;
    margin-bottom: 0; /* 确保没有底部外边距 */
}

/* 确保VantaJS画布填满整个容器，从顶部开始 */
#vanta-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

/* 为了确保VantaJS内容可见 */
.index-container .hero-section {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 2rem;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.index-container .hero-section h1 {
  font-family: "Noto Sans SC", sans-serif;
  color: #fff;
  font-weight: var(--font-bold);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important; /* 强制宽度100% */
    height: 100% !important; /* 强制高度100% */
    z-index: 1;
}

/* 首页和关于页面导航栏样式 */
.navbar-light {
    background-color: white !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar-light .navbar-nav .nav-link {
    font-family: "Noto Sans SC", sans-serif;
    color: var(--chinese-red) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--chinese-dark) !important;
}

/* 关于页面卡片样式 */
.about-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.about-card .card-body {
    position: relative;
}

.about-card .card-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--chinese-red), var(--chinese-gold));
}

/* 添加鼠标移动效果的动画 */
@keyframes gradientAnimation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* 首页登录按钮特殊样式 */
.index-container .btn-primary {
  background-color: var(--chinese-gold);
  border-color: var(--chinese-gold);
  color: #000;
  font-weight: var(--font-medium);
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.index-container .btn-primary:hover {
  background-color: #FFDF40;
  border-color: #FFDF40;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.index-container .lead,
.index-container p {
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  font-weight: var(--font-medium);
} 