/* ============================================
   Neon Realm — 霓虹幻境游戏平台样式系统
   赛博朋克 × 霓虹全息 × 玻璃拟态
   ============================================ */

/* ===== CSS 自定义属性 ===== */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* ===== 全局重置 ===== */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* ===== Body ===== */
.neon-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0a0a0f; color: #e0e0ff;
  line-height: 1.6; min-height: 100vh; overflow-x: hidden;
  position: relative;
}

/* ===== 粒子画布背景 ===== */
.particle-bg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

/* ===== 顶部粘性导航栏 ===== */
.neon-navbar {
  position: sticky; top: 0; z-index: 100; width: 100%; height: 72px;
  background: rgba(8,8,20,0.75); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,240,255,0.25);
  box-shadow: 0 0 20px rgba(0,240,255,0.08);
}
.navbar-inner {
  max-width: 1600px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; padding: 0 24px; gap: 28px;
}
/* Logo 霓虹光效字标 */
.navbar-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 26px; font-weight: 700;
  background: linear-gradient(90deg, #00f0ff, #b300ff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  text-decoration: none; letter-spacing: 2px;
  white-space: nowrap; flex-shrink: 0;
}
.navbar-logo:hover { filter: brightness(1.2); }

/* 主导航链接 */
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-link {
  color: #8892b0; text-decoration: none; font-size: 13px; font-weight: 500;
  letter-spacing: 1.2px; position: relative; padding: 4px 0;
  transition: color 0.3s; white-space: nowrap;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px;
  background: linear-gradient(90deg, #00f0ff, #b300ff);
  border-radius: 1px; transition: width 0.3s;
  box-shadow: 0 0 8px rgba(0,240,255,0.4);
}
.nav-link:hover { color: #00f0ff; text-shadow: 0 0 10px rgba(0,240,255,0.3); }
.nav-link:hover::after { width: 100%; }

/* 搜索框 */
.navbar-search { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.search-scan-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  pointer-events: none; animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow { 0%,100%{opacity:.5} 50%{opacity:1} }
.neon-search-input {
  width: 100%; padding: 10px 16px 10px 42px; height: 44px;
  background: rgba(10,10,20,0.8);
  border: 1px solid rgba(0,240,255,0.3); border-radius: 22px;
  color: #e0e0ff; font-family: 'Inter', sans-serif;
  font-size: 14px; outline: none; transition: all 0.3s;
}
.neon-search-input::placeholder { color: #4a4a6a; }
.neon-search-input:focus {
  border-color: #00f0ff;
  box-shadow: 0 0 15px rgba(0,240,255,0.35), inset 0 0 10px rgba(0,240,255,0.05);
}

/* 汉堡菜单按钮（移动端） */
.mobile-menu-btn {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; background: transparent;
  border: 1px solid rgba(0,240,255,0.3); border-radius: 8px;
  cursor: pointer; padding: 8px; flex-shrink: 0;
}
.mobile-menu-btn span { display: block; width: 100%; height: 2px; background: #00f0ff; border-radius: 1px; transition: all 0.3s; }
.mobile-menu-btn.active span:nth-child(1){transform:rotate(45deg) translate(5px,5px);}
.mobile-menu-btn.active span:nth-child(2){opacity:0;}
.mobile-menu-btn.active span:nth-child(3){transform:rotate(-45deg) translate(5px,-5px);}

/* 移动端导航面板 */
.mobile-nav-panel {
  display: none; background: rgba(8,8,20,0.95); backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,240,255,0.2); overflow: hidden;
  max-height: 0; transition: max-height 0.4s;
}
.mobile-nav-panel.open { max-height: 360px; }
.mobile-nav-links { display: flex; flex-direction: column; padding: 12px 24px; gap: 4px; }
.mobile-nav-links .nav-link { padding: 12px 16px; border-radius: 10px; font-size: 15px; letter-spacing: .5px; transition: all .2s; }
.mobile-nav-links .nav-link:hover { background: rgba(0,240,255,.08); color: #00f0ff; }

/* ===== Hero 精选大卡轮播 ===== */
.hero-carousel { padding: 24px 24px 0; max-width: 1600px; margin: 0 auto; }
.hero-track {
  display: flex; gap: 20px; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  -ms-overflow-style: none; padding-bottom: 8px;
}
.hero-track::-webkit-scrollbar { display: none; }
.hero-card {
  flex-shrink: 0; width: 520px; height: 320px; display: flex;
  background: linear-gradient(135deg, rgba(0,240,255,.08), rgba(179,0,255,.08));
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0,240,255,.25); border-radius: 16px; overflow: hidden;
  scroll-snap-align: start;
  transition: transform .4s cubic-bezier(.25,.46,.45,.94), box-shadow .4s;
  position: relative;
}
.hero-card::after {
  content: ''; position: absolute; bottom: 0; right: 0;
  width: 0; height: 0; border-style: solid;
  border-width: 0 0 80px 100px;
  border-color: transparent transparent rgba(0,240,255,.06) transparent;
  pointer-events: none;
}
.hero-card:hover {
  transform: perspective(1000px) rotateY(0deg) translateZ(30px);
  box-shadow: 0 0 30px rgba(0,240,255,.15), 0 0 60px rgba(179,0,255,.08);
  border-color: rgba(0,240,255,.5);
}
.hero-image { flex: 0 0 60%; overflow: hidden; position: relative; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px 0 0 12px; transition: transform .4s; }
.hero-card:hover .hero-image img { transform: scale(1.05); }
.hero-content { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px; gap: 12px; }
.hero-title { font-family: 'Orbitron', sans-serif; font-size: 20px; font-weight: 700; color: #e0e0ff; line-height: 1.3; }
.hero-desc { font-size: 13px; color: #8892b0; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; background: linear-gradient(135deg, #00f0ff, #b300ff);
  color: #fff; text-decoration: none; border-radius: 10px; font-weight: 600;
  font-size: 14px; letter-spacing: .5px; width: fit-content;
  transition: transform .3s, box-shadow .3s; position: relative; overflow: hidden;
}
.hero-btn::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
  transition: left .5s;
}
.hero-btn:hover::before { left: 100%; }
.hero-btn:hover { transform: scale(1.04); box-shadow: 0 0 25px rgba(0,240,255,.4), 0 0 50px rgba(179,0,255,.2); }

/* ===== 分类霓虹通道 ===== */
.category-banners-neon { padding: 20px 24px; max-width: 1600px; margin: 0 auto; }
.category-scroll {
  display: flex; gap: 16px; overflow-x: auto;
  scrollbar-width: thin; scrollbar-color: rgba(0,240,255,.33) transparent; padding: 4px 0;
}
.category-scroll::-webkit-scrollbar { height: 6px; }
.category-scroll::-webkit-scrollbar-track { background: transparent; }
.category-scroll::-webkit-scrollbar-thumb { background: rgba(0,240,255,.3); border-radius: 3px; }
.category-card-neon {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  min-width: 160px; height: 90px; border-radius: 14px;
  border: 1px solid rgba(0,240,255,.2); text-decoration: none;
  transition: all .3s; position: relative; overflow: hidden;
}
.category-card-neon::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(255,255,255,.015) 8px, rgba(255,255,255,.015) 16px);
  pointer-events: none;
}
.category-card-neon:hover {
  border-color: #ff00e5;
  box-shadow: 0 0 20px rgba(255,0,229,.2), inset 0 0 20px rgba(255,0,229,.05);
  transform: translateY(-3px) scale(1.02);
}
.category-label-neon { font-size: 12px; font-weight: 600; color: #e0e0ff; letter-spacing: 2px; text-transform: uppercase; position: relative; z-index: 1; }

/* ===== 游戏分区 Section ===== */
.main-content-neon { position: relative; z-index: 1; max-width: 1600px; margin: 0 auto; padding: 0 0 40px; }
.games-section-neon { padding: 28px 24px 0; }
.section-header-neon { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.section-title-neon {
  font-family: 'Orbitron', sans-serif; font-size: 22px; font-weight: 600;
  color: #e0e0ff; position: relative; display: inline-block; padding-bottom: 10px;
}
.section-title-neon::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 60px; height: 3px;
  background: linear-gradient(90deg, #00f0ff, #b300ff); border-radius: 2px;
  box-shadow: 0 0 10px rgba(0,240,255,.4);
}
.section-more-neon { color: #00f0ff; text-decoration: none; font-size: 13px; font-weight: 500; letter-spacing: .5px; transition: all .3s; }
.section-more-neon:hover { text-shadow: 0 0 10px rgba(0,240,255,.5); letter-spacing: 1px; }

/* ===== 游戏网格（响应式）===== */
.games-grid-neon { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 640px) { .games-grid-neon { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1024px) { .games-grid-neon { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
@media (min-width: 1440px) { .games-grid-neon { grid-template-columns: repeat(5, 1fr); } }

/* ===== 玻璃拟态游戏卡片 ===== */
.game-card-neon {
  background: rgba(16,16,30,.55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0,240,255,.15); border-radius: 16px; overflow: hidden;
  transition: transform .3s cubic-bezier(.25,.46,.45,.94), box-shadow .3s, border-color .3s;
  position: relative;
}
.game-card-neon:hover {
  transform: translateY(-6px) scale(1.02); border-color: transparent;
  box-shadow: 0 0 0 2px #00f0ff, 0 0 30px rgba(0,240,255,.4);
  background: rgba(16,16,30,.8);
}
.game-card-link-neon { display: block; text-decoration: none; color: inherit; }

/* 卡片图片区域 — 16:10 宽比例 */
.card-image-neon { position: relative; aspect-ratio: 16/10; overflow: hidden; background: #0a0a0f; }
.card-image-neon img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.game-card-neon:hover .card-image-neon img { transform: scale(1.06); }
/* 图片内阴影 屏幕凹陷感 */
.card-image-neon::after {
  content: ''; position: absolute; inset: 0;
  box-shadow: inset 0 0 20px rgba(0,0,0,.35); pointer-events: none; z-index: 1;
}
/* 全息扫描线动画 */
.card-scanline {
  position: absolute; top: -100%; left: 0; width: 100%; height: 30%;
  background: linear-gradient(180deg, transparent, rgba(0,240,255,.06), transparent);
  z-index: 2; pointer-events: none;
}
.game-card-neon:hover .card-scanline { animation: scan-move 2s ease-in-out infinite; }
@keyframes scan-move { 0%{top:-30%} 100%{top:110%} }

/* 徽章 右上角霓虹发光 */
.card-badge-neon {
  position: absolute; top: 10px; right: 10px;
  background: var(--badge-glow,#ff00e5); color: #fff;
  padding: 3px 10px; border-radius: 6px; font-size: 10px; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase; z-index: 3;
  box-shadow: 0 0 8px var(--badge-glow,#ff00e5);
}

/* 卡片信息区 */
.card-info-neon { padding: 12px 14px 14px; }
.card-title-neon { font-size: 14px; font-weight: 600; color: #e0e0ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .3s; }
.game-card-neon:hover .card-title-neon { color: #00f0ff; }

/* ===== 广告容器 全息风格 ===== */
.ad-container-neon { text-align: center; padding: 20px 24px; display: flex; flex-direction: column; align-items: center; max-width: 1600px; margin: 8px auto 0; }
.ad-label { color: #4a4a6a; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }

/* ===== 详情页 ===== */
.detail-page-neon { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 28px 24px 48px; }
.detail-back-neon { margin-bottom: 24px; }
.back-btn-neon {
  display: inline-flex; align-items: center; gap: 6px; color: #00f0ff;
  text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 10px 20px; border-radius: 10px;
  background: rgba(0,240,255,.06); border: 1px solid rgba(0,240,255,.2);
  transition: all .3s; letter-spacing: .3px;
}
.back-btn-neon:hover { background: rgba(0,240,255,.12); border-color: #00f0ff; box-shadow: 0 0 15px rgba(0,240,255,.2); }

.detail-hero-neon {
  display: flex; gap: 32px;
  background: rgba(16,16,30,.7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0,240,255,.15); border-radius: 20px; padding: 28px; margin-bottom: 28px;
}
.detail-thumb-neon { flex-shrink: 0; width: 340px; border-radius: 14px; overflow: hidden; border: 1px solid rgba(0,240,255,.15); position: relative; }
.detail-thumb-neon img { width: 100%; height: auto; display: block; }
.detail-info-neon { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.detail-title-neon { font-family: 'Orbitron', sans-serif; font-size: 28px; font-weight: 700; color: #e0e0ff; line-height: 1.2; }
.detail-desc-neon { color: #8892b0; font-size: 15px; line-height: 1.7; }
.play-btn-neon {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 42px; background: linear-gradient(135deg, #00f0ff, #b300ff);
  color: #fff; border: none; border-radius: 12px; font-family: 'Inter', sans-serif;
  font-size: 16px; font-weight: 600; cursor: pointer; letter-spacing: .5px;
  width: fit-content; transition: transform .3s, box-shadow .3s; position: relative; overflow: hidden;
}
.play-btn-neon::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent); transition: left .5s;
}
.play-btn-neon:hover::before { left: 100%; }
.play-btn-neon:hover { transform: scale(1.04); box-shadow: 0 0 30px rgba(0,240,255,.4), 0 0 60px rgba(179,0,255,.2); }

.game-iframe-container-neon {
  width: 100%; height: 650px; border-radius: 16px; overflow: hidden;
  margin-bottom: 28px; background: #000; border: 1px solid rgba(0,240,255,.15);
  box-shadow: 0 0 30px rgba(0,240,255,.08);
}
.game-iframe-container-neon iframe { width: 100%; height: 100%; border: none; }

.related-section-neon { margin-top: 48px; }
.related-games-grid-neon { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 768px) { .related-games-grid-neon { grid-template-columns: repeat(4, 1fr); } }
.related-card-neon .card-info-neon { padding: 8px 10px 10px; }
.related-card-neon .card-title-neon { font-size: 12px; }

/* ===== 静态页面 ===== */
.static-page-neon { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; padding: 28px 24px 48px; }
.static-back-neon { margin-bottom: 24px; }
.static-title-neon { font-family: 'Orbitron', sans-serif; font-size: 28px; font-weight: 700; color: #e0e0ff; margin-bottom: 24px; }
.static-content-neon {
  background: rgba(16,16,30,.7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0,240,255,.15); border-radius: 16px; padding: 36px;
  color: #8892b0; line-height: 1.85; font-size: 15px;
}
.static-content-neon p { margin-bottom: 16px; }
.static-content-neon strong { color: #e0e0ff; }
.static-content-neon ul { margin: 12px 0 12px 24px; }
.static-content-neon li { margin-bottom: 8px; }

/* ===== 手机端底部导航栏 ===== */
.mobile-bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 101;
  height: 64px; background: rgba(8,8,20,.93); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0,240,255,.25); box-shadow: 0 -4px 20px rgba(0,0,0,.4);
}
.mobile-bottom-nav { /* override display from above */ display: none !important; }

@media (max-width: 1024px) {
  .nav-links { display: none; }
  .navbar-search { display: none; }
  .mobile-menu-btn { display: flex; }
  .mobile-nav-panel { display: block; }
  .hero-card { width: 460px; height: 280px; }
  .detail-hero-neon { flex-direction: column; }
  .detail-thumb-neon { width: 100%; max-width: 420px; }
}

@media (max-width: 640px) {
  .neon-navbar { height: 58px; }
  .navbar-logo { font-size: 22px; }
  .category-banners-neon { display: none; }
  .mobile-bottom-nav { display: flex !important; }
  .main-content-neon { padding-bottom: 80px; }
  .detail-page-neon { padding-bottom: 80px; }
  .static-page-neon { padding-bottom: 80px; }
  .hero-carousel { padding: 16px 16px 0; }
  .hero-card { width: 320px; height: auto; min-height: 220px; flex-direction: column; }
  .hero-image { flex: none; height: 180px; }
  .hero-image img { border-radius: 14px 14px 0 0; }
  .hero-content { padding: 16px; }
  .hero-title { font-size: 17px; }
  .games-section-neon { padding: 20px 16px 0; }
  .section-title-neon { font-size: 18px; }
  .detail-page-neon { padding: 16px; }
  .detail-hero-neon { padding: 16px; }
  .detail-title-neon { font-size: 22px; }
  .game-iframe-container-neon { height: 450px; }
  .static-page-neon { padding: 16px; }
  .static-content-neon { padding: 20px; }
  .games-grid-neon { gap: 12px; }
  .neon-footer .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

/* ===== 自定义滚动条 ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0a0a0f; }
::-webkit-scrollbar-thumb { background: rgba(0,240,255,.35); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,240,255,.6); }
::selection { background: rgba(0,240,255,.25); color: #ffffff; }
a { color: inherit; }
