/* ===== GlacialFrost Theme - 冰川极寒风 ===== */

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Montserrat', 'Roboto', sans-serif;
  background: #e6f7ff;
  color: #1a2b3c;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== Site Header ===== */
.site-header {
  background: #e6f7ff;
  padding: 12px 16px;
  border-bottom: 2px solid #00c2ff;
  box-shadow: 0 2px 8px rgba(0,194,255,0.2);
  height: 60px;
  display: flex;
  align-items: center;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a2b3c;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  text-shadow: 0 0 10px rgba(0,194,255,0.3);
}
.logo:hover {
  color: #00c2ff;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: rgba(230,247,255,0.9);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,194,255,0.3);
  border: 2px solid #00c2ff;
}
.logo span {
  color: #00c2ff;
  font-weight: 600;
}
@media (max-width: 480px) {
  .logo { font-size: 1rem; }
  .logo-icon { width: 32px; height: 32px; }
}

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

/* ===== Hero Section - 顶部宫格 ===== */
/* 圆形格子可滑动布局 */
.hero-section {
  max-width: 375px;
  max-height: 150px;
  margin: 0 auto;
  padding: 10px;
  overflow: hidden;
}
.hero-grid {
  display: flex;
  gap: 12px;
  height: 130px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 5px;
  scrollbar-width: none;
}
.hero-grid::-webkit-scrollbar {
  display: none;
}
.hero-card {
  flex: 0 0 auto;
  width: 100px;
  height: 100px;
  background: rgba(230,247,255,0.9);
  border-radius: 50%;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,194,255,0.3);
  transition: all 0.3s ease;
  border: 2px solid #00c2ff;
  text-decoration: none;
  overflow: hidden;
  position: relative;
}
.hero-card:hover {
  transform: scale(1.08);
  border-color: #e0f7ff;
  box-shadow: 0 6px 16px rgba(224,247,255,0.5);
}
.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: none;
}
.hero-card span {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(0,0,0,0.8), 0 0 4px rgba(0,0,0,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 85px;
  z-index: 2;
}

/* ===== Games Section ===== */
.games-section {
  padding: 8px 0 32px;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: #00c2ff;
  position: relative;
  display: inline-block;
  padding-left: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(0,194,255,0.3);
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: linear-gradient(180deg, #00c2ff, #e0f7ff);
  box-shadow: 0 0 10px rgba(0,194,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: 12px 16px;
  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: 10px 12px; } }

/* ===== Game Card - 冰晶卡片 ===== */
.game-card {
  background: rgba(230,247,255,0.9);
  overflow: hidden;
  border-radius: 6px;
  border: 2px solid #00c2ff;
  box-shadow: 0 4px 12px rgba(0,194,255,0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}
.game-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(224,247,255,0.5) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}
.game-card:hover::before {
  opacity: 1;
}
.game-card:hover {
  transform: translateY(-2px);
  border-color: #e0f7ff;
  box-shadow: 0 6px 16px rgba(224,247,255,0.4);
}
.game-card:active {
  transform: scale(0.98);
}
.game-card-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: rgba(0,194,255,0.05);
  position: relative;
}
.game-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
  border-radius: 4px 4px 0 0;
  border: 1px solid #e0f7ff;
  border-bottom: none;
  position: relative;
  z-index: 2;
}
.game-card:hover .game-card-thumb img { 
  transform: scale(1.05); 
}
.game-card-title {
  padding: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #1a2b3c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  text-shadow: 0 0 5px rgba(0,194,255,0.2);
  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: rgba(230,247,255,0.9);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 6px;
  border: 2px solid #00c2ff;
  box-shadow: 0 4px 12px rgba(0,194,255,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;
}
.game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(230,247,255,0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 3;
}
.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(90%) saturate(80%);
}
.play-btn {
  position: relative;
  z-index: 1;
  background: rgba(230,247,255,0.9);
  color: #00c2ff;
  border: 2px solid #00c2ff;
  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: 1px;
  text-transform: uppercase;
  border-radius: 25px;
  box-shadow: 0 4px 12px rgba(0,194,255,0.3);
  text-shadow: 0 0 10px rgba(0,194,255,0.3);
}
.play-btn:hover {
  transform: translateY(-2px);
  background: #e0f7ff;
  box-shadow: 0 6px 20px rgba(0,194,255,0.4);
  border-color: #e0f7ff;
}
.play-btn:active {
  transform: scale(0.98);
}

.fullscreen-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: rgba(230,247,255,0.9);
  color: #00c2ff;
  border: 2px solid #00c2ff;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: none;
  transition: all 0.3s ease;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0,194,255,0.3);
}
.fullscreen-btn:hover {
  transform: translateY(-1px);
  background: #e0f7ff;
  border-color: #e0f7ff;
}
.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.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #00c2ff;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0,194,255,0.3);
}
.detail-desc {
  font-size: 1rem;
  color: #1a2b3c;
  line-height: 1.8;
  margin-bottom: 20px;
}
.tips-box {
  background: rgba(230,247,255,0.9);
  border-left: 4px solid #00c2ff;
  padding: 20px;
  margin-top: 16px;
  border-radius: 0 6px 6px 0;
  box-shadow: 0 4px 12px rgba(0,194,255,0.3);
  border: 2px solid #00c2ff;
  border-left: 4px solid #00c2ff;
}
.tips-box h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #00c2ff;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0,194,255,0.3);
}
.tips-box ul {
  list-style: none;
  padding: 0;
}
.tips-box li {
  font-size: 0.9rem;
  color: #1a2b3c;
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
}
.tips-box li::before {
  content: '❄';
  position: absolute;
  left: 0;
  color: #00c2ff;
  font-size: 0.8rem;
}

/* Related Games */
.related-section {
  padding: 32px 0;
}
.related-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: #00c2ff;
  position: relative;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(0,194,255,0.3);
}
.related-section h2::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, #00c2ff, #e0f7ff);
  box-shadow: 0 0 10px rgba(0,194,255,0.5);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 768px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== Footer - 浅青页脚 ===== */
.site-footer {
  background: #d1e8f2;
  padding: 40px 0;
  margin-top: auto;
  border-top: 2px solid #00c2ff;
  box-shadow: 0 -2px 8px rgba(0,194,255,0.2);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.footer-links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  font-size: 0.8rem;
  color: #1a2b3c;
  transition: all 0.3s ease;
  font-weight: 500;
  padding: 8px 16px;
  position: relative;
  letter-spacing: 1px;
  text-shadow: 0 0 5px rgba(0,194,255,0.2);
}
.footer-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #00c2ff;
  transition: all 0.3s ease;
  transform: translateX(-50%);
  box-shadow: 0 0 5px rgba(0,194,255,0.5);
}
.footer-links a:hover::after {
  width: 80%;
}
.footer-links a:hover {
  color: #00c2ff;
}
.footer-copy {
  font-size: 0.85rem;
  color: #1a2b3c;
  margin-top: 8px;
  letter-spacing: 1px;
}

/* ===== Info Pages (Contact/Policy/About) ===== */
.info-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px;
  flex: 1;
  background: rgba(230,247,255,0.9);
  margin-top: 32px;
  margin-bottom: 32px;
  border-radius: 6px;
  border: 2px solid #00c2ff;
  box-shadow: 0 4px 12px rgba(0,194,255,0.3);
}
.info-page h1 {
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 28px;
  color: #00c2ff;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 0 0 15px rgba(0,194,255,0.4);
}
.info-page h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 32px 0 16px;
  color: #00c2ff;
  position: relative;
  padding-left: 16px;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0,194,255,0.3);
}
.info-page h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: linear-gradient(180deg, #00c2ff, #e0f7ff);
  box-shadow: 0 0 10px rgba(0,194,255,0.5);
}
.info-page p {
  font-size: 1rem;
  color: #1a2b3c;
  line-height: 1.9;
  margin-bottom: 16px;
}
.info-page a {
  color: #00c2ff;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  text-shadow: 0 0 5px rgba(0,194,255,0.2);
}
.info-page a:hover {
  border-bottom-color: #00c2ff;
}
.info-page ul {
  list-style: none;
  padding: 0;
}
.info-page li {
  padding: 8px 0 8px 24px;
  position: relative;
  color: #1a2b3c;
  font-size: 1rem;
  line-height: 1.8;
}
.info-page li::before {
  content: '❄';
  position: absolute;
  left: 4px;
  color: #00c2ff;
  font-size: 0.8rem;
}

/* ===== Scrollbar - 滚动条 ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track {
  background: #e6f7ff;
  border: none;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00c2ff, #e0f7ff);
  border-radius: 5px;
  border: none;
  box-shadow: 0 0 5px rgba(0,194,255,0.3);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #00d4ff, #ffffff);
}

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