/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 主题变量 */
:root {
  /* 浅色主题 */
  --bg-color: #f5f5f5;
  --text-color: #333333;
  --primary-color: #e2db91;
  --secondary-color: #ccd78b;
  --card-bg: #ffffff;
  --card-bg-rgb: 255, 255, 255;
  --card-bg-50: rgba(255, 255, 255, 0.5);
  --nav-bg: rgba(255, 255, 255, 0.95);
  --nav-text: #333333;
  --border-color: #e0e0e0;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 深色主题 */
[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --text-color: #333333;
  --primary-color: #6c986c;
  --secondary-color: #82ae82;
  --card-bg: rgba(0, 0, 0, 1);
  --card-bg-rgb: 0, 0, 0;
  --card-bg-50: rgba(0, 0, 0, 0.5);
  --nav-bg: rgba(0, 0, 0, 0.95);
  --nav-text: #333333;
  --border-color: rgba(255, 255, 255, 0.2);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* 国风主题 */
[data-theme="chinese"] {
  --bg-color: #f9f2e8;
  --text-color: #8b4513;
  --primary-color: #e7c285;
  --secondary-color: #d3bc92;
  --card-bg: #f5efe6;
  --card-bg-rgb: 245, 239, 230;
  --card-bg-50: rgba(245, 239, 230, 0.5);
  --nav-bg: rgba(245, 239, 230, 0.95);
  --nav-text: #8b4513;
  --border-color: #e8d5c4;
  --shadow: 0 4px 6px rgba(139, 69, 19, 0.1);
}

/* 清新主题 */
[data-theme="fresh"] {
  --bg-color: #f0f8ff;
  --text-color: #2c3e50;
  --primary-color: #d4f1d4;
  --secondary-color: #b8e6b8;
  --card-bg: rgba(240, 248, 255, 1);
  --card-bg-rgb: 240, 248, 255;
  --card-bg-50: rgba(240, 248, 255, 0.5);
  --nav-bg: rgba(240, 248, 255, 0.95);
  --nav-text: #2c3e50;
  --border-color: #d6eaf8;
  --shadow: 0 4px 6px rgba(52, 152, 219, 0.1);
}

body {
  font-family: 'Microsoft YaHei', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: all 0.3s ease;
  position: relative;
  overflow-x: hidden;
}

/* 背景图片 */
.background-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.background-video img {
  width: 110%;
  height: 110%;
  object-fit: cover;
  animation: backgroundMove 30s linear infinite;
}

/* 背景移动动画 */
@keyframes backgroundMove {
  0% {
    transform: translate(-5%, -5%);
  }

  50% {
    transform: translate(0%, 0%);
  }

  100% {
    transform: translate(-5%, -5%);
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 左侧固定导航栏 */
.side-nav {
  position: fixed;
  left: 0;
  top: 0;
  width: 250px;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow);
  padding: 20px 0;
  transition: all 0.3s ease;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

[data-theme="dark"] .side-nav {
  background-color: rgba(0, 0, 0, 0.3);
}

.nav-header {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border-color);
}

.nav-header h2 {
  color: var(--primary-color);
  font-size: 1.5em;
  text-align: center;
}

.nav-links {
  list-style: none;
  padding: 20px 0;
}

.nav-links li {
  padding: 0 20px;
}

.nav-links a {
  display: block;
  padding: 12px 15px;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateX(5px);
}

/* 移动端汉堡菜单 */
.menu-toggle {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1001;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* 移动端汉堡按钮加半透明背景，提高可辨识度 */
@media (max-width: 768px) {
  .menu-toggle {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 8px;
    box-shadow: var(--shadow);
  }
}

/* 主内容区 */
.main-content {
  margin-left: 250px;
  margin-top: -10px;
  transition: all 0.3s ease;
}

/* 首屏视觉区 */
.hero-section {
  height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* 向下滚动提示 */
.scroll-down {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  animation: bounce 2s infinite;
  z-index: 4;
}

.scroll-down span {
  margin-bottom: 10px;
  font-size: 0.9em;
  color: var(--text-color);
}

.arrow {
  border: solid var(--text-color);
  border-width: 0 3px 3px 0;
  display: inline-block;
  padding: 10px;
}

.down {
  transform: rotate(45deg);
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  40% {
    transform: translateX(-50%) translateY(-20px);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  animation: fadeIn 1s ease-in-out;
}

.hero-subtitle {
  font-size: 1.5em;
  margin-bottom: 30px;
  animation: fadeIn 1.5s ease-in-out;
}

/* 通用区块样式 */
.section {
  padding: 60px 0;
  background-color: var(--card-bg-50);
  backdrop-filter: blur(5px);
  margin: 20px 0;
  border-radius: 10px;
}

.section-title {
  font-size: 2.5em;
  color: var(--primary-color);
  margin-bottom: 40px;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background-color: #668b62;
}

/* 页面概述样式 */
.overview-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  font-size: 1.1em;
}

.overview-content p {
  margin-bottom: 20px;
}

/* 设计理念样式 */
.design-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.design-item {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  color: var(--text-color);
}

.design-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.design-item h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.3em;
}

/* 开发信息样式 */
.development-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.development-item {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  color: var(--text-color);
}

.development-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.development-item h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.3em;
}

/* 节气文化溯源样式 */
.origin-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.origin-item {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  color: var(--text-color);
}

.origin-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.origin-item h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.3em;
}

/* 资料来源样式 */
.sources-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  font-size: 1.1em;
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  color: var(--text-color);
}

.sources-content p {
  margin-bottom: 20px;
}

.sources-content ul {
  margin-left: 20px;
  margin-bottom: 20px;
}

.sources-content li {
  margin-bottom: 10px;
}

[data-theme="dark"] .sources-content {
  background-color: rgba(0, 0, 0, 0.5);
}

/* 页脚 */
footer {
  background-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
  padding: 15px;
  text-align: center;
  border-top: 1px solid var(--border-color);
  margin-top: 60px;
  color: var(--text-color);
}

[data-theme="dark"] footer {
  background-color: rgba(0, 0, 0, 0.3);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.footer-info h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 1.5em;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: #668b62;
}

.footer-copyright {
  margin-top: 20px;
  font-size: 0.9em;
  opacity: 0.8;
}

/* 响应式设计 */

/* 手机端 - 小屏幕设备 */
@media (max-width: 480px) {

  /* 移动端导航 */
  .side-nav {
    transform: translateX(-100%);
    width: 180px;
  }

  .side-nav.active {
    transform: translateX(0);
  }

  .menu-toggle {
    display: block;
    top: 10px;
    left: 10px;
  }

  .main-content {
    margin-left: 0;
    padding: 10px;
  }

  /* 首屏视觉区 */
  .hero-section {
    height: 60vh;
  }

  .hero-content h1 {
    font-size: 1.8em;
  }

  .hero-content p {
    font-size: 0.95em;
    padding: 0 10px;
  }

  /* 向下滚动图标 */
  .scroll-down {
    bottom: 20px;
  }

  .scroll-arrow {
    width: 30px;
    height: 50px;
  }

  /* 区块调整 */
  .section {
    padding: 30px 10px;
  }

  .section-title {
    font-size: 1.5em;
    margin-bottom: 20px;
  }

  /* 内容卡片 */
  .content-card {
    padding: 15px;
  }

  .content-card h4 {
    font-size: 1.1em;
    margin-bottom: 10px;
  }

  .content-card p {
    font-size: 0.85em;
  }

  /* 网格布局调整 */
  .design-content,
  .development-content,
  .origin-content {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  /* 页脚 */
  footer {
    padding: 15px 10px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .footer-links {
    flex-direction: column;
    gap: 5px;
  }
}

/* 平板端 - 中等屏幕设备 */
@media (min-width: 481px) and (max-width: 768px) {

  /* 背景图片适配 */
  body {
    background-size: cover;
    background-position: center center;
    background-attachment: scroll;
  }

  /* 移动端导航 */
  .side-nav {
    transform: translateX(-100%);
    width: 180px;
    z-index: 1000;
  }

  .side-nav.active {
    transform: translateX(0);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  }

  .menu-toggle {
    display: block;
    top: 15px;
    left: 15px;
    z-index: 1001;
  }

  .main-content {
    margin-left: 0;
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
  }

  /* 首屏视觉区 */
  .hero-section {
    height: 65vh;
    width: 100%;
  }

  .hero-content {
    padding: 0 15px;
  }

  .hero-content h1 {
    font-size: 2em;
  }

  .hero-content p {
    font-size: 1em;
  }

  /* 向下滚动图标 */
  .scroll-down {
    bottom: 25px;
  }

  /* 区块调整 */
  .section {
    padding: 30px 15px;
    width: 100%;
    box-sizing: border-box;
  }

  .section-title {
    font-size: 1.6em;
    margin-bottom: 20px;
  }

  /* 内容卡片 */
  .content-card {
    padding: 15px;
  }

  .content-card h4 {
    font-size: 1.1em;
    margin-bottom: 10px;
  }

  .content-card p {
    font-size: 0.9em;
  }

  /* 网格布局调整 */
  .design-content,
  .development-content,
  .origin-content {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  /* 页脚 */
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 20px 15px;
  }
}

/* 桌面端 - 大屏幕设备 */
@media (min-width: 769px) and (max-width: 1024px) {
  .side-nav {
    width: 180px;
  }

  .main-content {
    margin-left: 180px;
  }

  .hero-content h1 {
    font-size: 2.8em;
  }

  .design-content,
  .development-content,
  .origin-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* 大桌面端 - 超大屏幕设备 */
@media (min-width: 1025px) {
  .hero-content h1 {
    font-size: 3.2em;
  }

  .design-content,
  .development-content,
  .origin-content {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #668b62;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #556b51;
}

/* ========== 特效动画样式 ========== */
/* 特效容器 */
.effect-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1001;
  overflow: hidden;
}

/* 通用特效样式 */
.effect-drop {
  position: absolute;
  top: -50px;
}

/* 雨滴特效 */
.rain-drop {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
  width: 2px;
  border-radius: 0 0 50% 50%;
  animation: rain-fall linear infinite;
}

@keyframes rain-fall {
  0% {
    transform: translateY(-100px);
    opacity: 1;
  }

  100% {
    transform: translateY(100vh);
    opacity: 0.3;
  }
}

/* 绿叶特效 */
.leaves-drop {
  background: linear-gradient(135deg, #4CAF50, #8BC34A);
  border-radius: 50% 0 50% 50%;
  animation: leaves-fall ease-in-out infinite;
}

@keyframes leaves-fall {
  0% {
    transform: translateY(-100px) rotate(0deg) translateX(0);
    opacity: 1;
  }

  25% {
    transform: translateY(25vh) rotate(90deg) translateX(50px);
  }

  50% {
    transform: translateY(50vh) rotate(180deg) translateX(-30px);
  }

  75% {
    transform: translateY(75vh) rotate(270deg) translateX(60px);
  }

  100% {
    transform: translateY(100vh) rotate(360deg) translateX(-20px);
    opacity: 0;
  }
}

/* 炊烟特效 */
.smoke-drop {
  background: radial-gradient(circle, rgba(200, 200, 200, 0.6) 0%, transparent 70%);
  border-radius: 50%;
  animation: smoke-rise ease-out infinite;
}

@keyframes smoke-rise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.5;
  }

  50% {
    opacity: 0.3;
  }

  100% {
    transform: translateY(-100vh) scale(2);
    opacity: 0;
  }
}

/* 雪花特效 */
.snow-drop {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 50%, transparent 70%);
  border-radius: 50%;
  animation: snow-fall ease-in-out infinite;
  top: -100px;
}

@keyframes snow-fall {
  0% {
    transform: translateY(0) rotate(0deg) translateX(0);
    opacity: 0;
  }

  10% {
    opacity: 0.8;
  }

  50% {
    transform: translateY(50vh) rotate(180deg) translateX(30px);
  }

  90% {
    opacity: 0.8;
  }

  100% {
    transform: translateY(100vh) rotate(360deg) translateX(-20px);
    opacity: 0;
  }
}