﻿/* ===== Dark Tech Theme - 暗黑科技风 ===== */

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Orbitron', 'Rajdhani', 'Share Tech Mono', sans-serif;
  background: #0a0a0f;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 212, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(124, 58, 237, 0.05) 0%, transparent 40%);
  color: #e6edf3;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== Container ===== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* ===== Header - 暗黑渐变导航 ===== */
.site-header {
  background: linear-gradient(90deg, #0d1117, #161b22);
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: #e6edf3;
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
  transition: all 0.3s ease;
}
.logo:hover {
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
  transform: scale(1.02);
}
.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #00d4ff, #7c3aed);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
  animation: neonPulse 2s ease-in-out infinite;
}
.logo span { color: #00d4ff; }

@keyframes neonPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(0, 212, 255, 0.4); }
  50% { box-shadow: 0 0 25px rgba(0, 212, 255, 0.7); }
}

/* ===== Hero Section - 顶部宫格区域 ===== */
.hero-section {
  padding: 15px 0;
  position: relative;
  max-height: 250px;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: -20px;
  right: -20px;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.03) 0%, rgba(124, 58, 237, 0.03) 100%);
  border-radius: 20px;
  z-index: -1;
}
.hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #e6edf3;
  text-align: center;
  text-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}
.hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 700px;
  margin: 0 auto;
}
.hero-card {
  background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 12px;
  padding: 0;
  text-align: center;
  color: #e6edf3;
  text-decoration: none;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  aspect-ratio: 1/1;
}
.hero-card:hover {
  border-color: #00d4ff;
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.5), inset 0 0 20px rgba(0, 212, 255, 0.1);
  transform: scale(1.05);
}
.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  margin-bottom: 0;
}
.hero-card span {
  display: none;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
  transition: left 0.5s ease;
}
.hero-card:hover::before {
  left: 100%;
}

/* 平板端 */
@media (max-width: 768px) {
  .hero-section { padding: 12px 0; max-height: 250px; }
  .hero-title { font-size: 1.2rem; margin-bottom: 10px; }
  .hero-grid { 
    grid-template-columns: repeat(4, 1fr); 
    max-width: 100%; 
    gap: 10px; 
    padding: 0 10px;
  }
  .hero-card { padding: 0; }
  .hero-card img { height: 100%; margin-bottom: 0; }
  .hero-card span { display: none; }
}

/* 手机端 */
@media (max-width: 480px) {
  .hero-section { padding: 10px 0; max-height: 250px; }
  .hero-title { font-size: 1rem; margin-bottom: 8px; }
  .hero-grid { 
    grid-template-columns: repeat(4, 1fr); 
    max-width: 100%; 
    gap: 8px; 
    padding: 0 8px;
  }
  .hero-card { padding: 0; }
  .hero-card img { height: 100%; margin-bottom: 0; }
  .hero-card span { display: none; }
}

/* ===== Games Section - 全部游戏区域 ===== */
.games-section {
  padding: 8px 0 32px;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #e6edf3;
  position: relative;
  display: inline-block;
  padding-left: 16px;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: linear-gradient(180deg, #00d4ff, #7c3aed);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}
@media (max-width: 768px) {
  .section-title { font-size: 1.25rem; }
}

/* ===== Game Grid (Home) - 科技网格 ===== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  padding: 5px 0;
}
@media (max-width: 1024px) { .game-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px)  { .game-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 576px)  { .game-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* ===== Game Card - 科技卡片 ===== */
.game-card {
  background: #161b22;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 212, 255, 0.2);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
  transition: all 0.4s ease;
  cursor: pointer;
  position: relative;
}
.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.15), transparent);
  transition: left 0.5s ease;
  z-index: 1;
  pointer-events: none;
}
.game-card:hover::before {
  left: 100%;
}
.game-card:hover {
  border-color: #00d4ff;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
  transform: translateY(-5px);
}
.game-card-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
  position: relative;
}
.game-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.game-card:hover .game-card-thumb img { transform: scale(1.08); }
.game-card-title {
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e6edf3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(180deg, #161b22 0%, #0d1117 100%);
  position: relative;
  z-index: 2;
}

/* ===== Ad Slot ===== */
.ad-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
}

/* ===== Detail Page ===== */
.detail-wrap {
  display: flex;
  gap: 28px;
  padding: 32px 0;
  flex: 1;
}
.detail-main {
  flex: 7;
  min-width: 0;
}
.detail-sidebar {
  flex: 3;
  min-width: 280px;
  max-width: 360px;
}
@media (max-width: 900px) {
  .detail-wrap { flex-direction: column; }
  .detail-sidebar { max-width: 100%; min-width: 0; }
}

/* Game Frame Area - 科技游戏框 */
.game-frame-wrap {
  background: #161b22;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
  border: 1px solid rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.2);
}
.game-frame-wrap:fullscreen,
.game-frame-wrap:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  aspect-ratio: unset;
  border-radius: 0;
}
.game-frame-wrap.mobile-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  z-index: 9999;
  aspect-ratio: unset;
  border-radius: 0;
}
.game-frame-wrap.mobile-fullscreen .fullscreen-btn {
  display: block;
  z-index: 10;
}
.game-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  position: relative;
  z-index: 1;
  border-radius: 16px;
}
.game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.4s ease;
  z-index: 3;
  border-radius: 16px;
}
.game-overlay.hidden { opacity: 0; pointer-events: none; }
.game-overlay-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 16px;
  filter: brightness(0.5);
}
.play-btn {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #00d4ff, #7c3aed);
  color: #FFFFFF;
  border: none;
  padding: 18px 36px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.5);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.7);
  animation: neonButton 1.5s infinite;
}
.play-btn:active {
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

@keyframes neonButton {
  0%, 100% { box-shadow: 0 0 25px rgba(0, 212, 255, 0.5), 0 0 50px rgba(0, 212, 255, 0.3); }
  50% { box-shadow: 0 0 35px rgba(0, 212, 255, 0.7), 0 0 70px rgba(0, 212, 255, 0.5); }
}

.fullscreen-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: rgba(0, 212, 255, 0.9);
  color: #FFFFFF;
  border: none;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}
.fullscreen-btn:hover {
  background: rgba(0, 212, 255, 1);
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.6);
  transform: scale(1.05);
}
.game-frame-wrap.playing .fullscreen-btn { display: block; }
.game-frame-wrap.playing .game-overlay { display: none; }
.game-frame-wrap.playing .game-overlay-thumb { display: none; }

/* 移动端隐藏全屏按钮 */
@media (max-width: 768px) {
  .game-frame-wrap .fullscreen-btn {
    display: none !important;
  }
}

/* PC端（大于768px）游戏开始后显示全屏按钮 */
@media (min-width: 769px) {
  .game-frame-wrap.playing .fullscreen-btn {
    display: block;
  }
}

/* 全屏模式下隐藏按钮 */
.game-frame-wrap:fullscreen .fullscreen-btn,
.game-frame-wrap:-webkit-full-screen .fullscreen-btn {
  display: none !important;
}

/* Sidebar - 科技侧边栏 */
.detail-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #e6edf3;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}
.detail-desc {
  font-size: 1rem;
  color: #8b949e;
  line-height: 1.8;
  margin-bottom: 20px;
}
.tips-box {
  background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
  border-left: 4px solid #00d4ff;
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}
.tips-box h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #00d4ff;
  margin-bottom: 12px;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}
.tips-box ul {
  list-style: none;
  padding: 0;
}
.tips-box li {
  font-size: 0.9rem;
  color: #8b949e;
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
}
.tips-box li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: #00d4ff;
  font-weight: bold;
}

/* Related Games */
.related-section {
  padding: 32px 0;
}
.related-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #e6edf3;
  position: relative;
  display: inline-block;
}
.related-section h2::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, #00d4ff, #7c3aed);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 768px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== Footer - 暗黑页脚 ===== */
.site-footer {
  background: #0d1117;
  border-top: 1px solid rgba(0, 212, 255, 0.2);
  padding: 40px 0;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  font-size: 0.9rem;
  color: #8b949e;
  transition: all 0.3s ease;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 20px;
}
.footer-links a:hover {
  color: #00d4ff;
  background: rgba(0, 212, 255, 0.1);
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}
.footer-copy {
  font-size: 0.85rem;
  color: #8b949e;
  margin-top: 8px;
}

/* ===== Info Pages (Contact/Policy/About) ===== */
.info-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px;
  flex: 1;
  background: #161b22;
  border-radius: 16px;
  margin-top: 32px;
  margin-bottom: 32px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.1);
}
.info-page h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 28px;
  color: #e6edf3;
  text-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}
.info-page h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 32px 0 16px;
  color: #00d4ff;
  position: relative;
  padding-left: 16px;
}
.info-page h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: linear-gradient(180deg, #00d4ff, #7c3aed);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}
.info-page p {
  font-size: 1rem;
  color: #8b949e;
  line-height: 1.9;
  margin-bottom: 16px;
}
.info-page a {
  color: #00d4ff;
  font-weight: 600;
  transition: all 0.3s ease;
}
.info-page a:hover {
  color: #7c3aed;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}
.info-page ul {
  list-style: none;
  padding: 0;
}
.info-page li {
  padding: 8px 0 8px 24px;
  position: relative;
  color: #8b949e;
  font-size: 1rem;
  line-height: 1.8;
}
.info-page li::before {
  content: '>';
  position: absolute;
  left: 4px;
  color: #00d4ff;
  font-weight: bold;
}

/* ===== Scrollbar - 科技滚动条 ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track {
  background: #0d1117;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00d4ff, #7c3aed);
  border-radius: 10px;
  border: 2px solid #0d1117;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #00d4ff, #9f67ff);
}

/* ===== Dark Tech Decorations & Animations ===== */

/* 霓虹光斑背景动画 */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.08) 0%, transparent 30%),
    radial-gradient(circle at 70% 60%, rgba(124, 58, 237, 0.06) 0%, transparent 35%),
    radial-gradient(circle at 40% 80%, rgba(0, 212, 255, 0.05) 0%, transparent 30%);
  animation: bgFloat 25s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, 1%) rotate(1deg); }
  66% { transform: translate(-1%, 2%) rotate(-1deg); }
}

/* 科技装饰元素 */
.game-card::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #00d4ff;
  border-radius: 50%;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
}
.game-card:hover::after {
  opacity: 1;
  animation: dotPulse 1s infinite;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.7; }
}

/* 链接霓虹效果 */
.footer-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00d4ff, #7c3aed);
  transition: all 0.3s ease;
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}
.footer-links a:hover::after {
  width: 80%;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .site-header { padding: 12px 0; }
  .logo { font-size: 1.3rem; }
  .logo-icon { width: 34px; height: 34px; font-size: 18px; }
  .detail-title { font-size: 1.4rem; }
  .info-page { margin: 20px 16px; padding: 32px 20px; border-radius: 12px; }
  .info-page h1 { font-size: 1.7rem; }
  .play-btn { padding: 14px 28px; font-size: 1rem; }
  .game-frame-wrap { border-radius: 12px; }
  .game-overlay { border-radius: 12px; }
  .game-frame-wrap iframe { border-radius: 12px; }
  .game-overlay-thumb { border-radius: 12px; }
}
