/* ===== Gradient Glow Theme - 渐变流光风 ===== */

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Poppins', 'Inter', 'Montserrat', sans-serif;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  color: #ffffff;
  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: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}
.logo:hover {
  transform: scale(1.02);
}
.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  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(102, 126, 234, 0.4);
}
.logo span { 
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Hero Section - 顶部宫格区域 ===== */
.hero-section {
  padding: 25px 0;
  max-height: 250px;
  overflow: hidden;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 550px;
  margin: 0 auto;
}
.hero-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 0;
  text-align: center;
  color: #fff;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  aspect-ratio: 1/1;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #667eea);
  background-size: 400% 400%;
  border-radius: 22px;
  z-index: -1;
  animation: gradientBorder 3s ease infinite;
}
@keyframes gradientBorder {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero-card:hover {
  transform: translateY(-15px) scale(1.05);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
}
.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 0;
  border: 0;
}
.hero-card span {
  display: none;
}

/* 平板端 */
@media (max-width: 768px) {
  .hero-section { padding: 20px 0; max-height: 250px; }
  .hero-grid { 
    grid-template-columns: repeat(4, 1fr); 
    max-width: 300px; 
    gap: 15px; 
  }
  .hero-card img { height: 100%; }
}

/* 手机端 */
@media (max-width: 480px) {
  .hero-section { padding: 15px 0; max-height: 250px; }
  .hero-grid { 
    grid-template-columns: repeat(4, 1fr); 
    max-width: 280px; 
    gap: 12px; 
  }
}

/* ===== Games Section - 全部游戏区域 ===== */
.games-section {
  padding: 8px 0 32px;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
  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, #667eea, #764ba2, #f093fb);
  border-radius: 2px;
}
@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: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
  transition: all 0.4s ease;
  cursor: pointer;
  position: relative;
}
.game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(102, 126, 234, 0.5);
  border-color: rgba(102, 126, 234, 0.5);
}
.game-card-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  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: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(255,255,255,0.05);
}

/* ===== 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(255,255,255,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}
.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(26, 26, 46, 0);
  backdrop-filter: blur(8px);
  -webkit-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.9);
}
.play-btn {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #667eea, #764ba2);
  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 8px 32px rgba(102, 126, 234, 0.4);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.6);
}

.fullscreen-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: linear-gradient(135deg, #667eea, #764ba2);
  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 4px 16px rgba(102, 126, 234, 0.4);
}
.fullscreen-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(102, 126, 234, 0.6);
}
.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: #ffffff;
}
.detail-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.8;
  margin-bottom: 20px;
}
.tips-box {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-left: 4px solid;
  border-image: linear-gradient(180deg, #667eea, #764ba2, #f093fb) 1;
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
}
.tips-box h3 {
  font-size: 1.05rem;
  font-weight: 700;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}
.tips-box ul {
  list-style: none;
  padding: 0;
}
.tips-box li {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
}
.tips-box li::before {
  content: '>';
  position: absolute;
  left: 0;
  background: linear-gradient(90deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
}

/* Related Games */
.related-section {
  padding: 32px 0;
}
.related-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
  position: relative;
  display: inline-block;
}
.related-section h2::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  border-radius: 2px;
}
.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: rgba(0,0,0,0.3);
  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: rgba(255,255,255,0.7);
  transition: all 0.3s ease;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 20px;
}
.footer-links a:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.1);
}
.footer-copy {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin-top: 8px;
}

/* ===== Info Pages (Contact/Policy/About) ===== */
.info-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px;
  flex: 1;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  margin-top: 32px;
  margin-bottom: 32px;
  border: 1px solid rgba(255,255,255,0.15);
}
.info-page h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 28px;
  color: #ffffff;
}
.info-page h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 32px 0 16px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  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, #667eea, #764ba2, #f093fb);
  border-radius: 2px;
}
.info-page p {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.9;
  margin-bottom: 16px;
}
.info-page a {
  background: linear-gradient(90deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
  transition: all 0.3s ease;
}
.info-page a:hover {
  background: linear-gradient(90deg, #764ba2, #f093fb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.info-page ul {
  list-style: none;
  padding: 0;
}
.info-page li {
  padding: 8px 0 8px 24px;
  position: relative;
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  line-height: 1.8;
}
.info-page li::before {
  content: '>';
  position: absolute;
  left: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #667eea, #764ba2);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #764ba2, #f093fb);
}

/* ===== Gradient Glow Decorations & Animations ===== */

/* 流动光斑背景动画 */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.15) 0%, transparent 30%),
    radial-gradient(circle at 70% 60%, rgba(118, 75, 162, 0.12) 0%, transparent 35%),
    radial-gradient(circle at 40% 80%, rgba(240, 147, 251, 0.1) 0%, transparent 30%);
  animation: bgFloat 20s 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: linear-gradient(135deg, #667eea, #f093fb);
  border-radius: 50%;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2;
}
.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; }
}

/* 响应式调整 */
@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; }
}
