/* ==========================================================================
   xixiTab 官网 - 全局样式（纯 HTML + CSS + JS，div+css 响应式布局）
   ========================================================================== */

/* ---------- 基础重置与变量 ---------- */
:root {
  --primary: #1677ff;
  --text-main: #3d3d3d;
  --text-gray: #737373;
  --text-dark: #353535;
  --gradient-btn: linear-gradient(102deg, #4662ed 8%, #78b0f3 90%);
  --gradient-title-purple: linear-gradient(180deg, #a1aef6 0%, #6268e6 100%);
  --gradient-title-green: linear-gradient(180deg, #30bf89 0%, #72dae8 100%);
  --gradient-title-blue: linear-gradient(90deg, #68e1fa 0%, #3172f6 100%);
  --header-height: 70px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
    sans-serif;
  font-size: 16px;
  color: var(--text-main);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  border: 0;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.page-main {
  flex: 1;
}

/* 深色内容页（关于我们 / 常见问题 / 隐私协议） */
body.page-dark {
  background: #000;
}

/* ---------- 滚动进入动画（替代 AOS） ---------- */
[data-aos] {
  opacity: 0;
  transition: opacity 0.8s ease 0.1s, transform 0.8s ease 0.1s;
}

[data-aos='fade-up'] {
  transform: translateY(30px);
}

[data-aos='fade-right'] {
  transform: translateX(-30px);
}

[data-aos='fade-left'] {
  transform: translateX(30px);
}

[data-aos].aos-animate {
  opacity: 1;
  transform: none;
}

/* ---------- 通用工具类 ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
}

.min-padding {
  width: 100%;
}

.text-link {
  color: var(--primary);
  cursor: pointer;
}

.text-link:hover {
  text-decoration: underline;
}

/* 渐变标题 */
.gradient-title {
  margin-top: 37px;
  font-size: 58px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  background: var(--gradient-title-purple);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.gradient-title--green {
  background-image: var(--gradient-title-green);
}

.gradient-title--blue {
  background-image: var(--gradient-title-blue);
}

.section-desc {
  margin-top: 8px;
  padding: 0 16px;
  text-align: center;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-gray);
}

/* 胶囊按钮（顶部安装入口） */
.pill-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
}

.pill-btn img {
  width: 24px;
  height: 24px;
}

.pill-btn span {
  margin-left: 8px;
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.32);
}

.pill-btn--gray {
  background: #f0efef;
  color: var(--text-gray);
}

.pill-btn--gray:hover {
  background: #e4e3e3;
}

/* 渐变主按钮 */
.btn-gradient {
  width: 128px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(103deg, #4662ed 8%, #78b0f3 90%);
  color: #fff;
  font-size: 14px;
}

.btn-gradient:hover {
  opacity: 0.9;
}

/* 滑动切换标签（通用） */
.tab-bar {
  position: relative;
  display: flex;
  border-radius: 10px;
  background: #f5f5f9;
  padding: 4px 6px;
  user-select: none;
  width: fit-content;
}

.tab-bar--ghost {
  background: rgba(245, 245, 249, 0.3);
}

.tab-item-bg {
  position: absolute;
  top: 4px;
  left: 6px;
  width: 167px;
  height: 46px;
  border-radius: 6px;
  background: var(--gradient-btn);
  transition: transform 0.3s ease;
}

.tab-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 167px;
  height: 46px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  white-space: nowrap;
}

.tab-item.active {
  font-weight: 600;
  color: #fff;
  transition: all 0.3s ease;
}

.tab-bar--ghost .tab-item {
  color: #fff;
}

.tab-bar--ghost .tab-item.active {
  color: #fff;
}

/* ---------- 顶部导航 ---------- */
#site-header {
  position: relative;
  z-index: 100;
  background: linear-gradient(96deg, #17246e 0%, #2740b8 55%, #4662ed 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 20px 3px rgba(70, 98, 237, 0.35);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: var(--header-height);
  padding: 0 70px;
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
}

.brand img {
  width: 32px;
  height: 32px;
}

.brand-name {
  margin-left: 12px;
  font-size: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  height: 100%;
  margin-left: auto;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  height: 100%;
  padding: 0 14px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

.nav-link:hover {
  color: #fff;
}

.nav-link.active {
  color: #fff;
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #fff;
}

.lang-select {
  margin-left: 12px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background: transparent;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}

.lang-select option {
  color: #333;
}

/* 移动端汉堡按钮 */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* ---------- 首页：顶部 Hero ---------- */
.hero {
  position: relative;
  z-index: 2;
  padding: 48px 0 100px;
  background: #000;
  color: #fff;
}

.hero-inner {
  position: relative;
  max-width: 1440px;
  height: 923px;
  margin: 0 auto;
  background-image: url('../images/home/bg-top.png');
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.hero-head {
  text-align: center;
}

.hero-title {
  font-size: 48px;
  font-weight: 500;
}

.hero-subtitle {
  font-size: 40px;
  font-weight: 500;
}

.hero-note {
  margin-top: 32px;
  font-size: 14px;
  opacity: 0.5;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  padding: 0 16px;
}

/* 快捷入口卡片 */
.anchors {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -50px;
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 0 16px;
}

.anchor-item {
  display: flex;
  align-items: flex-start;
  max-width: 300px;
  padding: 24px 26px 13px 20px;
  border-radius: 10px;
  background: #131315;
  backdrop-filter: blur(5px);
  color: #fff;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.anchor-item img {
  flex-shrink: 0;
}

.anchor-item .icon-light {
  display: none;
}

.anchor-item:hover {
  background: linear-gradient(97deg, #68e1fa -28%, #3172f6 97%);
  box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.3);
}

.anchor-item:hover .icon-dark {
  display: none;
}

.anchor-item:hover .icon-light {
  display: block;
}

.anchor-text {
  margin-left: 10px;
}

.anchor-title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  background: linear-gradient(90deg, #68e1fa 0%, #3172f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.anchor-item:hover .anchor-title {
  background: linear-gradient(90deg, #fff 0%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #fff;
}

.anchor-desc {
  margin-top: 8px;
  font-size: 14px;
}

/* ---------- 首页：个性化（section1） ---------- */
.section-individ {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 860px;
  overflow: hidden;
  background: #fff;
}

.individ-decor {
  position: absolute;
  top: -215px;
}

.individ-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: none;
}

.individ-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-individ.is-wallpaper .individ-bg {
  display: block;
}

.section-individ.is-wallpaper .section-desc {
  color: rgba(255, 255, 255, 0.7);
}

.section-individ .tab-bar {
  margin-top: 33px;
}

/* DIY 主题套装轮播 */
.carousel {
  flex: 1;
  width: 100%;
  height: 0;
  margin-top: 10px;
  padding: 20px 0 30px;
  background: linear-gradient(180deg, rgba(120, 176, 243, 0) 0%, rgba(70, 98, 237, 0.1) 98%);
}

.carousel-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.carousel-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.carousel-arrow {
  width: 30px;
  height: 60px;
  cursor: pointer;
  flex-shrink: 0;
}

.carousel-stage {
  position: relative;
  flex: 1;
  height: 385px;
  min-width: 0;
  margin: 0 8px;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transform: translateX(-50%);
  transition: transform 0.5s ease, opacity 0.5s ease;
  z-index: 2;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-slide.pos-left {
  transform: translateX(-80%) scale(0.83);
  z-index: 1;
  opacity: 0.9;
  cursor: pointer;
}

.carousel-slide.pos-right {
  transform: translateX(-20%) scale(0.83);
  z-index: 1;
  opacity: 0.9;
  cursor: pointer;
}

.carousel-title {
  display: none;
  margin-top: 16px;
  font-size: 18px;
  font-weight: 600;
  background: var(--gradient-title-purple);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.carousel-title.active {
  display: block;
}

.carousel-box .btn-gradient {
  margin-top: 22px;
}

/* 动态壁纸 */
.wallpaper-box {
  display: none;
  width: 735px;
  max-width: calc(100% - 32px);
  margin-top: 45px;
}

.wallpaper-box.active {
  display: block;
}

.wallpaper-video {
  display: block;
  width: 100%;
  height: 385px;
  object-fit: cover;
  background: #000;
  border: 5px solid #fff;
  border-radius: 10px;
  box-shadow: 0 5px 40px 0 rgba(0, 0, 0, 0.25);
}

.wallpaper-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  margin-top: 25px;
}

.wallpaper-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.47);
  border-radius: 10px;
  box-shadow: 0 5px 40px 0 rgba(0, 0, 0, 0.25);
  background: linear-gradient(180deg, #4966ee 0%, #76adf3 99%);
  cursor: pointer;
}

.wallpaper-thumb img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
}

.wallpaper-thumb.active {
  border: none;
}

.wallpaper-thumb.active img {
  width: calc(100% - 8px);
  height: calc(100% - 8px);
}

/* ---------- 首页：小组件（section2） ---------- */
.section-widget {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  overflow: hidden;
  padding-bottom: 40px;
  background: linear-gradient(111deg, #eff9fa 19%, #e3eded 82%);
}

.widget-decor {
  position: absolute;
  top: -110px;
}

.widget-intro {
  width: 100%;
  max-width: 1440px;
  margin-top: 45px;
  object-fit: cover;
}

/* ---------- 首页：便捷小工具（section3） ---------- */
.section-ai {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  overflow: hidden;
  padding-bottom: 50px;
  background: #fff;
}

.ai-decor {
  position: absolute;
  top: -150px;
}

.ai-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 1200px;
  margin-top: 30px;
}

.ai-grid img {
  width: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- 首页：多模式（section4） ---------- */
.section-mode {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  overflow: hidden;
  padding: 39px 0 55px;
  color: #fff;
}

.mode-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mode-pane {
  display: none;
  width: 100%;
}

.mode-pane.active {
  display: block;
}

.mode-title {
  font-size: 58px;
  font-weight: 600;
  text-align: center;
}

.mode-desc {
  max-width: 720px;
  margin: 8px auto 0;
  padding: 0 16px;
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  white-space: pre-wrap;
}

.mode-img {
  display: block;
  max-width: 100%;
  margin: 40px auto 0;
}

.section-mode .tab-bar {
  margin-top: 40px;
  max-width: calc(100% - 32px);
}

/* ---------- 首页：安装方式 ---------- */
.install-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 122px 0 118px;
}

.install-title {
  font-size: 50px;
  font-weight: 600;
  line-height: 80px;
  color: var(--text-dark);
}

.install-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 60px;
}

.install-logo {
  width: 211px;
  height: 186px;
  margin-left: 20px;
  flex-shrink: 0;
}

/* ---------- 底部信息 ---------- */
#site-footer {
  background: #000;
  padding: 18px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.footer-info {
  font-size: 12px;
  line-height: 24px;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- 内容页（深色文档型） ---------- */
.doc-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 16px;
}

.doc-page h2 {
  margin: 40px 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.doc-page h2:first-child {
  margin-top: 0;
}

.doc-page h3 {
  margin: 16px 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.doc-page p {
  margin: 6px 0;
  line-height: 1.8;
  color: #ccc;
}

/* ---------- 离线下载页 ---------- */
.od-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 16px;
  color: var(--text-main);
}

.od-page h3 {
  margin: 32px 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.od-page h3:first-child {
  margin-top: 0;
}

.od-page p {
  line-height: 1.9;
}

.od-page video {
  display: block;
  width: 100%;
  max-width: 800px;
  margin-top: 8px;
}

/* ---------- 安装帮助中心 ---------- */
.help-layout {
  display: flex;
  min-height: calc(100vh - var(--header-height));
  color: var(--text-main);
}

.help-sidebar {
  width: 280px;
  flex-shrink: 0;
  padding: 12px 0;
  background: #fff;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06);
}

.help-nav-item {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 20px;
  font-size: 14px;
  color: #303133;
  cursor: pointer;
}

.help-nav-item img {
  width: 20px;
  height: 20px;
  margin-right: 8px;
}

.help-nav-item:hover {
  background: #f5f7fa;
}

.help-nav-item.active {
  color: #409eff;
  background: #ecf5ff;
}

.help-content {
  flex: 1;
  min-width: 0;
}

.help-article {
  max-width: 700px;
  margin-left: 40px;
  padding: 40px 0;
}

.help-article h2 {
  font-size: 24px;
  font-weight: 700;
}

.help-article h3 {
  margin-top: 32px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.help-article p {
  margin-top: 12px;
  line-height: 32px;
}

.help-article img {
  display: block;
  max-width: 100%;
  margin-top: 8px;
}

.help-article video {
  display: block;
  max-width: 100%;
  margin-top: 8px;
}

/* 免责声明 */
.sub-title {
  margin: 16px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.disclaimer-list {
  padding-left: 2em;
  margin-top: 8px;
}

.disclaimer-list li {
  margin: 6px 0;
  line-height: 1.9;
}

/* ==========================================================================
   响应式布局
   ========================================================================== */

/* <= 1280px：两侧留白 */
@media (max-width: 1280px) {
  .min-padding {
    padding-left: 16px;
    padding-right: 16px;
  }

  .carousel-box,
  .ai-grid,
  .install-section {
    max-width: 100%;
  }

  .install-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .carousel-stage {
    height: 340px;
  }
}

/* <= 1024px：导航折叠 + 布局收窄 */
@media (max-width: 1024px) {
  .nav-inner {
    padding: 0 20px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 99;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 8px 0 16px;
    background: #22348f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nav-links.open .nav-link {
    width: 100%;
    height: 48px;
    padding: 0 24px;
    justify-content: flex-start;
  }

  .nav-links.open .nav-link.active::after {
    display: none;
  }

  .nav-links.open .lang-select {
    margin: 12px 24px 0;
  }

  .hero {
    padding-bottom: 60px;
  }

  .hero-inner {
    height: auto;
  }

  .anchors {
    position: static;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 64px;
  }

  .gradient-title,
  .mode-title {
    font-size: 42px;
  }

  .section-individ,
  .section-widget,
  .section-ai,
  .section-mode {
    height: auto;
  }

  .install-section {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .install-title {
    font-size: 36px;
    line-height: 1.5;
  }

  /* 帮助中心侧栏折叠到顶部 */
  .help-layout {
    flex-direction: column;
  }

  .help-sidebar {
    display: flex;
    width: 100%;
    overflow-x: auto;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }

  .help-nav-item {
    height: 48px;
    padding: 0 16px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .help-article {
    margin: 0 auto;
    padding: 24px 16px 40px;
    max-width: 760px;
  }
}

/* <= 768px：移动端 */
@media (max-width: 768px) {
  .hero {
    padding-top: 32px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 24px;
  }

  .hero-actions {
    gap: 10px;
  }

  .anchors {
    flex-direction: column;
    align-items: stretch;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  .gradient-title {
    font-size: 34px;
    margin-top: 24px;
  }

  .mode-title {
    font-size: 34px;
  }

  .section-desc {
    font-size: 15px;
  }

  /* 隐藏装饰性大图，避免遮挡内容 */
  .individ-decor,
  .widget-decor,
  .ai-decor {
    display: none;
  }

  .tab-item-bg,
  .tab-item {
    width: 124px;
    height: 40px;
  }

  .tab-item {
    font-size: 13px;
  }

  /* 轮播退化为单屏切换 */
  .carousel-stage {
    height: 220px;
  }

  .carousel-slide {
    width: 100%;
  }

  .carousel-slide.pos-left,
  .carousel-slide.pos-right {
    opacity: 0;
    pointer-events: none;
  }

  .wallpaper-video {
    height: 220px;
    border-width: 3px;
  }

  .wallpaper-thumbs {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .wallpaper-thumb {
    height: 72px;
  }

  .ai-grid {
    grid-template-columns: 1fr;
  }

  .section-mode .tab-bar {
    margin-top: 24px;
  }

  .mode-img {
    margin-top: 24px;
    padding: 0 16px;
  }

  .install-section {
    flex-direction: column;
    gap: 32px;
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .install-title {
    font-size: 28px;
    text-align: center;
  }

  .install-actions {
    margin-top: 0;
  }

  .install-logo {
    width: 140px;
    height: 124px;
    margin-left: 0;
  }
}

/* <= 480px：小屏手机 */
@media (max-width: 480px) {
  .doc-page {
    padding: 24px 16px;
  }

  .doc-page h2 {
    font-size: 20px;
  }

  .tab-item-bg,
  .tab-item {
    width: 108px;
    height: 38px;
  }

  .carousel-stage {
    height: 170px;
  }

  .wallpaper-video {
    height: 170px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 4px;
  }
}
