/* ════════════════════════════════════════
   赛博游戏中枢 — 赛博朋克 2077 风格
   ════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body {
  max-width: 100vw; overflow-x: hidden;
  background: #0a0a15; color: #e0e0ff;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  min-height: 100vh;
}

/* ── 背景层 ── */
.cyber-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    linear-gradient(rgba(178,0,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(178,0,255,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}
.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 4px);
}
.scanlines::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: rgba(0,240,255,0.03);
  animation: scan-line 8s linear infinite;
}
@keyframes scan-line {
  0% { transform: translateY(-100px); }
  100% { transform: translateY(100vh); }
}
.cyber-vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255,45,149,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(0,240,255,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(10,10,21,0.4) 100%);
}

/* ── 布局 ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 2; }

/* ── 顶部栏 ── */
.top-bar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,21,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(178,0,255,0.2);
  padding: 12px 0;
}
.nav-container { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 28px; }
.logo-text {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700; font-size: 20px;
  background: linear-gradient(135deg, #ff2d95, #b200ff, #00f0ff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo-version {
  font-size: 10px; color: rgba(178,0,255,0.5);
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid rgba(178,0,255,0.3);
  padding: 1px 6px; border-radius: 3px;
}
.nav-status { display: flex; align-items: center; gap: 12px; }
.status-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  animation: blink 1.4s ease-in-out infinite;
}
.status-dot.green { background: #39ff14; box-shadow: 0 0 6px #39ff14; }
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.status-label { font-size: 11px; color: rgba(57,255,20,0.7); letter-spacing: 2px; }
.play-count-badge {
  font-size: 12px; padding: 4px 12px;
  border-radius: 12px;
  background: rgba(178,0,255,0.15);
  border: 1px solid rgba(178,0,255,0.3);
  color: #b200ff;
}

/* ── AI 推荐 ── */
.ai-recommend {
  margin-top: 24px; padding: 24px;
  background: linear-gradient(135deg, rgba(178,0,255,0.08), rgba(0,240,255,0.04));
  border: 1px solid rgba(178,0,255,0.25);
  border-radius: 12px;
  position: relative; overflow: hidden;
}
.ai-recommend::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #ff2d95, #b200ff, #00f0ff, transparent);
}
.ai-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ai-badge {
  font-size: 11px; letter-spacing: 2px; padding: 3px 10px;
  background: rgba(0,240,255,0.1); border: 1px solid rgba(0,240,255,0.3);
  color: #00f0ff; border-radius: 4px;
}
.ai-refresh {
  cursor: pointer; font-size: 20px; color: rgba(0,240,255,0.4);
  transition: all 0.3s ease; display: inline-block;
}
.ai-refresh:hover { color: #00f0ff; transform: rotate(180deg); }
.ai-content { min-height: 32px; display: flex; align-items: center; }
.ai-content .ai-message {
  font-size: 15px; line-height: 1.6; color: #e0e0ff;
}
.ai-content .ai-message strong { color: #ff2d95; }
.ai-content .ai-message .highlight-pink { color: #ff2d95; font-weight: 600; }
.ai-content .ai-message .highlight-blue { color: #00f0ff; font-weight: 600; }
.ai-content .ai-message .highlight-purple { color: #b200ff; font-weight: 600; }
.ai-content .ai-message .highlight-gold { color: #ffd700; font-weight: 600; }

/* 加载动画点 */
.loading-dots { display: flex; gap: 6px; }
.loading-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: #b200ff; display: inline-block;
  animation: dot-pulse 1.4s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* ── 分类栏 ── */
.category-bar {
  margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap;
}
.cat-btn {
  padding: 6px 16px; font-size: 12px; font-family: 'JetBrains Mono', monospace;
  background: rgba(178,0,255,0.08); border: 1px solid rgba(178,0,255,0.2);
  color: rgba(224,224,255,0.7); border-radius: 20px;
  cursor: pointer; transition: all 0.3s ease; letter-spacing: 0.5px;
}
.cat-btn:hover { background: rgba(178,0,255,0.15); color: #e0e0ff; }
.cat-btn.active {
  background: rgba(178,0,255,0.2); border-color: #b200ff; color: #b200ff;
  box-shadow: 0 0 10px rgba(178,0,255,0.2);
}

/* ── 游戏网格 ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px; margin-top: 20px; padding-bottom: 60px;
}

/* ── 游戏卡片 ── */
.game-card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #12122a 0%, #1a1a3a 100%);
  border: 1px solid #2a1a4a; border-radius: 12px;
  transition: all 0.3s ease; cursor: pointer;
  display: flex; flex-direction: column;
}
.game-card::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: conic-gradient(
    transparent, rgba(255,45,149,0.1), transparent 30%, transparent 60%,
    rgba(0,240,255,0.1) 80%, transparent
  );
  animation: rotate-glow 6s linear infinite;
  opacity: 0; transition: opacity 0.3s ease;
}
.game-card:hover::before { opacity: 1; }
.game-card:hover {
  transform: translateY(-6px);
  border-color: #b200ff;
  box-shadow: 0 0 10px rgba(178,0,255,0.4), 0 0 20px rgba(178,0,255,0.2), inset 0 0 10px rgba(178,0,255,0.1);
}
@keyframes rotate-glow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.game-card-preview {
  position: relative; overflow: hidden; height: 140px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0d0d20, #151535);
}
.game-card-preview img {
  width: 80px; height: 80px; object-fit: contain;
  position: relative; z-index: 1;
  filter: drop-shadow(0 0 8px rgba(178,0,255,0.3));
  transition: filter 0.3s ease;
}
.game-card:hover .game-card-preview img {
  filter: drop-shadow(0 0 16px rgba(255,45,149,0.5));
}
.game-card-category-tag {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: 10px; padding: 2px 8px; border-radius: 4px;
  letter-spacing: 1px; font-family: 'JetBrains Mono', monospace;
}
.game-card-category-tag.slot { background: rgba(255,45,149,0.2); color: #ff2d95; border: 1px solid rgba(255,45,149,0.3); }
.game-card-category-tag.puzzle { background: rgba(0,240,255,0.2); color: #00f0ff; border: 1px solid rgba(0,240,255,0.3); }
.game-card-category-tag.casino { background: rgba(255,215,0,0.2); color: #ffd700; border: 1px solid rgba(255,215,0,0.3); }
.game-card-category-tag.idle { background: rgba(57,255,20,0.2); color: #39ff14; border: 1px solid rgba(57,255,20,0.3); }
.game-card-category-tag.arcade { background: rgba(178,0,255,0.2); color: #b200ff; border: 1px solid rgba(178,0,255,0.3); }

.game-card-body {
  padding: 16px; position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column; gap: 8px;
}
.game-card-title {
  font-family: 'Orbitron', sans-serif; font-weight: 600; font-size: 15px;
  color: #e0e0ff;
}
.game-card-desc {
  font-size: 12px; color: rgba(224,224,255,0.5); line-height: 1.5; flex: 1;
}
.game-card-play-btn {
  display: inline-block; width: 100%; padding: 8px 0; margin-top: 8px;
  text-align: center; font-family: 'JetBrains Mono', monospace; font-size: 12px;
  letter-spacing: 1px; text-transform: uppercase;
  border: 1px solid rgba(0,240,255,0.3); color: #00f0ff;
  background: rgba(0,240,255,0.05); border-radius: 6px;
  transition: all 0.3s ease; cursor: pointer;
}
.game-card-play-btn:hover {
  background: rgba(0,240,255,0.12);
  box-shadow: 0 0 8px rgba(0,240,255,0.2);
}

/* ── 游戏覆盖层 ── */
.game-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,0.9); backdrop-filter: blur(8px);
  display: none; flex-direction: column;
}
.game-overlay.open { display: flex; }
.game-overlay-content {
  flex: 1; display: flex; flex-direction: column;
  max-width: 1100px; margin: 0 auto; width: 100%; padding: 10px 16px 16px;
}
.game-overlay-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid rgba(178,0,255,0.2);
  margin-bottom: 10px;
}
.game-overlay-title {
  font-family: 'Orbitron', sans-serif; font-weight: 600; font-size: 16px;
  color: #b200ff;
}
.game-overlay-actions { display: flex; gap: 10px; }
.overlay-btn {
  width: 36px; height: 36px; border-radius: 6px;
  border: 1px solid rgba(178,0,255,0.3);
  background: rgba(178,0,255,0.08); color: #b200ff;
  font-size: 18px; cursor: pointer; transition: all 0.3s ease;
  display: flex; align-items: center; justify-content: center;
}
.overlay-btn:hover { background: rgba(178,0,255,0.2); border-color: #b200ff; }
.game-overlay-body { flex: 1; position: relative; }
.game-overlay-body iframe {
  width: 100%; height: 100%; border: none; border-radius: 8px;
  background: #0a0a15;
}

/* ── 付费墙 ── */
.paywall-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,0.85);
  display: none; align-items: center; justify-content: center;
}
.paywall-overlay.open { display: flex; }
.paywall-modal {
  position: relative; max-width: 380px; width: 90%;
  background: linear-gradient(135deg, #1a0a2e, #0d0d25);
  border: 1px solid rgba(255,215,0,0.3); border-radius: 16px;
  overflow: hidden; padding: 40px 30px 30px; text-align: center;
}
.paywall-glow {
  position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: conic-gradient(
    transparent, rgba(255,215,0,0.06), transparent 30%, transparent 60%, rgba(255,45,149,0.06) 80%, transparent
  );
  animation: rotate-glow 8s linear infinite;
}
.paywall-content { position: relative; z-index: 1; }
.paywall-icon { font-size: 48px; margin-bottom: 12px; }
.paywall-title {
  font-family: 'Orbitron', sans-serif; font-size: 22px; font-weight: 700;
  color: #ffd700; margin-bottom: 12px;
}
.paywall-desc { font-size: 13px; color: rgba(224,224,255,0.6); line-height: 1.7; margin-bottom: 24px; }
.paywall-btn {
  display: block; width: 100%; padding: 14px; margin-bottom: 10px;
  border: none; border-radius: 10px; font-size: 16px; font-weight: 600;
  font-family: 'JetBrains Mono', monospace; cursor: pointer; letter-spacing: 1px;
  background: linear-gradient(135deg, #ffd700, #ffaa00); color: #1a0a2e;
  transition: all 0.3s ease;
}
.paywall-btn:hover { transform: scale(1.02); box-shadow: 0 4px 20px rgba(255,215,0,0.3); }
.paywall-btn.secondary {
  background: transparent; border: 1px solid rgba(178,0,255,0.3);
  color: rgba(224,224,255,0.5); font-size: 13px;
}
.paywall-btn.secondary:hover { border-color: #b200ff; color: #b200ff; transform: none; box-shadow: none; }

/* ── 分割线 ── */
.cyber-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #b200ff, #ff2d95, #00f0ff, transparent);
  margin: 24px 0;
}

/* ── 滚动条 ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0a1a; }
::-webkit-scrollbar-thumb { background: #b200ff; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #ff2d95; }

/* ── 底部 ── */
.footer {
  border-top: 1px solid rgba(178,0,255,0.12);
  padding: 20px 0; margin-top: 20px;
  position: relative; z-index: 2;
}
.footer-inner {
  display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.footer-links { font-size: 12px; color: rgba(224,224,255,0.3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.footer-divider { color: rgba(178,0,255,0.3); }
.footer-tech { font-size: 10px; color: rgba(224,224,255,0.15); letter-spacing: 1px; }

/* ── 响应式 ── */
@media (max-width: 640px) {
  .logo-text { font-size: 16px; }
  .status-label { display: none; }
  .games-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .game-card-preview { height: 100px; }
  .game-card-preview img { width: 60px; height: 60px; }
  .game-card-title { font-size: 13px; }
  .game-card-desc { font-size: 11px; }
  .overlay-btn { width: 32px; height: 32px; font-size: 14px; }
  .ai-recommend { padding: 16px; }
  .category-bar { gap: 6px; }
  .cat-btn { font-size: 11px; padding: 5px 12px; }
}