/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color System */
  --background: #ffffff;
  --foreground: #164e63;
  --card: #ecfeff;
  --card-foreground: #475569;
  --primary: #164e63;
  --primary-foreground: #ffffff;
  --secondary: #f59e0b;
  --secondary-foreground: #000000;
  --muted: #f1f5f9;
  --muted-foreground: #374151;
  --accent: #f59e0b;
  --accent-foreground: #000000;
  --border: #d1d5db;
  --input: #f1f5f9;
  --ring: rgba(0, 0, 0, 0.1);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, Inconsolata, "Roboto Mono", Consolas, "Courier New", monospace;

  /* Spacing */
  --radius: 0.5rem;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  min-height: 100vh;
}

/* Header Styles */
.header {
  background-color: #1f2937;
  color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .nav-container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .nav-container {
    padding: 0 2rem;
  }
}

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

.nav-brand {
  display: flex;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  height: 2rem;
  width: 2rem;
  border-radius: 0.5rem;
  background-color: #0891b2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon span {
  color: white;
  font-weight: bold;
  font-size: 1.125rem;
}

.brand-text {
  font-size: 1.25rem;
  font-weight: bold;
  color: #fbbf24;
}

.nav-desktop {
  display: none;
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: block;
  }
}

.nav-links {
  margin-left: 2.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #d1d5db;
  text-decoration: none;
  transition: all 0.2s;
}

.nav-link:hover {
  background-color: #374151;
  color: white;
}

.nav-mobile {
  display: block;
}

@media (min-width: 1024px) {
  .nav-mobile {
    display: none;
  }
}

.mobile-menu-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mobile-menu-btn:hover {
  background-color: #374151;
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background-color: currentColor;
  transition: all 0.3s;
}

.mobile-menu {
  display: none;
  padding: 0.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.75rem;
  max-height: 24rem;
  overflow-y: auto;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 500;
  color: #d1d5db;
  text-decoration: none;
  transition: all 0.2s;
}

.mobile-nav-link:hover {
  background-color: #374151;
  color: white;
}

/* Game Section */
.game-section {
  padding: 2rem 0;
  background-color: white;
}

.game-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .game-container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .game-container {
    padding: 0 2rem;
  }
}

/* 调整游戏布局，让广告位顶到边缘 */
.game-layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between; /* 改为space-between让广告位顶到边缘 */
  gap: 0; /* 移除gap，让广告位紧贴边缘 */
  width: 100%;
}

/* 移除所有响应式的gap设置 */
@media (min-width: 768px) {
    .game-layout {
        gap: 0;
    }
}

@media (min-width: 1024px) {
    .game-layout {
        gap: 0;
    }
}

@media (min-width: 1200px) {
    .game-layout {
        gap: 0;
    }
}

@media (min-width: 1440px) {
    .game-layout {
        gap: 0;
    }
}

@media (min-width: 1920px) {
    .game-layout {
        gap: 0;
    }
}

/* 恢复游戏布局的间距 */
.game-layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0; /* 保持gap为0，通过margin控制间距 */
  width: 100%;
}

/* 广告位动态间距 - 基础设置 */
.vertical-ad.left-ad {
  margin-left: 0;
  margin-right: 0.15rem; /* 基础间距0.15rem */
  align-self: flex-start;
}

.vertical-ad.right-ad {
  margin-right: 0;
  margin-left: 0.15rem; /* 基础间距0.15rem */
  align-self: flex-start;
}

/* 游戏主区域基础宽度计算 */
.game-main {
  flex: 1;
  max-width: calc(100% - 24vw - 0.3rem) !important; /* 基础：总间距0.3rem */
  width: 100%;
  margin: 0;
  min-width: 0;
}

/* 响应式间距调整 */
@media (min-width: 1920px) {
  .vertical-ad.left-ad {
    margin-right: 3rem; /* 最大间距3rem */
  }
  
  .vertical-ad.right-ad {
    margin-left: 3rem; /* 最大间距3rem */
  }
  
  .game-main {
    max-width: calc(100% - 22vw - 6rem) !important; /* 总间距6rem */
  }
}

@media (min-width: 1440px) and (max-width: 1919px) {
  .vertical-ad.left-ad {
    margin-right: 2rem; /* 2rem间距 */
  }
  
  .vertical-ad.right-ad {
    margin-left: 2rem; /* 2rem间距 */
  }
  
  .game-main {
    max-width: calc(100% - 23vw - 4rem) !important; /* 总间距4rem */
  }
}

@media (min-width: 1200px) and (max-width: 1439px) {
  .vertical-ad.left-ad {
    margin-right: 1.5rem; /* 1.5rem间距 */
  }
  
  .vertical-ad.right-ad {
    margin-left: 1.5rem; /* 1.5rem间距 */
  }
  
  .game-main {
    max-width: calc(100% - 23.5vw - 3rem) !important; /* 总间距3rem */
  }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .vertical-ad.left-ad {
    margin-right: 1rem; /* 1rem间距 */
  }
  
  .vertical-ad.right-ad {
    margin-left: 1rem; /* 1rem间距 */
  }
  
  .game-main {
    max-width: calc(100% - 24vw - 2rem) !important; /* 总间距2rem */
  }
}

@media (min-width: 900px) and (max-width: 1023px) {
  .vertical-ad.left-ad {
    margin-right: 0.5rem; /* 0.5rem间距 */
  }
  
  .vertical-ad.right-ad {
    margin-left: 0.5rem; /* 0.5rem间距 */
  }
  
  .game-main {
    max-width: calc(100% - 24vw - 1rem) !important; /* 总间距1rem */
  }
}

@media (min-width: 800px) and (max-width: 899px) {
  .vertical-ad.left-ad {
    margin-right: 0.2rem; /* 0.2rem间距 */
  }
  
  .vertical-ad.right-ad {
    margin-left: 0.2rem; /* 0.2rem间距 */
  }
  
  .game-main {
    max-width: calc(100% - 24vw - 0.4rem) !important; /* 总间距0.4rem */
  }
}

@media (min-width: 769px) and (max-width: 799px) {
  .vertical-ad.left-ad {
    margin-right: 0.15rem; /* 0.15rem间距 */
  }
  
  .vertical-ad.right-ad {
    margin-left: 0.15rem; /* 0.15rem间距 */
  }
  
  .game-main {
    max-width: calc(100% - 24vw - 0.3rem) !important; /* 总间距0.3rem */
  }
}

@media (min-width: 1024px) {
  .vertical-ad {
    display: block;
  }
}

.ad-content {
  width: 12vw; /* 使用视口宽度单位，自动适应屏幕 */
  min-width: 80px; /* 最小宽度 */
  max-width: 220px; /* 最大宽度 */
  height: 60vh; /* 使用视口高度单位 */
  min-height: 300px; /* 最小高度 */
  max-height: 750px; /* 最大高度 */
  background-color: var(--muted);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 更细化的响应式调整 */
@media (min-width: 1920px) {
  .ad-content {
    width: 11vw;
    height: 65vh;
  }
}

@media (min-width: 1440px) and (max-width: 1919px) {
  .ad-content {
    width: 11.5vw;
    height: 62vh;
  }
}

@media (min-width: 1200px) and (max-width: 1439px) {
  .ad-content {
    width: 12vw;
    height: 60vh;
  }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .ad-content {
    width: 10vw;
    height: 55vh;
  }
  
  .game-layout {
    gap: 1.5rem;
  }
}

@media (min-width: 900px) and (max-width: 1023px) {
  .ad-content {
    width: 8vw;
    height: 50vh;
  }
  
  .game-layout {
    gap: 1rem;
  }
  
  .ad-placeholder {
    font-size: 0.75rem;
    writing-mode: vertical-lr;
    text-orientation: mixed;
  }
}

@media (min-width: 800px) and (max-width: 899px) {
  .ad-content {
    width: 7vw;
    height: 45vh;
  }
  
  .game-layout {
    gap: 0.75rem;
  }
  
  .ad-placeholder {
    font-size: 0.625rem;
    writing-mode: vertical-lr;
    text-orientation: mixed;
  }
}

@media (min-width: 769px) and (max-width: 799px) {
  .ad-content {
    width: 6vw;
    height: 40vh;
  }
  
  .game-layout {
    gap: 0.5rem;
  }
  
  .ad-placeholder {
    font-size: 0.5rem;
    writing-mode: vertical-lr;
    text-orientation: mixed;
  }
}

/* 平板和手机隐藏广告 */
@media (max-width: 768px) {
  .vertical-ad {
    display: none !important;
  }
  
  .game-layout {
    justify-content: center;
  }
  
  .game-main {
    max-width: 100%;
    width: 100%;
  }
  
  .game-iframe-container {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 480px) {
  .game-iframe-container {
    aspect-ratio: 1 / 1;
  }
}

.ad-placeholder {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  text-align: center;
  transform: rotate(-90deg);
}

/* 移除或覆盖原有的game-main最大宽度限制 */
.game-main {
  flex: 1;
  max-width: none !important; /* 强制移除宽度限制 */
  width: 100%;
  margin: 0 1rem;
  min-width: 0; /* 允许flex item缩小 */
}

.game-card {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  width: 100%;
  max-width: none !important; /* 如果有max-width限制也移除 */
}

.game-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  background-color: #f9fafb;
  border-radius: 0.5rem 0.5rem 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.game-title-section {
  flex: 1;
}

.game-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #111827;
  margin-bottom: 0.25rem;
}

.game-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
}

.game-controls {
  display: flex;
  gap: 0.5rem;
}

.control-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background-color: white;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.control-btn:hover {
  background-color: #f9fafb;
}

.btn-icon {
  width: 1rem;
  height: 1rem;
}

/* 调整游戏区域的padding */
.game-area {
  padding: 1rem; /* 统一设置为1rem */
}

/* 移除所有响应式的padding调整 */
@media (min-width: 1024px) {
  .game-area {
    padding: 1rem; /* 保持1rem */
  }
}

@media (min-width: 1440px) {
  .game-area {
    padding: 1rem; /* 保持1rem */
  }
}

.game-iframe-container {
  aspect-ratio: 16 / 9;
  background-color: #f3f4f6;
  border-radius: 0.5rem;
  border: 2px dashed #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  max-width: none !important;
}

.game-iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0.5rem;
}

.game-start-screen {
  text-align: center;
}

.play-icon {
  width: 4rem;
  height: 4rem;
  color: #9ca3af;
  margin: 0 auto 1rem;
}

.start-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.start-subtitle {
  color: #6b7280;
  margin-bottom: 1rem;
}

.start-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: #0891b2;
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  margin: 0 auto;
}

.start-btn:hover {
  background-color: #0e7490;
}

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

.loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #0891b2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 0.5rem;
}

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

.loading-text {
  font-size: 0.875rem;
  color: #6b7280;
}

#gameIframe {
  width: 100%;
  height: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

.game-stats {
  padding: 0 1.5rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat-item {
  background-color: #f9fafb;
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #0891b2;
}

.stat-label {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Ad Banner */
.ad-banner-section {
  padding: 1rem 0;
}

.ad-banner-container {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .ad-banner-container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .ad-banner-container {
    padding: 0 2rem;
  }
}

.ad-banner {
  height: 6rem;
  background-color: var(--muted);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-banner-content {
  color: var(--muted-foreground);
  font-size: 1.125rem;
  font-weight: 500;
}

/* Section Styles */
.section-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .section-container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .section-container {
    padding: 0 2rem;
  }
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: bold;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 42rem;
  margin: 0 auto;
}

/* Related Games */
.related-games-section {
  padding: 4rem 0;
  background-color: var(--muted);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 235px); /* 固定宽度235px */
  gap: 1.5rem;
  justify-content: center; /* 居中显示固定宽度的卡片 */
}

.game-card-item {
  background-color: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.game-card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.game-image {
  width: 100%;
  height: 7rem; /* 从10rem改为7rem */
  object-fit: cover;
  background-color: #f3f4f6;
}

.game-card-content {
  padding: 0.75rem; /* 从1rem减少到0.75rem */
  padding-bottom: 1rem; /* 减少底部padding */
}

/* 移除不需要的样式 */
.game-card-description,
.game-card-footer,
.play-count,
.play-btn {
  display: none; /* 隐藏这些元素的样式 */
}

.game-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem; /* 从0.5rem减少到0.25rem */
}

.game-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0; /* 移除底部margin */
  line-height: 1.3; /* 紧凑的行高 */
}

.game-category {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.game-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fbbf24;
}

.game-card-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.game-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.play-count {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.play-btn {
  padding: 0.5rem 1rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.play-btn:hover {
  background-color: #0e7490;
}

/* Game Info */
.game-info-section {
  padding: 4rem 0;
  background-color: white;
}

.game-info-content {
  display: grid;
  grid-template-columns: 1fr; /* 改为单列布局 */
  gap: 2rem;
  justify-content: center; /* 居中显示 */
  max-width: 950px; /* 从 800px 增加到 950px */
  margin: 0 auto; /* 水平居中 */
}

/* 删除大屏幕的双列布局 */
@media (min-width: 1024px) {
  .game-info-content {
    grid-template-columns: 1fr; /* 保持单列 */
    gap: 2rem;
    max-width: 1000px; /* 从 900px 增加到 1000px */
  }
}

@media (min-width: 1200px) {
  .game-info-content {
    max-width: 1100px; /* 在更大屏幕上进一步增加 */
  }
}

@media (min-width: 1440px) {
  .game-info-content {
    max-width: 1200px;
  }
}

/* 隐藏右侧边栏 */
.info-sidebar {
  display: none;
}

.info-title {
  font-size: 2rem;
  font-weight: bold;
  color: var(--foreground);
  margin-bottom: 1.5rem;
}

.info-text p {
  margin-bottom: 1rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

.info-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-card {
  background-color: var(--card);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.feature-list,
.instruction-list {
  list-style: none;
  padding: 0;
}

.feature-list li,
.instruction-list li {
  padding: 0.5rem 0;
  color: var(--muted-foreground);
  border-bottom: 1px solid rgba(209, 213, 219, 0.3);
}

.feature-list li:last-child,
.instruction-list li:last-child {
  border-bottom: none;
}

.feature-list li:before {
  content: "✓";
  color: var(--secondary);
  font-weight: bold;
  margin-right: 0.5rem;
}

.instruction-list {
  counter-reset: step-counter;
}

.instruction-list li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 2rem;
}

.instruction-list li:before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0.5rem;
  background-color: var(--primary);
  color: white;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

/* Comments Section */
.comments-section {
  padding: 4rem 0;
  background-color: var(--muted);
}

.comments-header {
  text-align: center;
  margin-bottom: 3rem;
}

/* 调整评论表单容器的宽度 */
.comment-form-container {
  max-width: 50rem; /* 从 42rem 增加到 50rem */
  margin: 0 auto; /* 移除底部间距 */
  background-color: white;
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-weight: 500;
  color: var(--foreground);
}

.form-input,
.form-textarea {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 78, 99, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 6rem;
}

.submit-btn {
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 0.375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  align-self: flex-start;
}

.submit-btn:hover {
  background-color: #0e7490;
}

/* 调整评论列表的宽度 */
.comments-list {
  max-width: 50rem; /* 从 42rem 增加到 50rem */
  margin: 0 auto 3rem; /* 评论列表下方增加间距 */
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* 在更大屏幕上进一步增加宽度 */
@media (min-width: 1024px) {
  .comment-form-container,
  .comments-list {
    max-width: 55rem;
  }
}

@media (min-width: 1200px) {
  .comment-form-container,
  .comments-list {
    max-width: 60rem;
  }
}

@media (min-width: 1440px) {
  .comment-form-container,
  .comments-list {
    max-width: 65rem;
  }
}

.comment-item {
  background-color: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

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

.comment-author {
  font-weight: 600;
  color: var(--foreground);
}

.comment-date {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.comment-text {
  color: var(--muted-foreground);
  line-height: 1.6;
}

.load-more-container {
  text-align: center;
  margin: 0 auto 4rem; /* 加载更多按钮下方增加更多间距 */
  max-width: 50rem;
}

.load-more-btn {
  padding: 0.75rem 1.5rem;
  background-color: white;
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.load-more-btn:hover {
  background-color: var(--muted);
}

/* Footer */
.footer {
  background-color: #1f2937;
  color: white;
  padding: 3rem 0 1rem;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .footer-container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .footer-container {
    padding: 0 2rem;
  }
}

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

@media (min-width: 640px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-content {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.footer-description {
  color: #d1d5db;
  line-height: 1.6;
}

.footer-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: #d1d5db;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1rem;
  text-align: center;
  color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
  .game-layout {
    flex-direction: column;
  }

  .game-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .game-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .section-title {
    font-size: 1.875rem;
  }

  .info-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 0.5rem;
  }

  .game-container {
    padding: 0 0.5rem;
  }

  .section-container {
    padding: 0 0.5rem;
  }

  .game-stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

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

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

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

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

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

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mt-4 {
  margin-top: 1rem;
}

.p-4 {
  padding: 1rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.rounded {
  border-radius: 0.25rem;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.shadow {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.border {
  border: 1px solid var(--border);
}

.bg-white {
  background-color: white;
}

.bg-gray-50 {
  background-color: #f9fafb;
}

.text-gray-600 {
  color: #6b7280;
}

.text-gray-900 {
  color: #111827;
}

.font-bold {
  font-weight: bold;
}

.font-semibold {
  font-weight: 600;
}

.text-sm {
  font-size: 0.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.cursor-pointer {
  cursor: pointer;
}

.transition {
  transition: all 0.2s;
}

.hover\:bg-gray-100:hover {
  background-color: #f3f4f6;
}

.focus\:outline-none:focus {
  outline: none;
}

.focus\:ring-2:focus {
  box-shadow: 0 0 0 2px var(--ring);
}

/* Enhanced responsive design and mobile optimizations */

/* Enhanced Mobile Navigation */
@media (max-width: 1023px) {
  .mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
}

/* Enhanced Game Layout for Mobile */
@media (max-width: 768px) {
  .game-section {
    padding: 1rem 0;
  }

  .game-card {
    margin: 0 -0.5rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .game-header {
    padding: 1rem 0.5rem;
  }

  .game-area {
    padding: 1rem 0.5rem;
  }

  .game-stats {
    padding: 0 0.5rem 1rem;
  }

  .control-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  .btn-icon {
    width: 0.875rem;
    height: 0.875rem;
  }
}

/* Enhanced Typography for Mobile */
@media (max-width: 640px) {
  .game-title {
    font-size: 1.25rem;
    line-height: 1.3;
  }

  .game-subtitle {
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .section-title {
    font-size: 1.75rem;
    line-height: 1.2;
  }

  .section-subtitle {
    font-size: 1rem;
    line-height: 1.5;
  }

  .info-title {
    font-size: 1.375rem;
    line-height: 1.3;
  }
}

/* Enhanced Touch Targets for Mobile */
@media (max-width: 768px) {
  .nav-link,
  .mobile-nav-link,
  .control-btn,
  .start-btn,
  .play-btn,
  .submit-btn,
  .load-more-btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-menu-btn {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Enhanced Form Layout for Mobile */
@media (max-width: 640px) {
  .comment-form-container {
    padding: 1rem;
    margin: 0 -0.5rem 2rem;
    border-radius: 0;
  }

  .form-input,
  .form-textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .submit-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Enhanced Grid Layouts for Tablets */
@media (min-width: 641px) and (max-width: 1023px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .game-info-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Enhanced Large Screen Optimizations */
@media (min-width: 1280px) {
  .section-container {
    max-width: 1200px;
  }

  .game-container {
    max-width: 1200px;
  }

  .nav-container {
    max-width: 1200px;
  }

  .footer-container {
    max-width: 1200px;
  }
}

/* Enhanced Print Styles */
@media print {
  .header,
  .footer,
  .vertical-ad,
  .ad-banner-section,
  .game-controls,
  .mobile-menu,
  .comment-form-container,
  .load-more-container {
    display: none !important;
  }

  .game-section {
    padding: 0;
  }

  .game-card {
    box-shadow: none;
    border: 1px solid #000;
  }

  .section-container {
    max-width: none;
    padding: 0;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
  }

  .section-title {
    font-size: 18pt;
    margin-bottom: 12pt;
  }

  .info-title {
    font-size: 16pt;
    margin-bottom: 8pt;
  }
}

/* Enhanced Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #0f172a;
    --foreground: #f1f5f9;
    --card: #1e293b;
    --card-foreground: #f1f5f9;
    --muted: #334155;
    --muted-foreground: #94a3b8;
    --border: #334155;
    --input: #334155;
  }

  .game-card,
  .comment-form-container,
  .comment-item,
  .info-card {
    background-color: var(--card);
    color: var(--card-foreground);
    border-color: var(--border);
  }

  .game-header {
    background-color: var(--muted);
  }

  .stat-item {
    background-color: var(--muted);
  }

  .form-input,
  .form-textarea {
    background-color: var(--input);
    color: var(--foreground);
    border-color: var(--border);
  }

  .form-input:focus,
  .form-textarea:focus {
    border-color: var(--primary);
  }
}

/* Enhanced Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .loading-spinner {
    animation: none;
    border: 2px solid #0891b2;
  }
}

/* Enhanced High Contrast Support */
@media (prefers-contrast: high) {
  :root {
    --border: #000000;
    --ring: rgba(0, 0, 0, 0.5);
  }

  .nav-link:hover,
  .mobile-nav-link:hover {
    background-color: #000000;
    color: #ffffff;
  }

  .control-btn:hover,
  .play-btn:hover,
  .submit-btn:hover,
  .load-more-btn:hover {
    border-color: #000000;
    background-color: #000000;
    color: #ffffff;
  }
}

/* Enhanced Focus Styles for Accessibility */
.nav-link:focus,
.mobile-nav-link:focus,
.control-btn:focus,
.start-btn:focus,
.play-btn:focus,
.submit-btn:focus,
.load-more-btn:focus,
.form-input:focus,
.form-textarea:focus,
.mobile-menu-btn:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Enhanced Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading * {
  cursor: wait !important;
}

/* Enhanced Error States */
.error {
  border-color: #dc2626 !important;
  background-color: #fef2f2 !important;
}

.error-message {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Enhanced Success States */
.success {
  border-color: #10b981 !important;
  background-color: #f0fdf4 !important;
}

.success-message {
  color: #10b981;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* 调整导航菜单项之间的间距 */
nav ul li,
.navbar-nav li,
.nav-menu li {
    margin: 0 1rem; /* 增加左右间距 */
}

/* 在更宽的屏幕上进一步增加间距 */
@media (min-width: 1024px) {
    nav ul li,
    .navbar-nav li,
    .nav-menu li {
        margin: 0 1.5rem;
    }
}

@media (min-width: 1440px) {
    nav ul li,
    .navbar-nav li,
    .nav-menu li {
        margin: 0 2rem;
    }
}

@media (min-width: 1920px) {
    nav ul li,
    .navbar-nav li,
    .nav-menu li {
        margin: 0 2.5rem;
    }
}

/* 调整导航栏整体容器的宽度 */
nav,
.navbar,
header nav {
    max-width: 90%; 
    margin: 0 auto;
}

/* 在更宽的屏幕上增加导航栏整体宽度 */
@media (min-width: 768px) {
    nav,
    .navbar,
    header nav {
        max-width: 92%;
    }
}

@media (min-width: 1024px) {
    nav,
    .navbar,
    header nav {
        max-width: 94%;
    }
}

@media (min-width: 1200px) {
    nav,
    .navbar,
    header nav {
        max-width: 95%;
    }
}

@media (min-width: 1440px) {
    nav,
    .navbar,
    header nav {
        max-width: 96%;
    }
}

@media (min-width: 1920px) {
    nav,
    .navbar,
    header nav {
        max-width: 97%;
    }
}

/* 调整导航栏容器的宽度，保持左侧边距，增加右侧边距 */
.nav-container {
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    transform: translateX(-3%); /* 向左偏移，增加右侧边距 */
}

/* 在更宽的屏幕上调整 */
@media (min-width: 768px) {
    .nav-container {
        max-width: 82%;
        transform: translateX(-2.5%);
    }
}

@media (min-width: 1024px) {
    .nav-container {
        max-width: 84%;
        transform: translateX(-2%);
    }
}

@media (min-width: 1200px) {
    .nav-container {
        max-width: 85%;
        transform: translateX(-1.5%);
    }
}

@media (min-width: 1440px) {
    .nav-container {
        max-width: 86%;
        transform: translateX(-1%);
    }
}

@media (min-width: 1920px) {
    .nav-container {
        max-width: 87%;
        transform: translateX(-0.5%);
    }
}

/* 确保导航链接可以充分利用空间 */
.nav-links {
    display: flex;
    justify-content: space-between;
    width: 100%;
}
/* 调整游戏主要内容区域的宽度 */
.game-container {
    max-width: 83% !important; /* 使用 !important 确保优先级 */
    margin: 0 auto;
    padding: 0 1rem;
    transform: translateX(-2%);
}

/* 在更宽的屏幕上调整游戏区域宽度 */
@media (min-width: 640px) {
    .game-container {
        max-width: 85% !important;
        transform: translateX(-1.5%);
    }
}

@media (min-width: 1024px) {
    .game-container {
        max-width: 87% !important;
        transform: translateX(-1.2%);
    }
}

@media (min-width: 1200px) {
    .game-container {
        max-width: 89% !important;
        transform: translateX(-1%);
    }
}

@media (min-width: 1440px) {
    .game-container {
        max-width: 90% !important;
        transform: translateX(-0.8%);
    }
}

@media (min-width: 1920px) {
    .game-container {
        max-width: 75% !important;
        transform: translateX(-0.3%);
    }
}

/* 同时调整其他主要内容区域保持一致 */
.section-container {
    max-width: 75%;
    margin: 0 auto;
    transform: translateX(-2%);
}

@media (min-width: 768px) {
    .section-container {
        max-width: 77%;
        transform: translateX(-1.5%);
    }
}

@media (min-width: 1024px) {
    .section-container {
        max-width: 79%;
        transform: translateX(-1.2%);
    }
}

@media (min-width: 1200px) {
    .section-container {
        max-width: 80%;
        transform: translateX(-1%);
    }
}

@media (min-width: 1440px) {
    .section-container {
        max-width: 81%;
        transform: translateX(-0.8%);
    }
}

@media (min-width: 1920px) {
    .section-container {
        max-width: 82%;
        transform: translateX(-0.3%);
    }
}

/* 移动端和小屏幕优化 */
@media (max-width: 1023px) {
  .ad-content {
    width: 120px; /* 缩小广告宽度 */
    height: 400px; /* 降低高度 */
  }
  
  .game-layout {
    gap: 1rem; /* 减少间距 */
  }
}

@media (max-width: 768px) {
  .ad-content {
    width: 80px; /* 进一步缩小 */
    height: 300px;
  }
  
  .game-layout {
    gap: 0.5rem; /* 最小间距 */
  }
  
  /* 广告位文字调整 */
  .ad-placeholder {
    font-size: 0.75rem;
    writing-mode: vertical-lr; /* 竖直显示文字 */
    text-orientation: mixed;
  }
}

@media (max-width: 640px) {
  .ad-content {
    width: 60px; /* 更小的广告位 */
    height: 250px;
  }
  
  .ad-placeholder {
    font-size: 0.625rem;
  }
}

/* 确保游戏主区域在小屏幕上占据更多空间 */
@media (max-width: 768px) {
  .game-main {
    flex: 1;
    min-width: 0; /* 允许缩小 */
  }
  
  .game-iframe-container {
    aspect-ratio: 4 / 3; /* 在小屏幕上使用更方正的比例 */
  }
}

@media (max-width: 480px) {
  .ad-content {
    width: 40px; /* 极窄的广告位 */
    height: 200px;
  }
  
  .game-layout {
    gap: 0.25rem;
  }
  
  .ad-placeholder {
    font-size: 0.5rem;
  }
  
  .game-iframe-container {
    aspect-ratio: 1 / 1; /* 正方形比例更适合手机游戏 */
  }
}

/* 超小屏幕时隐藏广告，全屏显示游戏 */
@media (max-width: 320px) {
  .vertical-ad {
    display: none;
  }
  
  .game-layout {
    justify-content: center;
  }
  
  .game-main {
    max-width: 100%;
  }
}

/* PC端屏幕变小时的优化 */
@media (min-width: 769px) and (max-width: 1200px) {
  .ad-content {
    width: 140px; /* PC小屏幕时缩小广告 */
    height: 450px;
  }
  
  .game-layout {
    gap: 2rem; /* 保持合理间距 */
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .ad-content {
    width: 120px; /* 进一步缩小 */
    height: 400px;
  }
  
  .game-layout {
    gap: 1.5rem;
  }
  
  .ad-placeholder {
    font-size: 0.75rem;
  }
}

@media (min-width: 769px) and (max-width: 900px) {
  .ad-content {
    width: 100px; /* PC端最小广告尺寸 */
    height: 350px;
  }
  
  .game-layout {
    gap: 1rem;
  }
  
  .ad-placeholder {
    font-size: 0.625rem;
    writing-mode: vertical-lr; /* 竖直显示文字 */
    text-orientation: mixed;
  }
}

/* 平板端（768px以下）隐藏广告 */
@media (max-width: 768px) {
  .vertical-ad {
    display: none !important;
  }
  
  .game-layout {
    justify-content: center;
  }
  
  .game-main {
    max-width: 100%;
    width: 100%;
  }
  
  .game-iframe-container {
    aspect-ratio: 4 / 3; /* 平板上使用4:3比例 */
  }
}

/* 手机端优化 */
@media (max-width: 480px) {
  .game-iframe-container {
    aspect-ratio: 1 / 1; /* 手机上使用正方形 */
  }
  
  .game-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .game-controls {
    width: 100%;
    justify-content: flex-start;
  }
}

/* 合并的Games Section */
.games-section {
  padding: 4rem 0;
  background-color: var(--muted);
}

/* 游戏子区域 */
.games-subsection {
  margin-bottom: 4rem; /* 两个子区域之间的间距 */
}

.games-subsection:last-child {
  margin-bottom: 0; /* 最后一个子区域不需要底部间距 */
}

/* 为最新游戏添加特殊标识 */
.latest-game {
  position: relative;
}

.latest-game::before {
  content: "NEW";
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: #ef4444;
  color: white;
  font-size: 0.625rem;
  font-weight: bold;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  z-index: 10;
  letter-spacing: 0.05em;
}

/* 最新游戏的悬停效果 */
.latest-game:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.15);
  border-color: #ef4444;
}

.latest-game {
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

/* 表单行布局 */
.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem; /* 减小底部间距 */
}

.form-row .form-group {
  flex: 1; /* 每个输入框平均分配空间 */
}

/* 评论输入框组的特殊样式 */
.comment-group {
  margin-bottom: 1rem; /* 保持正常的底部间距 */
}

/* 必填项标签样式 */
.form-label {
  font-weight: 500;
  color: var(--foreground);
}

/* 必填项的红色星号样式 */
.form-label::after {
  content: '';
}

/* 为包含 * 的标签添加红色星号 */
.form-label:has-text("*")::after,
.form-label[for="commentName"]::after,
.form-label[for="commentEmail"]::after,
.form-label[for="commentText"]::after {
  content: ' *';
  color: #ef4444;
  font-weight: bold;
}

/* 响应式布局 - 在小屏幕上改为垂直布局 */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 1rem;
  }
  
  .form-row .form-group {
    flex: none; /* 取消flex布局 */
  }
}

/* 在中等屏幕上，邮箱和网址可能需要换行 */
@media (min-width: 481px) and (max-width: 768px) {
  .form-row {
    flex-wrap: wrap;
  }
  
  .form-row .form-group:first-child {
    flex: 1 1 100%; /* Name占据整行 */
  }
  
  .form-row .form-group:not(:first-child) {
    flex: 1 1 calc(50% - 0.5rem); /* Email和Website各占一半 */
  }
}

.comment-author-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.comment-author-link:hover {
  color: #0e7490;
  text-decoration: underline;
}

/* How to Use Section */
.how-to-use-section {
  padding: 4rem 0;
  background-color: white; /* 与About区域不同的背景色 */
}

.how-to-use-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  justify-content: center;
  max-width: 950px;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .how-to-use-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1000px;
  }
}

@media (min-width: 1200px) {
  .how-to-use-content {
    max-width: 1100px;
  }
}

@media (min-width: 1440px) {
  .how-to-use-content {
    max-width: 1200px;
  }
}

/* How to Use内容样式 */
.how-to-use-section .info-text h3 {
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
}

.how-to-use-section .info-text h3:first-of-type {
  margin-top: 1rem; /* 第一个h3的顶部间距小一些 */
}

.how-to-use-section .info-text ol,
.how-to-use-section .info-text ul {
  margin: 1rem 0;
  padding-left: 2rem;
}

.how-to-use-section .info-text li {
  margin: 0.75rem 0;
  line-height: 1.6;
}

.how-to-use-section .info-text strong {
  color: var(--foreground);
  font-weight: 600;
}

/* 为颜色代码添加特殊样式 */
.how-to-use-section .info-text li:has-text("🟩"),
.how-to-use-section .info-text li:has-text("Green") {
  border-left: 3px solid #22c55e;
  padding-left: 1rem;
  background-color: #f0fdf4;
  margin: 0.5rem 0;
  border-radius: 0.25rem;
}

.how-to-use-section .info-text li:has-text("🟨"),
.how-to-use-section .info-text li:has-text("Yellow") {
  border-left: 3px solid #eab308;
  padding-left: 1rem;
  background-color: #fefce8;
  margin: 0.5rem 0;
  border-radius: 0.25rem;
}

.how-to-use-section .info-text li:has-text("⬜"),
.how-to-use-section .info-text li:has-text("Gray") {
  border-left: 3px solid #6b7280;
  padding-left: 1rem;
  background-color: #f9fafb;
  margin: 0.5rem 0;
  border-radius: 0.25rem;
}

/* Frequently Asked Questions Section */
.faq-section {
  padding: 4rem 0;
  background-color: var(--muted); /* 与How to Use区域不同的背景色 */
}

.faq-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  justify-content: center;
  max-width: 950px;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .faq-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1000px;
  }
}

@media (min-width: 1200px) {
  .faq-content {
    max-width: 1100px;
  }
}

@media (min-width: 1440px) {
  .faq-content {
    max-width: 1200px;
  }
}

/* FAQ项目样式 */
.faq-item {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.faq-question {
  color: var(--primary);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* 改为flex-start让问题靠左 */
  text-align: left;
  position: relative; /* 为绝对定位的+号做准备 */
  padding-right: 2rem; /* 为右侧的+号留出空间 */
}

.faq-question::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  transition: transform 0.3s ease;
  position: absolute; /* 绝对定位到右侧 */
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  color: var(--muted-foreground);
  line-height: 1.6;
  max-height: none;
  overflow: visible;
  transition: all 0.3s ease;
  text-align: left; /* 确保答案内容靠左对齐 */
}

.faq-answer p {
  margin-bottom: 0.75rem;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer ul {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.faq-answer li {
  margin: 0.5rem 0;
}

.faq-answer strong {
  color: var(--foreground);
  font-weight: 600;
}

/* 可选：添加折叠功能的样式 */
.faq-item.collapsible .faq-answer {
  max-height: 0;
  overflow: hidden;
  padding-top: 0;
}

.faq-item.collapsible.active .faq-answer {
  max-height: 500px;
  padding-top: 0.75rem;
}

/* 为FAQ项目添加数字标识 */
.faq-item {
  counter-increment: faq-counter;
  position: relative;
}

.faq-section {
  counter-reset: faq-counter;
}

.faq-question::before {
  content: "Q" counter(faq-counter) ".";
  color: var(--primary);
  font-weight: bold;
  margin-right: 0.5rem;
  font-size: 0.875rem;
}

/* 居中显示About、How to Use、FAQ的标题 */
.game-info-section .info-title,
.how-to-use-section .info-title,
.faq-section .info-title {
  text-align: center;
}

/* Related Word Games Section */
.related-word-games-section {
  padding: 4rem 0;
  background-color: #f8fafc; /* 浅灰色背景 */
}

.related-word-games-content {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.related-word-games-content .section-subtitle {
  color: var(--muted-foreground);
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

/* Word Games Grid */
.word-games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.word-game-link {
  display: block;
  background-color: white;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1.5rem 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.word-game-link:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.word-game-text {
  color: #374151;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .word-games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .word-game-link {
    padding: 1.25rem 0.75rem;
  }
  
  .word-game-text {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .word-games-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .word-game-link {
    padding: 1rem 0.5rem;
  }
}

@media (min-width: 1200px) {
  .related-word-games-content {
    max-width: 1100px;
  }
  
  .word-games-grid {
    max-width: 900px;
  }
}

@media (min-width: 1440px) {
  .related-word-games-content {
    max-width: 1200px;
  }
  
  .word-games-grid {
    max-width: 1000px;
  }
}

/* 全屏状态下的样式 */
#gameIframe:fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  object-fit: contain;
}

#gameIframe:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  object-fit: contain;
}

#gameIframe:-moz-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  object-fit: contain;
}

#gameIframe:-ms-fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  object-fit: contain;
}

/* 调整按钮布局，使其在iframe下方居中显示 */
.game-area .game-controls {
  display: flex;
  gap: 0.75rem;
  justify-content: center; /* 居中显示 */
  margin-top: 1rem; /* 与iframe保持间距 */
  flex-shrink: 0;
}

/* 移除原有的game-header中的按钮响应式样式，因为按钮已经移动 */
.game-header {
  display: block; /* 简化为block，不需要flex布局 */
  /*margin-bottom: 1.5rem;*/
}

.game-title-section {
  /* 移除flex相关样式 */
  text-align: left;
}

/* 隐藏所有广告位 */
.vertical-ad,
.ad-banner-section,
.ad-content,
.ad-banner {
  display: none !important;
}

/* 调整游戏布局，移除广告位后让游戏区域居中 */
.game-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center; /* 居中显示游戏区域 */
  gap: 0;
  width: 100%;
}

/* 游戏主区域占满可用空间 */
.game-main {
  flex: 1;
  max-width: 100% !important; /* 移除宽度限制 */
  width: 100%;
  margin: 0;
  min-width: 0;
}

/* 隐藏游戏相关板块 */
.related-games-section,
.games-section,
.games-subsection,
.latest-games-section {
  display: none !important;
}

/* 隐藏评论相关板块 */
.comments-section,
.comment-form-container,
.comments-list,
.load-more-container {
  display: none !important;
}

/* 隐藏所有可能的错误提示和弹窗 */
.error-message,
.alert,
.notification,
.toast,
.modal,
.popup,
[class*="error"],
[class*="alert"],
[id*="error"],
[id*="alert"] {
  display: none !important;
}

/* 特别针对评论加载失败的提示 */
.comments-error,
.load-comments-error,
.api-error {
  display: none !important;
}

/* Legal Pages Styles */
.legal-content-section {
  padding: 4rem 0;
  background-color: white;
  min-height: 60vh;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.7;
}

.legal-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--foreground);
  margin-bottom: 2rem;
  text-align: center;
  border-bottom: 3px solid var(--primary);
  padding-bottom: 1rem;
}

.legal-section {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background-color: #f9fafb;
  border-radius: 0.5rem;
  border-left: 4px solid var(--primary);
}

.section-heading {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
}

.legal-section p {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.legal-list {
  margin: 1rem 0;
  padding-left: 2rem;
  color: var(--muted-foreground);
}

.legal-list li {
  margin: 0.75rem 0;
  line-height: 1.6;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .legal-title {
    font-size: 2rem;
  }
  
  .section-heading {
    font-size: 1.25rem;
  }
  
  .legal-section {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .legal-content {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .legal-title {
    font-size: 1.75rem;
  }
  
  .legal-content-section {
    padding: 2rem 0;
  }
}
