/* 吸顶标题栏样式 */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 99;
  background-color: #ffffffee;
  backdrop-filter: blur(6px);
  padding: 10px 20px;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 返回按钮样式优化 */
.sticky-header .back-link {
  font-size: 0.95rem;
  color: #0070f3;
  background: none;
  padding: 0;
  border: none;
}

.sticky-header .back-link:hover {
  text-decoration: underline;
}

/* 基础样式 */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f9f9fb;
  color: #1c1c1e;
  text-align: center;
}

/* 标题简介区背景 */
.game-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 30px 40px 25px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.game-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

.game-header h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.game-header .game-intro {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.95);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.5;
  font-weight: 400;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 游戏容器优化 */
.game-container {
  max-width: 1200px;
  margin: auto;
  padding: 20px 20px;
  position: relative;
}

/* 游戏框架优化 */
.game-frame {
  width: 100%;
  border: none;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  margin: 0 auto 30px;
  display: block;
  background: #000;
}

/* 桌面端使用固定高度 */
@media (min-width: 1024px) {
  .game-frame {
    height: 720px;
  }
}

/* 中等屏幕 */
@media (min-width: 768px) and (max-width: 1023px) {
  .game-frame {
    height: 600px;
  }
}

/* 移动端使用宽高比 */
@media (max-width: 767px) {
  .game-frame {
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

/* 返回按钮苹果风格 */
.back-link {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 500;
  color: #007AFF;
  background: rgba(0, 122, 255, 0.1);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 122, 255, 0.2);
  backdrop-filter: blur(10px);
}

.back-link:hover {
  background: rgba(0, 122, 255, 0.15);
  color: #0056CC;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

.back-link:active {
  transform: translateY(0);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .game-header {
    padding: 25px 20px 20px;
    border-radius: 16px;
    margin-bottom: 1.5rem;
  }
  
  .game-header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
  }
  
  .game-header .game-intro {
    font-size: 1rem;
    line-height: 1.4;
  }
  
  .game-container {
    padding: 15px 15px;
  }
  
  .back-link {
    padding: 12px 24px;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .game-header {
    padding: 20px 15px 15px;
  }
  
  .game-header h1 {
    font-size: 1.8rem;
  }
  
  .game-header .game-intro {
    font-size: 0.95rem;
  }
}

/* Footer Styles */
.footer {
  background: linear-gradient(90deg, #4e54c8, #8f94fb);
  color: white;
  padding: 25px 20px 15px;
  margin-top: 40px;
  width: 100%;
  box-sizing: border-box;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.footer-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-section h3 {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.footer-section p {
  margin: 0 0 8px 0;
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0.9;
}

.footer-section a {
  color: white;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.footer-section a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.footer-links li {
  margin-bottom: 6px;
}

.footer-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  width: 100%;
}

.footer-categories a {
  display: inline-block;
  padding: 5px 10px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.footer-categories a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 15px;
  font-size: 0.8rem;
  opacity: 0.8;
  text-align: center;
}

.footer-bottom a {
  color: white;
  text-decoration: none;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .footer {
    padding: 20px 15px 10px;
    margin-top: 30px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .footer-section h3 {
    font-size: 1rem;
  }
  
  .footer-categories {
    gap: 6px;
  }
  
  .footer-categories a {
    padding: 4px 8px;
    font-size: 0.75rem;
  }
}

/* 左上角悬浮返回首页按钮 */
.floating-back-home {
  position: fixed;
  top: 28px;
  left: 28px;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 12px 22px;
  font-size: 1rem;
  font-weight: 500;
  color: #007AFF;
  background: rgba(255,255,255,0.7);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  border: 1px solid rgba(0,122,255,0.13);
  backdrop-filter: blur(12px);
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.4,0,0.2,1);
  gap: 8px;
}
.floating-back-home:hover {
  background: rgba(0,122,255,0.12);
  color: #0056CC;
  box-shadow: 0 8px 32px rgba(0,122,255,0.13);
  transform: translateY(-2px) scale(1.03);
}
.floating-back-home:active {
  transform: scale(0.98);
}
.floating-back-home .icon {
  font-size: 1.2em;
  margin-right: 4px;
}
@media (max-width: 768px) {
  .floating-back-home {
    top: 12px;
    left: 10px;
    padding: 9px 15px;
    font-size: 0.97rem;
    border-radius: 12px;
  }
  .floating-back-home .icon {
    font-size: 1em;
  }
}

/* 分页导航美化升级（小号按钮） */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 28px 0 0 0;
  flex-wrap: wrap;
}
.pagination button {
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  background: linear-gradient(90deg, #e0e7ff 0%, #f3f4fa 100%);
  color: #4e54c8;
  border: none;
  border-radius: 10px;
  font-size: 0.97rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(102,126,234,0.06);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4,0,0.2,1);
  outline: none;
  margin: 0 1px;
  position: relative;
  border: 2px solid transparent;
}
.pagination button:hover:not([disabled]):not(.active) {
  background: linear-gradient(90deg, #a3bffa 0%, #c3cfff 100%);
  color: #4e54c8;
  box-shadow: 0 4px 16px rgba(102,126,234,0.13);
  transform: translateY(-1.5px) scale(1.03);
}
.pagination button[disabled], .pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #e0e3f7;
  color: #aaa;
  box-shadow: none;
}
.pagination button.active, .pagination button[aria-current="page"] {
  background: #fff;
  color: #4e54c8;
  font-weight: 800;
  border: 2px solid #7c83f7;
  box-shadow: 0 6px 24px 0 rgba(102,126,234,0.13);
  z-index: 1;
  transform: scale(1.07);
}
.pagination .ellipsis {
  color: #b3b3c6;
  font-size: 1.1em;
  padding: 0 4px;
  user-select: none;
}
@media (max-width: 600px) {
  .pagination {
    gap: 2px;
    margin-top: 12px;
  }
  .pagination button {
    min-width: 22px;
    height: 22px;
    font-size: 0.93rem;
    border-radius: 7px;
    padding: 0 4px;
  }
}
