/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 广告区域样式 */
.ads-section {
  margin: 30px 0;
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 15px;
}

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

.ad-item {
  display: block;
  width: 100%;
  transition: opacity 0.3s ease;
}

.ad-item img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #e0e0e0;
}

.ad-item:hover {
  opacity: 0.9;
}

/* 广告区域响应式设计 */
@media (max-width: 768px) {
  .ads-section {
    margin: 20px 0;
    padding: 10px;
  }
}

/* 全局变量定义 - 统一色调 */
:root {
  --primary-blue: #1e3c72;
  --secondary-blue: #2a5298;
  --accent-blue: #4a90e2;
  --light-blue: #e3f2fd;
  --text-primary: #333;
  --text-secondary: #666;
  --text-light: #fff;
  --bg-primary: #f5f7fa;
  --bg-secondary: #fff;
  --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 5px 15px rgba(0, 0, 0, 0.15);
  --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.2);
  --radius-small: 6px;
  --radius-medium: 12px;
  --radius-large: 16px;
  --transition: all 0.3s ease;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 40% 20%, rgba(74, 144, 226, 0.05) 0px, transparent 50%),
    radial-gradient(at 80% 0%, rgba(42, 82, 152, 0.05) 0px, transparent 50%),
    radial-gradient(at 0% 50%, rgba(30, 60, 114, 0.05) 0px, transparent 50%);
}

/* 容器 */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部样式 */
header {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
  color: var(--text-light);
  padding: 20px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo h1 a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  transition: var(--transition);
}

.logo h1 a:hover {
  color: #f0f8ff;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

nav ul li a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: var(--radius-small);
  transition: var(--transition);
  display: inline-block;
  font-weight: 500;
  position: relative;
}

nav ul li a:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  transform: translateY(-1px);
}

/* 搜索表单样式 */
.search-form {
  display: flex;
  align-items: center;
}

.search-form form {
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-small);
  overflow: hidden;
  transition: var(--transition);
}

.search-form form:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.search-form input[type="text"] {
  padding: 8px 15px;
  border: none;
  background: transparent;
  color: white;
  outline: none;
  font-size: 14px;
  width: 200px;
}

.search-form input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-form button {
  padding: 8px 12px;
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  cursor: pointer;
  transition: var(--transition);
}

.search-form button:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

nav ul li a.active {
  background-color: white;
  color: var(--secondary-blue);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

/* 主要内容样式 */
main {
  padding: 60px 0;
  min-height: 70vh;
}

/* 标题通用样式 */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 30px;
  padding-bottom: 10px;
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--secondary-blue));
  border-radius: 3px;
}

/* 精选游戏轮播样式 */
.featured-section {
  margin: 60px 0;
  position: relative;
}

.featured-section h2 {
  font-size: 32px;
  color: var(--text-primary);
  margin-bottom: 30px;
  text-align: center;
}

.featured-section h2::after {
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
}

.featured-carousel {
  position: relative;
  height: 450px;
  border-radius: var(--radius-large);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  transition: var(--transition);
}

.featured-carousel:hover {
  box-shadow: var(--shadow-hover);
}

.featured-game {
  position: relative;
  width: 100%;
  height: 100%;
}

.featured-game img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-carousel:hover .featured-game img {
  transform: scale(1.05);
}

.featured-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  color: white;
  padding: 40px;
  transform: translateY(20px);
  opacity: 0.9;
  transition: var(--transition);
}

.featured-carousel:hover .featured-overlay {
  transform: translateY(0);
  opacity: 1;
}

.featured-overlay h3 {
  font-size: 36px;
  margin: 0 0 15px 0;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.featured-overlay p {
  margin: 0 0 25px 0;
  opacity: 0.95;
  line-height: 1.6;
  font-size: 18px;
  max-width: 800px;
}

.featured-overlay a {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent-blue);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-small);
  transition: var(--transition);
  font-weight: 600;
  font-size: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

.featured-overlay a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition);
}

.featured-overlay a:hover::before {
  left: 100%;
}

.featured-overlay a:hover {
  background: var(--secondary-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.6);
}

/* 游戏统计概览样式 */
.stats-section {
  margin: 80px 0;
  position: relative;
}

.stats-section h2 {
  font-size: 32px;
  color: var(--text-primary);
  margin-bottom: 40px;
  text-align: center;
}

.stats-section h2::after {
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}

.stat-card {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, #f8faff 100%);
  padding: 40px 30px;
  border-radius: var(--radius-medium);
  text-align: center;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(74, 144, 226, 0.1);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-blue), var(--secondary-blue));
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-medium);
  border-color: rgba(74, 144, 226, 0.3);
}

.stat-number {
  font-size: 4rem;
  font-weight: bold;
  color: var(--accent-blue);
  margin-bottom: 15px;
  line-height: 1;
  text-shadow: 0 2px 5px rgba(74, 144, 226, 0.1);
}

.stat-card:hover .stat-number {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.stat-label {
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.stat-card a {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

/* 所有游戏页面样式 */
.page-header {
    margin: 40px 0 30px;
    text-align: center;
}

.page-header h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
}

.page-header p {
    color: #666;
    font-size: 16px;
}

/* 筛选器样式 */
.filter-section {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    color: #333;
    font-weight: 500;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
}

.filter-btn {
    padding: 8px 20px;
    background: #3a86ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

.filter-btn:hover {
    background: #2a76e6;
}

/* 所有游戏列表样式 */
.all-games-section {
    margin: 40px 0;
}

.all-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* 游戏卡片增强样式 */
.game-card .game-meta {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    font-size: 14px;
    color: #666;
}

.view-details-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: #3a86ff;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
    font-weight: 500;
    transition: background 0.3s;
}

.view-details-btn:hover {
    background: #2a76e6;
}

/* 无数据状态 */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-data p {
    font-size: 18px;
    margin: 0;
}

/* 最近更新游戏样式 */
.recent-section {
  margin: 80px 0;
  position: relative;
}

.recent-section h2 {
  font-size: 32px;
  color: var(--text-primary);
  margin-bottom: 30px;
  text-align: center;
}

.recent-section h2::after {
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.game-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-medium);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  position: relative;
  border: 1px solid rgba(74, 144, 226, 0.05);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-blue), var(--secondary-blue));
  transform: scaleX(0);
  transition: var(--transition);
}

.game-card:hover::before {
  transform: scaleX(1);
}

.game-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-medium);
  border-color: rgba(74, 144, 226, 0.2);
}

.game-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.game-info {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.game-update-time {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 5px 0 10px 0;
  font-style: italic;
}

.game-info h3 {
  margin: 0 0 15px 0;
  font-size: 22px;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-category {
  color: var(--accent-blue);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 10px;
  display: inline-block;
  padding: 4px 12px;
  background: rgba(74, 144, 226, 0.1);
  border-radius: 20px;
  align-self: flex-start;
}

.game-rating {
  color: #f39c12;
  font-size: 14px;
  margin-bottom: auto;
  display: flex;
  align-items: center;
  gap: 5px;
}

.game-rating::before {
  content: '★';
  color: #f39c12;
}

.game-info a {
  display: inline-block;
  padding: 10px 20px;
  background: var(--accent-blue);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-small);
  transition: var(--transition);
  font-weight: 500;
  text-align: center;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(74, 144, 226, 0.3);
}

.game-info a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition);
}

.game-info a:hover::before {
  left: 100%;
}

.game-info a:hover {
  background: var(--secondary-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.5);
}

/* 热门推荐样式 */
.popular-section {
  margin: 80px 0;
  position: relative;
}

.popular-section h2 {
  font-size: 32px;
  color: var(--text-primary);
  margin-bottom: 30px;
  text-align: center;
}

.popular-section h2::after {
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
}

.games-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.popular-item {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, #f8faff 100%);
  padding: 20px;
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(74, 144, 226, 0.05);
}

.popular-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--accent-blue), var(--secondary-blue));
}

.popular-item:hover {
  transform: translateX(10px);
  box-shadow: var(--shadow-medium);
  border-color: rgba(74, 144, 226, 0.2);
}

.popular-item .rank {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-blue), var(--secondary-blue));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 20px;
  font-size: 18px;
  box-shadow: 0 2px 10px rgba(74, 144, 226, 0.3);
  z-index: 1;
}

/* 前三名特殊样式 */
.popular-item:nth-child(1) .rank {
  background: linear-gradient(135deg, #FFD700, #FFC107);
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.4);
}

.popular-item:nth-child(2) .rank {
  background: linear-gradient(135deg, #C0C0C0, #E0E0E0);
  box-shadow: 0 2px 10px rgba(192, 192, 192, 0.4);
}

.popular-item:nth-child(3) .rank {
  background: linear-gradient(135deg, #CD7F32, #D7B377);
  box-shadow: 0 2px 10px rgba(205, 127, 50, 0.4);
}

.popular-item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-small);
  margin-right: 20px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.popular-item:hover img {
  transform: scale(1.05);
}

.game-details {
  flex: 1;
}

.game-details h4 {
  margin: 0 0 10px 0;
  font-size: 20px;
  color: var(--text-primary);
  font-weight: 600;
  transition: color 0.3s ease;
}

.popular-item:hover .game-details h4 {
  color: var(--accent-blue);
}

.game-meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.game-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.popular-item a {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent-blue), var(--secondary-blue));
  color: white;
  text-decoration: none;
  border-radius: var(--radius-small);
  transition: var(--transition);
  font-weight: 500;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(74, 144, 226, 0.3);
}

.popular-item a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition);
}

.popular-item a:hover::before {
  left: 100%;
}

.popular-item a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.5);
}

.no-data {
  text-align: center;
  padding: 60px;
  color: #666;
  font-size: 18px;
  background: #f9f9f9;
  border-radius: 8px;
}

/* 分类页面样式 */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.category-card {
  background-color: #fff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: center;
  border: 1px solid transparent;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border-color: #e3f2fd;
}

.category-card h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  font-weight: 600;
}

.category-card h3 a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s;
}

.category-card h3 a:hover {
  color: #2196F3;
}

.game-count {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.view-games {
  display: inline-block;
  padding: 8px 20px;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(42, 82, 152, 0.2);
}

.view-games:hover {
  background: linear-gradient(135deg, #1976D2 0%, #2196F3 100%);
  box-shadow: 0 4px 15px rgba(42, 82, 152, 0.3);
  transform: translateY(-2px);
}

/* 排行榜页面样式 */
.ranking-section {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.ranking-section h2 {
  margin-bottom: 20px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e3c72;
  padding-bottom: 10px;
  border-bottom: 2px solid #e1e8ed;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.ranking-item {
  display: flex;
  align-items: center;
  background-color: #fff;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

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

.rank-number {
  font-size: 1.5rem;
  font-weight: bold;
  color: #999;
  width: 40px;
  text-align: center;
  margin-right: 15px;
}

.rank-number.top-rank {
  color: #2196F3;
}

.rank-number.top-rank:nth-child(1) {
  color: #FFD700;
}

.rank-number.top-rank:nth-child(2) {
  color: #C0C0C0;
}

.rank-number.top-rank:nth-child(3) {
  color: #CD7F32;
}

.ranking-game-info {
  flex: 1;
  display: flex;
  align-items: center;
}

.game-thumbnail-small {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  margin-right: 15px;
  flex-shrink: 0;
}

.game-thumbnail-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-details h3 {
  margin: 0 0 5px 0;
  font-size: 1rem;
  font-weight: 600;
}

.game-details h3 a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s;
}

.game-details h3 a:hover {
  color: #2196F3;
}

.game-rating {
  font-size: 0.85rem;
  color: #FFD700;
  margin: 0;
}

.play-button-small {
  padding: 6px 16px;
  background: linear-gradient(135deg, #1e3c72 0%, #2196F3 100%);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
  white-space: nowrap;
}

.play-button-small:hover {
  background: linear-gradient(135deg, #1976D2 0%, #2196F3 100%);
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
  transform: translateY(-2px);
}

/* 关于我们页面样式 */
.about-section {
  padding: 40px 0;
}

.about-header {
  text-align: center;
  margin-bottom: 40px;
}

.about-header h2 {
  font-size: 2.5em;
  color: #2c3e50;
  margin-bottom: 10px;
}

.about-subtitle {
  font-size: 1.2em;
  color: #7f8c8d;
  margin-bottom: 30px;
}

.about-content {
  max-width: 1200px;
  margin: 0 auto;
}

.about-intro {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-bottom: 40px;
  line-height: 1.8;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.feature-item {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.feature-icon {
  font-size: 3em;
  margin-bottom: 20px;
}

.feature-item h3 {
  font-size: 1.3em;
  color: #2c3e50;
  margin-bottom: 15px;
}

.about-stats {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 10px;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
  text-align: center;
}

.stat-item .stat-number {
  font-size: 3em;
  font-weight: bold;
  margin-bottom: 10px;
}

.stat-item .stat-label {
  font-size: 1.1em;
  opacity: 0.9;
}

.about-contact {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  text-align: center;
}

.about-contact h3 {
  font-size: 1.5em;
  color: #2c3e50;
  margin-bottom: 15px;
}

.contact-email {
  font-size: 1.2em;
  color: #3498db;
  font-weight: bold;
  margin-top: 15px;
}

.game-description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 15px;
}

.play-button {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(135deg, #1e3c72 0%, #2196F3 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
  box-shadow: 0 2px 5px rgba(33, 150, 243, 0.2);
}

.play-button:hover {
  background: linear-gradient(135deg, #1976D2 0%, #2196F3 100%);
  box-shadow: 0 4px 10px rgba(33, 150, 243, 0.3);
  transform: translateY(-2px);
}

.no-games {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #666;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 2px dashed #ddd;
  font-size: 1.1rem;
}

/* 游戏详情页 */
.game-detail {
  background-color: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.game-detail-container {
  display: flex;
  gap: 30px;
}

.game-detail-left {
  flex: 0 0 300px;
}

.game-detail-thumbnail img {
  width: 100%;
  border-radius: 8px;
}

.game-detail-right {
  flex: 1;
}

.game-detail-right h1 {
  margin-bottom: 15px;
  font-size: 2rem;
}

.game-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  color: #666;
}

.game-detail-description {
  margin-bottom: 30px;
  line-height: 1.8;
}

.play-button-large {
  display: inline-block;
  padding: 12px 24px;
  background-color: #4CAF50;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 1.1rem;
  transition: background-color 0.3s;
}

.play-button-large:hover {
  background-color: #45a049;
}

.back-button,
.home-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #f0f0f0;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  margin-left: 10px;
  transition: background-color 0.3s;
}

.back-button:hover,
.home-button:hover {
  background-color: #e0e0e0;
}

/* 游戏播放页面 */
.game-play {
  background-color: #fff;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.game-play h1 {
  margin-bottom: 20px;
}

.game-container {
  margin-bottom: 30px;
}

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

/* 页脚样式 */
footer {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
  color: var(--text-light);
  padding: 60px 0 30px;
  position: relative;
  margin-top: 100px;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-blue), transparent);
}

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

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 40px;
}

.footer-info {
  flex: 1;
  min-width: 250px;
}

.footer-info h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--text-light);
}

.footer-info p {
  margin: 0 0 15px 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

footer nav ul {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

footer nav ul li a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
  position: relative;
  padding: 5px 0;
}

footer nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-blue);
  transition: var(--transition);
}

footer nav ul li a:hover {
  color: white;
}

footer nav ul li a:hover::after {
  width: 100%;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

/* 响应式设计 */
@media (max-width: 768px) {
  /* 头部样式 */
  header .container {
    flex-direction: column;
    gap: 15px;
    padding: 10px 0;
  }
  
  .logo h1 a {
    font-size: 1.6rem;
  }
  
  nav ul {
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
  }
  
  nav ul li a {
    padding: 8px 12px;
    font-size: 14px;
  }
  
  /* 主要内容 */
  main {
    padding: 30px 0;
  }
  
  /* 标题样式 */
  h2 {
    font-size: 24px !important;
    margin-bottom: 20px !important;
  }
  
  /* 精选游戏轮播 */
  .featured-carousel {
    height: 300px;
  }
  
  .featured-overlay {
    padding: 20px;
  }
  
  .featured-overlay h3 {
    font-size: 24px;
  }
  
  .featured-overlay p {
    font-size: 16px;
  }
  
  /* 游戏统计概览 */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .stat-number {
    font-size: 3rem;
  }
  
  /* 游戏网格 */
  .game-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  /* 热门推荐 */
  .popular-item {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }
  
  .popular-item .rank {
    margin-right: 0;
    margin-bottom: 15px;
  }
  
  .popular-item img {
    margin-right: 0;
    margin-bottom: 15px;
  }
  
  .game-meta {
    justify-content: center;
  }
  
  .popular-item a {
    margin-top: 15px;
  }
  
  /* 页脚 */
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  footer nav ul {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  /* 调整容器宽度 */
  .container {
    width: 95%;
    padding: 0 10px;
  }
  
  /* 精选游戏轮播 */
  .featured-carousel {
    height: 250px;
  }
  
  .featured-overlay h3 {
    font-size: 20px;
  }
  
  /* 按钮样式调整 */
  .featured-overlay a,
  .game-info a,
  .popular-item a {
    padding: 8px 16px;
    font-size: 14px;
  }
}

/* 按钮样式 */
.btn, button, .add-button, .edit-button, .delete-button, .save-button, .cancel-button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: background-color 0.3s;
  margin-right: 8px;
}

.btn:hover, button:hover, .add-button:hover, .edit-button:hover, .delete-button:hover, .save-button:hover, .cancel-button:hover {
  opacity: 0.9;
}

.edit-button {
  background-color: #ffc107;
  color: #212529;
}

.edit-button:hover {
  background-color: #e0a800;
}

.delete-button {
  background-color: #dc3545;
  color: white;
}

.delete-button:hover {
  background-color: #c82333;
}

.save-button {
  background-color: #28a745;
  color: white;
}

.save-button:hover {
  background-color: #218838;
}

.cancel-button {
  background-color: #6c757d;
  color: white;
}

.cancel-button:hover {
  background-color: #5a6268;
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  padding: 0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: #212529;
}

.close-button {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6c757d;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-button:hover {
  color: #dc3545;
}

.modal-body {
  padding: 20px;
}

.modal-body .form-group {
  margin-bottom: 16px;
}

.modal-body label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #495057;
}

.modal-body input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.modal-body input:focus {
  outline: none;
  border-color: #80bdff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .game-detail-container {
    flex-direction: column;
  }
  
  .game-detail-left {
    flex: 0 0 auto;
    text-align: center;
  }
  
  .game-detail-thumbnail {
    display: inline-block;
  }
  
  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 576px) {
  .container {
    width: 95%;
    padding: 0 10px;
  }
  
  .logo h1 a {
    font-size: 1.5rem;
  }
  
  nav ul {
    gap: 10px;
  }
  
  main {
    padding: 20px 0;
  }
  
  .game-grid {
    grid-template-columns: 1fr;
  }
}

/* 排行榜页面样式 */
.ranking-section {
  margin: 20px 0;
}

.ranking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #eaeaea;
}

.ranking-header h2 {
  font-size: 28px;
  color: #333;
  margin: 0;
}

.ranking-filters {
  display: flex;
  align-items: center;
  gap: 15px;
}

.filter-label {
  font-weight: 500;
  color: #666;
}

.filter-buttons {
  display: flex;
  gap: 10px;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 20px;
  text-decoration: none;
  color: #555;
  background-color: #fff;
  transition: all 0.3s ease;
  font-size: 14px;
}

.filter-btn:hover {
  background-color: #f8f9fa;
  border-color: #ccc;
}

.filter-btn.active {
  background-color: #2a5298;
  color: #fff;
  border-color: #2a5298;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.ranking-item {
  display: flex;
  align-items: center;
  padding: 20px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.rank-number {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  color: #666;
  margin-right: 20px;
  flex-shrink: 0;
}

.rank-number.first-place {
  background-color: #ffd700;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rank-number.second-place {
  background-color: #c0c0c0;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.rank-number.third-place {
  background-color: #cd7f32;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}

.ranking-game-info {
  display: flex;
  align-items: center;
  flex: 1;
}

.game-thumbnail-small {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  margin-right: 15px;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.game-thumbnail-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-details {
  flex: 1;
}

.game-details h3 {
  margin: 0 0 5px 0;
  font-size: 18px;
}

.game-details h3 a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.game-details h3 a:hover {
  color: #2a5298;
}

.game-category {
  color: #666;
  font-size: 14px;
  margin-bottom: 5px;
}

.game-stats {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: #666;
}

.game-players {
  margin: 0;
}

.game-rating {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rating-stars {
  color: #ffc107;
  font-size: 14px;
  letter-spacing: 1px;
}

.rating-value {
  color: #666;
  font-size: 14px;
}

.ranking-actions {
  display: flex;
  gap: 10px;
  margin-left: 20px;
}

.view-detail-btn-small, .play-button-small {
  padding: 8px 15px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.view-detail-btn-small {
  background-color: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
}

.view-detail-btn-small:hover {
  background-color: #e9ecef;
}

.play-button-small {
  background-color: #28a745;
  color: white;
  border: none;
}

.play-button-small:hover {
  background-color: #218838;
}

.no-games {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 16px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .ranking-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .ranking-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .rank-number {
    align-self: center;
    margin-right: 0;
  }
  
  .ranking-actions {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }
}