:root {
  --primary-color: #F2C14E;
  --secondary-color: #FFD36B;
  --bg-dark: #0A0A0A;
  --card-bg: #111111;
  --text-main: #FFF6D6;
  --border-color: #3A2A12;
  --glow-color: #FFD36B;
  --btn-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
}

/* 🚨 Body背景色为 #0A0A0A (深色)，因此页面主文字颜色应为浅色 #FFF6D6 */
.page-index {
  color: var(--text-main);
  background-color: var(--bg-dark);
}

/* 🚨 桌面端视频区域样式（必须严格遵守） */
.page-index__video-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  /* 🚨 页头整段高度由 shared 的 body { padding-top: var(--header-offset); } 承担；此处仅用小额顶距，禁止再写 var(--header-offset) 以免双倍空白 */
  padding-top: 10px;
}

.page-index__video-container {
  position: relative;
  width: 100%; /* 🚨 必须同时写 width: 100% 和 max-width */
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box; /* 确保 padding 不会导致溢出 */
}

/* 🚨 视频点击链接样式（必须严格遵守） */
.page-index__video-link {
  display: block;
  text-decoration: none;
  position: relative;
  width: 100%;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index__video-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.page-index__video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 宽高比 - 🚨 PageSpeed优化：固定宽高比避免布局偏移（CLS） */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color); /* Add border for visual separation */
}

.page-index__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  object-fit: cover;
  pointer-events: none; /* 防止视频控件阻止点击事件 */
}

/* 🚨 视频点击提示遮罩层样式（可选，增强用户体验） */
.page-index__video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.page-index__video-link:hover .page-index__video-overlay {
  opacity: 1;
}

.page-index__video-click-hint {
  color: var(--text-main);
  font-size: 18px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  padding: 10px 20px;
  background: rgba(var(--primary-color-rgb, 242, 193, 78), 0.8);
  border-radius: 5px;
  white-space: nowrap;
}

/* 🚨 Play Now按钮样式（必须严格遵守，位于视频下方中间位置） */
.page-index__video-cta {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
}

.page-index__play-now-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--btn-gradient);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: none;
  cursor: pointer;
  min-width: 150px; /* Ensure button is not too small */
}

.page-index__play-now-button:hover {
  background: linear-gradient(180deg, #DDA11D 0%, #FFD86A 100%); /* Invert gradient on hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.page-index__play-now-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 🚨 模块 2：优惠礼品区（__promo-dark + __gifcode-tabs）*/
.page-index__promo-dark {
  background: var(--card-bg); /* #111111 */
  padding: 40px 20px;
  margin-top: 30px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.page-index__gifcode-tabs {
  max-width: 1200px;
  margin: 0 auto;
}

.page-index__gifcode-title {
  color: var(--primary-color); /* #F2C14E */
  text-align: center;
  text-transform: uppercase;
  font-size: 28px;
  margin-bottom: 30px;
  font-weight: bold;
}

.page-index__gifcode-tab-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
}

.page-index__gifcode-tab-nav li {
  margin: 0;
}

.page-index__gifcode-tab-nav a {
  color: var(--text-main);
  text-decoration: none;
  text-transform: uppercase;
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 16px;
}

.page-index__gifcode-tab-nav a.is-active,
.page-index__gifcode-tab-nav a:hover {
  color: var(--primary-color); /* #F2C14E */
  border-bottom-color: var(--primary-color); /* #F2C14E */
}

.page-index__gifcode-panel {
  display: none;
}

.page-index__gifcode-panel.is-active {
  display: block;
}

.page-index__gifcode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 1250px;
  margin: 0 auto;
}

.page-index__gifcode-col {
  flex: 1 1 calc(50% - 6px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.page-index__gifcode-img {
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
}

.page-index__gifcode-img a {
  display: block;
}

.page-index__gifcode-img img {
  display: block;
  width: 100%;
  aspect-ratio: 370 / 127; /* PC 双列内单卡约 600×200，移动全宽约 370×127 */
  object-fit: cover;
  transition: transform 0.3s ease;
  border-radius: 4px;
}

.page-index__gifcode-img:hover img {
  transform: scale(1.03);
}

.page-index__blog-section-title {
  color: var(--primary-color); /* #F2C14E */
  text-align: center;
  margin: 40px 0 20px;
  font-size: 24px;
  font-weight: bold;
  text-transform: uppercase;
}

/* 🚨 模块 3：最新文章横滑（__blog-slider）*/
.page-index__blog-slider {
  padding: 40px 0;
  background-color: var(--bg-dark); /* Using the main dark background */
}

.page-index__blog-slider-wrap {
  position: relative;
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 40px;
}

.page-index__blog-slider-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* For Firefox */
  -webkit-overflow-scrolling: touch; /* For iOS Safari */
}

.page-index__blog-slider-track::-webkit-scrollbar {
  display: none; /* For Chrome, Safari, Opera */
}

.page-index__post-item {
  flex: 0 0 calc((100% - 64px) / 5); /* 5 cards visible on desktop, 16px gap * 4 = 64px */
  scroll-snap-align: start;
  min-width: 0; /* Allow shrinking */
  transition: transform 0.3s ease;
}

.page-index__post-item:hover {
  transform: translateY(-5px);
}

.page-index__post-box {
  position: relative;
  background: var(--card-bg); /* #111111 */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  height: 100%; /* Ensure consistent height for cards */
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
}

.page-index__post-image {
  position: relative;
  width: 100%;
}

.page-index__post-cover {
  position: relative;
  padding-top: 120px; /* 🚨 固定 120px 高度 */
  overflow: hidden;
}

.page-index__post-cover-link {
  display: block;
  position: absolute;
  inset: 0;
}

.page-index__post-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.page-index__post-cover-link:hover img {
  transform: scale(1.05);
}

.page-index__post-text {
  padding: 15px;
  text-align: center;
  color: var(--text-main);
  flex-grow: 1; /* Allow text content to take remaining space */
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Push date to bottom if needed */
}

.page-index__post-title {
  margin: 0 0 10px 0;
  font-size: 18px;
  line-height: 1.3;
}

.page-index__post-title a {
  color: var(--primary-color); /* #F2C14E */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-index__post-title a:hover {
  color: var(--secondary-color); /* #FFD36B */
}

.page-index__post-divider {
  width: 40px;
  height: 2px;
  background: var(--primary-color); /* #F2C14E */
  margin: 10px auto;
}

.page-index__post-excerpt {
  color: #bbb;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  -webkit-box-orient: vertical;
}