
/* 
整体页面样式设计
定义基本的页面结构和布局，采用现代专业风格，融合未来科技感和数据驱动的视觉元素
*/

/* 引入字体 */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* 设置全局样式 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #1A3B5D, #F0F2F5);
  color: #333333;
  overflow-x: hidden;
}

/* 顶部导航栏样式 */
.navbar {
  background-color: #1A3B5D;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 1rem 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar a {
  color: #F0F2F5;
  text-decoration: none;
  font-weight: bold;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: #FF7E00;
}

/* 主内容区样式 */
.main-content {
  padding-top: 80px; /* 确保内容不被导航栏覆盖 */
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* 章节样式 */
section {
  background-color: #FFFFFF;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

/* 标题样式 */
h2, h3 {
  color: #1A3B5D;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #FF7E00;
  display: inline-block;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* 段落样式 */
p {
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: #555555;
}

/* 代码块样式 */
pre {
  background-color: #F0F2F5;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

code {
  font-family: 'Courier New', Courier, monospace;
  color: #D35400;
}

/* 图片样式 */
img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
}

/* 鼠标悬停图片时显示光斑特效 */
img:hover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,126,0,0.4), rgba(255,126,0,0) 70%);
  animation: shine 2s infinite;
  border-radius: 8px;
}

@keyframes shine {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(0.8);
  }
}

/* 动态雨滴特效 */
.rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

.rain .drop {
  position: absolute;
  top: -10px;
  width: 2px;
  height: 15px;
  background: rgba(255, 255, 255, 0.6);
  animation: fall 1s linear infinite;
}

@keyframes fall {
  to {
    transform: translateY(100vh);
    opacity: 0;
  }
}

/* 添加阳光光斑动态特效 */
.sunlight::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 25%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 223, 0, 0.5), rgba(255, 223, 0, 0) 70%);
  animation: rotate 10s linear infinite;
  border-radius: 50%;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 提示文本样式 */
.prompt {
  text-align: center;
  font-size: 1.2rem;
  color: #FF7E00;
  margin-bottom: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
  }
  
  .navbar a {
    padding: 0.5rem 0;
  }
  
  .main-content {
    padding: 1rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.2rem;
  }
}

