/* ==================== 全屏Hero区域 ==================== */
.hero-section {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: var(--gradient-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 1;
  transition: opacity 0.8s ease-out;
}

.hero-section.hidden {
  opacity: 0;
  pointer-events: none;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  padding: 40px;
}

.hero-typewriter {
  font-family: var(--font-title);
  font-size: 3.5rem;
  color: var(--text-primary);
  margin-bottom: 20px;
  min-height: 80px;
  position: relative;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.enter-btn {
  display: inline-block;
  padding: 15px 40px;
  background: var(--gradient-accent);
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  animation: bounce 2s infinite;
}

.enter-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px var(--shadow-soft);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* ==================== 主题切换全屏遮罩 ==================== */
.theme-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.theme-overlay.active {
  opacity: 1;
  visibility: visible;
}

.theme-transition {
  font-size: 5rem;
  color: var(--accent-color);
  animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ==================== 代码块样式 ==================== */
.highlight {
  margin: 20px 0;
  border-radius: 10px;
  overflow: hidden;
}

.highlight pre {
  background: #fafafa;
  border-radius: 10px;
  padding: 20px;
  overflow-x: auto;
}

.dark .highlight pre {
  background: #2d2d2d !important;
}

.highlight code {
  font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* 亮色模式下的代码块 */
.highlight pre {
  background: #fafafa;
  border-radius: 10px;
  padding: 20px;
  overflow-x: auto;
}

/* ==================== 欢迎卡片样式 ==================== */
.welcome-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 4px 20px var(--shadow-soft);
  border: 1px solid var(--border-soft);
}

.dark .welcome-card {
  background: rgba(61, 61, 61, 0.6);
}

.welcome-card h3 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.welcome-card p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.welcome-stats {
  display: flex;
  justify-content: space-around;
  gap: 20px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}

.welcome-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 15px 20px;
  background: rgba(212, 165, 116, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.welcome-stat:hover {
  background: rgba(212, 165, 116, 0.2);
  transform: translateY(-3px);
}

.welcome-stat i {
  font-size: 1.5rem;
  color: var(--accent-color);
}

.welcome-stat span {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==================== 章节标题样式 ==================== */
.section-title {
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--text-primary);
  margin: 40px 0 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--accent-soft);
}

/* ==================== 查看更多按钮 ==================== */
.view-more {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
}

/* ==================== 侧边栏宽度调整 ==================== */
/* 左侧边栏 - 扩宽10%~15% */
aside.left-sidebar {
  width: 300px;
}

/* 右侧边栏 - 扩宽10%~15% */
aside.right-sidebar {
  width: 300px;
}

/* 主内容区 - 相应缩窄 */
main#main-content {
  margin-left: 300px;
  margin-right: 300px;
  width: calc(100% - 600px);
}

/* 响应式调整 */
@media (max-width: 1400px) {
  aside.left-sidebar,
  aside.right-sidebar {
    width: 260px;
  }

  main#main-content {
    margin-left: 260px;
    margin-right: 260px;
    width: calc(100% - 520px);
  }
}

@media (max-width: 1100px) {
  aside.right-sidebar {
    display: none;
  }

  main#main-content {
    margin-right: 0;
    width: calc(100% - 260px);
  }
}

@media (max-width: 768px) {
  aside.left-sidebar {
    display: none;
  }

  main#main-content {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }
}
