/* ═══════════════════════════════════════
   圣淘沙游戏官网 - 主样式表
   设计语言：暗色国风 · 紫金配色 · 移动优先
   ═══════════════════════════════════════ */

/* ── 变量 ── */
:root {
  --c-bg: #0f0a1e;
  --c-bg-2: #1a0e2e;
  --c-surface: #1e1538;
  --c-surface-2: #2a1f50;
  --c-gold: #ffd700;
  --c-gold-2: #f0c040;
  --c-purple: #6c5ce7;
  --c-purple-light: #a29bfe;
  --c-red: #ff6b6b;
  --c-text: #f5f5f5;
  --c-text-2: #c9c4dd;
  --c-text-3: #8e88a8;
  --c-border: rgba(255,255,255,.08);
  --c-border-2: rgba(255,215,0,.18);
  --shadow-lg: 0 12px 48px rgba(0,0,0,.45);
  --shadow-md: 0 6px 24px rgba(0,0,0,.35);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition: all .25s ease;
  --container: 1200px;
  --header-h: 68px;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; }
time { display: block; }

/* ── 容器 ── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ── 通用按钮 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600;
  transition: var(--transition); white-space: nowrap;
}
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--c-purple), #4a3acf); color: #fff; box-shadow: 0 4px 16px rgba(108,92,231,.4); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(108,92,231,.55); }
.btn-outline { background: transparent; color: var(--c-text); border: 1.5px solid var(--c-border-2); }
.btn-outline:hover { background: rgba(255,215,0,.08); border-color: var(--c-gold); }

/* ── 标题 ── */
.section-title { font-size: 30px; font-weight: 800; margin-bottom: 12px; color: #fff; }
.section-title span { color: var(--c-gold); }
.section-sub { color: var(--c-text-3); font-size: 15px; margin-bottom: 36px; }
.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 36px; flex-wrap: wrap; gap: 12px; }
.link-more { color: var(--c-gold); font-size: 14px; font-weight: 600; }
.link-more:hover { text-decoration: underline; }

/* ═══════════════════ 头部导航 ═══════════════════ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h); background: rgba(15,10,30,.85); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--c-border); transition: var(--transition);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 36px; height: 36px; }
.logo-text { font-size: 20px; font-weight: 800; background: linear-gradient(135deg, var(--c-gold), var(--c-red)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: 2px; }

.main-nav { display: flex; gap: 6px; }
.main-nav a {
  padding: 8px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
  color: var(--c-text-2); transition: var(--transition); position: relative;
}
.main-nav a:hover, .main-nav a.active { color: #fff; background: rgba(255,255,255,.06); }
.main-nav a.active::after { content: ""; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); width: 20px; height: 2px; background: var(--c-gold); border-radius: 2px; }

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span { width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: var(--transition); }

.mobile-menu {
  display: none; position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
  background: rgba(15,10,30,.97); backdrop-filter: blur(20px); z-index: 999;
  flex-direction: column; padding: 30px 24px; gap: 8px; overflow-y: auto;
}
.mobile-menu a { padding: 14px 20px; border-radius: var(--radius-sm); font-size: 17px; color: var(--c-text-2); border: 1px solid var(--c-border); }
.mobile-menu a:hover { background: var(--c-surface); color: #fff; }

/* ═══════════════════ Hero区 ═══════════════════ */
.hero {
  padding: calc(var(--header-h) + 60px) 0 80px; position: relative; overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(108,92,231,.18), transparent), var(--c-bg);
}
.hero::before {
  content: ""; position: absolute; top: -200px; right: -200px; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,107,107,.1), transparent 70%); border-radius: 50%;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.hero-tag { display: inline-block; padding: 6px 16px; background: rgba(255,215,0,.1); border: 1px solid var(--c-border-2); border-radius: 20px; font-size: 13px; color: var(--c-gold); margin-bottom: 20px; }
.hero-text h1 { font-size: 48px; font-weight: 900; line-height: 1.2; margin-bottom: 20px; }
.text-gold { background: linear-gradient(135deg, var(--c-gold), var(--c-red)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-desc { font-size: 17px; color: var(--c-text-2); margin-bottom: 32px; line-height: 1.9; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 36px; }

.trust-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.trust-badges li { padding: 6px 14px; background: rgba(255,255,255,.05); border: 1px solid var(--c-border); border-radius: 20px; font-size: 13px; color: var(--c-text-3); }

/* Hero视觉卡 */
.hero-visual { perspective: 1000px; }
.hero-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(145deg, var(--c-surface), var(--c-bg-2)); border: 1px solid var(--c-border-2);
  box-shadow: var(--shadow-lg); transform: rotateY(-5deg) rotateX(5deg); transition: transform .5s ease;
}
.hero-card:hover { transform: rotateY(0) rotateX(0); }
.hero-card-badge { position: absolute; top: 16px; right: 16px; background: linear-gradient(135deg, var(--c-red), #ee5a24); color: #fff; padding: 4px 12px; border-radius: 4px; font-size: 12px; font-weight: 700; z-index: 2; }
.hero-card-art {
  position: relative; height: 280px; overflow: hidden;
  background: linear-gradient(180deg, #1a1a3e 0%, #2d1b69 60%, #4a2c8a 100%);
}
/* 纯CSS国风山水 */
.sun { position: absolute; top: 40px; right: 60px; width: 80px; height: 80px; background: radial-gradient(circle, var(--c-gold), transparent 70%); border-radius: 50%; opacity: .8; }
.cloud { position: absolute; background: rgba(255,255,255,.08); border-radius: 50%; }
.cloud.c1 { width: 120px; height: 40px; top: 60px; left: 40px; }
.cloud.c2 { width: 80px; height: 30px; top: 100px; left: 180px; }
.mountain { position: absolute; bottom: 0; border-left: 60px solid transparent; border-right: 60px solid transparent; border-bottom: 120px solid; }
.mountain.m1 { left: 20px; border-bottom-color: #2a1f50; }
.mountain.m2 { left: 100px; border-bottom: 160px solid #3a2f60; border-left-width: 80px; border-right-width: 80px; z-index: 1; }
.mountain.m3 { right: 30px; border-bottom: 100px solid #2a1f50; border-left-width: 50px; border-right-width: 50px; }

.hero-card-info { padding: 20px; }
.hero-card-info h3 { font-size: 20px; margin-bottom: 6px; }
.hero-card-info p { font-size: 13px; color: var(--c-text-3); }
.rating { font-size: 14px; margin-top: 8px; color: var(--c-gold); }
.rating span { color: var(--c-text-3); margin-left: 6px; }

/* ═══════════════════ 特色亮点 ═══════════════════ */
.features-section { padding: 80px 0; background: var(--c-bg-2); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.feature-card {
  padding: 32px 28px; border-radius: var(--radius-lg); background: var(--c-surface);
  border: 1px solid var(--c-border); transition: var(--transition);
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--c-border-2); box-shadow: var(--shadow-md); }
.feature-icon { width: 56px; height: 56px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 20px; }
.feature-card h3 { font-size: 18px; margin-bottom: 10px; color: #fff; }
.feature-card p { font-size: 14px; color: var(--c-text-2); line-height: 1.8; }

/* ═══════════════════ 游戏阵容 ═══════════════════ */
.games-section { padding: 80px 0; }
.games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; }
.game-card {
  border-radius: var(--radius-lg); overflow: hidden; background: var(--c-surface);
  border: 1px solid var(--c-border); transition: var(--transition);
}
.game-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.game-card.featured { grid-column: span 1; border-color: var(--c-border-2); }
.game-thumb { position: relative; height: 200px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.game-badge { position: absolute; top: 14px; left: 14px; background: linear-gradient(135deg, var(--c-gold), var(--c-gold-2)); color: #1a0e2e; padding: 4px 12px; border-radius: 4px; font-size: 12px; font-weight: 700; z-index: 2; }
/* 纯CSS游戏封面 */
.art-dragon { width: 120px; height: 120px; background: radial-gradient(circle at 30% 30%, var(--c-gold), transparent 60%); border-radius: 50%; opacity: .6; animation: pulse 3s ease-in-out infinite; }
.art-sword { width: 100px; height: 100px; background: linear-gradient(45deg, #74b9ff, transparent); border-radius: 50%; opacity: .5; }
.art-moon { width: 90px; height: 90px; background: radial-gradient(circle at 35% 35%, #dfe6e9, #b2bec3); border-radius: 50%; box-shadow: 0 0 40px rgba(223,230,233,.3); }
@keyframes pulse { 0%,100%{ transform: scale(1); opacity: .6; } 50%{ transform: scale(1.1); opacity: .8; } }

.game-body { padding: 24px; }
.game-card h3 { font-size: 20px; margin-bottom: 8px; }
.game-tag { font-size: 13px; color: var(--c-gold); margin-bottom: 10px; font-weight: 500; }
.game-desc { font-size: 14px; color: var(--c-text-2); margin-bottom: 16px; line-height: 1.7; }
.game-meta { display: flex; gap: 16px; margin-bottom: 16px; font-size: 13px; color: var(--c-text-3); flex-wrap: wrap; }

/* ═══════════════════ 资讯 ═══════════════════ */
.news-section { padding: 80px 0; background: var(--c-bg-2); }
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.news-card {
  padding: 28px; border-radius: var(--radius-lg); background: var(--c-surface);
  border: 1px solid var(--c-border); transition: var(--transition);
}
.news-card:hover { border-color: var(--c-border-2); transform: translateY(-3px); }
.news-card time { font-size: 13px; color: var(--c-gold); margin-bottom: 10px; font-weight: 600; }
.news-card h3 { font-size: 17px; margin-bottom: 10px; line-height: 1.5; }
.news-card h3 a:hover { color: var(--c-gold); }
.news-card p { font-size: 14px; color: var(--c-text-2); margin-bottom: 14px; line-height: 1.7; }

/* ═══════════════════ 数据统计 ═══════════════════ */
.stats-section { padding: 60px 0; background: linear-gradient(135deg, var(--c-purple), #4a3acf); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.stat-item .stat-num { font-size: 42px; font-weight: 900; color: #fff; margin-bottom: 4px; }
.stat-item p { font-size: 15px; color: rgba(255,255,255,.8); }

/* ═══════════════════ FAQ ═══════════════════ */
.faq-section { padding: 80px 0; }
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--c-border); border-radius: var(--radius-md); margin-bottom: 12px;
  background: var(--c-surface); overflow: hidden; transition: var(--transition);
}
.faq-item[open] { border-color: var(--c-border-2); }
.faq-item summary {
  padding: 18px 24px; font-size: 16px; font-weight: 600; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; color: var(--c-gold); transition: var(--transition); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 24px 20px; font-size: 14px; color: var(--c-text-2); line-height: 1.8; }

/* ═══════════════════ CTA ═══════════════════ */
.cta-section { padding: 80px 0; background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(108,92,231,.2), transparent), var(--c-bg-2); text-align: center; }
.cta-inner h2 { font-size: 32px; margin-bottom: 12px; }
.cta-inner p { font-size: 16px; color: var(--c-text-2); margin-bottom: 32px; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ═══════════════════ 页脚 ═══════════════════ */
.site-footer { padding: 60px 0 24px; border-top: 1px solid var(--c-border); background: #0a0615; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h4 { font-size: 16px; color: var(--c-gold); margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: var(--c-text-3); font-size: 14px; transition: var(--transition); }
.footer-col a:hover { color: var(--c-gold); }
.footer-col p { font-size: 14px; color: var(--c-text-3); line-height: 1.8; }
.footer-bottom { padding-top: 24px; border-top: 1px solid var(--c-border); text-align: center; }
.footer-bottom p { font-size: 13px; color: var(--c-text-3); margin-bottom: 6px; }
.footer-disclaimer { font-size: 12px !important; color: var(--c-text-3); opacity: .7; }

/* ═══════════════════ 悬浮客服 ═══════════════════ */
.floating-kefu {
  position: fixed; bottom: 24px; right: 24px; z-index: 998;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-purple), #4a3acf); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(108,92,231,.5); transition: var(--transition);
}
.floating-kefu:hover { transform: scale(1.1); }
.kefu-icon { font-size: 20px; }
.kefu-text { font-size: 11px; margin-top: 2px; }

.kefu-modal {
  position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
}
.kefu-modal[hidden] { display: none; }
.kefu-modal-box {
  background: var(--c-surface); border: 1px solid var(--c-border-2); border-radius: var(--radius-lg);
  width: 90%; max-width: 400px; overflow: hidden; box-shadow: var(--shadow-lg);
}
.kefu-modal-box header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; background: var(--c-bg-2); }
.kefu-modal-box h3 { font-size: 18px; color: var(--c-gold); }
.kefu-close { font-size: 28px; color: var(--c-text-3); line-height: 1; padding: 4px 8px; }
.kefu-close:hover { color: #fff; }
.kefu-body { padding: 20px 24px; }
.kefu-item { padding: 12px 16px; background: rgba(255,255,255,.04); border-radius: var(--radius-sm); margin-bottom: 10px; font-size: 14px; display: flex; align-items: center; gap: 10px; }

/* ═══════════════════ 响应式 ═══════════════════ */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-text h1 { font-size: 36px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .main-nav, .header-actions { display: none; }
  .hamburger { display: flex; }
  .mobile-menu.open { display: flex; }
}

@media (max-width: 600px) {
  .hero { padding: calc(var(--header-h) + 30px) 0 50px; }
  .hero-text h1 { font-size: 28px; }
  .hero-desc { font-size: 15px; }
  .hero-cta .btn { flex: 1; min-width: 140px; }
  .section-title { font-size: 24px; }
  .features-grid, .games-grid, .news-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item .stat-num { font-size: 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .cta-buttons .btn { flex: 1; min-width: 120px; }
  .trust-badges { gap: 8px; }
  .trust-badges li { font-size: 12px; padding: 4px 10px; }
}

/* ═══════════════════ 性能优化 ═══════════════════ */
/* 图片懒加载淡入 */
img[loading="lazy"] { opacity: 0; transition: opacity .4s; }
img.loaded { opacity: 1; }

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 暗色模式已默认，亮色模式适配 */
@media (prefers-color-scheme: light) {
  /* 保持暗色品牌风格，不强制切换 */
}
