/* ========================================
   CSS Variables & Global Styles
   ======================================== */

:root {
  /* Colors */
  --primary-color: #dbba49;
  --secondary-color: #fbcf21;
  --text-white: #fff;
  --bg-dark: #000000;
  --bg-card: #313131;
  --bg-light: #f2fbff;

  /* Gradients */
  --gradient-gold: linear-gradient(135deg, #fff9aa 0%, #d9be4d 100%);
  --gradient-silver: linear-gradient(135deg, #fff 1%, #b7b7b7 100%);

  /* Sizes */
  --container-width: 1170px;
  --border-radius: 15px;
  --section-padding: 40px 0;
  --mobile-section-padding: 20px;
}

* {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-light);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.7;
}

img {
  max-width: 100%;
  display: block;
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ========================================
   Utility Classes (通用工具类)
   ======================================== */

/* Container */
.container {
  margin: 0;
  max-width: 100%;
}

/* Section Containers */
.advantage-container,
.experience-container,
.game-container,
.promotion-container,
.platform-container,
.registration-container,
.navigate-container,
.agent-container,
.recommendation-container,
.contact-container {
  width: min(var(--container-width), calc(100% - 3rem));
  margin: 0 auto;
  max-width: 100%;
  padding: var(--section-padding);
}

/* Gradient Text Titles - 优化：所有 section 的 h2 自动应用 */
section h2 {
  line-height: 1.2;
  font-size: 2rem;
  /* 保持 2rem 不变 */
  font-weight: bold;
  margin: 15px 0;
  text-align: left;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* White Text Descriptions */
.game-description,
.game-instructions,
.game-step__description,
.game-steps__description,
.game-steps__end,
.promotion-description,
.platform-description,
.platform-end,
.registration-description,
.navigate-description,
.agent-description,
.recommendation-description,
.recommendation-introduction,
.experience-card__desc,
.advantage-card__desc,
.agent-card__description,
.agent-card__end,
.navigate-card__description {
  color: var(--text-white);
  line-height: 1.5;
}

.game-step__description,
.game-steps__description {
  margin: 0;
}

/* Contact List Items */
.contact-chat,
.contact-phone,
.contact-email,
.contact-address {
  color: var(--text-white);
  line-height: 1.5;
}

/* Buttons */
.btn,
.experience-card__btn,
.promotion-button,
.agent-card__btn {
  padding: 10px 15px;
  text-align: center;
  margin: 5px;
  display: inline-block;
  color: #000;
  border-radius: 20px;
  line-height: 1.1;
  background: var(--gradient-gold);
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s;
  cursor: pointer;
}

.btn:hover,
.experience-card__btn:hover,
.promotion-button:hover,
.agent-card__btn:hover {
  background: #fff;
}

.btn-signin {
  background: var(--gradient-silver);
}

/* List Items with Icon */
.platform-tip-list,
.game-step__tip,
.game-steps__tip,
.platform-tip-list,
.agent-card__tip {
  background: url("/public/images/spot.png") no-repeat left 5px;
  padding-left: 25px;
  margin: 10px 0;
  color: var(--text-white);
  list-style: none;
}

.navigate-card__tip {
  background: url("/public/images/spot-check.png") no-repeat left 5px;
  padding-left: 25px;
  margin: 10px 0;
  color: var(--text-white);
  list-style: none;
}

.platform-tips-list,
.game-step__tips-list,
.game-steps__tips-list,
.navigate-card__tips-list,
.agent-card__tips-list,
.contact-list {
  padding-left: 0;
  margin: 10px 0;
}

.contact-list li {
  list-style: none;
  margin: 0;
}

/* Secondary Color Headings - 优化：所有 section 的 h3 自动应用 */
section h3 {
  color: var(--secondary-color);
  font-size: 1.5em;
  /* 保持 1.5em 不变 */
  font-weight: bold;
  margin: 0;
}

/* 特殊覆盖：某些标题需要不同大小 */
.platform-tip-title,
.navigate-instructions {
  color: var(--secondary-color);
  font-size: 1.5em;
  /* 保持原样 */
  font-weight: bold;
  margin: 0;
}

.recommendation-name {
  color: var(--secondary-color);
  font-size: 2em;
  /* 保持 2em 不变 */
  font-weight: bold;
  margin: 0;
}


/* ========================================
   Common Layout Components (通用布局组件)
   ======================================== */

/* Grid Layouts - 网格布局系统 */
/* 2列网格布局，适用于双卡片展示 */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: stretch;
}

/* 3列网格布局，适用于三卡片展示 */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
}

/* 1列网格布局，适用于单卡片展示 */
.grid-1 {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  align-items: stretch;
}

/* Card Components - 卡片组件系统 */
/* 基础卡片样式，包含背景、边框、内边距等 */
.card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 15px;
  overflow: hidden;
  border: 1px solid #c9ab45;
  width: auto;
  display: flex;
  flex-direction: column;
}

/* 卡片包装器，提供外层间距和居中对齐 */
.card-wrapper {
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 卡片图片样式 */
.card__image {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 16px;
}

/* 卡片标题样式 */
.card__title {
  margin-bottom: 15px;
}

/* 卡片变体样式 */
.card--no-border {
  border: none;
}

.card--center-text {
  text-align: center;
}

.card--flex-1 {
  flex: 1;
}

/* Flex Layouts - Flex 布局系统 */
/* 水平 Flex 布局，元素水平排列 */
.flex-row {
  display: flex;
  flex-direction: row;
  align-items: center;
}

/* 垂直 Flex 布局，元素垂直排列 */
.flex-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 居中 Flex 布局，元素水平和垂直都居中 */
.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Column Layouts - 列布局系统 */
/* 55% 宽度列，适用于主要内容区域 */
.col-55 {
  width: 55%;
}

/* 45% 宽度列，适用于次要内容区域 */
.col-45 {
  width: 45%;
}

/* 50% 宽度列，适用于等分内容 */
.col-50 {
  width: 50%;
}

/* 66% 宽度列，适用于主要内容区域 */
.col-66 {
  width: 66%;
}

/* 34% 宽度列，适用于次要内容区域 */
.col-34 {
  width: 34%;
}

/* Content Wrappers - 内容包装器系统 */
/* 内容包装器，提供水平布局和容器宽度限制 */
.content-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: var(--container-width);
  height: auto;
  max-width: 100%;
}

/* 内容内部区域，提供左侧间距 */
.content-inner {
  flex: 1;
  padding-left: 20px;
}

/* Section Backgrounds - 区块背景系统 */
/* 通用背景图片样式 */
.section-bg {
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  width: 100%;
  position: relative;
}

/* 深色背景样式 */
.section-dark {
  background: var(--bg-dark);
}

/* ========================================
   Header
   ======================================== */

.site-header {
  padding: 10px 0;
  background: rgba(34, 36, 41, 0.8);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-container {
  width: 100%;
  max-width: var(--container-width);
}

.header-top .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo img {
  width: 200px;
  height: 38px;
  display: block;
}

.header-actions {
  display: flex;
  gap: 0;
}

/* Header Navigation */
.header-nav {
  background: rgba(34, 36, 41, 0.8);
}

.nav {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav__item a {
  display: block;
  padding: 15px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s;
  font-size: 16px;
}

.nav__item a:hover {
  color: var(--primary-color);
}

.nav__item--active a {
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
}

/* ========================================
   Mobile Menu
   ======================================== */

/* Mobile Menu Toggle Button (汉堡图标) */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 50px;
  height: 50px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1001;
}

.mobile-menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background-color: var(--text-white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow: hidden;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Menu Content */
.mobile-menu-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Mobile Menu Close Button */
.mobile-menu-close {
  position: absolute;
  top: 0;
  right: 0;
  background: transparent;
  border: none;
  color: var(--text-white);
  cursor: pointer;
  padding: 10px;
  z-index: 10000;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.mobile-menu-close:hover {
  transform: rotate(90deg);
}

.mobile-menu-close svg {
  width: 30px;
  height: 30px;
}

/* Mobile Navigation */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 60px 0 0 0;
  overflow: hidden;
}

.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.mobile-nav__item {
  width: 100%;
  text-align: center;
}

.mobile-nav__item a {
  display: block;
  padding: 10px;
  color: var(--text-white);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav__item a:hover {
  color: var(--primary-color);
  background-color: rgba(255, 255, 255, 0.05);
}

.mobile-nav__item--active a {
  color: var(--primary-color);
  background-color: rgba(255, 255, 255, 0.05);
  border-bottom: 3px solid var(--primary-color);
}

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* ========================================
   Sider
   ======================================== */

.site-sider {
  position: fixed;
  right: 0;
  bottom: 45%;
  z-index: 9;
}

.sider-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sider-facebook,
.sider-twitter,
.sider-pin,
.sider-linkedin,
.sider-line,
.sider-top {
  width: 32px;
  height: 32px;
  display: block;
  border-radius: 4px;
  text-decoration: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.3s;
}

.sider-facebook img,
.sider-twitter img,
.sider-pin img,
.sider-linkedin img,
.sider-line img,
.sider-top img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 4px;
}

.sider-facebook {
  background-color: rgb(24, 119, 242);
}

.sider-twitter {
  background-color: rgb(85, 172, 238);
}

.sider-pin {
  background-color: rgb(189, 8, 28);
}

.sider-linkedin {
  background-color: rgb(0, 123, 181);
}

.sider-line {
  background-color: rgb(0, 195, 0);
}

.sider-top {
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sider-top.show {
  opacity: 1;
  pointer-events: auto;
}

/* ========================================
   Footer
   ======================================== */

.site-footer {
  background: var(--bg-card);
  color: var(--text-white);
  padding: 20px 0;
  text-align: center;
  font-size: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-nav {
  padding-bottom: 16px;
  border-bottom: 1px solid #666;
}

.footer-nav ul {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav-item {
  list-style: none;
}

.footer-nav a {
  padding: 10px;
  color: var(--text-white);
  font-size: 16px;
}

.footer-nav a:hover {
  color: var(--secondary-color);
}

.footer-copyright {
  margin: 16px 0 0 0;
  font-size: 16px;
  color: #999;
}

/* ========================================
   移动端响应式适配 (< 768px)
   ======================================== */

@media (max-width: 767px) {

  /* 全局设置 */
  body {
    font-size: 14px;
  }

  .advantage-container,
  .experience-container,
  .game-container,
  .promotion-container,
  .platform-container,
  .registration-container,
  .navigate-container,
  .agent-container,
  .recommendation-container,
  .contact-container {
    width: auto;
    padding: var(--mobile-section-padding);
  }


  /* Header */
  .header-top .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .header-logo {
    width: auto;
  }

  .header-logo img {
    width: 140px;
    height: auto;
  }

  .header-actions {
    width: auto;
    justify-content: flex-start;
    gap: 10px;
  }

  /* 移动端显示汉堡菜单按钮（绝对定位在右上角） */
  .mobile-menu-toggle {
    display: flex;
  }

  /* 移动端隐藏原始导航栏 */
  .header-nav {
    display: none;
  }

  /* 移动端隐藏侧边栏 */
  .site-sider {
    display: none;
  }

  .contact-list {
    padding-left: 0;
  }

  /* ========================================
   Common Responsive Styles (通用响应式样式)
   ======================================== */

  /* 移动端媒体查询 (< 768px) */
  @media (max-width: 767px) {

    /* Grid Layouts → 1 列 */
    /* 多列网格布局在移动端变为单列 */
    .grid-2,
    .grid-3 {
      grid-template-columns: 1fr;
      gap: 0;
      margin: 0;
    }

    /* Flex 容器 → 垂直堆叠 */
    /* 水平 Flex 布局在移动端变为垂直 */
    .flex-row {
      flex-direction: column;
    }

    /* 列布局 → 全宽 */
    /* 所有列布局在移动端变为全宽 */
    .col-55,
    .col-45,
    .col-50,
    .col-66,
    .col-34 {
      width: 100%;
    }

    /* 内容包装器 → 垂直 */
    /* 水平内容包装器在移动端变为垂直 */
    .content-wrapper {
      flex-direction: column;
    }

    .content-inner {
      padding-left: 0;
    }

    /* 卡片包装器 */
    /* 移动端卡片包装器添加内边距 */
    .card-wrapper {
      padding: 10px;
    }

    /* 图片自适应 */
    /* 确保图片在移动端正确显示 */
    .card__image {
      width: 100%;
      height: auto;
    }
  }

  /* Footer */
  .footer-nav ul {
    flex-direction: column;
    gap: 5px;
  }

  .footer-nav a {
    font-size: 14px;
  }

  .footer-copyright {
    font-size: 12px;
  }
}