/* ============================================================
   无畏三国官网 - 样式表
   视觉基调：深黑棕底 + 中国红 #C8102E + 金色 #D4A017
============================================================ */

/* ---------------- 基础重置与变量 ---------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-dark: #14100d;      /* 页面深黑棕底色 */
  --bg-panel: #1e1813;     /* 卡片/面板底色 */
  --bg-darker: #0e0b08;    /* 页脚/导航更深底色 */
  --red: #c8102e;          /* 中国红主色 */
  --red-deep: #8f0a20;     /* 深红（渐变收尾） */
  --gold: #d4a017;         /* 金色点缀 */
  --gold-light: #eec96a;   /* 亮金（大标题） */
  --text-main: #f0e6d2;    /* 主文字（米白） */
  --text-sub: #a08d70;     /* 次级文字 */
  --border-dark: #3d3227;  /* 深色描边 */
}

html { scroll-behavior: smooth; }

body {
  font-family: "STKaiti", "KaiTi", serif;
  background: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------------- 通用按钮 ---------------- */
.btn {
  display: inline-block;
  padding: 10px 32px;
  font-size: 17px;
  letter-spacing: 4px;
  border-radius: 4px;
  transition: all .3s ease;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  border: 1px solid rgba(212, 160, 23, .55);
  box-shadow: 0 2px 12px rgba(200, 16, 46, .35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 16, 46, .55);
}
.btn-lg { padding: 14px 48px; font-size: 20px; }
.btn-block { width: 100%; }

/* ---------------- 顶部固定导航 ---------------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 64px;
  /* 透明导航：仅顶部一层淡渐变保证文字可读，背景图可透过导航栏 */
  background: linear-gradient(180deg, rgba(14, 11, 8, .55) 0%, rgba(14, 11, 8, .22) 65%, transparent 100%);
}
.navbar-inner { display: flex; align-items: center; height: 100%; }
.logo {
  font-size: 26px;
  font-weight: bold;
  letter-spacing: 6px;
  color: var(--gold-light);
  text-shadow: 0 0 12px rgba(212, 160, 23, .4);
}
.nav-links { display: flex; gap: 36px; margin-left: auto; }
.nav-link {
  position: relative;
  padding: 6px 0;
  font-size: 17px;
  letter-spacing: 3px;
  color: var(--text-sub);
  transition: color .3s;
}
/* 导航下划线动效 */
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  width: 0; height: 2px;
  background: var(--red);
  transform: translateX(-50%);
  transition: width .3s;
}
.nav-link:hover, .nav-link.active { color: var(--gold-light); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-reserve { margin-left: 36px; padding: 8px 24px; font-size: 16px; letter-spacing: 3px; }

/* 汉堡按钮（仅移动端显示） */
.hamburger { display: none; margin-left: auto; width: 40px; height: 40px; }
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  margin: 5px auto;
  background: var(--gold-light);
  transition: all .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 移动端折叠菜单 */
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 8px 20px 20px;
  background: rgba(14, 11, 8, .98);
  border-bottom: 1px solid var(--border-dark);
}
.mobile-menu.open { display: flex; }
.mobile-menu .nav-link { padding: 13px 0; border-bottom: 1px dashed var(--border-dark); }
.mobile-reserve { margin-top: 16px; }

/* ---------------- 首屏 KV ---------------- */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg-dark);
}
/* 动态视频背景：cover 铺满整个屏幕（等比缩放、居中裁切保证无留白） */
.hero-video {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* TapTap 预约按钮：底部居中悬浮胶囊，磨砂暗底 + 金边，压在视频上但不抢画面 */
.taptap-cta {
  position: fixed;
  left: 50%;
  bottom: calc(34px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 34px;
  background: linear-gradient(135deg, rgba(18,14,9,.74), rgba(18,14,9,.52));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212,160,23,.55);
  border-radius: 999px;
  color: var(--gold-light);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 5px;
  text-indent: 5px; /* 平衡尾部字距，保证视觉居中 */
  box-shadow: 0 6px 24px rgba(0,0,0,.38), inset 0 0 14px rgba(212,160,23,.08);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.taptap-cta:hover {
  transform: translateX(-50%) translateY(-3px);
  border-color: rgba(230,190,90,.9);
  box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 20px rgba(212,160,23,.28);
}
/* 按钮内的 TapTap 徽标 */
.tt-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #d4a017, #f5d47a);
  color: #1a120a;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  text-indent: 0;
}
@media (max-width: 767px) {
  .taptap-cta {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    padding: 11px 26px;
    font-size: 15px;
    letter-spacing: 4px;
    text-indent: 4px;
  }
  .tt-badge { width: 23px; height: 23px; font-size: 13px; }
}
/* 压暗渐变遮罩，向下融入页面底色 */
.hero::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(14,11,8,.18) 0%, rgba(14,11,8,.1) 45%, var(--bg-dark) 100%);
}

/* ---------------- 通用区块 ---------------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-panel); } /* 交替底色区分区块 */
.section-title { text-align: center; font-size: 38px; letter-spacing: 10px; color: var(--gold-light); }
.section-sub { margin: 14px 0 56px; text-align: center; font-size: 15px; letter-spacing: 4px; color: var(--text-sub); }

/* ---------------- 游戏特色卡片 ---------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  overflow: hidden;
  transition: all .3s;
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .5);
}
.feature-card img { width: 100%; height: 170px; object-fit: cover; }
.feature-body { padding: 18px 16px 22px; }
.feature-name { margin-bottom: 10px; font-size: 20px; letter-spacing: 3px; color: var(--gold); text-align: center; }
.feature-desc { font-size: 14px; line-height: 1.8; color: var(--text-sub); text-align: center; }

/* ---------------- 游戏动态新闻列表 ---------------- */
.news-list { max-width: 900px; margin: 0 auto; }
.news-item { border-bottom: 1px dashed var(--border-dark); }
.news-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 6px;
  transition: background .3s;
}
.news-link:hover { background: rgba(212, 160, 23, .06); }
/* 新闻分类标签（边框随文字颜色） */
.news-tag { flex-shrink: 0; padding: 2px 10px; font-size: 13px; border: 1px solid currentColor; border-radius: 3px; }
.tag-news     { color: #ff6b81; }
.tag-notice   { color: var(--gold-light); }
.tag-activity { color: #7ecf96; }
.news-title {
  flex: 1;
  font-size: 17px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color .3s;
}
.news-link:hover .news-title { color: var(--gold-light); }
.news-date { flex-shrink: 0; font-size: 14px; color: var(--text-sub); }

/* ---------------- 游戏视频 ---------------- */
.video-wrap { max-width: 420px; margin: 0 auto; }
.video-cover {
  position: relative;
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  overflow: hidden;
}
.video-cover img { width: 100%; }
/* 播放按钮 */
.play-btn {
  position: absolute;
  top: 50%; left: 50%;
  width: 76px; height: 76px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(200, 16, 46, .85);
  border: 2px solid rgba(238, 201, 106, .9);
  transition: transform .3s;
}
.play-btn:hover { transform: translate(-50%, -50%) scale(1.12); }
/* CSS 三角形播放图标 */
.play-btn i {
  display: block;
  margin-left: 8px;
  border-style: solid;
  border-width: 14px 0 14px 22px;
  border-color: transparent transparent transparent #fff;
}
.video-player { width: 100%; border-radius: 8px; background: #000; }
.video-tip { margin-top: 16px; text-align: center; font-size: 14px; letter-spacing: 2px; color: var(--text-sub); }

/* ---------------- 页脚 ---------------- */
.footer {
  padding: 48px 0;
  background: var(--bg-darker);
  border-top: 1px solid var(--border-dark);
  text-align: center;
}
.footer-brand { margin-bottom: 16px; font-size: 24px; letter-spacing: 8px; color: var(--gold-light); }
.footer-tip { margin-bottom: 10px; font-size: 14px; color: var(--text-sub); }
.age-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 9px;
  font-size: 13px;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
}
.footer-copy { font-size: 13px; color: var(--text-sub); }

/* ---------------- 预约弹窗 ---------------- */
.modal-mask {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .72);
  opacity: 0;
  visibility: hidden;
  transition: all .3s;
}
.modal-mask.show { opacity: 1; visibility: visible; }
.modal {
  position: relative;
  width: 90%;
  max-width: 420px;
  padding: 36px 30px;
  background: var(--bg-panel);
  border: 1px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  transform: translateY(24px);
  transition: transform .3s;
}
.modal-mask.show .modal { transform: translateY(0); }
.modal-close { position: absolute; top: 8px; right: 14px; font-size: 28px; color: var(--text-sub); }
.modal-close:hover { color: var(--gold-light); }
.modal-title { margin-bottom: 12px; font-size: 24px; letter-spacing: 4px; color: var(--gold-light); text-align: center; }
.modal-desc { margin-bottom: 24px; font-size: 14px; color: var(--text-sub); text-align: center; }
.phone-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--text-main);
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  outline: none;
  transition: border-color .3s;
}
.phone-input:focus { border-color: var(--gold); }
.modal-error { min-height: 20px; margin: 8px 0 4px; font-size: 13px; color: #ff6b81; }
.modal-success { font-size: 15px; line-height: 1.9; color: var(--gold-light); text-align: center; }
.success-icon {
  display: block;
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  font-size: 30px;
  font-style: normal;
  line-height: 54px;
  color: var(--gold);
  border: 2px solid var(--gold);
  border-radius: 50%;
}

/* ---------------- 返回顶部 ---------------- */
.back-top {
  position: fixed;
  right: 24px; bottom: 40px;
  z-index: 90;
  width: 46px; height: 46px;
  font-size: 20px;
  color: var(--gold-light);
  background: var(--red);
  border: 1px solid rgba(238, 201, 106, .8);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
  opacity: 0;
  visibility: hidden;
  transition: all .3s;
}
.back-top.show { opacity: 1; visibility: visible; }
.back-top:hover { transform: translateY(-4px); }

/* ============================================================
   响应式：<768px 切换为移动端单列布局
============================================================ */
@media (max-width: 767px) {
  /* 导航：隐藏桌面链接与预约按钮，显示汉堡菜单 */
  .nav-links, .nav-reserve { display: none; }
  .hamburger { display: block; }

  /* 首屏字号与字距收紧 */
  .hero-title { letter-spacing: 10px; text-indent: 10px; }
  .hero-slogan { letter-spacing: 5px; }

  /* 区块留白收紧 */
  .section { padding: 64px 0; }
  .section-title { font-size: 28px; letter-spacing: 6px; }
  .section-sub { margin-bottom: 36px; }

  /* 特色卡片单列堆叠 */
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card img { height: 200px; }

  /* 新闻条目改为两行式：标签+日期一行，标题单独换行 */
  .news-link { flex-wrap: wrap; gap: 8px; }
  .news-date { order: 2; margin-left: auto; }
  .news-title { order: 3; flex-basis: 100%; white-space: normal; }

  /* 弹窗内边距收紧 */
  .modal { padding: 28px 20px; }
}
