
/* 
整体页面样式设计
以下样式定义了网页的整体布局、颜色搭配、排版以及交互效果，旨在打造一个融合未来感与高级质感的图文并茂页面。
*/

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

/* 全局样式 */
body {
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', sans-serif;
  background: linear-gradient(135deg, #0D47A1, #1976D2);
  color: #333333;
  line-height: 1.6;
}

/* 容器设置 */
.container {
  display: grid;
  grid-template-areas:
    'header'
    'main'
    'footer';
  grid-template-columns: 1fr;
  grid-template-rows: 80px 1fr 60px;
  min-height: 100vh;
}

/* 头部样式 */
header {
  grid-area: header;
  background: rgba(13, 71, 161, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 50px;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header .logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  color: #FFFFFF;
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav ul li a {
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: #FF5722;
}

/* 主内容区样式 */
main {
  grid-area: main;
  padding: 100px 50px 50px 50px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 30px;
}

/* 弹性布局用于内容模块 */
.section {
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: 10px;
  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(-10px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

/* 图片样式 */
.section img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

/* 代码块样式 */
pre {
  background: #f5f5f5;
  padding: 15px;
  border-radius: 5px;
  overflow: auto;
  position: relative;
}

pre::before {
  content: '代码示例';
  position: absolute;
  top: -20px;
  left: 0;
  background: #1976D2;
  color: #FFFFFF;
  padding: 5px 10px;
  font-size: 14px;
  border-radius: 3px;
}

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

/* 按钮样式 */
.button {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(45deg, #FF5722, #FF9800);
  color: #FFFFFF;
  text-decoration: none;
  border-radius: 25px;
  transition: background 0.3s ease;
}

.button:hover {
  background: linear-gradient(45deg, #FFA726, #FFB74D);
}

/* 底部样式 */
footer {
  grid-area: footer;
  background: rgba(13, 71, 161, 0.9);
  color: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 50px;
}

footer a {
  color: #FF5722;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #FF9800;
}

/* 加载动画样式 */
.loader {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #FF5722;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 2s linear infinite;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 20px;
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
  }

  main {
    padding: 120px 20px 20px 20px;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* 提示信息样式 */
.prompt-message {
  position: fixed;
  bottom: 10px;
  right: 10px;
  background: #FF5722;
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 600;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 折叠区域样式 */
.collapsible {
  background-color: #1976D2;
  color: white;
  cursor: pointer;
  padding: 10px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 16px;
  margin-top: 10px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.collapsible:hover {
  background-color: #1565C0;
}

.content {
  padding: 0 15px;
  display: none;
  overflow: hidden;
  background-color: #f1f1f1;
  border-radius: 5px;
}

.content p {
  color: #333333;
}

/* 动态卡片滑动展示样式 */
.slider {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  padding: 20px 0;
}

.slider::-webkit-scrollbar {
  height: 8px;
}

.slider::-webkit-scrollbar-thumb {
  background: #1976D2;
  border-radius: 4px;
}

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

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

.section {
  animation: fadeInSection 0.5s ease-in-out forwards;
}

/* 高亮文本样式 */
.highlight {
  color: #FF5722;
  font-weight: bold;
}

