/* 现代AI风格CSS - 珠峰未来学习中心 */

/* 使用系统字体，避免外部字体加载问题 */

:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-light: 0 8px 32px rgba(31, 38, 135, 0.37);
  --shadow-dark: 0 8px 32px rgba(0, 0, 0, 0.3);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --accent-color: #00d4ff;
  --success-color: #00ff88;
  --warning-color: #ffaa00;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  position: relative;
}

/* 黑客帝国数字雨效果 - 降低明度版本 */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), rgba(0, 15, 0, 0.6));
  z-index: -1;
}

.matrix-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.matrix-column {
  position: absolute;
  top: -100px;
  font-family: 'Courier New', monospace;
  font-size: 16px;
  color: #00cc66; /* 降低明度的绿色 */
  text-shadow: 0 0 3px rgba(0, 204, 102, 0.7), 0 0 6px rgba(0, 204, 102, 0.4);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  animation: matrixFall linear infinite;
}

@keyframes matrixFall {
  0% { 
    transform: translateY(-100%); 
    opacity: 0;
  }
  5% { 
    opacity: 1;
  }
  95% { 
    opacity: 1;
  }
  100% { 
    transform: translateY(100vh); 
    opacity: 0;
  }
}

/* 头部设计 - 精确5%透明度 */
header {
  position: relative;
  padding: 2rem 0;
  background: rgba(10, 10, 10, 0.05); /* 精确5%透明度 */
  backdrop-filter: blur(30px); /* 保持模糊效果 */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* 保持透明边框 */
  overflow: hidden;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-gradient);
  opacity: 0.05; /* 进一步降低背景渐变透明度 */
}

header h1 {
  font-size: 3.5rem;
  font-weight: 800;
  text-align: center;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  text-shadow: 0 0 40px rgba(102, 126, 234, 0.5);
  animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  from { filter: brightness(1); }
  to { filter: brightness(1.2); }
}

/* 导航栏 */
nav {
  position: relative;
  z-index: 10;
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 2rem;
  padding: 1rem 0;
}

nav ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

nav ul li a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.8) 0%, rgba(0, 242, 254, 0.8) 100%); /* 降低饱和度，与整体色彩搭配 */
  border-radius: 25px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
  z-index: -1;
}

nav ul li a:hover::before {
  transform: scaleX(1);
}

nav ul li a:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(79, 172, 254, 0.3); /* 柔和的阴影效果 */
}

/* 主体内容 */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem;
  position: relative;
}

/* 章节标题 - 半透明效果 */
section {
  margin-bottom: 4rem;
  position: relative;
}

h2 {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  background: var(--secondary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  text-shadow: 0 0 20px rgba(240, 147, 251, 0.3); /* 添加半透明发光效果 */
}

h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

/* 内容网格 */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* 内容卡片 - 增强半透明效果 */
.content-item {
  background: rgba(255, 255, 255, 0.08); /* 更透明的背景 */
  backdrop-filter: blur(25px); /* 增强模糊效果 */
  border: 1px solid rgba(255, 255, 255, 0.12); /* 更透明的边框 */
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.25); /* 更柔和的阴影 */
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.content-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.8) 0%, rgba(0, 242, 254, 0.8) 100%); /* 与导航栏一致的渐变色彩 */
  border-radius: 20px;
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.4s ease;
  z-index: -1;
}

.content-item:hover::before {
  transform: scale(1);
  opacity: 0.15; /* 适中的高亮透明度 */
}

.content-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 48px rgba(79, 172, 254, 0.4); /* 柔和的蓝色阴影 */
  border-color: rgba(79, 172, 254, 0.5); /* 蓝色边框高亮 */
}

.content-item h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
}

.content-item h3::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background: var(--accent-color);
  border-radius: 1px;
}

/* 按钮样式 */
.game-link, .dropdown-btn {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.9) 0%, rgba(0, 242, 254, 0.9) 100%); /* 降低饱和度，与整体色彩搭配 */
  color: white;
  padding: 1rem 2rem;
  border-radius: 15px;
  text-decoration: none;
  margin-top: 1.5rem;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3); /* 柔和的阴影 */
}

.game-link::before, .dropdown-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent); /* 降低高光强度 */
  transition: left 0.5s ease;
}

.game-link:hover::before, .dropdown-btn:hover::before {
  left: 100%;
}

.game-link:hover, .dropdown-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4); /* 柔和的悬停阴影 */
}

/* 下拉菜单 */
.dropdown {
  position: relative;
  display: inline-block;
  width: 100%;
}

.dropdown-content {
  display: none;
  position: absolute;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  min-width: 300px;
  max-width: 400px;
  box-shadow: var(--shadow-dark);
  z-index: 1000;
  border-radius: 15px;
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
  transition: all 0.3s ease;
  overflow: hidden;
}

.dropdown:hover .dropdown-content {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.dropdown-content a {
  color: var(--text-secondary);
  padding: 1rem 1.5rem;
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-content a:hover {
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.9) 0%, rgba(0, 242, 254, 0.9) 100%); /* 与导航栏一致的渐变色彩 */
  color: white;
  padding-left: 2rem;
  transform: translateX(5px); /* 轻微的移动效果 */
  box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3); /* 柔和的蓝色阴影 */
}

.dropdown-content a:last-child {
  border-bottom: none;
}

/* 音频播放器 */
.audio-player {
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.audio-player h4 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.audio-player audio {
  width: 100%;
  height: 40px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
}

/* 视频播放器 */
.video-player {
  width: 100%;
  margin: 2rem 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-dark);
  border: 1px solid var(--glass-border);
}

.video-player video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
}

/* 页脚 */
footer {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  padding: 3rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-gradient);
  opacity: 0.05;
}

footer p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0.5rem 0;
  position: relative;
  z-index: 1;
}

/* 子菜单链接 */
.sub-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.sub-links .game-link {
  margin-top: 0;
  font-size: 0.9rem;
  padding: 0.8rem 1.5rem;
}

/* 子下拉菜单 */
.sub-dropdown {
  position: relative;
}

.sub-dropdown-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: none;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 10px;
  font-size: 1rem;
  position: relative;
}

.sub-dropdown-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
}

.sub-dropdown-btn::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.sub-dropdown:hover .sub-dropdown-btn::after {
  transform: translateY(-50%) rotate(90deg);
}

.sub-dropdown-content {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  min-width: 250px;
  box-shadow: var(--shadow-dark);
  z-index: 1001;
  border-radius: 15px;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.3s ease;
  overflow: hidden;
}

.sub-dropdown:hover .sub-dropdown-content {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

.sub-dropdown-content a {
  color: var(--text-secondary);
  padding: 1rem 1.5rem;
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sub-dropdown-content a:hover {
  background: var(--accent-gradient);
  color: white;
  padding-left: 2rem;
}

/* 特殊音频下拉菜单 */
.audio-dropdown-top {
  z-index: 9999 !important;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  header h1 {
    font-size: 2.5rem;
  }

  nav ul {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .content-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
  }

  main {
    padding: 2rem 1rem;
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 2rem;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  nav ul li a {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .content-item {
    padding: 1.5rem;
  }

  .dropdown-content,
  .sub-dropdown-content {
    position: static;
    box-shadow: none;
    transform: none;
    opacity: 1;
    display: none;
    margin-top: 1rem;
    border-radius: 10px;
  }

  .dropdown:hover .dropdown-content,
  .sub-dropdown:hover .sub-dropdown-content {
    transform: none;
    display: block;
  }

  .content-item .dropdown-content {
    min-width: 100%;
    max-width: 100%;
  }

  .video-player {
    margin: 1rem 0;
  }

  .sub-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .content-item {
    padding: 1rem;
  }

  .game-link, .dropdown-btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
}

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

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
  opacity: 0.8;
}

/* 加载动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-item {
  animation: fadeInUp 0.6s ease-out;
}

.content-item:nth-child(1) { animation-delay: 0.1s; }
.content-item:nth-child(2) { animation-delay: 0.2s; }
.content-item:nth-child(3) { animation-delay: 0.3s; }
.content-item:nth-child(4) { animation-delay: 0.4s; }
.content-item:nth-child(5) { animation-delay: 0.5s; }
.content-item:nth-child(6) { animation-delay: 0.6s; }

/* 悬停时的科技感效果 */
.content-item:hover {
  animation: techPulse 2s infinite;
}

@keyframes techPulse {
  0%, 100% { box-shadow: 0 20px 60px rgba(31, 38, 135, 0.5); }
  50% { box-shadow: 0 20px 60px rgba(79, 172, 254, 0.8); }
}
