/* =========== 全局 =========== */
:root {
  --primary: #FFD30F;
  --primary-end: #FBC900;
  --bg-top: #FFFFFF;
  --bg-bottom: #E9F4FF;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(to bottom, var(--bg-top), var(--bg-bottom));
  color: #444;
  text-align: center;
  font-size: 15px;
  line-height: 1.65;
}

.hidden {
  display: none !important;
}

/* =========== 主页面 =========== */
#mainPage .container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 88%;
}

#mainPage .logo {
  max-width: 35vw;
  width: 120px;
  margin: 0 auto 20px;
}

#mainPage .slogan {
  font-size: clamp(1.1rem, 4vw, 1.3rem);
  margin-bottom: 36px;
  color: #222;
  font-weight: 600;
}

.btn {
  padding: 14px 36px;
  background: linear-gradient(90deg, var(--primary), var(--primary-end));
  color: #000;
  border: none;
  border-radius: 32px;
  font-size: 16px;
  font-weight: 600;
  display: inline-block;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* =========== 遮罩 =========== */
.browser-tip {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(3px);
}

.tip-box {
  max-width: 84%;
  background: #fff;
  color: #111;
  border-radius: 16px;
  padding: 24px 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  text-align: left;
  font-size: 15px;
  line-height: 1.6;
}

.tip-box h3 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}

/* =========== 弹窗 =========== */
@keyframes modalShow {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.modal-dialog {
  width: 94%;
  max-width: 380px;
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 32px 26px 28px;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  animation: modalShow 0.28s ease-out;
}

.close-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 22px;
  color: #777;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.modal-logo {
  max-width: 92px;
  width: 34%;
  margin: 0 auto 20px auto;
  display: block;
}

.modal-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  background: linear-gradient(90deg, var(--primary), var(--primary-end));
  color: #000;
  font-weight: 600;
  border-radius: 30px;
  padding: 15px 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.modal-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.footer-note {
  font-size: 13px;
  color: #666;
  margin-top: 22px;
}

/* =========== 分享页 =========== */
#sharePage {
  display: flex;
  justify-content: center;
  align-items: flex-start;          /* 从顶部对齐，避免被顶部元素遮挡 */
  padding-top: 60px;                /* 预留顶部空间给语言切换器 */
  min-height: 100vh;
  background: #f9f9f9;
}

.share-container {
  width: 92%;
  max-width: 540px;
  padding: 24px 20px 40px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  box-sizing: border-box;
  text-align: center;
}

/* Logo 部分 */
.share-logo {
  max-width: 95px;
  width: 24%;
  margin: 0 auto 4vh;
}

/* 口号文字 */
.share-slogan {
  font-size: 19px;
  font-weight: 600;
  color: #111;
  margin-bottom: 4vh;
}

/* 二维码图像 */
.qrcode {
  width: min(50vw, 260px);
  display: block;
  margin: 0 auto 5vh;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

/* 下载按钮 */
.share-btn {
  display: inline-block;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--primary), var(--primary-end));
  color: #000;
  margin-bottom: 4vh;
  transition: opacity 0.2s ease;
}
.share-btn:hover {
  opacity: 0.9;
}

.instruction {
  font-size: 14px;
  color: #555;
}
.language-switcher {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 12px;
  border-radius: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.lang-icon {
  width: 20px;
  height: 20px;
}

.lang-select {
  font-size: 14px;
  border: none;
  background: transparent;
  outline: none;
  cursor: pointer;
  appearance: none;
  padding: 4px 2px;
}
/* 次要按钮：查看安装指南（红色高亮） */
.guide-btn {
  display: block;                          /* 独占一行 */
  margin: 1em auto 0;                      /* 顶部间距 + 左右自动居中 */
  padding: 6px 12px;
  font-size: 10px;
  background: transparent;
  color: #E53935;
  border: 1px solid #E53935;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}


/* 悬停时红底白字反色反馈 */
.guide-btn:hover {
  background: #E53935;
  color: #fff;
}
/* 全局重置与基础 */
html, body {
  margin: 0;
  padding: 0;
  background: #f7f8fa;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  height: 100%;
  box-sizing: border-box;
}
*, *::before, *::after {
  box-sizing: inherit;
}

/* 顶部固定导航栏 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: #FFD30F;
  display: flex;
  align-items: center;
  padding: 0 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  z-index: 100;
}
.back-btn {
  width: 22px;
  height: 22px;
  background: url('image/fh.webp') no-repeat center;
  background-size: cover;
  border: none;
  border-radius: 50%;
  padding: 0;
  margin-right: 8px;
  cursor: pointer;
}
.header .title {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: #222;
}

/* 主体容器，顶部预留导航栏高度 */
.container {
  padding: 70px 20px 20px;
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: 8px;
}

h1 {
  font-size: 22px;
  text-align: center;
  color: #222;
  margin-bottom: 16px;
}
h2 {
  font-size: 18px;
  margin-top: 28px;
  color: #333;
}
.step {
  margin-bottom: 24px;
}
.note {
  background: #fef9e7;
  border-left: 4px solid #f4c430;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.6;
  border-radius: 4px;
}
.screenshot {
  width: 100%;
  margin: 12px 0;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
p {
  font-size: 15px;
  line-height: 1.7;
  margin: 8px 0;
}

/* 返回顶部按钮 */
.back-top {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: url('image/fhdb.webp') no-repeat center;
  background-size: cover;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 100;
}
