/* 全局重置和基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #6c5ce7;
  --primary-dark: #5a4bd1;
  --primary-light: #a29bfe;
  --accent-color: #00cec9;
  --accent-dark: #00b4b0;
  --bg-dark: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #22223a;
  --text-primary: #f0f0f5;
  --text-secondary: #b0b0c0;
  --text-muted: #6c6c80;
  --border-color: #2a2a40;
  --gradient-start: #6c5ce7;
  --gradient-end: #00cec9;
  --shadow-color: rgba(108, 92, 231, 0.3);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 0 2rem;
  transition: all 0.3s ease;
}

.navbar .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.navbar .logo {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.navbar .nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.navbar .nav-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.navbar .nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  transition: width 0.3s ease;
}

.navbar .nav-links a:hover {
  color: var(--text-primary);
}

.navbar .nav-links a:hover::after {
  width: 100%;
}

/* 汉堡菜单 */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.hamburger span {
  width: 26px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

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

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

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

/* 主要内容区域 */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0px 2rem 2rem;
}

/* Hero区域 */
.hero-section {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero-section h1 {
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.8rem;
}

.hero-section p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* 游戏分类区域 */
.category-section {
  margin-bottom: 3rem;
}

.category-section .category-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
  padding-left: 0.5rem;
  border-left: 4px solid var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-section .category-title .category-icon {
  font-size: 1.4rem;
}

/* 游戏网格 */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* 游戏卡片 */
.game-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.35s ease;
  display: block;
  position: relative;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.game-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: var(--primary-light);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px var(--shadow-color);
}

.game-card:hover::before {
  opacity: 1;
}

.game-card .card-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.game-card:hover .card-thumb {
  transform: scale(1.05);
}

.game-card .card-thumb-wrapper {
  overflow: hidden;
  position: relative;
}

.game-card .card-info {
  padding: 1rem;
}

.game-card .card-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-card .card-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* 详情页样式 */
.detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 2rem 2rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-light);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: var(--accent-color);
}

.detail-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border-color);
}

.detail-image {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-info h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.detail-info p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  width: fit-content;
}

.play-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-color);
}

/* 相关游戏区域 */
.related-section {
  margin-top: 2rem;
}

.related-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
  padding-left: 0.5rem;
  border-left: 4px solid var(--accent-color);
}

.related-games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.related-games-grid .game-card .card-info h3 {
  font-size: 0.95rem;
}

.related-games-grid .game-card .card-info p {
  font-size: 0.8rem;
}

/* 页脚样式 */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 2rem;
  margin-top: 3rem;
}

.footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer .footer-copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer .footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer .footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer .footer-links a:hover {
  color: var(--primary-light);
}

/* 通用页面样式 (Privacy, Terms, Contact) */
.page-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 2rem 2rem;
}

.page-container h1 {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

.page-container h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
}

.page-container p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.page-container ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.page-container ul li {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  list-style: disc;
  line-height: 1.6;
}

.page-container a {
  color: var(--primary-light);
  transition: color 0.3s ease;
}

.page-container a:hover {
  color: var(--accent-color);
}

/* Contact表单样式 */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1rem;
}

.contact-form label {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form button {
  width: fit-content;
  padding: 0.8rem 2rem;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-color);
}

/* 响应式设计 - 平板 */
@media (max-width: 1024px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .related-games-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 响应式设计 - 手机 */
@media (max-width: 768px) {
  .navbar .nav-links {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(15, 15, 26, 0.98);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--border-color);
  }

  .navbar .nav-links.active {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section p {
    font-size: 0.95rem;
  }

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

  .category-section .category-title {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
  }

  .detail-wrapper {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.2rem;
  }

  .detail-info h1 {
    font-size: 1.6rem;
  }

  .related-games-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer .footer-container {
    flex-direction: column;
    text-align: center;
  }
}

/* 响应式设计 - 小屏手机 */
@media (max-width: 480px) {
  .main-content,
  .detail-container,
  .page-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

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

  .related-games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .hero-section h1 {
    font-size: 1.6rem;
  }

  .navbar .nav-container {
    padding: 0 1rem;
  }

  .navbar {
    padding: 0 1rem;
  }
}
