
:root {
  --font-sans: "Noto Sans SC", sans-serif;
  --font-serif: "Noto Serif SC", serif;
  --animation-curve: cubic-bezier(0.34, 1.56, 0.64, 1); /* 弹性曲线，使动画更有活力 */
  --long-animation: 0.8s var(--animation-curve);
  --medium-animation: 0.5s var(--animation-curve);
  --short-animation: 0.3s var(--animation-curve);
}

/* 加载动画 */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-dark);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: opacity 0.5s ease;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  position: relative;
  margin-bottom: 1.5rem;
}

.loading-spinner:before,
.loading-spinner:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 5px solid transparent;
  border-top-color: var(--primary-color);
  border-bottom-color: var(--secondary-color);
  animation: spin 1.5s ease-in-out infinite;
}

.loading-spinner:before {
  z-index: 10;
}

.loading-spinner:after {
  border-top-color: var(--secondary-color);
  border-bottom-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite reverse;
}

.loading p {
  font-size: 1.2rem;
  animation: pulse 1.5s infinite;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 500;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}


.main-nav {
  background-color: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: all 0.4s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--primary-light);
  text-decoration: none;
  transition: transform var(--short-animation);
}

.logo:hover {
  transform: scale(1.05);
}

.logo i {
  font-size: 1.8rem;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.logo span {
  font-size: 1.8rem;
  font-weight: 600;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px rgba(166, 99, 204, 0.3);
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.nav-links li a {
  color: var(--text-light);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 1.05rem;
}

.nav-links li a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: width 0.4s var(--animation-curve);
  border-radius: 2px;
}

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

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--accent-color);
}

/* 树洞专用英雄区域 */
.shudong-hero {
  background-image: url("https://banana404.top/shudon/02.jpg");
  background-size: cover;
  background-position: center;
  position: relative;
  height: 600px;
  margin-top: 60px; /* 为固定导航腾出空间 */
}

.shudong-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, rgba(26, 26, 46, 0.8), rgba(106, 48, 147, 0.5));
  animation: gradientShift 10s ease-in-out infinite alternate;
}

@keyframes gradientShift {
  0% {
    opacity: 0.8;
  }
  100% {
    opacity: 0.9;
  }
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  color: white;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  background: linear-gradient(45deg, #fff, var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content p {
  font-size: 1.4rem;
  max-width: 600px;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.t1 {
  position: relative;
  font-size: 2.5rem;
  color: var(--accent-color);
  text-shadow: 0 0 15px rgba(200, 162, 200, 0.8);
  transition: all 0.3s ease-in-out;
  display: inline-block;
}

/* 文章卡片样式 */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

/* 分类卡片样式 */
.category-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.category-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.5s var(--animation-curve);
  display: flex;
  flex-direction: column;
  padding: 2.5rem 2rem;
  border: 1px solid rgba(166, 99, 204, 0.1);
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp var(--long-animation) forwards;
  animation-delay: calc(var(--animation-very-fast) * var(--index, 0));
  position: relative;
  z-index: 1;
}

.category-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(106, 48, 147, 0.05), rgba(166, 99, 204, 0.05));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.category-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border-color: rgba(166, 99, 204, 0.3);
}

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

.category-card i {
  font-size: 3.5rem;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1.5rem;
  transition: transform 0.5s var(--animation-curve);
}

.category-card:hover i {
  transform: scale(1.2) rotate(5deg);
}

.category-card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
  transition: color 0.3s ease;
}

.category-card:hover h3 {
  color: var(--primary-light);
}

.category-card p {
  color: var(--text-light);
  margin-bottom: 1.8rem;
  flex: 1;
  line-height: 1.6;
}

.category-card .btn {
  align-self: center;
  transform: translateY(0);
  transition: transform 0.4s var(--animation-curve), box-shadow 0.4s ease;
}

.category-card:hover .btn {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(106, 48, 147, 0.3);
}

.wide-card {
  grid-column: 1 / -1;
  max-width: 800px;
  margin: 0 auto;
}

/* 音乐播放器样式 - 全新设计 */
.music-player {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(34, 34, 54, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1.2rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 320px;
  border: 1px solid rgba(166, 99, 204, 0.3);
  z-index: 90;
  transition: all 0.6s var(--animation-curve);
  overflow: hidden;
}

.music-player.hidden {
  transform: translateX(calc(100% + 2rem));
}

.music-info {
  width: 100%;
  text-align: center;
  margin-bottom: 1rem;
}

#song-title {
  display: block;
  margin-bottom: 0.8rem;
  color: var(--accent-color);
  font-weight: 600;
  font-size: 1.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: textFloat 2s ease-in-out infinite alternate;
}

@keyframes textFloat {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-3px);
  }
}

.progress-container {
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin: 0.8rem 0;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.progress-container:hover .progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-light), var(--secondary-color));
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 3px;
  width: 0;
  transition: width 0.1s linear, background 0.3s ease, height 0.3s ease;
  position: relative;
}

.progress-bar::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.progress-container:hover .progress-bar::after {
  opacity: 1;
}

#time-info {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.8rem;
}

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

.player-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
}

.player-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(166, 99, 204, 0.1);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.4s var(--animation-curve);
}

.player-btn:hover::before {
  transform: scale(1);
}

.player-btn:hover {
  color: var(--accent-color);
  transform: translateY(-3px);
}

.play-btn {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: white;
  width: 50px;
  height: 50px;
  box-shadow: 0 5px 15px rgba(106, 48, 147, 0.4);
}

.play-btn:hover {
  background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
  color: white;
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 8px 20px rgba(106, 48, 147, 0.5);
}

.toggle-player {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(106, 48, 147, 0.4);
  z-index: 100;
  transition: all 0.4s var(--animation-curve);
}

.toggle-player:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 8px 25px rgba(106, 48, 147, 0.5);
}

.toggle-player i {
  font-size: 1.5rem;
  animation: pulse 2s infinite;
}

/* 全新设计的移动导航菜单 */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 110;
}

.menu-toggle span {
  width: 30px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 10px;
  transition: all 0.3s ease;
  position: relative;
  transform-origin: 1px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg);
}

/* 页面过渡动画 */

/* 响应式样式 - 全新移动端设计 */
@media (max-width: 768px) {
  .main-nav {
    padding: 0.8rem 1rem;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

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

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 80%;
    max-width: 350px;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.98), rgba(42, 42, 64, 0.98));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 5rem 2rem 2rem;
    transition: right 0.5s var(--animation-curve);
    z-index: 100;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
    border-left: 1px solid rgba(166, 99, 204, 0.2);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    margin: 0;
    width: 100%;
  }

  .nav-links li a {
    display: block;
    padding: 1rem;
    text-align: left;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 1.1rem;
  }

  .nav-links li a:hover,
  .nav-links li a.active {
    background: rgba(166, 99, 204, 0.1);
    padding-left: 1.5rem;
  }

  .nav-links li a::after {
    display: none;
  }

  /* 移动端音乐播放器 */
  .music-player {
    width: calc(100% - 2rem);
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    padding: 1rem;
    border-radius: 12px;
    transform: translateY(calc(100% + 1rem));
    transition: transform 0.5s var(--animation-curve);
  }

  .music-player.hidden {
    transform: translateY(calc(100% + 1rem));
  }

  .music-player.visible {
    transform: translateY(0);
  }

  .toggle-player {
    bottom: 1.5rem;
    right: 1.5rem;
  }

  .category-cards {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .category-card {
    padding: 1.5rem;
  }

  .wide-card {
    max-width: 100%;
  }
}

/* 动画效果 */
@keyframes jump {
  0% {
    transform: translateY(0) translateX(0) rotate(0);
  }
  50% {
    transform: translateY(-15px) translateX(8px) rotate(5deg);
  }
  100% {
    transform: translateY(0) translateX(0) rotate(0);
  }
}

.t1 {
  animation: jump 3s infinite var(--animation-curve);
}

/* 文章卡片悬停效果 */
.article-card {
  transition: transform 0.5s var(--animation-curve), box-shadow 0.5s ease;
}

.article-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* 滚动动画 */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--animation-curve), transform 0.8s var(--animation-curve);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

