/* 红楼书屋 · 静态页共用样式（登录 / 充值 / 我的账号 / 首页导航） */
:root {
  --ink: #3d3226;
  --brown: #8b4513;
  --brown-2: #a0522d;
  --line: #d4c4a8;
  --paper: #f5f0e8;
  --card: #fff;
}

* { box-sizing: border-box; }

/* 关掉安卓 Chrome 的「字体自动放大」(Font Boosting)：
   它会在窄列宽页面上自动放大文字，放大后重排容易出现「卡片只画一半」的渲染问题 */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

a { color: var(--brown-2); }

.hs-head {
  background: linear-gradient(135deg, var(--brown), var(--brown-2));
  color: #fff;
  padding: 10px 20px;
}

.hs-row {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hs-brand,
.hs-brand:link,
.hs-brand:visited {
  font-size: 22px;
  letter-spacing: 4px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.hs-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

@media (max-width: 640px) {
  .hs-row { flex-direction: column; gap: 8px; }
}

.hs-nav a,
.hs-nav a:visited {
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 16px;
  padding: 4px 12px;
  white-space: nowrap;
}

.hs-nav a:hover { background: rgba(255, 255, 255, .16); }

.hs-nav .hs-vip-badge {
  background: #f6d365;
  color: #7a3f12;
  border: 0;
  font-weight: 700;
}

/* 登录后：一个白线框胶囊。普通会员 = 白字（只显示邮箱）；VIP = 金色发亮（邮箱 · VIP） */
.hs-nav .hs-userpit,
.hs-nav .hs-userpit:visited {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #fff;
  border-radius: 16px;
  padding: 4px 12px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.hs-nav .hs-userpit:hover { background: rgba(255, 255, 255, .16); }

.hs-nav .hs-userpit .hs-mail,
.hs-nav .hs-userpit .hs-vipinfo,
.hs-nav .hs-userpit .hs-dot {
  color: #fff;
  font-weight: 700;
}

/* VIP：金色 + 一道来回扫过的光泽，显得尊贵 */
@keyframes hsShine {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.hs-nav .hs-userpit.is-vip .hs-mail,
.hs-nav .hs-userpit.is-vip .hs-vipinfo,
.hs-nav .hs-userpit.is-vip .hs-dot {
  background-image: linear-gradient(100deg,
    #ffd75e 0%, #ffab00 10%, #fff6c2 22%, #ffffff 27%, #ffe98a 33%,
    #ffb300 50%, #ffd75e 62%, #ffcf3f 80%, #ffd75e 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #ffd75e;
  filter: drop-shadow(0 0 5px rgba(255, 205, 60, .65));
  animation: hsShine 3.2s linear infinite;
}

/* 系统里开了「减弱动态效果」就只保留金色，不做动画 */
@media (prefers-reduced-motion: reduce) {
  .hs-nav .hs-userpit.is-vip .hs-mail,
  .hs-nav .hs-userpit.is-vip .hs-vipinfo,
  .hs-nav .hs-userpit.is-vip .hs-dot { animation: none; }
}

.hs-nav .hs-userpit.is-banned,
.hs-nav .hs-userpit.is-banned .hs-mail,
.hs-nav .hs-userpit.is-banned .hs-vipinfo,
.hs-nav .hs-userpit.is-banned .hs-dot {
  border-color: #ffb3a7;
  color: #ffb3a7;
}

/* 账号页的数据小格子 */
.hs-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}

.hs-stat {
  background: #fdf8f2;
  border: 1px solid #f0e6d6;
  border-radius: 10px;
  padding: 12px 14px;
}

.hs-stat span {
  display: block;
  font-size: 12px;
  color: #9a8a74;
  margin-bottom: 5px;
}

.hs-stat b { font-size: 18px; color: var(--brown); }

/* VIP 页：价格和购买按钮合成一行 */
.hs-plan-cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.hs-plan-price { flex: 0 0 auto; min-width: 76px; text-align: right; }

/* 注意要写成 .hs-btn.hs-plan-buy：.hs-btn 有一条 width:100%，普通权重会被它盖掉，
   按钮就会撑满整行、把价格挤成 0 宽（手机上就是「立即充值挡住价格」） */
.hs-btn.hs-plan-buy {
  flex: 0 0 auto;
  width: auto;
  min-width: 84px;
  padding: 6px 14px;
  font-size: 12.5px;
  line-height: 1.6;
  text-align: center;
  border-radius: 15px;
  border: 0;
  white-space: nowrap;
}

/* 窗口窄（手机）时：套餐名一行，价格和按钮整体换到第二行，绝不顶出卡片 */
@media (max-width: 560px) {
  .hs-plan { grid-template-columns: minmax(0, 1fr); }
  .hs-plan-cta { width: 100%; justify-content: space-between; }
  .hs-plan-price { min-width: 0; }
}

/* 账号页：两个按钮之间的行间距 */
.hs-btnrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin: 12px 0 18px;
}

.hs-btnrow .hs-btn { margin: 0 0 4px; }

.hs-page {
  max-width: 520px;
  margin: 32px auto 60px;
  padding: 0 16px;
}

.hs-card {
  /* 安卓部分机型上，圆角+阴影的卡片会出现「只画一半」的合成层问题，单独给它一层可规避 */
  transform: translateZ(0);
  background: var(--card);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .07);
  padding: 26px 24px;
}

.hs-card h1 {
  font-size: 20px;
  color: var(--brown);
  letter-spacing: 2px;
  margin: 0 0 6px;
  text-align: center;
}

.hs-sub {
  text-align: center;
  color: #999;
  font-size: 13px;
  margin: 0 0 22px;
}

.hs-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  background: #f7f2ea;
  border-radius: 22px;
  padding: 4px;
}

.hs-tabs button {
  flex: 1;
  border: 0;
  background: none;
  padding: 8px 0;
  border-radius: 18px;
  font-size: 14px;
  color: #8a7c68;
  cursor: pointer;
  font-family: inherit;
}

.hs-tabs button.on {
  background: #fff;
  color: var(--brown);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.hs-field { margin-bottom: 14px; }

.hs-field label {
  display: block;
  font-size: 13px;
  color: #7a6a56;
  margin-bottom: 6px;
}

.hs-field input {
  width: 100%;
  padding: 11px 14px;
  font-size: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #fffdfa;
  font-family: inherit;
  color: var(--ink);
}

.hs-field input:focus { border-color: var(--brown-2); }

.hs-btn {
  display: inline-block;
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-radius: 24px;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brown), var(--brown-2));
  color: #fff;
  text-align: center;
  text-decoration: none;
}

.hs-btn:hover { filter: brightness(1.06); }

.hs-btn[disabled] { opacity: .55; cursor: default; }

.hs-btn-ghost {
  background: #fff;
  color: var(--brown);
  border: 1px solid var(--line);
}

.hs-btn-ghost:hover { background: #fdf8f2; }

.hs-msg {
  font-size: 13px;
  line-height: 1.7;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 14px;
  display: none;
}

.hs-msg.err { display: block; background: #fdf0ee; color: #b3402f; border: 1px solid #f2d2cc; }
.hs-msg.ok  { display: block; background: #f2fbf5; color: #2b6b45; border: 1px solid #bfe0cb; }

/* 套餐行：Grid 排版。minmax(0,1fr) 保证套餐名那一列可以被压缩，
   右边的价格/按钮永远不会把行撑破（同样的规则也内联在 vip.html 里，防止样式表缓存） */
.hs-plans { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 22px; }

.hs-plan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid #f0e6d6;
  border-radius: 10px;
  background: #fffdfa;
}

.hs-plan-main {
  min-width: 0;
  font-size: 15px;
  color: var(--brown);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* 天数跟在套餐名后面，同一行、中间留一个空档 */
.hs-plan-main .hs-plan-sub {
  display: inline-block;
  font-size: 12px;
  color: #9a8a74;
  font-weight: 400;
  margin-left: 6px;
}
.hs-plan-price { font-size: 16px; color: #b3402f; font-weight: 700; }
.hs-plan-price small { font-size: 12px; font-weight: 400; }

.hs-sep {
  text-align: center;
  color: #bbb;
  font-size: 12px;
  margin: 20px 0 16px;
  border-top: 1px dashed #e6dcc9;
  line-height: 0;
}

.hs-sep span { background: #fff; padding: 0 10px; }

.hs-tip {
  font-size: 12px;
  color: #a99a86;
  line-height: 1.9;
  margin: 14px 0 0;
}

.hs-status {
  background: #fdf8f2;
  border: 1px solid #f0e6d6;
  border-left: 4px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 2;
  color: #5a4a38;
  margin-bottom: 20px;
}

.hs-status b { color: var(--brown); }

.hs-vip-on {
  background: #f2fbf5;
  border-color: #bfe0cb;
  border-left-color: #2e8b57;
  color: #2b6b45;
}

.hs-foot {
  text-align: center;
  color: #b3a894;
  font-size: 12px;
  padding: 0 20px 40px;
}

.hs-foot a { color: #a99a86; text-decoration: none; }
.hs-foot a:hover { color: #8b4513; text-decoration: underline; }
