:root { 
  --bg: #0b0d12; 
  --card: #151923; 
  --card-hover: #1a1f2b;
  --text: #e9eef7; 
  --muted: #93a0b4; 
  --primary: #2dd4bf;
  --secondary: #a78bfa;
  --accent: #fbbf24;
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
}
* { box-sizing: border-box; }
html,body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Noto Sans CJK SC', 'Microsoft YaHei', system-ui, Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.app-header { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 16px; background: rgba(11,13,18,.95); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid #1f2633; box-shadow: var(--shadow-sm); }
.app-header .logo { font-weight: 700; font-size: 20px; letter-spacing: .5px; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.app-header .back { color: var(--muted); }
.tabs { display: flex; align-items: center; gap: 8px; overflow-x: auto; }
.tab { appearance: none; border: 0; background: #111521; color: var(--text); padding: 8px 14px; border-radius: 999px; white-space: nowrap; transition: all 0.2s ease; cursor: pointer; }
.tab:hover { background: #1a1f2b; transform: translateY(-1px); }
.tab.active { background: linear-gradient(135deg, var(--primary), #22c5ad); color: #0a0f14; font-weight: 700; box-shadow: 0 2px 8px rgba(45,212,191,0.3); }
.divider { width: 1px; height: 20px; background: #1f2633; margin: 0 4px; }

.page { padding: 16px; max-width: 1400px; margin: 0 auto; }
.search { margin-bottom: 20px; }
.search input { width: 100%; height: 44px; border-radius: 12px; border: 1px solid #202736; background: #0f1320; color: var(--text); outline: none; padding: 0 16px; font-size: 15px; transition: all 0.2s ease; }
.search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(45,212,191,0.1); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
@media (min-width: 480px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(5, 1fr); gap: 16px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(6, 1fr); gap: 18px; } }
.card { background: var(--card); border: 1px solid #1b2130; border-radius: 14px; overflow: hidden; transition: all 0.3s ease; cursor: pointer; position: relative; }
.card:hover { background: var(--card-hover); transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #2a3242; }
.card .thumb { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; background: linear-gradient(135deg, #0f1320, #1a1f2b); transition: transform 0.3s ease; }
.card:hover .thumb { transform: scale(1.05); }
.card .meta { padding: 10px; background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.3)); }
.card .title { font-size: 14px; line-height: 1.4; margin-bottom: 4px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .tag { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.card .tag::before { content: ''; width: 4px; height: 4px; background: var(--primary); border-radius: 50%; }

.ad { margin: 20px 0; background: linear-gradient(135deg, #0f1320, #151923); border: 1px dashed #2b3242; border-radius: 14px; min-height: 60px; display: grid; place-items: center; color: var(--muted); position: relative; overflow: hidden; }
.ad::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(45,212,191,0.1), transparent); animation: shimmer 3s infinite; }
@keyframes shimmer { 0% { left: -100%; } 100% { left: 100%; } }
.ad-banner { min-height: 80px; }
.ad-feed { min-height: 120px; }

.pager { display: grid; place-items: center; padding: 16px 0; }
.pager button { appearance: none; border: 0; background: linear-gradient(135deg, var(--primary), #22c5ad); color: #0a0f14; padding: 12px 24px; border-radius: 12px; font-weight: 700; cursor: pointer; transition: all 0.2s ease; box-shadow: 0 4px 12px rgba(45,212,191,0.2); }
.pager button:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(45,212,191,0.3); }
.pager button:active { transform: translateY(0); }

.app-footer { text-align: center; color: var(--muted); padding: 24px 12px; font-size: 12px; }

.game-hero { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; background: linear-gradient(135deg, var(--card), #1a1f2b); border: 1px solid #1b2130; border-radius: 16px; padding: 16px; box-shadow: var(--shadow-sm); }
.game-hero img { width: 120px; height: 120px; border-radius: 14px; object-fit: cover; box-shadow: var(--shadow-md); }
.game-hero h1 { margin: 0 0 8px 0; font-size: 20px; font-weight: 700; }
.game-desc { color: var(--text); padding: 16px; line-height: 1.7; background: var(--card); border-radius: 14px; border: 1px solid #1b2130; margin: 16px 0; }
.game-desc h3 { color: var(--primary); margin: 16px 0 8px 0; font-size: 16px; }
.related { margin-top: 20px; }
.related h2 { font-size: 18px; margin-bottom: 16px; color: var(--text); }

/* 按钮样式 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 12px; font-weight: 700; text-decoration: none; transition: all 0.2s ease; cursor: pointer; }
.btn-primary { background: linear-gradient(135deg, var(--primary), #22c5ad); color: #0a0f14; box-shadow: 0 4px 12px rgba(45,212,191,0.2); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(45,212,191,0.3); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid #273246; }
.btn-outline:hover { background: rgba(39,50,70,0.2); border-color: var(--primary); }

/* 详情页按钮容器 */
.hero-actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }

/* 标签页样式 */
.game-tabs { margin: 20px 0; }
.tab-nav { display: flex; gap: 4px; border-bottom: 2px solid #1b2130; margin-bottom: 20px; overflow-x: auto; }
.tab-btn { 
  appearance: none; 
  border: none; 
  background: transparent; 
  color: var(--muted); 
  padding: 12px 20px; 
  font-size: 15px; 
  font-weight: 600; 
  cursor: pointer; 
  position: relative; 
  transition: all 0.3s ease;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { 
  color: var(--primary); 
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}
.tab-content { min-height: 200px; }
.tab-pane { display: none; animation: fadeIn 0.3s ease; }
.tab-pane.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 游戏内容区域样式 */
.game-howto, .game-strategy { 
  background: var(--card); 
  border-radius: 14px; 
  padding: 20px; 
  border: 1px solid #1b2130;
  line-height: 1.8;
}
.game-howto h3, .game-strategy h3 { 
  color: var(--primary); 
  margin: 0 0 12px 0; 
  font-size: 18px;
}
.game-howto ul, .game-strategy ul { 
  margin: 12px 0; 
  padding-left: 24px; 
}
.game-howto li, .game-strategy li { 
  margin: 8px 0; 
  color: var(--text);
}

/* 游戏统计信息 */
.game-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.stat-card {
  background: linear-gradient(135deg, var(--card), #1a1f2b);
  border: 1px solid #1b2130;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.stat-label {
  font-size: 13px;
  color: var(--muted);
}

/* 评论区样式 */
.game-comments {
  background: var(--card);
  border-radius: 14px;
  padding: 20px;
  border: 1px solid #1b2130;
}
.comment-form {
  margin-bottom: 20px;
}
.comment-form textarea {
  width: 100%;
  min-height: 100px;
  background: #0f1320;
  border: 1px solid #202736;
  border-radius: 10px;
  padding: 12px;
  color: var(--text);
  resize: vertical;
  font-family: inherit;
}
.comment-form button {
  margin-top: 10px;
}
.comment-list {
  margin-top: 20px;
}
.comment-item {
  padding: 12px 0;
  border-bottom: 1px solid #1b2130;
}
.comment-item:last-child {
  border-bottom: none;
}
.comment-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.comment-author {
  color: var(--primary);
  font-weight: 600;
}
.comment-time {
  color: var(--muted);
  font-size: 12px;
}
.comment-text {
  color: var(--text);
  line-height: 1.6;
}

/* 热门游戏区域 */
.hot-games {
  margin-top: 30px;
}
.hot-games h2 {
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hot-games h2::before {
  content: '🔥';
}

/* 游戏评分 */
.game-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.stars {
  display: flex;
  gap: 2px;
}
.star {
  color: #fbbf24;
  font-size: 16px;
}
.star.empty {
  color: #374151;
}
.rating-text {
  color: var(--muted);
  font-size: 14px;
}

/* 标签系统 */
.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}
.tag-chip {
  background: rgba(45, 212, 191, 0.1);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(45, 212, 191, 0.2);
  transition: all 0.2s ease;
  cursor: pointer;
}
.tag-chip:hover {
  background: rgba(45, 212, 191, 0.2);
  transform: translateY(-1px);
}

/* 难度指示器 */
.difficulty-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.difficulty-label {
  color: var(--muted);
  font-size: 14px;
}
.difficulty-bars {
  display: flex;
  gap: 3px;
}
.difficulty-bar {
  width: 4px;
  height: 16px;
  background: #374151;
  border-radius: 2px;
}
.difficulty-bar.filled {
  background: linear-gradient(to top, #10b981, #fbbf24, #ef4444);
}

/* 移动端优化 */
@media (max-width: 768px) {
  .page { padding: 12px; }
  
  .game-hero {
    grid-template-columns: 80px 1fr;
    gap: 12px;
    padding: 12px;
  }
  
  .game-hero img {
    width: 80px;
    height: 80px;
  }
  
  .game-hero h1 {
    font-size: 18px;
  }
  
  .tab-nav {
    padding-bottom: 8px;
  }
  
  .tab-btn {
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
  
  .game-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stat-card {
    padding: 12px;
  }
  
  .stat-value {
    font-size: 20px;
  }
  
  .comment-form textarea {
    min-height: 80px;
  }
}

@media (max-width: 480px) {
  .app-header {
    height: 56px;
    padding: 0 12px;
  }
  
  .app-header .logo {
    font-size: 18px;
  }
  
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .card .title {
    font-size: 13px;
  }
  
  .game-tags {
    margin: 8px 0;
  }
  
  .tag-chip {
    font-size: 11px;
    padding: 3px 8px;
  }
}

/* 平板优化 */
@media (min-width: 768px) and (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .game-hero {
    grid-template-columns: 100px 1fr;
  }
  
  .game-hero img {
    width: 100px;
    height: 100px;
  }
}

/* 大屏优化 */
@media (min-width: 1440px) {
  .page {
    max-width: 1600px;
  }
  
  .grid {
    grid-template-columns: repeat(8, 1fr);
    gap: 20px;
  }
}


