
:root {
  --primary: #1a365d;
  --secondary: #c4b454;
  --white: #ffffff;
  --black: #000000;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
}

/* 基础样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  line-height: 1.5;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--white);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

/* 布局 */
.container {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.flex {
  display: flex;
}

.grid {
  display: grid;
}

.hidden {
  display: none;
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(26, 54, 93, 0.9);
  backdrop-filter: blur(4px);
  z-index: 50;
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo {
  font-family: 'Pacifico', cursive;
  color: var(--secondary);
  font-size: 1.5rem;
}

.nav-menu {
  display: flex;
  align-items: baseline;
}

.nav-menu-items {
  margin-left: 2.5rem;
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--white);
  padding: 0.75rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.nav-link:hover {
  color: var(--secondary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* 主要区域 */
.main {
  padding-top: 4rem;
}

/* 视频和英雄部分 */
.video-section {
  position: relative;
  max-height: 70vh;
  overflow: hidden;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 恢复原始比例 */
  height: 0;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-image: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 2rem;
}

.hero-title {
  color: var(--white);
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-text {
  color: var(--gray-200);
  margin-bottom: 1rem;
}

.btn-group {
  display: flex;
  gap: 1rem;
}

.primary-btn {
  background-color: var(--secondary);
  color: var(--primary);
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.primary-btn:hover {
  background-color: rgba(196, 180, 84, 0.9);
}

.secondary-btn {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--white);
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.secondary-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* 新闻部分 */
.news-section {
  padding: 4rem 0;
  background-color: var(--gray-50);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.text-center {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--gray-600);
  max-width: 42rem;
  margin: 0 auto;
  margin-bottom: 2rem;
}

.view-more {
  color: var(--secondary);
  display: flex;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
}

.view-more:hover {
  color: rgba(196, 180, 84, 0.8);
}

.view-more i {
  margin-left: 0.5rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.news-item {
  background-color: var(--white);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
}

.news-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.news-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.news-content {
  padding: 1.5rem;
}

.news-date {
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.news-title {
  color: var(--gray-900);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.news-description {
  color: var(--gray-700);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.news-read-more, .news-read-less {
  display: inline-block;
  background-color: var(--primary);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.news-read-more:hover, .news-read-less:hover {
  background-color: #0f294a;
}

.news-detail {
  padding: 0 1.5rem 1.5rem;
  overflow: hidden;
}

.news-detail.hidden {
  display: none;
}

.news-detail-inner {
  background-color: var(--gray-50);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.news-detail-image {
  width: 100%;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
}

.news-detail-subtitle {
  font-size: 1.125rem;
  color: var(--gray-800);
  margin: 1.25rem 0 0.75rem;
}

.timeline-box {
  background-color: var(--white);
  border-radius: 0.375rem;
  padding: 1rem;
  margin-top: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.timeline-title {
  font-size: 1rem;
  color: var(--gray-800);
  margin-bottom: 0.75rem;
}

.timeline-list {
  list-style: none;
  padding-left: 1rem;
}

.timeline-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-700);
}

.timeline-list li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--primary);
  border-radius: 50%;
}

/* 特性部分 */
.features-section {
  padding: 6rem 0;
  background-color: var(--white);
}

.text-center {
  text-align: center;
}

.section-subtitle {
  color: var(--gray-600);
  max-width: 42rem;
  margin: 0 auto;
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.feature-item {
  background-color: var(--gray-100);
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
}

.feature-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--secondary);
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.feature-text {
  color: var(--gray-600);
}

/* 统计部分 */
.stats-section {
  padding: 6rem 0;
  background-color: var(--gray-100);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item {
  margin-bottom: 1.5rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--gray-600);
}

.chart {
  width: 100%;
  height: 20rem;
}

/* 评论部分 */
.reviews-section {
  padding: 6rem 0;
  background-color: var(--white);
}

.reviews-container {
  position: relative;
  overflow: hidden;
}

.reviews-slider {
  display: flex;
  transition: transform 0.3s ease;
}

.review-item {
  flex: none;
  width: 100%;
  padding: 1rem;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.review-card {
  background-color: var(--gray-100);
  border-radius: 0.5rem;
  padding: 1.5rem;
  height: 100%;
}

.review-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.review-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
}

.review-info {
  margin-left: 1rem;
}

.review-name {
  font-weight: 600;
  color: var(--primary);
}

.review-stars {
  color: #facc15;
  display: flex;
}

.review-text {
  color: var(--gray-600);
}

/* 游戏集合部分 */
.games-section {
  padding: 4rem 0;
}

.games-container {
  position: relative;
}

.game-scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1.5rem;
  scroll-behavior: smooth;
}

.game-scroll::-webkit-scrollbar {
  display: none;
}

.game-item {
  flex: none;
  width: 18rem;
}

.game-card {
  background-color: var(--white);
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  cursor: pointer;
}

.game-image {
  width: 100%;
  height: 16rem;
  object-fit: cover;
}

.game-info {
  padding: 1rem;
}

.game-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
}

.game-subtitle {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

.game-platforms {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.game-platforms i {
  color: var(--gray-600);
}

.game-btn {
  display: block;
  width: 100%;
  background-color: var(--secondary);
  color: var(--primary);
  text-align: center;
  padding: 0.5rem 0;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.15s;
  border: none;
  cursor: pointer;
}

.game-btn:hover {
  background-color: rgba(196, 180, 84, 0.9);
}

.game-prev,
.game-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.8);
  padding: 0.5rem;
  border-radius: 50%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.game-prev {
  left: 0;
}

.game-next {
  right: 0;
}

.game-prev:hover,
.game-next:hover {
  background-color: var(--white);
}

.game-prev i,
.game-next i {
  font-size: 1.5rem;
  color: var(--primary);
}

/* 模态框 */
.modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background-color: var(--white);
  border-radius: 0.5rem;
  max-width: 48rem;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-500);
  cursor: pointer;
}

.modal-body {
  padding: 1.5rem;
}

.modal-content-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-image {
  width: 100%;
  height: auto;
  max-height: 24rem;
  object-fit: cover;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
}

.modal-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin: 1rem 0 0.5rem 0;
}

.timeline-box {
  background-color: var(--gray-100);
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1.5rem;
}

.timeline-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.timeline-list {
  list-style: disc;
  padding-left: 1.5rem;
}

.timeline-list li {
  margin-bottom: 0.5rem;
}

/* 页脚 */
.footer {
  background-color: var(--primary);
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand .logo {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.footer-text {
  color: var(--gray-300);
}

.social-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  color: var(--gray-300);
  transition: color 0.15s;
}

.social-link:hover {
  color: var(--secondary);
}

.social-link i {
  font-size: 1.5rem;
  margin-right: 0.5rem;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: var(--gray-300);
}

/* 响应式设计 */
@media (max-width: 1023px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .mobile-nav-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 4rem;
    left: 0;
    width: 100%;
    background-color: rgba(26, 54, 93, 0.95);
    padding: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 40;
    margin-top: 0;
    display: block;
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-menu-items {
    flex-direction: column;
    align-items: flex-start;
    margin-left: 0;
    width: 100%;
  }
  
  .nav-link {
    padding: 0.75rem 0;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
  }
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .review-item {
    width: 50%;
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .review-item {
    width: 33.333%;
  }
  
  .social-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* 文章详情页样式 */
.article-header {
  padding: 3rem 0 2rem;
  background-color: var(--gray-50);
}

.article-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.article-category {
  background-color: var(--secondary);
  color: var(--primary);
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.article-date {
  color: var(--gray-600);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
}

.article-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.article-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  color: var(--gray-700);
  font-weight: 500;
}

.featured-image {
  padding: 2rem 0;
}

.full-width-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 0.5rem;
}

.article-content {
  padding: 2rem 0 4rem;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 2rem;
}

.main-content {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--gray-800);
}

.main-content p {
  margin-bottom: 1.5rem;
}

.main-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  margin: 2rem 0 1rem;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.image-gallery img {
  width: 100%;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: transform 0.3s;
}

.image-gallery img:hover {
  transform: scale(1.02);
}

.video-embed {
  margin: 2rem 0;
  border-radius: 0.5rem;
  overflow: hidden;
}

blockquote {
  margin: 2rem 0;
  padding: 1.5rem;
  background-color: var(--gray-50);
  border-left: 4px solid var(--secondary);
  font-style: italic;
  color: var(--gray-700);
}

blockquote cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-weight: 500;
  color: var(--gray-600);
}

.article-sidebar {
  position: sticky;
  top: 2rem;
}

.share-buttons, .related-tags {
  background-color: var(--gray-50);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.share-buttons h3, .related-tags h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
}

.social-icons {
  display: flex;
  gap: 0.75rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--white);
  border-radius: 50%;
  color: var(--primary);
  font-size: 1.25rem;
  transition: all 0.2s;
}

.social-icon:hover {
  background-color: var(--secondary);
  color: var(--white);
  transform: translateY(-3px);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--white);
  border-radius: 1rem;
  color: var(--gray-700);
  font-size: 0.875rem;
  transition: all 0.2s;
}

.tag:hover {
  background-color: var(--secondary);
  color: var(--white);
}

.related-articles {
  padding: 4rem 0;
  background-color: var(--gray-50);
}

.back-to-news {
  padding: 2rem 0;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  border: 2px solid var(--white);
}

.close-lightbox {
  position: absolute;
  top: -2rem;
  right: -2rem;
  font-size: 2rem;
  color: var(--white);
  cursor: pointer;
}

@media (max-width: 768px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  
  .article-title {
    font-size: 2rem;
  }
  
  .image-gallery {
    grid-template-columns: 1fr;
  }
  
  .article-sidebar {
    position: static;
  }
}


      /* 添加昼夜模式样式 */
      body {
        transition: all 0.3s ease;
      }
      body.night-mode {
        background-color: #1a1a1a;
        color: #ffffff;
      }
      body.night-mode .navbar {
  background-color: #2d2d2d;
}
body.night-mode .navbar .nav-link {
  color: #e5e7eb; /* 灰白文字 */
}
body.night-mode .navbar .nav-link:hover {
  color: #c4b454; /* 保持次要色 */
}
body.night-mode .footer {
  background-color: #2d2d2d;
}
body.night-mode .footer .footer-text,
body.night-mode .footer .social-link,
body.night-mode .footer .copyright {
  color: #d1d5db; /* 浅灰色文字 */
}
body.night-mode .footer .social-link:hover {
  color: #c4b454;
}
body.night-mode .section-title {
  color: #c4b454; /* 次要色标题 */
}
body.night-mode .section-subtitle,
body.night-mode .feature-text,
body.night-mode .stat-label,
body.night-mode .review-text {
  color: #d1d5db; /* 浅灰色文字 */
}
body.night-mode .news-item,
body.night-mode .feature-item,
body.night-mode .game-card,
body.night-mode .review-card {
  background-color: #333333;
}
body.night-mode .news-title,
body.night-mode .feature-title,
body.night-mode .game-title {
  color: #e5e7eb; /* 灰白标题 */
}
body.night-mode .news-description,
body.night-mode .news-date,
body.night-mode .game-subtitle {
  color: #9ca3af; /* 中灰色文字 */
}
body.night-mode .hero-overlay {
  background-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}
body.night-mode .hero-title {
  color: #e5e7eb;
}
body.night-mode .hero-text {
  color: #d1d5db;
}

body.night-mode .news-section {
  background-color: #252525; /* 深灰背景 */
}
body.night-mode .features-section {
  background-color: #1a1a1a; /* 与 body 一致 */
}
body.night-mode .stats-section {
  background-color: #252525;
}
body.night-mode .games-section {
  background-color: #1a1a1a;
}
body.night-mode .news-detail-inner,
body.night-mode .timeline-box {
  background-color: #333333;
}
body.night-mode .primary-btn {
  color: #e5e7eb; /* 确保按钮文字在深色背景下可见 */
}
body.night-mode .secondary-btn {
  background-color: rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
}
body.night-mode .secondary-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}
body.night-mode .game-btn {
  color: #e5e7eb;
}
body.night-mode .news-read-more,
body.night-mode .news-read-less {
  color: #e5e7eb;
}
body.night-mode #backToTop {
  color: #e5e7eb;
}

body.night-mode .reviews-section {
  background-color: var(--gray-800);
}

body.night-mode .review-card {
  background-color: var(--gray-900);
  color: var(--gray-200);
}

body.night-mode .review-name {
  color: var(--gray-200);
}
      /* 添加置顶按钮样式 */
      #backToTop {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        background-color: #c4b454;
        color: white;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        display: none;
        z-index: 1000;
        transition: opacity 0.3s;
      }
      #backToTop:hover {
        background-color: #1a365d;
      }
      
            /* 移动端导航样式 */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 100;
}

.search-toggle {
  display: block;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: 1rem;
}

.search-container {
  display: none; /* 默认隐藏 */
  position: fixed; /* 使用 fixed 定位使其相对于视口居中 */
  top: 50%; /* 垂直居中 */
  left: 50%; /* 水平居中 */
  transform: translate(-50%, -50%); /* 通过 transform 实现真正的居中 */
  width: 90%; /* 宽度自适应，最大不超过屏幕的90% */
  max-width: 500px; /* 设置最大宽度，避免过宽 */
  background-color: var(--gray-800);
  border-radius: 1rem; /* 圆角更大，视觉上更柔和 */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* 阴影增强层次感 */
  padding: 1.5rem; /* 内边距稍大，提升体验 */
  z-index: 60; /* 确保在导航栏之上 */
  overflow: hidden;
  transition: all 0.3s ease; /* 添加平滑显示动画 */
}
/* 搜索框内部样式 */
.search-box {
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 1rem; /* 与热门搜索部分增加间距 */
}

.search-input {
  flex: 1;
  padding: 0.75rem;
  border: none;
  outline: none;
  font-size: 1rem;
}

/* 搜索按钮 */
.search-submit {
  background-color: var(--secondary);
  color: var(--primary);
  border: none;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-submit:hover {
  background-color: rgba(196, 180, 84, 0.9);
}

.hot-searches {
  margin-top: 1rem;
}

.hot-searches h4 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.hot-search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
/* 搜索按钮 */
.search-submit {
  background-color: var(--secondary);
  color: var(--primary);
  border: none;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-submit:hover {
  background-color: rgba(196, 180, 84, 0.9);
}

/* 热门搜索部分 */
.hot-searches {
  margin-top: 1rem;
}

.hot-searches h4 {
  color: var(--white);
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
}

.hot-search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hot-search-tag {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--white);
  padding: 0.35rem 0.85rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.hot-search-tag:hover {
  background-color: var(--secondary);
}
/* 夜间模式样式 */
body.night-mode .search-container {
  background-color: rgba(50, 50, 50, 0.95);
}

body.night-mode .search-input {
  background-color: var(--gray-800);
  color: var(--gray-200);
}

body.night-mode .hot-search-tag {
  background-color: rgba(255, 255, 255, 0.1);
}

body.night-mode .search-container {
  background-color: rgba(50, 50, 50, 0.95);
}

body.night-mode .search-input {
  background-color: var(--gray-800);
  color: var(--gray-200);
}

body.night-mode .hot-search-tag {
  background-color: rgba(255, 255, 255, 0.1);
}
/* 响应式调整 */
@media (max-width: 640px) {
  .search-container {
    width: 95%; /* 小屏幕下宽度更大 */
    padding: 1rem;
  }
  
  .search-input {
    font-size: 0.9rem;
  }
  
  .hot-searches h4 {
    font-size: 1rem;
  }
  
  .hot-search-tag {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
  }
}
@media (max-width: 768px) {
  .mobile-nav-toggle, .search-toggle {
    display: block;
  }
  
  .navbar-content {
    flex-direction: row;
    justify-content: space-between;
    height: 4rem;
    padding: 0;
  }
  
  .nav-menu {
    position: fixed;
    top: 4rem;
    left: 0;
    width: 100%;
    background-color: rgba(26, 54, 93, 0.95);
    padding: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 40;
    margin-top: 0;
    display: block;
  }
  
  .nav-menu-items {
    flex-direction: column;
    align-items: flex-start;
    margin-left: 0;
    width: 100%;
  }
  
  .nav-link {
    padding: 0.75rem 0;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
  }
  
  body.night-mode .nav-menu {
    background-color: rgba(17, 24, 39, 0.95);
  }
}
      
      /* 在现有样式后添加 */
@media (max-width: 768px) {
  .navbar-content {
    flex-direction: column;
    height: auto;
    padding: 1rem 0;
  }
  .nav-menu {
    width: 100%;
    margin-top: 1rem;
  }
  .nav-menu-items {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-left: 0;
  }
  .nav-link {
    padding: 0.5rem 1rem;
    width: 100%;
    text-align: center;
  }
}
@media (max-width: 640px) {
  .logo {
    font-size: 1.25rem;
  }
}
@media (max-width: 640px) {
  .footer-content {
    grid-template-columns: 1fr; 
  }
  .social-grid {
    grid-template-columns: repeat(2, 1fr); 
    gap: 0.75rem;
  }
  .social-link {
    font-size: 0.875rem;
  }
  .social-link i {
    font-size: 1.25rem;
    margin-right: 0.25rem;
  }
}
