/**
 * FunnyGame.help 赛博朋克主题样式
 * 极简设计，强调功能性和视觉冲击力
 */

/* 赛博朋克色彩方案 */
:root {
  /* 主要颜色 */
  --cyber-primary: #00ffcc;      /* 霓虹青色 - 主要品牌色 */
  --cyber-secondary: #ff006e;    /* 霓虹粉红 - 强调色 */
  --cyber-accent: #ffbe0b;       /* 霓虹黄色 - 高亮色 */
  --cyber-purple: #8338ec;       /* 霓虹紫色 */
  --cyber-blue: #3a86ff;         /* 霓虹蓝色 */

  /* 背景色 */
  --bg-dark: #0a0a0a;            /* 深黑背景 */
  --bg-darker: #050505;          /* 最深背景 */
  --bg-medium: #1a1a1a;          /* 中等背景 */
  --bg-light: #2a2a2a;           /* 浅背景 */

  /* 文字颜色 */
  --text-primary: #ffffff;       /* 主要文字 */
  --text-secondary: #b3b3b3;     /* 次要文字 */
  --text-muted: #666666;         /* 静音文字 */

  /* 边框和分割线 */
  --border-primary: #333333;     /* 主要边框 */
  --border-accent: var(--cyber-primary); /* 强调边框 */

  /* 阴影 */
  --shadow-glow: 0 0 20px rgba(0, 255, 204, 0.3);
  --shadow-glow-pink: 0 0 20px rgba(255, 0, 110, 0.3);
  --shadow-glow-purple: 0 0 20px rgba(131, 56, 236, 0.3);
}

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

body {
  font-family: 'Courier New', monospace;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* 背景网格效果 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 255, 204, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 204, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 1;
}

/* 容器 */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* 导航栏 - 极简设计 */
.header {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--cyber-primary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
  transition: all 0.3s ease;
}

.logo:hover {
  color: var(--cyber-secondary);
  text-shadow: 0 0 15px rgba(255, 0, 110, 0.7);
}

/* 简化的导航链接 */
.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cyber-primary);
  text-shadow: 0 0 8px rgba(0, 255, 204, 0.6);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cyber-primary);
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(0, 255, 204, 0.6);
}

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

/* 右侧图标 - 极简设计 */
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-icon {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-icon:hover {
  color: var(--cyber-primary);
  filter: drop-shadow(0 0 8px rgba(0, 255, 204, 0.6));
}

/* 英雄区域 - 极简设计 */
.hero-banner {
  background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-medium) 100%);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 204, 0.1), transparent);
  animation: scan 8s linear infinite;
}

@keyframes scan {
  0% { left: -100%; }
  100% { left: 100%; }
}

.hero-title {
  font-size: 48px;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 0 0 20px rgba(0, 255, 204, 0.5);
}

.hero-description {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* 游戏区域 - 紧凑布局 */
.games-section {
  padding: 60px 0;
  background: var(--bg-darker);
}

.section-title {
  font-size: 32px;
  color: var(--cyber-primary);
  text-align: center;
  margin-bottom: 40px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 15px rgba(0, 255, 204, 0.4);
}

/* 游戏网格 - 更紧凑的设计 */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 60px;
}

/* 游戏卡片 - 缩小尺寸，强调效率 */
.game-card {
  background: var(--bg-medium);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
}

.game-card:hover {
  border-color: var(--cyber-primary);
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.game-card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.game-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: var(--bg-light);
  transition: all 0.3s ease;
}

.game-card:hover img {
  filter: brightness(1.2) contrast(1.1);
}

.game-card p {
  padding: 12px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  background: var(--bg-medium);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Home cards: title colors (readable, consistent palette) */
.game-info { padding: 12px; text-align: center; }
.game-title { font-size: 14px; font-weight: 600; color: var(--cyber-blue); text-decoration: none; }
a.game-card:visited .game-title { color: var(--cyber-accent); }
a.game-card:hover .game-title,
a.game-card:focus .game-title { color: var(--cyber-primary); }

/* 游戏卡片悬停效果 */
.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 255, 204, 0.1), rgba(255, 0, 110, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

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

/* 语言选择器 - 赛博朋克风格 */
.language-selector {
  position: relative;
}

.language-selector-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(58, 134, 255, 0.1);
  border: 1px solid var(--cyber-blue);
  border-radius: 4px;
  color: var(--cyber-blue);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.language-selector-btn:hover {
  background: rgba(58, 134, 255, 0.2);
  box-shadow: 0 0 15px rgba(58, 134, 255, 0.4);
}

.language-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--bg-medium);
  border: 1px solid var(--border-primary);
  border-radius: 4px;
  min-width: 150px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.language-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 12px;
}

.language-option:hover {
  background: rgba(0, 255, 204, 0.1);
  color: var(--cyber-primary);
}

/* 底部 - 极简设计 */
.footer {
  background: var(--bg-darker);
  border-top: 1px solid var(--border-primary);
  padding: 40px 0;
  text-align: center;
}

.footer-content {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-link {
  color: var(--cyber-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-link:hover {
  color: var(--cyber-secondary);
  text-shadow: 0 0 8px rgba(255, 0, 110, 0.6);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-description {
    font-size: 16px;
  }

  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }

  .container {
    padding: 0 15px;
  }

  .nav-container {
    height: 60px;
  }

  .logo {
    font-size: 20px;
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
  background: var(--cyber-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--cyber-secondary);
}

/* 加载动画 */
@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.loading {
  /* 暂时移除动画以避免闪烁问题 */
  /* animation: pulse-glow 2s ease-in-out infinite; */
}

/* 彻底禁用所有动画和过渡效果以解决闪烁问题 */
* {
  animation: none !important;
  transition: none !important;
  transform: none !important;
}

/* 保持赛博朋克风格但去除动态效果 */
.neon-flicker {
  /* 完全禁用闪烁动画 */
  animation: none !important;
  text-shadow: 0 0 14px rgba(0, 255, 204, 0.7), 0 0 24px rgba(0, 255, 204, 0.5);
}

/* 移除所有hover动画 */
.game-card:hover,
.nav-links a:hover,
button:hover,
.retry-btn:hover {
  animation: none !important;
  transition: none !important;
  transform: none !important;
}

/* 保持静态的霓虹发光效果 */
.hero-title {
  text-shadow: 0 0 20px rgba(0, 255, 204, 0.8), 0 0 30px rgba(0, 255, 204, 0.5);
}

.game-card {
  box-shadow: 0 0 15px rgba(0, 255, 204, 0.2);
}

button, .retry-btn {
  box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

button:hover, .retry-btn:hover {
  box-shadow: 0 0 15px rgba(0, 255, 204, 0.5);
  background: var(--cyber-primary);
  color: var(--bg-dark);
}

/* Nav icons and SVG sizing */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
}

.nav-icon:hover { color: var(--cyber-primary); }

/* Constrain inline SVG icons to avoid unexpected full-screen sizing */
.search-icon,
.user-icon,
.nav-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex: 0 0 auto;
}
/* Search overlay */
.no-scroll { overflow: hidden; }
.search-overlay { position: fixed; inset: 0; z-index: 2000; }
.search-overlay.hidden { display: none; }
.search-overlay-backdrop { position:absolute; inset:0; background: rgba(0,0,0,0.7); backdrop-filter: blur(2px); }
.search-overlay-panel { position:relative; margin: 8vh auto 0; max-width: 900px; background: var(--bg-medium); border:1px solid var(--border-primary); box-shadow: var(--shadow-glow); border-radius: 8px; padding: 16px; z-index:1; }
.search-overlay-header { display:flex; gap: 10px; align-items: center; }
.search-input { flex:1; padding: 10px 12px; border:1px solid var(--border-primary); background: var(--bg-dark); color: var(--text-primary); border-radius: 4px; font-size: 16px; }
.search-close { background: transparent; color: var(--text-secondary); border:none; font-size: 24px; line-height: 1; cursor: pointer; }
.search-results { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 12px; }
.search-item { display:flex; gap: 10px; align-items: center; background: var(--bg-dark); border:1px solid var(--border-primary); padding: 8px; border-radius: 6px; color: var(--text-primary); text-decoration: none; }
.search-item:hover { border-color: var(--cyber-primary); box-shadow: var(--shadow-glow); }
.search-thumb { width: 64px; height: 40px; object-fit: cover; border-radius: 4px; }
.search-title { font-size: 14px; }
.search-empty { padding: 12px; color: var(--text-secondary); }
/* Header stats */
.header-stats { display:flex; align-items:center; gap: 12px; margin-right: 8px; }
.header-stats .stat-item { display:inline-flex; align-items:center; gap:6px; color: var(--text-secondary); text-decoration:none; font-size: 13px; padding:4px 8px; border:1px solid var(--border-primary); border-radius: 4px; background: var(--bg-dark); }
.header-stats .stat-item:hover { color: var(--text-primary); border-color: var(--cyber-primary); box-shadow: var(--shadow-glow); }
.header-stats .badge { min-width: 20px; height: 20px; padding: 0 6px; display:inline-flex; align-items:center; justify-content:center; border-radius: 10px; background: var(--cyber-primary); color: #000; font-weight: bold; font-size: 12px; }
.header-stats .stat-value { color: var(--text-primary); max-width: 140px; overflow:hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .header-stats .stat-value { display:none; } }
/* Login status pill */
.login-pill { display:inline-flex; align-items:center; gap:8px; padding:4px 10px; border-radius: 999px; text-decoration:none; margin-left: 8px; border:1px solid var(--border-primary); font-size: 13px; }
.login-pill .login-pill-dot { width:8px; height:8px; border-radius:50%; background:#0f0; box-shadow: 0 0 6px rgba(0,255,0,0.6); }
.login-pill .login-pill-text { color: var(--text-secondary); }
.login-pill--info { background: var(--bg-dark); }
.login-pill--success { background: rgba(0,255,128,0.12); border-color: var(--cyber-primary); }
.login-pill:hover .login-pill-text { color: var(--text-primary); }
@media (max-width: 640px) { .login-pill .login-pill-text { display:none; } .login-pill { padding:4px; } }
/* Language selector defaults */
.language-selector { position: relative; margin-left: 12px; }
.language-selector-btn { display:flex; align-items:center; cursor:pointer; padding:4px 8px; border:1px solid var(--border-primary); border-radius:4px; background: var(--bg-dark); color: var(--text-secondary); }
.language-selector-btn img { display:inline-block; width:20px; height:15px; margin-right:6px; visibility:visible; opacity:1; }
.language-dropdown { position:absolute; top:100%; right:0; margin-top:6px; background: var(--bg-medium); border:1px solid var(--border-primary); border-radius:6px; box-shadow: var(--shadow-glow); padding:6px 0; z-index:1000; display:none; }
.language-dropdown.active { display:block; }
.language-option { display:flex; align-items:center; gap:8px; padding:6px 10px; cursor:pointer; color: var(--text-primary); }
.language-option:hover { background: var(--bg-dark); }
.language-option img { width:20px; height:15px; }
/* Always show language text; no hover dependency */
.language-option span { color: var(--text-primary); opacity: 1; visibility: visible; }
