/* ============================================================
   佔位品牌遊戲展示站 —— 共享樣式（深色博彩風）
   顏色/字體集中在 :root，替換品牌時改這裡即可
   ============================================================ */
:root {
  --bg: #0a201a;
  --bg-2: #0d2721;
  --bg-3: #154034;
  --card: #103128;
  --line: rgba(191, 162, 88, 0.18);
  --text: #eae7db;
  --muted: #94a496;
  --glow: radial-gradient(135% 82% at 50% -6%, #2c6a5a 0%, #164435 30%, #0c271f 58%, #0a201a 100%);
  --gold: #d9bd74;
  --gold-2: #987b2d;
  --gold-bright: #f8e4aa;
  --gold-grad: linear-gradient(135deg, #bfa258 0%, #f8e4aa 45%, #bfa258 68%, #987b2d 100%);
  --accent: #c0392b;
  --accent-2: #e0574a;
  --green: #2fbf71;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  --maxw: 1200px;
  --header-h: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg);
  background-image: var(--glow);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 56px 0; }
.section--alt { background: var(--bg-2); }

.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin: 0 0 8px;
  letter-spacing: 1px;
}
.section-head h2 span { color: var(--gold); }
.section-head p { color: var(--muted); margin: 0; }

/* ---------------- 頂部導航 ---------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(10, 32, 26, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 1px;
}
.brand .logo {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--gold-grad);
  color: #201a06;
  font-weight: 900;
}
.brand b { color: var(--gold); }
.brand-img { height: 56px; width: auto; max-width: 220px; display: block; }
.footer .brand-img { height: 46px; }
@media (max-width: 460px) { .brand-img { height: 44px; max-width: 160px; } }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  color: var(--muted);
  font-size: 15px;
  padding: 6px 2px;
  position: relative;
  transition: color .2s;
}
.nav a:hover, .nav a.active { color: var(--text); }
.nav a.active::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--gold); border-radius: 2px;
}

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px;
  flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span {
  display: block; height: 2px; width: 22px; margin: 0 auto;
  background: var(--text); border-radius: 2px; transition: .25s;
}

/* ---------------- Hero 輪播 ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
}
.slides { position: relative; }
.slide {
  display: none;
  min-height: clamp(300px, 42vw, 460px);
  align-items: center;
  padding: 40px 0;
  background-size: cover;
  background-position: center;
}
.slide.active { display: flex; animation: fade .6s ease; }
@keyframes fade { from { opacity: .2; } to { opacity: 1; } }
.slide-inner { max-width: 560px; }
.slide .eyebrow {
  display: inline-block;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 13px;
  margin-bottom: 10px;
}
.slide h1 {
  font-size: clamp(26px, 4.4vw, 46px);
  line-height: 1.15;
  margin: 0 0 14px;
}
.slide p { color: var(--muted); font-size: 16px; margin: 0 0 24px; }

.slides-dots {
  position: absolute; bottom: 16px; left: 0; right: 0;
  display: flex; gap: 8px; justify-content: center;
}
.slides-dots button {
  width: 10px; height: 10px; border-radius: 50%;
  border: 0; cursor: pointer; padding: 0;
  background: rgba(255,255,255,.35);
}
.slides-dots button.active { background: var(--gold); width: 24px; border-radius: 6px; }

/* ---------------- 按鈕 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--gold-grad);
  color: #201a06;
  box-shadow: 0 8px 20px rgba(191, 162, 88, .30);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(191, 162, 88, .46); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { background: var(--bg-3); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------------- 優勢條 ---------------- */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}
.feature .ico { font-size: 30px; margin-bottom: 8px; }
.feature h4 { margin: 0 0 4px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 13px; }

/* ---------------- 遊戲卡片網格 ---------------- */
.cat-tabs {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; margin-bottom: 30px;
}
.cat-tabs button {
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 9px 20px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  transition: .2s;
}
.cat-tabs button.active,
.cat-tabs button:hover {
  color: #201a06;
  background: var(--gold-grad);
  border-color: transparent;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.game-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.game-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(191, 162, 88, .45);
}
.game-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 1px;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.game-thumb .tag {
  position: absolute; top: 10px; left: 10px;
  background: var(--accent);
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
}
.game-thumb .rtp {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(0,0,0,.5);
  color: var(--gold); font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
}
.game-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.game-body h3 { margin: 0; font-size: 17px; }
.game-body p { margin: 0; color: var(--muted); font-size: 13px; flex: 1; }
.game-actions { display: flex; gap: 8px; }
.game-actions .btn { flex: 1; }

/* ---------------- 資訊列表 ---------------- */
.news-list { display: grid; gap: 16px; }
.news-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  align-items: center;
}
.news-date {
  text-align: center;
  border-right: 1px solid var(--line);
  padding-right: 14px;
}
.news-date .d { font-size: 26px; font-weight: 800; color: var(--gold); }
.news-date .m { font-size: 12px; color: var(--muted); }
.news-item h3 { margin: 0 0 6px; font-size: 17px; }
.news-item p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------------- 通用內容頁 ---------------- */
.page-hero {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  padding: 48px 0;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(24px, 4vw, 36px); margin: 0 0 8px; }
.page-hero p { color: var(--muted); margin: 0; }

.prose { max-width: 820px; margin: 0 auto; }
.prose h3 { color: var(--gold); margin-top: 30px; }
.prose p { color: var(--muted); }

.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin: 30px 0;
}
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; }
.stat .num { font-size: 30px; font-weight: 800; color: var(--gold); }
.stat .lbl { color: var(--muted); font-size: 13px; }

.tip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.tip {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.tip h3 { margin: 0 0 8px; color: var(--gold); font-size: 17px; }
.tip p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------------- 認證徽章 ---------------- */
.badges { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.badge {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 22px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 1px;
}

/* ---------------- 底部 ---------------- */
.footer {
  background: #081c16;
  border-top: 1px solid var(--line);
  padding: 44px 0 24px;
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 30px;
}
.footer-cols h5 { margin: 0 0 14px; font-size: 15px; }
.footer-cols a, .footer-cols p { color: var(--muted); font-size: 14px; margin: 6px 0; }
.footer-cols a:hover { color: var(--gold); }
.footer-note {
  margin-top: 30px; padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center; color: var(--muted); font-size: 13px;
}
.footer-note .warn { color: #7d879b; font-size: 12px; margin-top: 8px; }

/* ---------------- 客服彈窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-mask.open { display: flex; animation: fade .25s; }
.modal {
  width: 100%;
  max-width: 440px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: pop .28s ease;
}
@keyframes pop { from { transform: translateY(16px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  padding: 22px 22px 6px;
  text-align: center;
  position: relative;
}
.modal-head h3 { margin: 0 0 4px; font-size: 20px; }
.modal-head p { margin: 0; color: var(--muted); font-size: 14px; }
.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: 0; color: var(--muted);
  font-size: 24px; cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 16px 22px 24px; }
.cs-list { display: grid; gap: 12px; }
.cs-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color .2s, transform .15s;
}
.cs-item:hover { border-color: rgba(191,162,88,.55); transform: translateY(-2px); }
.cs-ico {
  width: 44px; height: 44px; border-radius: 11px;
  display: grid; place-items: center; font-size: 22px; flex-shrink: 0;
}
.cs-ico.tg { background: #229ed9; }
.cs-ico.wa { background: #25d366; }
.cs-ico.wx { background: #07c160; }
.cs-ico.qq { background: #12b7f5; }
.cs-ico.crisp { background: #1972f5; }
.cs-meta { flex: 1; min-width: 0; }
.cs-meta .t { font-weight: 700; font-size: 15px; }
.cs-meta .v { color: var(--muted); font-size: 13px; word-break: break-all; }
.cs-go { color: var(--gold); font-size: 13px; font-weight: 700; white-space: nowrap; }
.modal-foot {
  text-align: center; color: var(--muted);
  font-size: 12px; padding: 4px 22px 20px;
}

/* 二維碼佔位 */
.qr-box { text-align: center; margin-top: 14px; }
.qr {
  width: 150px; height: 150px; margin: 0 auto 8px;
  border-radius: 12px; background: #fff;
  display: grid; place-items: center; color: #333;
  font-size: 12px; font-weight: 700;
  background-image:
    linear-gradient(45deg, #222 25%, transparent 25%),
    linear-gradient(-45deg, #222 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #222 75%),
    linear-gradient(-45deg, transparent 75%, #222 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.qr span { background: #fff; padding: 4px 8px; border-radius: 4px; }

/* ---------------- 右側常駐客服浮窗 ---------------- */
.cs-float {
  position: fixed; right: 16px; bottom: 90px;
  z-index: 40;
  display: flex; flex-direction: column; gap: 10px;
}
.cs-float button {
  width: 54px; height: 54px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: var(--gold-grad);
  color: #201a06; font-size: 24px;
  box-shadow: var(--shadow);
  display: grid; place-items: center;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.cs-float .label {
  position: absolute; right: 64px; top: 50%; transform: translateY(-50%);
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 8px; font-size: 13px;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.cs-float button:hover .label { opacity: 1; }

/* 回到頂部 */
.to-top {
  position: fixed; right: 16px; bottom: 24px; z-index: 40;
  width: 46px; height: 46px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg-3);
  color: var(--text); cursor: pointer; font-size: 20px;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.to-top.show { opacity: 1; pointer-events: auto; }

/* ---------------- 響應式 ---------------- */
/* ---- 小筆記本 / 橫向平板 ---- */
@media (max-width: 1024px) {
  .container { padding: 0 18px; }
  .game-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---- 平板（豎屏起用漢堡菜單）---- */
@media (max-width: 900px) {
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 8px 0; box-shadow: var(--shadow);
    transform: translateY(-120%); transition: transform .28s;
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 13px 20px; font-size: 16px; }
  .nav a.active::after { display: none; }
  .nav-toggle { display: flex; }
  .feature-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

/* ---- 大手機 / 豎向平板 ---- */
@media (max-width: 680px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .tip-grid { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 60px 1fr; gap: 12px; }
  .slide { min-height: clamp(210px, 50vw, 300px); padding: 22px 0; }
  .slide-inner { max-width: 100%; }
  .section { padding: 44px 0; }
  .section-head { margin-bottom: 26px; }
}

/* ---- 手機 ---- */
@media (max-width: 460px) {
  .container { padding: 0 14px; }
  .game-grid { gap: 12px; }
  .game-body { padding: 12px; gap: 8px; }
  .game-body h3 { font-size: 16px; }
  .feature-strip { grid-template-columns: 1fr 1fr; gap: 10px; }
  .feature { padding: 16px; }
  .feature .ico { font-size: 26px; }
  .section { padding: 36px 0; }
  .slide { min-height: 190px; }
  .badges { gap: 10px; }
  .badge { padding: 10px 16px; font-size: 13px; }
}

/* ---------------- 頂部公告跑馬燈 ---------------- */
.notice-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  background: var(--bg-2);
  border-top: 1px solid rgba(191, 162, 88, .35);
  border-bottom: 1px solid rgba(191, 162, 88, .35);
  overflow: hidden;
}
.notice-ico { flex-shrink: 0; }
.notice-viewport { flex: 1; overflow: hidden; }
.notice-track { display: flex; width: max-content; white-space: nowrap; animation: marquee 26s linear infinite; }
.notice-track span { color: var(--text); font-size: 14px; padding-right: 90px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.notice-bar:hover .notice-track { animation-play-state: paused; }

/* ---------------- 右側在線客服豎排 ---------------- */
.cs-tab {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%);
  z-index: 45;
  writing-mode: vertical-rl; text-orientation: upright; letter-spacing: 4px; line-height: 1;
  background: var(--gold-grad); color: #201a06; font-weight: 800;
  border: 0; cursor: pointer;
  padding: 16px 9px; border-radius: 12px 0 0 12px;
  box-shadow: var(--shadow); font-size: 15px;
}
.cs-tab:hover { filter: brightness(1.06); }

/* ---------------- 底部固定導航（移動端）---------------- */
.bottom-nav { display: none; }
@media (max-width: 900px) {
  .bottom-nav {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 46;
    background: rgba(9, 26, 21, .97); backdrop-filter: blur(8px);
    border-top: 1px solid rgba(191, 162, 88, .3);
  }
  .bottom-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 0 9px; color: var(--gold); font-size: 12px; font-weight: 600;
  }
  .bottom-nav a .bi { font-size: 20px; line-height: 1; }
  .bottom-nav a:active { background: rgba(255, 255, 255, .05); }
  body { padding-bottom: 60px; }
  .to-top { bottom: 72px; }
  .cs-tab { font-size: 14px; padding: 14px 8px; }
}
