/* ===== Tech Prism Theme - 科技棱镜风 ===== */

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Space Grotesk', 'Rajdhani', sans-serif;
  background: #0a0f1a;
  color: #e0f2fe;
  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%;
}

/* ===== Site Header - 科技棱镜页眉 ===== */
.site-header {
  background: linear-gradient(180deg, rgba(10,15,26,0.95), rgba(5,10,20,0.9));
  border-bottom: 1px solid rgba(0,243,255,0.2);
  padding: 16px 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,243,255,0.1);
}
/* 首页隐藏页眉 */
body.index-page .site-header {
  display: none;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #e0f2fe;
  transition: all 0.3s ease;
}
.logo:hover {
  text-shadow: 0 0 20px rgba(0,243,255,0.6);
}
.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #6b21f5, #00f3ff);
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  box-shadow: 0 0 15px rgba(0,243,255,0.5);
  animation: logoGlow 3s ease-in-out infinite;
  position: relative;
}
.logo-icon::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: rgba(255,255,255,0.3);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}
.logo-icon::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  top: 8px;
  left: 12px;
}
.logo span {
  color: #00f3ff;
  text-shadow: 0 0 10px rgba(0,243,255,0.5);
}

@keyframes logoGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(0,243,255,0.5); }
  50% { box-shadow: 0 0 25px rgba(0,243,255,0.8); }
}

@media (max-width: 480px) {
  .logo { font-size: 1.25rem; }
  .logo-icon { width: 36px; height: 36px; font-size: 1.2rem; }
}

/* ===== Hero Section - 六边形蜂巢宫格 ===== */
.hero-section {
  background: radial-gradient(circle at 20% 30%, #13203a, #050a14);
  padding: 30px 0;
  overflow-x: auto;
}
.hero-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px 30px;
  max-width: 700px;
  margin: 0 auto;
}
.hero-card {
  width: clamp(80px, 18vw, 110px);
  aspect-ratio: 1 / 0.866;
  background: linear-gradient(145deg, rgba(30,50,80,0.6), rgba(10,20,40,0.9));
  backdrop-filter: blur(8px);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  text-align: center;
  transition: all 0.3s cubic-bezier(0.2,0.9,0.4,1.1);
  border: 1px solid rgba(0,243,255,0.4);
  box-shadow: 0 0 8px rgba(0,243,255,0.3);
  animation: breathe 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}
.hero-card:hover {
  transform: scale(1.08) translateY(-8px);
  border-color: #00f3ff;
  box-shadow: 0 0 20px #00f3ff;
}
.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}
.hero-card span {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  z-index: 1;
  white-space: nowrap;
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-card:nth-child(4) { margin-right: 15%; }
.hero-card:nth-child(5) { margin-left: 15%; }

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 8px rgba(0,243,255,0.3); }
  50% { box-shadow: 0 0 16px rgba(0,243,255,0.6); }
}

/* 平板端 */
@media (max-width: 768px) {
  .hero-section { padding: 20px 0; }
  .hero-grid { gap: 15px 20px; }
}

/* 手机端 */
@media (max-width: 480px) {
  .hero-section { padding: 15px 0; }
  .hero-grid { gap: 10px 15px; }
  .hero-card:nth-child(4) { margin-right: 10%; }
  .hero-card:nth-child(5) { margin-left: 10%; }
}

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

/* ===== Game Grid (Home) - 玻璃拟态网格 ===== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  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: rgba(15, 25, 45, 0.75);
  overflow: hidden;
  border: 1px solid rgba(0,243,255,0.1);
  box-shadow: 0 8px 20px rgba(0, 243, 255, 0.2), 0 0 0 1px rgba(0,243,255,0.1);
  transition: all 0.3s cubic-bezier(0.2,0.9,0.4,1.1);
  cursor: pointer;
  position: relative;
  backdrop-filter: blur(10px);
  border-radius: 12px;
}
.game-card:hover {
  box-shadow: 0 8px 30px rgba(0, 243, 255, 0.4), 0 0 0 1px rgba(0,243,255,0.5);
  transform: translateY(-5px);
  border-color: rgba(0,243,255,0.5);
}
.game-card-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: rgba(15, 25, 45, 0.9);
  position: relative;
}
.game-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.game-card:hover .game-card-thumb img { transform: scale(1.08); }
.game-card-title {
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #e0f2fe;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(15, 25, 45, 0.75);
  backdrop-filter: blur(10px);
}

/* ===== 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: rgba(15, 25, 45, 0.9);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
  border: 1px solid rgba(0,243,255,0.3);
  box-shadow: 0 8px 20px rgba(0, 243, 255, 0.2), 0 0 0 1px rgba(0,243,255,0.1);
  border-radius: 12px;
}
.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;
}
.game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 26, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 3;
  backdrop-filter: blur(8px);
}
.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;
  filter: brightness(0.7) saturate(1.2);
}
.play-btn {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #6b21f5, #00f3ff);
  color: #ffffff;
  border: none;
  padding: 18px 36px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 50px;
  box-shadow: 0 0 20px rgba(0,243,255,0.4);
}
.play-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(0,243,255,0.6);
}
.play-btn:active {
  transform: scale(1.02);
}

.fullscreen-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: linear-gradient(135deg, #6b21f5, #00f3ff);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: none;
  transition: all 0.3s ease;
  border-radius: 8px;
}
.fullscreen-btn:hover {
  box-shadow: 0 0 15px rgba(0,243,255,0.5);
}
.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: #00f3ff;
  text-shadow: 0 0 10px rgba(0,243,255,0.5);
}
.detail-desc {
  font-size: 1rem;
  color: #8ba3b8;
  line-height: 1.8;
  margin-bottom: 20px;
}
.tips-box {
  background: rgba(15, 25, 45, 0.75);
  border-left: 4px solid #00f3ff;
  padding: 20px;
  margin-top: 16px;
  backdrop-filter: blur(10px);
  border-radius: 0 12px 12px 0;
  box-shadow: 0 0 15px rgba(0,243,255,0.1);
}
.tips-box h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #00f3ff;
  margin-bottom: 12px;
}
.tips-box ul {
  list-style: none;
  padding: 0;
}
.tips-box li {
  font-size: 0.9rem;
  color: #8ba3b8;
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
}
.tips-box li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: #00f3ff;
}

/* Related Games */
.related-section {
  padding: 32px 0;
}
.related-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #00f3ff;
  position: relative;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.related-section h2::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, #6b21f5, #00f3ff);
  box-shadow: 0 0 10px rgba(0,243,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: #05080f;
  padding: 40px 0;
  margin-top: auto;
  border-top: 1px solid rgba(0,243,255,0.2);
}
.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: #e0f2fe;
  transition: all 0.3s ease;
  font-weight: 400;
  padding: 8px 16px;
  position: relative;
}
.footer-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: #00f3ff;
  transition: all 0.3s ease;
  transform: translateX(-50%);
  box-shadow: 0 0 5px rgba(0,243,255,0.5);
}
.footer-links a:hover::after {
  width: 80%;
}
.footer-links a:hover {
  color: #00f3ff;
  text-shadow: 0 0 8px rgba(0,243,255,0.5);
}
.footer-copy {
  font-size: 0.85rem;
  color: #8ba3b8;
  margin-top: 8px;
}

/* ===== Info Pages (Contact/Policy/About) ===== */
.info-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px;
  flex: 1;
  background: rgba(15, 25, 45, 0.75);
  margin-top: 32px;
  margin-bottom: 32px;
  border: 1px solid rgba(0,243,255,0.2);
  box-shadow: 0 8px 20px rgba(0, 243, 255, 0.2), 0 0 0 1px rgba(0,243,255,0.1);
  backdrop-filter: blur(10px);
  border-radius: 12px;
}
.info-page h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 28px;
  color: #00f3ff;
  text-shadow: 0 0 15px rgba(0,243,255,0.5);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.info-page h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 32px 0 16px;
  color: #00f3ff;
  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, #6b21f5, #00f3ff);
  box-shadow: 0 0 10px rgba(0,243,255,0.5);
}
.info-page p {
  font-size: 1rem;
  color: #8ba3b8;
  line-height: 1.9;
  margin-bottom: 16px;
}
.info-page a {
  color: #00f3ff;
  font-weight: 600;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}
.info-page a:hover {
  border-bottom-color: #00f3ff;
  text-shadow: 0 0 8px rgba(0,243,255,0.5);
}
.info-page ul {
  list-style: none;
  padding: 0;
}
.info-page li {
  padding: 8px 0 8px 24px;
  position: relative;
  color: #8ba3b8;
  font-size: 1rem;
  line-height: 1.8;
}
.info-page li::before {
  content: '▸';
  position: absolute;
  left: 4px;
  color: #00f3ff;
}

/* ===== Scrollbar - 科技滚动条 ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track {
  background: #0a0f1a;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #6b21f5, #00f3ff);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  box-shadow: 0 0 10px rgba(0,243,255,0.5);
}

/* ===== 响应式调整 ===== */
@media (max-width: 768px) {
  .info-page { margin: 20px 16px; padding: 32px 20px; }
  .info-page h1 { font-size: 1.7rem; }
  .play-btn { padding: 14px 28px; font-size: 1rem; }
  .detail-title { font-size: 1.4rem; }
}
