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

/* 移除原有的rem相关设置 */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden; /* 保持这个以便支持全屏滚动 */
}

body {
  font-family: 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #2354ff 0%, #0a8fff 25%, #4fc3f7 50%, #81d4fa 75%, #b3e5fc 100%);
  background-size: 400% 400%;
  animation: gradientBG 20s ease infinite;
  /* 确保内容可见 */
  opacity: 1;
  transition: opacity 0.5s ease;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 添加初始加载类 */
body.loaded {
  opacity: 1;
  visibility: visible;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* 默认样式 - 针对1920px屏幕 */
header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1010; /* 提高层级，确保在最上层 */
  background: rgba(255, 255, 255, 0.95);
  padding: 0;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

nav {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 10px 20px;
}

.company-logo {
  background: none;
  color: #2354ff;
  font-weight: bold;
  font-size: 24px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Logo 图片样式 */
.logo-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-right: 12px;
}

nav ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  margin-left: auto;
}

nav ul li {
  position: relative;
}

nav ul li a {
  text-decoration: none;
  color: #555;
  padding: 10px 20px;
  display: block;
  font-size: 16px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 6px;
  padding: 8px;
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.submenu a {
  color: #2354ff;
  padding: 8px 12px;
  font-size: 14px;
  display: block;
  transition: all 0.3s ease;
}

nav ul li:hover>a {
  background: rgba(35, 84, 255, 0.1);
  color: #2354ff;
  border-radius: 6px;
}

nav ul li:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu a:hover {
  background: rgba(35, 84, 255, 0.1);
  border-radius: 4px;
}

.nav-buttons {
  display: none;
}

.search-box {
  display: none;
}

/* 重要：覆盖脚本中的hidden类，确保内容始终可见 */
.hidden {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

.fade-in {
  animation: none !important; /* 禁用可能导致问题的动画 */
}

/* 修改section样式确保可见性但不干扰滑动 */
section {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 80px 60px; /* 增加顶部填充以留出导航栏空间 */
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(15px);
  border: none;
  border-radius: 0;
  /* 确保内容显示但不强制display */
  opacity: 1;
  visibility: visible;
  transform: none;
  overflow-y: auto; /* 允许内部滚动 */
  box-sizing: border-box;
  display: flex;
  align-items: center; /* 垂直居中 */
  justify-content: center; /* 水平居中 */
}

/* 修复：确保内容可见但不强制居中也不干扰swiper */
.section-content {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 50px 20px 20px; /* 右侧留出更多空间给圆点导航 */
  height: 100%; /* 改为auto，让内容决定高度 */
  max-height: calc(100% - 40px); /* 设置最大高度 */
  overflow-y: auto; /* 允许内容滚动 */
  opacity: 1;
  position: relative;
  z-index: 1; /* 降低z-index避免覆盖其他内容 */
  display: flex;
  flex-direction: column;
  justify-content: center; /* 垂直居中内容 */
}

/* 首页样式调整 */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  display: flex !important;
  align-items: center; /* 垂直居中 */
  justify-content: center; /* 水平居中 */
  text-align: center;
  padding: 80px 60px; /* 调整填充以匹配其他section */
  overflow: visible;
  opacity: 1 !important;
  visibility: visible !important;
}

.hero-content {
  max-width: 1200px;
  width: 100%;
  height: 100%;
  padding: 20px 50px 20px 20px; /* 右侧留出更多空间给圆点导航 */
  position: relative;
  z-index: 10;
  display: flex !important;
  flex-direction: column;
  /* 修复：调整高度，防止内容溢出 */
  min-height: auto;
  justify-content: center; /* 垂直居中 */
  align-items: center; /* 水平居中 */
  margin: 0 auto;
  /* 强制可见性 */
  opacity: 1 !important;
  visibility: visible !important;
}

.hero-header {
  margin-bottom: 40px;
}

.hero-header h1 {
  font-size: 48px;
  margin-bottom: 15px;
  color: #333;
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
  position: relative;
  display: inline-block;
  font-weight: 700;
}

.hero-header h1::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #2354ff, #0a8fff);
  border-radius: 2px;
}

.subtitle {
  font-size: 22px;
  color: #555;
  margin-bottom: 20px;
  text-shadow: none;
  font-weight: 400;
}

/* 特性展示区域 */
.hero-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 50px;
  width: 100%;
}

.feature-item {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  padding: 30px;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.feature-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.feature-item i {
  font-size: 36px;
  margin-bottom: 16px;
  color: #2354ff;
}

.feature-item h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: #333;
  font-weight: 600;
}

.feature-item p {
  color: #666;
  font-size: 16px;
}

/* 按钮样式 */
.hero-cta {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 60px;
  width: 100%;
}

.cta-button {
  padding: 12px 30px;
  font-size: 16px;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  cursor: pointer;
}

.cta-button:first-child {
  background: linear-gradient(135deg, #2354ff 0%, #0a8fff 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(35, 84, 255, 0.3);
}

.cta-button.outline {
  border: 2px solid #2354ff;
  color: #2354ff;
  background: rgba(255, 255, 255, 0.5);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(35, 84, 255, 0.4);
}

/* 修改滚动提示样式 */
.scroll-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: #555;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: bounce 2s infinite;
  z-index: 10;
  background: none;
  padding: 8px 16px;
  border-radius: 20px;
  backdrop-filter: none;
}

.scroll-hint span {
  font-size: 14px;
  letter-spacing: 2px;
  font-weight: 500;
  color: #555;
  text-shadow: none;
}

.scroll-hint .arrow {
  width: 15px;
  height: 15px;
  border-right: 2px solid #2354ff;
  border-bottom: 2px solid #2354ff;
  transform: rotate(45deg);
  margin-top: -5px;
}

/* 修改动画效果 */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translate(-50%, 0);
  }
  40% {
    transform: translate(-50%, -10px);
  }
  60% {
    transform: translate(-50%, -5px);
  }
}

/* 关于我部分样式 */
.about {
  margin: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.7);
  background-size: 400% 400%;
}

.about .section-content {
  max-width: 1200px;
  height: 100%;
  width: 100%;
  overflow-y: auto;
  padding: 20px 50px 20px 20px; /* 右侧留出空间给导航 */
  display: flex;
  flex-direction: column;
  justify-content: center; /* 垂直居中 */
}

/* 调整关于我部分样式 */
.about-content {
  width: 100%;
  display: flex;
  align-items: center; /* 居中对齐 */
  justify-content: space-between;
  margin: auto 0; /* 垂直居中 */
}

/* 左侧内容 */
.about-left {
  display: flex;
  flex-direction: column;
  gap: 60px;
  width: 55%;
}

/* 右侧内容 */
.about-right {
  width: 40%;
  padding-top: 40px;
  height: 100%;
}

/* 调整头像和个人介绍部分 */
.about-header {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
}

.about-intro {
  flex: 1;
  margin-left: 20px;
}

.about-intro h3 {
  font-size: 28px;
  margin-bottom: 8px;
  color: #333;
  font-weight: 700;
}

.about-intro .title {
  font-size: 18px;
  color: #666;
  margin-bottom: 15px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tags span {
  padding: 5px 12px;
  height: 28px;
  background: rgba(35, 84, 255, 0.15);
  border-radius: 14px;
  font-size: 14px;
  display: flex;
  align-items: center;
  color: #2354ff;
  font-weight: 500;
}

/* 技能部分 */
.skills-section {
  width: 100%;
}

.skills-section h3 {
  font-size: 32px;
  margin-bottom: 30px;
  color: #333;
  font-weight: 700;
}

.skills-grid {
  display: grid;
  gap: 24px;
}

.skill-item {
  background: rgba(255, 255, 255, 0.8);
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.skill-header span {
  color: #333;
  font-weight: 600;
  font-size: 16px;
}

.skill-header i {
  font-size: 32px;
  color: #2354ff;
}

.skill-bar {
  height: 8px;
  background: rgba(35, 84, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.skill-level {
  height: 100%;
  background: linear-gradient(90deg, #2354ff, #0a8fff);
  border-radius: 4px;
  transition: width 1s ease;
}

/* Swiper及其相关元素的样式 */
.main-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  margin-top: 0; /* 不需要额外的顶部间距 */
}

.swiper {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.swiper-wrapper {
  width: 100%;
  height: 100%;
  /* 移除阻止Swiper工作的样式 */
  /* transform: none; */ /* 允许Swiper控制transform */
  /* transition: transform 0.8s ease; */ /* 让Swiper控制自己的transition */
}

.swiper-slide {
  width: 100%;
  height: 100%;
  position: relative;
  opacity: 1;
  visibility: visible;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 40px; /* 为右侧分页器留出空间 */
  box-sizing: border-box;
}

/* 活动幻灯片样式 */
.swiper-slide-active {
  z-index: 2;
}

/* 自定义分页器样式 - 简约风格 */
.swiper-pagination {
  position: fixed !important;
  right: 30px !important;
  left: auto !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: auto !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1020;
  padding: 0;
  background: transparent;
  border-radius: 0;
  backdrop-filter: none;
  box-shadow: none;
}

.swiper-pagination-bullet {
  width: 10px !important;
  height: 10px !important;
  background: rgba(35, 84, 255, 0.3) !important;
  opacity: 1 !important;
  margin: 0 !important;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.swiper-pagination-bullet::before {
  display: none;
}

.swiper-pagination-bullet::after {
  display: none;
}

.swiper-pagination-bullet:hover {
  background: rgba(35, 84, 255, 0.6) !important;
  transform: scale(1.3);
}

.swiper-pagination-bullet-active {
  background: #2354ff !important;
  width: 10px !important;
  height: 32px !important;
  border-radius: 5px !important;
}

@keyframes pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.5;
  }
}

/* 汉堡菜单按钮样式 */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger span {
  width: 100%;
  height: 3px;
  background-color: #fff;
  transition: all 0.3s ease;
}

h2 {
  font-size: 42px;
  margin-bottom: 40px;
  color: #333;
  text-align: center;
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  font-weight: 700;
}

/* 作品集样式 */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  width: 100%;
  padding: 0;
  margin-top: 20px;
}

.portfolio-item {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.portfolio-preview {
  position: relative;
  overflow: hidden;
}

.portfolio-preview img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.portfolio-links {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-links {
  opacity: 1;
}

.portfolio-links a {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.3s ease;
}

.portfolio-links a:hover {
  background: rgba(255, 255, 255, 0.2);
}

.portfolio-info {
  padding: 20px;
}

.portfolio-info h3 {
  font-size: 22px;
  margin-bottom: 15px;
  color: #333;
  font-weight: 600;
}

.tech-stack {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.tech-stack span {
  padding: 5px 12px;
  background: rgba(35, 84, 255, 0.15);
  border-radius: 15px;
  font-size: 14px;
  color: #2354ff;
  font-weight: 500;
}

.project-desc {
  margin-bottom: 15px;
  line-height: 1.6;
  color: #666;
  font-size: 14px;
}

.project-features {
  list-style: none;
  padding: 0;
}

.project-features li {
  padding: 5px 0;
  color: #666;
  position: relative;
  padding-left: 25px;
  font-size: 14px;
}

.project-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #2354ff;
  font-weight: bold;
}

/* 联系方式部分样式 */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 20px 20px 0; /* 右侧不需要额外空间 */
}

.contact-header {
  margin-bottom: 30px;
  text-align: left;
  padding-top: 20px;
}

.contact-header h3 {
  font-size: 28px;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #2354ff, #0a8fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.contact-header p {
  color: #666;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  transition: transform 0.3s ease, background-color 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.contact-item:hover {
  transform: translateX(5px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.contact-item i {
  font-size: 24px;
  color: #2354ff;
  flex-shrink: 0;
}

.contact-detail h4 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #333;
  font-weight: 600;
}

.contact-detail p,
.contact-detail a {
  color: #666;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 16px;
}

.contact-detail a:hover {
  color: #2354ff;
}

.social-media {
  margin-top: 30px;
}

.social-media h4 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #333;
  font-weight: 600;
}

.social-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(35, 84, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2354ff;
  text-decoration: none;
  font-size: 20px;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: #2354ff;
  color: #fff;
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(35, 84, 255, 0.3);
}

/* 联系表单样式 */
.contact-form {
  background: rgba(255, 255, 255, 0.8);
  padding: 30px;
  border-radius: 12px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.contact-form h3 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #333;
  font-weight: 700;
}

.form-group {
  position: relative;
  margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(35, 84, 255, 0.2);
  border-radius: 6px;
  color: #333;
  font-size: 16px;
  transition: all 0.3s ease;
}

.form-group textarea {
  height: 120px;
  resize: none;
}

.form-group label {
  position: absolute;
  left: 15px;
  top: 15px;
  color: #999;
  transition: all 0.3s ease;
  pointer-events: none;
  font-size: 16px;
}

.form-group input:focus,
.form-group textarea:focus {
  background: rgba(255, 255, 255, 0.8);
  border-color: #2354ff;
  outline: none;
}

.form-group input:focus~label,
.form-group textarea:focus~label,
.form-group input:valid~label,
.form-group textarea:valid~label {
  transform: translateY(-25px);
  font-size: 14px;
  color: #2354ff;
}

.submit-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #2354ff 0%, #0a8fff 100%);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(35, 84, 255, 0.4);
}

.submit-btn i {
  transition: transform 0.3s ease;
}

.submit-btn:hover i {
  transform: translateX(5px);
}

/* 响应式设计 - 1600px */
@media (max-width: 1600px) {
  nav {
    max-width: 1200px;
  }
  
  .hero-content {
    max-width: 1000px;
  }
  
  .hero-header h1 {
    font-size: 42px;
  }
  
  .subtitle {
    font-size: 20px;
  }
  
  .feature-item {
    padding: 25px;
  }
  
  .feature-item i {
    font-size: 32px;
  }
  
  .section-content {
    max-width: 1000px;
  }
  
  .portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  
  section {
    padding: 70px 50px;
  }
  
  .section-content {
    padding: 20px 40px 20px 20px;
  }
  
  .hero {
    padding: 70px 50px;
  }
  
  .hero-content {
    padding: 20px 40px 20px 20px;
  }
}

/* 响应式设计 - 1200px */
@media (max-width: 1200px) {
  nav {
    max-width: 1000px;
    padding: 8px 15px;
  }
  
  .company-logo {
    font-size: 20px;
  }
  
  .logo-icon {
    width: 35px;
    height: 35px;
  }
  
  nav ul li a {
    padding: 8px 15px;
    font-size: 15px;
  }
  
  section {
    padding: 60px 40px;
  }
  
  .hero-content {
    max-width: 800px;
  }
  
  .hero-header h1 {
    font-size: 36px;
  }
  
  .subtitle {
    font-size: 18px;
  }
  
  .feature-item {
    padding: 20px;
  }
  
  .feature-item i {
    font-size: 28px;
  }
  
  .feature-item h3 {
    font-size: 18px;
  }
  
  .section-content {
    max-width: 800px;
  }
  
  .portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
  }
  
  .contact-container {
    gap: 30px;
  }
  
  h2 {
    font-size: 36px;
    margin-bottom: 30px;
  }
  
  .section-content {
    padding: 15px 30px 15px 15px;
  }
  
  .hero {
    padding: 60px 40px;
  }
  
  .hero-content {
    padding: 15px 30px 15px 15px;
  }
  
  .swiper-pagination {
    right: 10px !important;
    padding: 8px;
  }
}

/* 响应式设计 - 768px */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  nav ul {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }

  nav ul.active {
    transform: translateX(0);
  }

  nav ul li {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
  }

  nav ul.active li {
    opacity: 1;
    transform: translateY(0);
  }

  nav ul li:nth-child(1) {
    transition-delay: 0.1s;
  }

  nav ul li:nth-child(2) {
    transition-delay: 0.2s;
  }

  nav ul li:nth-child(3) {
    transition-delay: 0.3s;
  }

  nav ul li:nth-child(4) {
    transition-delay: 0.4s;
  }

  .hamburger.active span:first-child {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:last-child {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  nav ul li a {
    font-size: 18px;
  }

  .submenu {
    position: static;
    background: transparent;
    padding: 15px 0;
    min-width: auto;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }

  .submenu a {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 8px 0;
    font-size: 16px;
  }

  nav ul li:hover .submenu {
    display: block;
  }
  
  section {
    padding: 50px 30px;
  }
  
  .hero-content {
    max-width: 600px;
    padding: 10px 20px 10px 10px;
  }
  
  .hero-header h1 {
    font-size: 30px;
  }
  
  .subtitle {
    font-size: 16px;
  }
  
  .hero-features {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
  }
  
  .cta-button {
    padding: 10px 25px;
  }
  
  .swiper-pagination {
    right: 5px !important;
    padding: 5px;
  }
  
  .section-content {
    padding: 10px 20px 10px 10px;
  }
  
  .about-content {
    flex-direction: column;
    align-items: center;
  }
  
  .about-left, .about-right {
    width: 100%;
  }
  
  .avatar {
    width: 100px;
    height: 100px;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 160px);
  }
  
  .contact-container {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 10px;
  }
  
  h2 {
    font-size: 28px;
    margin-bottom: 25px;
  }
}

/* 响应式设计 - 480px (小型手机设备) */
@media (max-width: 480px) {
  .company-logo {
    font-size: 18px;
  }
  
  .logo-icon {
    width: 30px;
    height: 30px;
    margin-right: 8px;
  }
  
  .hero-header h1 {
    font-size: 24px;
  }
  
  .subtitle {
    font-size: 14px;
  }
  
  .feature-item {
    padding: 15px;
  }
  
  .feature-item i {
    font-size: 24px;
  }
  
  .cta-button {
    padding: 8px 20px;
    font-size: 14px;
  }
  
  .about-header {
    flex-direction: column;
    text-align: center;
  }
  
  .about-intro {
    margin-left: 0;
    margin-top: 15px;
  }
  
  .contact-item {
    padding: 15px;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 12px;
  }
  
  .form-group label {
    left: 12px;
    top: 12px;
    font-size: 14px;
  }
  
  .submit-btn {
    padding: 12px;
  }
  
  /* 修复小屏幕可视范围 */
  .section-content {
    padding: 10px;
  }
  
  .portfolio-grid {
    gap: 15px;
  }
  
  section {
    padding: 40px 20px;
  }
  
  .section-content {
    padding: 10px 15px 10px 5px;
  }
  
  .hero {
    padding: 40px 20px;
  }
  
  .hero-content {
    padding: 10px 15px 10px 5px;
  }
}

/* 额外添加：确保内容可见的样式 */
footer {
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  color: #666;
  text-align: center;
  padding: 15px;
  z-index: 999;
  backdrop-filter: blur(10px);
}

/* 确保页面内容在初始加载时可见 */
#home, #about, #portfolio, #contact {
  display: flex;
  visibility: visible;
  opacity: 1;
}

/* 特别确保首页显示 */
#home.hero {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 10;
}

/* 动画和过渡样式 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* 为JavaScript动画添加的类 */
.fade-in {
  animation: fadeIn 0.8s ease-in-out forwards;
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-in-out forwards;
}

.fade-in-left {
  animation: fadeInLeft 0.8s ease-in-out forwards;
}

.fade-in-right {
  animation: fadeInRight 0.8s ease-in-out forwards;
}

.scale-in {
  animation: scaleIn 0.8s ease-in-out forwards;
}

/* 延迟类 */
.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

.delay-4 {
  animation-delay: 0.4s;
}

.delay-5 {
  animation-delay: 0.5s;
}

/* 进度条 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #2354ff, #0a8fff);
  z-index: 1500;
  width: 0;
  transition: width 0.3s ease;
}

/* 波纹效果 */
.ripple {
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 1s linear;
}

@keyframes ripple {
  to {
    transform: scale(20);
    opacity: 0;
  }
}

/* 确保所有sections可见但不要干扰布局 */
#home, #about, #portfolio, #contact {
  display: flex;
  visibility: visible;
  opacity: 1;
}

/* 移除覆盖元素 */
.animated,
.fade-in,
.fade-in-up,
.fade-in-left,
.fade-in-right,
.scale-in,
.hidden {
  /* 适当减弱强制样式 */
  opacity: 1;
  visibility: visible;
}

/* 修复容器问题 */
.main-wrapper {
  visibility: visible !important;
  opacity: 1 !important;
}

/* 作品集部分调整 */
.portfolio .section-content {
  height: 100%;
  justify-content: center; /* 垂直居中 */
  padding-top: 20px; /* 减少顶部padding */
}

/* 联系方式部分调整 */
.contact .section-content {
  height: 100%;
  justify-content: center; /* 垂直居中 */
  padding-top: 20px; /* 减少顶部padding */
}

/* 活跃导航项样式 */
nav ul li a.active {
  background: rgba(35, 84, 255, 0.15);
  color: #2354ff;
  font-weight: bold;
  border-radius: 6px;
}

/* 确保分页器点能在各种背景下显示 */
.swiper-pagination-bullet {
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}