/* =============================================
   FU7gaming — Silver Purple Tech Theme
   Style: 冷銀科技 + 紫光點綴
   Black 70% / Silver 20% / White 8% / Red 2%
   ============================================= */

/* ─── CSS Variables ───────────────────────── */
:root {
  /* Midnight (lifted from pure black) */
  --bg-main:        #1A1A22;
  --bg-alt:         #22222E;
  --bg-section:     #1E1E28;
  --card-bg:        #24242F;
  --card-border:    rgba(139, 127, 255, 0.22);
  --header-bg:      rgba(26, 26, 34, 0.92);

  /* Silver (primary brand, 取代金色) */
  --gold-primary:   #E8E8EC;
  --gold-light:     #FFFFFF;
  --gold-dark:      #9A9AA8;
  --gold-gradient:  linear-gradient(135deg, #FFFFFF 0%, #C8C8D4 40%, #7A7A88 100%);
  --gold-glow:      rgba(139, 127, 255, 0.45);

  /* Accent Red (max 2%) */
  --accent-red:     #FF3B3B;
  --accent-red-glow: rgba(255, 59, 59, 0.6);

  /* Purple tech (升格為次主色，承接 logo 紫光) */
  --brand-secondary: #8B7FFF;
  --brand-glow-purple: rgba(139, 127, 255, 0.45);
  --brand-glow-purple-soft: rgba(139, 127, 255, 0.18);

  /* Text */
  --text-dark:      #FFFFFF;
  --text-secondary: #CFCFCF;
  --text-light:     #8A8A8A;
  --white:          #FFFFFF;
  --error-red:      #FF3B3B;

  /* Legacy aliases (used throughout) */
  --brand-primary:      var(--gold-primary);
  --brand-primary-dark: var(--gold-dark);
  --brand-glow:         var(--gold-glow);
  --tech-light-blue:    #1A1A28;
  --tech-purple:        #8B7FFF;
}

/* ─── Light Theme (default，呼應亮底 FU7 logo — 電藍 + 橘紅) ────── */
html[data-theme="light"]:root,
html[data-theme="light"] {
  /* Background */
  --bg-main:        #F5F8FF;      /* 微冷藍白 */
  --bg-alt:         #FFFFFF;
  --bg-section:     #EAF1FF;
  --card-bg:        #FFFFFF;
  --card-border:    rgba(46, 128, 232, 0.22);
  --header-bg:      rgba(255, 255, 255, 0.94);

  /* Brand primary 電藍（呼應 logo FU + 橢圓光環） */
  --gold-primary:   #2E80E8;
  --gold-light:     #5EB3FF;
  --gold-dark:      #1255B5;
  --gold-gradient:  linear-gradient(135deg, #5EB3FF 0%, #2E80E8 55%, #1255B5 100%);
  --gold-glow:      rgba(46, 128, 232, 0.35);

  /* Accent CTA 橘紅（呼應 logo 的 7） */
  --accent-red:     #FF6A1A;
  --accent-red-glow: rgba(255, 106, 26, 0.55);

  /* Secondary electric blue */
  --brand-secondary: #5EB3FF;
  --brand-glow-purple: rgba(46, 128, 232, 0.35);
  --brand-glow-purple-soft: rgba(46, 128, 232, 0.12);

  /* Text */
  --text-dark:      #0F1A2E;
  --text-secondary: #455568;
  --text-light:     #7A8A99;
  --white:          #FFFFFF;

  /* Legacy alias */
  --tech-light-blue:#DCEAFF;
  --tech-purple:    #2E80E8;
}

/* ─── Radial bg override for light theme ─────────── */
html[data-theme="light"] body::before {
  background: radial-gradient(circle at 50% 0%, #DCEAFF 0%, #F5F8FF 60%);
}

/* ─── Logo 切換（dark vs light 兩張圖） ────────── */
.logo-light { display: none !important; }
.logo-dark  { display: block; }
html[data-theme="light"] .logo-light { display: block !important; }
html[data-theme="light"] .logo-dark  { display: none !important; }

/* 亮底 logo 尺寸（Travis 要求放大 + 置中） */
html[data-theme="light"] .header-logo-img.logo-light { height: 74px; }
html[data-theme="light"] .footer-logo-img.logo-light { height: 60px; margin: 0 auto; display: block; }
html[data-theme="light"] .hero-logo-watermark .logo-light { height: 40px; }

/* footer img 無論主題都讓其置中 */
.footer-logo { text-align: center; }
.footer-logo-img { margin: 0 auto; }

/* 亮底時關掉 mix-blend-mode: screen（本來是為了暗底 logo 融合發光，亮底會 screen 變白） */
html[data-theme="light"] .header-logo-img,
html[data-theme="light"] .footer-logo-img,
html[data-theme="light"] .hero-logo-watermark img {
  mix-blend-mode: normal !important;
}

/* BGM 按鈕 + 提示在亮底要看得到 */
html[data-theme="light"] .bgm-toggle-btn {
  background: rgba(46, 128, 232, 0.08);
  border-color: rgba(46, 128, 232, 0.35);
  color: var(--brand-primary);
}
html[data-theme="light"] .bgm-toggle-btn:hover {
  background: rgba(46, 128, 232, 0.15);
  box-shadow: 0 0 16px rgba(46, 128, 232, 0.35);
}
html[data-theme="light"] .bgm-toggle-btn.playing {
  background: rgba(46, 128, 232, 0.12);
  border-color: var(--brand-primary);
  box-shadow: 0 0 12px rgba(46, 128, 232, 0.45);
}
html[data-theme="light"] .bgm-hint,
html[data-theme="light"] .bgm-lyrics-text {
  color: var(--brand-primary);
  text-shadow: none;
}

/* 亮版歌詞浮條：白底 + 藍邊 + 藍字 */
html[data-theme="light"] .bgm-lyrics-bar {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(46, 128, 232, 0.35);
  box-shadow: 0 4px 16px rgba(46, 128, 232, 0.18);
}

@media (max-width: 900px) {
  html[data-theme="light"] .header-logo-img.logo-light { height: 64px; }
}
@media (max-width: 520px) {
  html[data-theme="light"] .header-logo-img.logo-light { height: 48px; }
}

/* ─── Theme Toggle Button ─────────────────────── */
.theme-toggle-btn {
  width: 40px; height: 40px;
  margin-left: 12px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--brand-primary);
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}
.theme-toggle-btn:hover {
  background: var(--brand-primary);
  color: var(--white);
  box-shadow: 0 0 14px var(--gold-glow);
}
.theme-toggle-btn .theme-icon-sun,
.theme-toggle-btn .theme-icon-moon { display: none; }
html[data-theme="light"] .theme-toggle-btn .theme-icon-moon { display: inline; }
html[data-theme="dark"]  .theme-toggle-btn .theme-icon-sun  { display: inline; }

/* 亮底時卡片/按鈕 box-shadow 用投影而非發光 */
html[data-theme="light"] {
  --card-shadow: 0 4px 20px rgba(15, 15, 26, 0.08);
}

/* ─── Light Theme — 修正寫死 color: var(--white) 的文字（全部改成深色） ──────── */
html[data-theme="light"] .section-title,
html[data-theme="light"] .team-card h3,
html[data-theme="light"] .feature-card h3,
html[data-theme="light"] .plan-card h3,
html[data-theme="light"] .plan-card .plan-title,
html[data-theme="light"] .success-content h3,
html[data-theme="light"] .hero-content h1,
html[data-theme="light"] .hero-content h2 {
  color: var(--text-dark);
}

/* 亮底 card hover box-shadow 用暗投影取代原本的紫發光，避免洗白 */
html[data-theme="light"] .team-card:hover,
html[data-theme="light"] .hover-glow:hover,
html[data-theme="light"] .feature-card:hover,
html[data-theme="light"] .plan-card:hover {
  box-shadow: 0 16px 40px rgba(15, 15, 26, 0.12), 0 0 0 1px var(--brand-primary);
}

/* Section 分隔線 after 在亮底仍用主色（紫） */
html[data-theme="light"] .section-title::after {
  background: var(--brand-primary);
}

/* Footer 內文字在亮底要深色 */
html[data-theme="light"] footer {
  background: #1A1B3E;   /* 深紫藍，跟 light bg 分層 */
  color: var(--white);
}
html[data-theme="light"] footer p {
  color: rgba(255, 255, 255, 0.85);
}

/* ─── Light Theme Hero — 上影片 70vh + 下文字橫條 30vh（選項 C） ───── */
html[data-theme="light"] #hero {
  min-height: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
  overflow: visible;
  max-width: 100%;
  margin: 0;
  padding-top: 100px; /* header avoidance */
}

/* 下方文字橫條：白底、置中；Grid 排 tag(全寬) / h1(左) + CTA(右) / desc(全寬) */
html[data-theme="light"] .hero-content {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 48px;
  row-gap: 12px;
  align-items: center;
  text-align: left;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 80px 40px;
  order: 1;
}
html[data-theme="light"] .hero-tag-scroll { grid-column: 1 / -1; }
html[data-theme="light"] .hero-content h1 { grid-column: 1; grid-row: 2; margin-bottom: 0; }
html[data-theme="light"] .hero-content p { grid-column: 1 / -1; grid-row: 3; margin-bottom: 0; }
html[data-theme="light"] .hero-cta-group { grid-column: 2; grid-row: 2; align-self: center; }
html[data-theme="light"] .hero-content h1,
html[data-theme="light"] .hero-content h2 {
  color: var(--text-dark);
  font-size: 46px;
  text-shadow: none;
  line-height: 1.2;
  margin-bottom: 16px;
}
html[data-theme="light"] .hero-content h1 em {
  background: linear-gradient(90deg, #FF6A1A 0%, #2E80E8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  color: transparent;
  font-style: normal;
  white-space: normal;
  display: inline-block;
}
html[data-theme="light"] .hero-content p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 24px;
}
html[data-theme="light"] .hero-tag-scroll {
  justify-content: flex-start;
  margin-bottom: 18px;
}
html[data-theme="light"] .hero-tag-item {
  color: var(--brand-primary);
  background: rgba(46, 128, 232, 0.08);
  border: 1px solid rgba(46, 128, 232, 0.22);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
}
html[data-theme="light"] .hero-tag-sep { display: none; }
html[data-theme="light"] .hero-cta-group { justify-content: flex-start; }

/* 影片佔 70vh 頂部橫幅 */
html[data-theme="light"] .hero-bg-video {
  position: relative !important;
  inset: auto;
  width: 100%;
  height: 70vh;
  min-height: 420px;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  order: 0;
  display: block;
}

/* Hero 下方區塊 wrapper — 文字 grid 分左右 */
html[data-theme="light"] .hero-content .hero-text-left {
  flex: 1 1 60%;
  min-width: 0;
}
html[data-theme="light"] .hero-content .hero-text-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}
html[data-theme="light"] .hero-bg-overlay { display: none; }
html[data-theme="light"] .hero-logo-watermark { display: none; }

@media (max-width: 1100px) {
  html[data-theme="light"] #hero { padding-top: 90px; }
  html[data-theme="light"] .hero-bg-video { height: 50vh; min-height: 320px; }
  html[data-theme="light"] .hero-content {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 28px;
    gap: 20px;
  }
  html[data-theme="light"] .hero-content h1,
  html[data-theme="light"] .hero-content h2 { font-size: 34px; }
}
@media (max-width: 520px) {
  html[data-theme="light"] .hero-content h1,
  html[data-theme="light"] .hero-content h2 { font-size: 26px; }
  html[data-theme="light"] .hero-content { padding: 20px; }
  html[data-theme="light"] .hero-bg-video { height: 42vh; min-height: 240px; }
}

/* ─── Light Theme Stage-2 — CTA 橘紅漸層 + 卡片彩色 hover glow ─── */

/* Primary CTA 改走橘紅漸層（呼應 logo 的 7），強力吸睛 */
html[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #FFAE3B 0%, #FF6A1A 50%, #D43010 100%);
  color: #FFFFFF;
  box-shadow: 0 6px 20px rgba(255, 106, 26, 0.45), inset 0 1px 0 rgba(255,255,255,0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
html[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 10px 30px rgba(255, 106, 26, 0.65), inset 0 1px 0 rgba(255,255,255,0.5);
  filter: brightness(1.08);
  color: #FFFFFF;
}

/* Outline CTA 用電藍主色 */
html[data-theme="light"] .btn-outline {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
html[data-theme="light"] .btn-outline:hover {
  background: var(--gold-gradient);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(46, 128, 232, 0.4);
}

/* 卡片 hover：色彩更活 — 藍發光 + 橘漸層邊框 */
html[data-theme="light"] .team-card:hover,
html[data-theme="light"] .hover-glow:hover,
html[data-theme="light"] .feature-card:hover,
html[data-theme="light"] .plan-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow:
    0 16px 40px rgba(46, 128, 232, 0.22),
    0 0 0 2px #2E80E8,
    0 0 30px rgba(46, 128, 232, 0.25);
  border-color: #2E80E8;
}

/* 卡片 icon 用漸層底色增加遊戲感 */
html[data-theme="light"] .team-icon,
html[data-theme="light"] .feature-icon {
  background: linear-gradient(135deg, rgba(94, 179, 255, 0.18), rgba(46, 128, 232, 0.28));
  border: 1px solid rgba(46, 128, 232, 0.35);
  color: #2E80E8;
}

/* Section title 加一點電藍光暈 */
html[data-theme="light"] .section-title {
  text-shadow: 0 1px 0 rgba(46, 128, 232, 0.08);
}

/* Section title 底線改成橘藍雙色漸層 */
html[data-theme="light"] .section-title::after {
  background: linear-gradient(90deg, #FF6A1A 0%, #2E80E8 100%);
  width: 80px;
  height: 4px;
  border-radius: 2px;
}

/* ─── Reset & Base ────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: 17px;
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Radial bg gradient — black top center, pure black edges */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, #2A2A3A 0%, #1A1A22 60%);
  pointer-events: none;
  z-index: 0;
}

section, header, footer, main { position: relative; z-index: 1; }

a { color: var(--brand-primary); text-decoration: none; }
a:hover { color: var(--white); }

*:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }

/* ─── Text Logo ───────────────────────────── */
.brand-logo-integrated { text-decoration: none; }

.text-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  line-height: 1;
}

.text-logo-fu {
  font-family: 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--brand-primary);
  letter-spacing: -0.5px;
  text-shadow: 0 0 20px rgba(200, 200, 220, 0.5);
}

.text-logo-gaming {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.5px;
  opacity: 0.9;
}

.footer-logo {
  margin-bottom: 12px;
}

.footer-logo .text-logo-fu { font-size: 30px; }
.footer-logo .text-logo-gaming { font-size: 20px; }

/* ─── Header / Nav ────────────────────────── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 96px;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200, 200, 220, 0.1);
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.header-logo-img {
  height: 120px;
  width: auto;
  display: block;
  mix-blend-mode: screen;
  position: relative;
  z-index: 10;
}

.footer-logo-img {
  height: 70px;
  width: auto;
  mix-blend-mode: screen;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-item {
  font-size: 17px;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

.nav-item:hover,
.nav-item.active { color: var(--brand-primary); }

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 2px;
  background: var(--brand-primary);
  border-radius: 2px;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-label {
  font-size: 13px;
  color: var(--text-light);
}

#lang-select {
  background: var(--card-bg);
  color: var(--text-dark);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

#lang-select:focus { border-color: var(--brand-primary); }

/* Left cluster: Logo + BGM */
.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Mobile nav toggle */
.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--card-border);
  color: var(--text-dark);
  font-size: 20px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

/* ─── BGM Player (toggle + lyrics) ───────── */
.bgm-player-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  position: relative;
}

/* Lyrics bar — absolutely positioned so it never affects nav layout */
.bgm-lyrics-bar {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  display: flex;
  align-items: center;
  max-width: 260px;
  overflow: hidden;
  background: rgba(10, 12, 20, 0.85);
  border: 1px solid rgba(139, 127, 255, 0.25);
  border-radius: 20px;
  padding: 4px 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  white-space: nowrap;
}

.bgm-lyrics-bar.visible {
  opacity: 1;
}


.bgm-lyrics-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--gold-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 12px rgba(246, 215, 118, 0.6);
}

.bgm-lyrics-text.lyric-anim {
  animation: lyricSlideIn 0.35s cubic-bezier(0.22,1,0.36,1);
}

@keyframes lyricSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}


/* ─── BGM Hint Arrow ──────────────────────── */
.bgm-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-light);
  white-space: nowrap;
  letter-spacing: 0.05em;
  opacity: 1;
  transition: opacity 0.4s ease;
  animation: hintBounce 1.2s ease-in-out infinite;
  cursor: pointer;
  pointer-events: none;
}

.bgm-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes hintBounce {
  0%, 100% { transform: translateX(0); }
  50%       { transform: translateX(-4px); }
}

/* ─── BGM Toggle ──────────────────────────── */
.bgm-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(139, 127, 255, 0.08);
  border: 1px solid rgba(139, 127, 255, 0.35);
  color: var(--gold-primary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  flex-shrink: 0;
  position: relative;
}

.bgm-toggle-btn:hover {
  background: rgba(139, 127, 255, 0.18);
  box-shadow: 0 0 16px rgba(139, 127, 255, 0.4);
  transform: scale(1.1);
}

/* Playing state — pulsing gold ring */
.bgm-toggle-btn.playing {
  background: rgba(139, 127, 255, 0.15);
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px rgba(139, 127, 255, 0.5);
  animation: bgmPulse 2.2s ease-in-out infinite;
}

/* Muted state — dimmed */
.bgm-toggle-btn.muted {
  color: var(--text-light);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  animation: none;
}

.bgm-toggle-btn.muted::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 22px;
  background: var(--text-light);
  transform: rotate(45deg);
  border-radius: 2px;
  opacity: 0.7;
}

@keyframes bgmPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(139, 127, 255, 0.4); }
  50%       { box-shadow: 0 0 22px rgba(139, 127, 255, 0.75); }
}

/* ─── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold-gradient);
  color: #000000;
  box-shadow: 0 4px 20px rgba(139, 127, 255, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px var(--accent-red-glow), 0 4px 20px rgba(139, 127, 255, 0.3);
  filter: brightness(1.05);
  color: #000000;
}

.btn-outline {
  background: transparent;
  color: var(--gold-primary);
  border: 2px solid var(--gold-primary);
}

.btn-outline:hover {
  background: var(--gold-gradient);
  color: #000000;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(139, 127, 255, 0.35);
}

/* ─── Hero Section ────────────────────────── */
.light-beam-bg {
  position: relative;
  overflow: hidden;
}

.light-beam-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(139, 127, 255, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse at 100% 100%, rgba(200, 200, 220, 0.08) 0%, transparent 60%);
  pointer-events: none;
  animation: lightSweep 10s ease-in-out infinite alternate;
}

@keyframes lightSweep {
  0%   { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1;   transform: scale(1.05); }
}

#hero {
  min-height: 100vh;
  padding-top: 96px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ─── Hero Logo Watermark ──────────────────── */
.hero-logo-watermark {
  position: absolute;
  bottom: 32px;
  right: 36px;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  animation: wmFadeIn 1.2s ease 1.8s forwards;
}

.hero-logo-watermark img {
  height: 56px;
  width: auto;
  mix-blend-mode: screen;
  filter: brightness(0.65) saturate(0.8);
}

@keyframes wmFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 0.55; transform: none; }
}

/* Subtle shimmer sweep across watermark */
.hero-logo-watermark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(246,215,118,0.35) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: wmShimmer 5s ease-in-out 3s infinite;
  pointer-events: none;
}

@keyframes wmShimmer {
  0%   { background-position: -100% 0; }
  40%  { background-position: 200% 0; }
  100% { background-position: 200% 0; }
}

/* ─── Hero Tag Scroll Bar ──────────────────── */
.hero-tag-scroll {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeSlideUp 0.7s ease 0.3s forwards;
}

.hero-tag-item {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold-primary);
  text-transform: uppercase;
  background: rgba(139, 127, 255, 0.08);
  border: 1px solid rgba(139, 127, 255, 0.25);
  padding: 5px 14px;
  border-radius: 20px;
}

.hero-tag-sep {
  color: rgba(139, 127, 255, 0.4);
  font-size: 14px;
}

/* ─── Hero Entrance Animations ────────────── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

@keyframes heroTitleIn {
  from { opacity: 0; transform: translateY(30px); clip-path: inset(0 0 100% 0); }
  to   { opacity: 1; transform: none;             clip-path: inset(0 0 0% 0); }
}

.hero-title-anim {
  opacity: 0;
  animation: fadeSlideUp 0.85s cubic-bezier(0.22,1,0.36,1) 0.55s forwards;
}

.hero-desc-anim {
  opacity: 0;
  animation: fadeSlideUp 0.75s ease 0.9s forwards;
}

.hero-cta-anim {
  opacity: 0;
  animation: fadeSlideUp 0.7s ease 1.2s forwards;
}

/* Full-screen background video */
.hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Dark overlay so text is readable */
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 11, 26, 0.75) 0%,
    rgba(10, 11, 26, 0.65) 50%,
    rgba(10, 11, 26, 0.88) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  text-align: center;
  padding: 0 24px;
}

.hero-content h1 {
  font-size: 66px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

/* Gold highlight on hero title */
.hero-content h1 em {
  color: var(--brand-primary);
  font-style: normal;
  display: block;
  white-space: nowrap;
}

.hero-content p {
  font-size: 21px;
  color: rgba(200, 210, 240, 0.95);
  line-height: 1.7;
  margin-bottom: 32px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7);
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ─── Section Base ────────────────────────── */
section {
  padding: 100px max(24px, calc((100% - 1200px) / 2));
}

section:nth-of-type(even) {
  background: var(--bg-alt);
}

.section-title {
  font-size: 46px;
  font-weight: 700;
  color: var(--white);
  text-align: center;
  margin-bottom: 48px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--brand-primary);
  margin: 12px auto 0;
  border-radius: 2px;
}

.section-subtitle {
  font-size: 20px;
  color: var(--text-light);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* ─── Reveal Animation ────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.active {
  opacity: 1;
  transform: none;
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* ─── Team Grid ───────────────────────────── */
#team { background: var(--bg-section); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.team-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.team-card:hover,
.hover-glow:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 60px rgba(139, 127, 255, 0.15), 0 0 0 1px rgba(139, 127, 255, 0.35);
  border-color: var(--gold-primary);
}

.team-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(139, 127, 255, 0.2), rgba(200, 200, 220, 0.1));
  border: 1px solid rgba(139, 127, 255, 0.3);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--brand-primary);
}

.team-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 8px;
}

.team-card p {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.65;
}

/* ─── Strengths Grid ──────────────────────── */
#strengths { background: var(--bg-main); }

.strengths-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.strength-card {
  background: linear-gradient(135deg, var(--card-bg), rgba(139, 127, 255, 0.05));
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 28px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.strength-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(139, 127, 255, 0.15);
  border-color: rgba(139, 127, 255, 0.4);
}

.strength-card h3 {
  font-size: 19px;
  font-weight: 600;
  color: var(--brand-primary);
  margin-bottom: 8px;
}

.strength-card p {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ─── Features Grid ───────────────────────── */
#features { background: var(--bg-alt); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(200, 200, 220, 0.1);
  border-color: rgba(200, 200, 220, 0.3);
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(200, 200, 220, 0.15), rgba(200, 200, 220, 0.05));
  border: 1px solid rgba(200, 200, 220, 0.25);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--brand-primary);
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.7;
}

/* ─── Plans Section ───────────────────────── */
#plans { background: var(--bg-section); }

.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 900px;
  margin: 0 auto;
}

.plan-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 40px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.plan-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(200, 200, 220, 0.12);
  border-color: rgba(200, 200, 220, 0.35);
}

.plan-card h3 {
  font-size: 26px;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 16px;
}

.plan-card p {
  font-size: 17px;
  color: var(--text-light);
  line-height: 1.75;
}

/* ─── Demo Section ────────────────────────── */
#demo { background: var(--bg-main); }

.demo-header { text-align: center; margin-bottom: 32px; }

.demo-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
}

.tab-btn {
  background: var(--card-bg);
  color: var(--text-light);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 10px 26px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover,
.tab-btn.active {
  background: var(--brand-primary);
  color: #0A0B1A;
  border-color: var(--brand-primary);
  box-shadow: 0 4px 16px var(--brand-glow);
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.demo-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.demo-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 24px 60px rgba(139, 127, 255, 0.18), 0 0 0 1px var(--gold-primary);
  border-color: var(--gold-primary);
}

/* Dark bg for thumbnails — game art pops on dark */
.demo-thumb {
  aspect-ratio: 1 / 1;
  background: #08090F;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.45s ease;
}

.demo-card:hover .demo-thumb img {
  transform: scale(1.08);
}

/* Hover overlay — only appears on hover, no always-on gradient */
.demo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 26, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.demo-card:hover .demo-overlay {
  opacity: 1;
}

.demo-play-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #0A0B1A;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px var(--brand-glow);
  transform: scale(0.85);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.demo-card:hover .demo-play-btn {
  transform: scale(1);
}

.demo-coming-soon {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
}

/* Card info */
.demo-info {
  padding: 18px 20px 20px;
  cursor: pointer;
}

.demo-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.demo-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-secondary);
  background: rgba(139, 127, 255, 0.14);
  border: 1px solid rgba(139, 127, 255, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
}

.demo-rtp-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--brand-primary);
  background: rgba(200, 200, 220, 0.1);
  border: 1px solid rgba(200, 200, 220, 0.25);
  padding: 3px 10px;
  border-radius: 20px;
}

.demo-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.demo-card-desc {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.5;
}

/* ─── Contact Section ─────────────────────── */
#contact {
  background: linear-gradient(135deg, #0D1035 0%, #0A0B1A 100%);
  text-align: center;
  min-height: 300px;
}

/* ─── Footer ──────────────────────────────── */
footer {
  background: #07080F;
  border-top: 1px solid rgba(200, 200, 220, 0.1);
  text-align: center;
  padding: 48px 24px;
}

footer h2 {
  color: var(--brand-primary) !important;
  margin-bottom: 10px;
  font-size: 26px;
}

footer p {
  color: var(--text-light);
  font-size: 16px;
  line-height: 1.6;
}

/* ─── Modal System ────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7, 8, 20, 0.88);
  backdrop-filter: blur(10px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-overlay[aria-hidden="false"],
.modal-overlay.active { display: flex; }

.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-primary) var(--bg-alt);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--card-border);
  color: var(--text-light);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--brand-primary);
  color: #0A0B1A;
  border-color: var(--brand-primary);
}

.modal-body { padding: 40px; }

/* ─── Form (Multi-step) ───────────────────── */
.form-modal-content { max-width: 720px; }

.form-header {
  padding: 28px 40px 16px;
  border-bottom: 1px solid var(--card-border);
}

.form-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
}

.progress-bar-container {
  height: 6px;
  background: var(--tech-light-blue);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, var(--brand-secondary), var(--brand-primary));
  border-radius: 3px;
  transition: width 0.4s ease;
}

.step-indicator {
  font-size: 12px;
  color: var(--text-light);
}

.form-body { padding: 28px 40px 32px; }

.form-step { display: none; }
.form-step.active { display: block; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group.col-12 { grid-column: span 2; }
.form-group.col-6 { grid-column: span 1; }

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text-dark);
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(200, 200, 220, 0.1);
}

.form-group input::placeholder { color: rgba(136, 146, 176, 0.5); }

.form-group textarea { min-height: 100px; resize: vertical; }

.form-group select option { background: var(--card-bg); color: var(--text-dark); }

/* Chip selector */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.03);
  color: var(--text-light);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.chip:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.chip.active, .chip.selected {
  background: rgba(200, 200, 220, 0.15);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Radio chips */
.radio-chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-chip-group input[type="radio"] { display: none; }

.radio-chip {
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.03);
  color: var(--text-light);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.radio-chip-group input[type="radio"]:checked + .radio-chip {
  background: rgba(200, 200, 220, 0.15);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Messenger inputs */
.messenger-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.messenger-input {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}

.messenger-icon {
  padding: 10px 12px;
  background: rgba(139, 127, 255, 0.12);
  color: var(--brand-secondary);
  font-size: 12px;
  font-weight: 700;
  border-right: 1px solid var(--card-border);
  min-width: 40px;
  text-align: center;
}

.messenger-input input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-dark);
  outline: none;
}

/* Form actions */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.row-end { justify-content: flex-end; }
.row-between { justify-content: space-between; }
.row-gap-10 { gap: 10px; }

/* Radio group */
.radio-group { display: flex; gap: 20px; }
.radio-group label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-light); cursor: pointer; }
.radio-group input[type="radio"] { accent-color: var(--brand-primary); }

/* Error message */
.error-msg {
  font-size: 12px;
  color: var(--error-red);
  display: none;
}
.error-msg.visible { display: block; }

/* Success screen */
.success-content { text-align: center; padding: 20px 0; }

.success-icon {
  width: 80px;
  height: 80px;
  background: rgba(200, 200, 220, 0.1);
  border: 2px solid var(--brand-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--brand-primary);
}

.success-content h3 { font-size: 20px; font-weight: 700; color: var(--white); margin-bottom: 10px; }
.success-content p { font-size: 15px; color: var(--text-light); margin-bottom: 24px; }
.success-actions { display: flex; justify-content: center; gap: 12px; }

/* ─── Responsive ──────────────────────────── */
@media (max-width: 1024px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .strengths-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-content h1 { font-size: 54px; }
  .section-title { font-size: 38px; }
}

/* ─── Tablet nav collapse（平板用漢堡選單，避免 nav items 擠到換行） ─── */
@media (max-width: 1100px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100px; left: 0; right: 0;
    background: var(--bg-main);
    border-bottom: 1px solid var(--card-border);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  .mobile-menu-btn { display: flex; }
  .bgm-hint { display: none; }
  /* header logo 在平板縮一點避免跟漢堡鈕擠 */
  html[data-theme="light"] .header-logo-img.logo-light { height: 70px; }
  .header-logo-img { height: 100px; }
}

@media (max-width: 768px) {
  header { height: 80px; }
  .header-logo-img { height: 90px; }
  /* 桌面版右側 nav 隱藏，改用 nav-right cluster */
  .nav-links {
    display: none;
    position: absolute;
    top: 80px; left: 0; right: 0;
    background: var(--bg-main);
    border-bottom: 1px solid var(--card-border);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  /* 漢堡按鈕顯示 */
  .mobile-menu-btn { display: flex; }
  /* BGM hint 手機隱藏，避免太擠 */
  .bgm-hint { display: none; }
  /* 歌詞 bar 手機版顯示（浮在按鈕下方）*/
  .bgm-lyrics-bar { display: flex; max-width: 200px; }
  section { padding: 60px 20px; }
  .hero-content { max-width: 100%; padding: 0 16px; }
  .hero-content h1 { font-size: 38px; }
  .hero-content h1 em { white-space: normal; }
  .section-title { font-size: 32px; }
  .hero-content p { font-size: 18px; }
  .team-grid,
  .features-grid,
  .plans-grid,
  .strengths-grid { grid-template-columns: 1fr; }
  .demo-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.col-6,
  .form-group.col-12 { grid-column: span 1; }
  .messenger-grid { grid-template-columns: 1fr; }
  .modal-body,
  .form-body { padding: 20px; }
  .form-header { padding: 20px 20px 14px; }
}

@media (max-width: 480px) {
  .demo-grid { grid-template-columns: 1fr; }
  .header-logo-img { height: 76px; }
  .hero-content h1 { font-size: 30px; }
  .section-title { font-size: 26px; }
  .hero-content p { font-size: 15px; }
  .nav-container { padding: 0 16px; }
}

/* ─── Reduced motion ──────────────────────── */
@prefers-reduced-motion: reduce {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .light-beam-bg::after { display: none; }
}
