/* 全局样式 */
:root {
  /* 苹果典型色系 */
  --primary-color: #007AFF; /* 苹果蓝 */
  --secondary-color: #5AC8FA; /* 浅蓝 */
  --accent-color: #FF2D55; /* 粉红 */
  --background-color: #F2F2F7; /* 浅灰背景 */
  --text-color: #1C1C1E; /* 深灰文本 */
  --light-text: #8E8E93; /* 浅灰文本 */
  --white: #FFFFFF;
  --border-color: #C7C7CC;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* 容器样式 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-item {
  margin-left: 25px;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-link:hover {
  color: var(--primary-color);
}

/* 搜索框样式 */
.search-container {
  display: flex;
  margin: 20px 0;
}

.search-input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px 0 0 8px;
  font-size: 16px;
  outline: none;
}

.search-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0 20px;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  font-size: 16px;
}

/* 游戏卡片样式 */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin: 30px 0;
}

.game-card {
  background-color: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.game-thumbnail {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.game-info {
  padding: 15px;
}

.game-title {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text-color);
}

.game-description {
  color: var(--light-text);
  font-size: 14px;
  margin-bottom: 15px;
}

.play-button {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s;
}

.play-button:hover {
  background-color: var(--secondary-color);
}

/* 分类部分样式 */
.categories-section {
  margin: 40px 0;
}

.section-title {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--text-color);
  border-left: 4px solid var(--primary-color);
  padding-left: 10px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.category-card {
  background-color: var(--white);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.category-card:hover {
  transform: translateY(-5px);
}

.category-icon {
  font-size: 32px;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.category-name {
  font-weight: 500;
}

/* 游戏详情页样式 */
.game-container {
  background-color: var(--white);
  border-radius: 12px;
  padding: 25px;
  margin: 30px 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.game-header {
  margin-bottom: 20px;
}

.game-title-large {
  font-size: 28px;
  margin-bottom: 10px;
}

.game-tagline {
  color: var(--light-text);
  font-size: 18px;
  margin-bottom: 20px;
}

/* 游戏iframe容器 */
.game-frame-container {
    width: 100%;
    margin: 20px 0;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    padding-top: 56.25%; /* 16:9比例 */
}

.game-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.game-description {
  margin-bottom: 30px;
  line-height: 1.8;
}

.game-description h2 {
  font-size: 22px;
  margin: 20px 0 10px;
  color: var(--text-color);
}

.game-description p {
  margin-bottom: 15px;
}

/* 相关游戏部分 */
.related-games {
  margin-top: 40px;
}

/* 页脚样式 */
.footer {
  background-color: var(--text-color);
  color: var(--white);
  padding: 40px 0;
  margin-top: 50px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.footer-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
}

.footer-links {
  list-style: none;
}

.footer-link {
  margin-bottom: 10px;
}

.footer-link a {
  color: var(--light-text);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-link a:hover {
  color: var(--white);
}

.copyright {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--light-text);
  font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar-container {
    flex-direction: column;
  }
  
  .nav-menu {
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .nav-item {
    margin: 5px 10px;
  }
  
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .game-title-large {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .games-grid {
    grid-template-columns: 1fr;
  }
  
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .search-container {
    flex-direction: column;
  }
  
  .search-input {
    border-radius: 8px;
    margin-bottom: 10px;
  }
  
  .search-button {
    border-radius: 8px;
    padding: 10px;
  }
} 