/* 基础样式 */
:root {
  --primary-color: #6a0dad;
  --secondary-color: #4b0082;
  --accent-color: #9370db;
  --light-purple: #b19cd9;
  --blue-color: #4169e1;
  --light-blue: #87cefa;
  --text-color: #333;
  --light-text: #fff;
  --bg-color: #f9f9f9;
  --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: var(--light-text);
  transition: all 0.3s ease;
}

a:hover {
  color: var(--light-blue);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部样式 */
header {
  background: linear-gradient(135deg, var(--primary-color), var(--blue-color));
  color: var(--light-text);
  padding: 15px 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 50px;
  margin-right: 10px;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  padding: 5px 10px;
  border-radius: 5px;
}

nav ul li a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* 横幅样式 */
.banner {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, var(--accent-color), var(--light-blue));
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  overflow: hidden;
  position: relative;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}

.banner-content {
  position: absolute;
  text-align: center;
  color: var(--light-text);
  z-index: 2;
}

.banner-content h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-content p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 主要内容样式 */
.main-content {
  padding: 30px 0;
  min-height: calc(100vh - 400px);
}

/* 页脚样式 */
footer {
  background: linear-gradient(135deg, var(--primary-color), var(--blue-color));
  color: var(--light-text);
  padding: 30px 0 20px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.footer-section {
  flex: 1;
  min-width: 200px;
  margin-bottom: 20px;
  padding: 0 15px;
}

.footer-section h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 10px;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 2px;
  background-color: var(--light-blue);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 20px;
}

.copyright p {
  margin-bottom: 10px;
}

.legal-link {
  cursor: pointer;
  text-decoration: underline;
}

/* 弹窗样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  overflow: auto;
}

.modal-content {
  background-color: var(--bg-color);
  margin: 10% auto;
  padding: 30px;
  border-radius: 10px;
  width: 80%;
  max-width: 700px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  color: var(--text-color);
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  cursor: pointer;
}

.close-modal:hover {
  color: var(--secondary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
  }
  
  nav ul {
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  nav ul li {
    margin: 5px 10px;
  }
  
  .banner-content h2 {
    font-size: 2rem;
  }
  
  .banner-content p {
    font-size: 1rem;
  }
  
  .footer-container {
    flex-direction: column;
  }
  
  .footer-section {
    margin-bottom: 30px;
  }
}

/* 主页特定样式 */
.welcome-section {
  text-align: center;
  margin-bottom: 50px;
}

.welcome-section h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.welcome-section p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 30px;
}

.slider {
  width: 100%;
  height: 500px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin-bottom: 50px;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-content {
  position: absolute;
  bottom: 50px;
  left: 50px;
  background-color: rgba(106, 13, 173, 0.8);
  color: var(--light-text);
  padding: 20px;
  border-radius: 10px;
  max-width: 500px;
}

.slide-content h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.slide-content p {
  font-size: 1.1rem;
}

.slider-nav {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  z-index: 10;
}

.slider-nav-item {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  margin: 0 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.slider-nav-item.active {
  background-color: var(--light-text);
}

/* 页面1特定样式 - 图文展示 */
.image-text-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.image-text-item {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
}

.image-text-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.image-text-item img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  flex-shrink: 0;
}

.image-text-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.image-text-content h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.image-text-content p {
  color: var(--text-color);
  flex-grow: 1;
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.pagination a {
  color: var(--primary-color);
  padding: 8px 16px;
  margin: 0 5px;
  border-radius: 5px;
  border: 1px solid var(--accent-color);
}

.pagination a.active, 
.pagination a:hover {
  background-color: var(--primary-color);
  color: white;
}

/* 页面2特定样式 - 视频展示 */
.video-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.video-item {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.video-item:hover {
  transform: translateY(-5px);
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 比例 */
  height: 0;
  overflow: hidden;
}

.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-info {
  padding: 15px;
}

.video-info h3 {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

/* 页面3特定样式 - 图片展示 */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.photo-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
  aspect-ratio: 1/1;
}

.photo-item:hover {
  transform: scale(1.05);
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

/* 图片弹窗样式 */
.image-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
}

.image-modal-content {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  position: relative;
}

.image-modal-content img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.close-image-modal {
  position: absolute;
  top: 30px;
  right: 40px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.prev-btn, .next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  padding: 20px;
  user-select: none;
}

.prev-btn {
  left: 30px;
}

.next-btn {
  right: 30px;
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 1s ease-in-out;
}

/* 响应式调整 */
@media (max-width: 1024px) {
  .photo-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .image-text-section, .video-gallery {
    grid-template-columns: 1fr;
  }
  
  .image-text-item {
    flex-direction: column;
  }
  
  .image-text-item img {
    width: 100%;
    height: 200px;
  }
  
  .photo-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .slider {
    height: 400px;
  }
  
  .slide-content {
    left: 20px;
    bottom: 20px;
    max-width: 80%;
  }
}

@media (max-width: 480px) {
  .photo-gallery {
    grid-template-columns: 1fr;
  }
  
  .slider {
    height: 300px;
  }
  
  .slide-content {
    padding: 10px;
    left: 10px;
    bottom: 10px;
  }
  
  .slide-content h3 {
    font-size: 1.3rem;
  }
  
  .slide-content p {
    font-size: 0.9rem;
  }
}