/* ============================================================
   电脑站外壳：顶部导航 + 内容区
   鸡舍 / 百万纳指 / 估值历史 / 我的 共用；小游戏页(index.html)不用这套
   ============================================================ */

html, body { margin: 0; padding: 0; }

body.site-body {
  /* 非游戏页面使用雾蓝、藏青与暖金色，不污染农场小游戏。 */
  --cream: #f2f6fb;
  --cream-2: #e6edf5;
  --paper: #ffffff;
  --line: #d7e1eb;
  --inner: #edf2f7;
  --pink: #5a8fc2;
  --pink-d: #2f6f9f;
  --butter: #efc367;
  --butter-d: #d3a345;
  --butter-d2: #ae7f2e;
  --cta: #2f6f9f;
  --cta-d: #24557a;
  --mint: #c8e2f3;
  --mint-d: #4e8db2;
  --ink: #1f2f45;
  --ink-2: #607188;
  --ink-3: #91a0b2;

  display: block;
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: auto;
  background:
    radial-gradient(circle at 8% -8%, rgba(91, 139, 185, .20) 0%, transparent 38%),
    radial-gradient(circle at 94% 2%, rgba(216, 164, 62, .11) 0%, transparent 31%),
    linear-gradient(180deg, #f9fbfe 0%, var(--cream) 52%, #eaf0f7 100%);
  color: var(--ink);
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------------- 顶部导航 ---------------- */
.site-top {
  position: sticky;
  top: 0;
  z-index: 400;
  background: rgba(249, 251, 254, .91);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(47, 111, 159, .14);
  box-shadow: 0 5px 20px rgba(31, 47, 69, .05);
}
.site-top::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #2f6f9f 0%, #7ea8ca 56%, #e5b553 100%);
}
.site-top-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 9px 24px;
  box-sizing: border-box;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: .3px;
}
.site-brand .brand-emoji { font-size: 20px; }
.site-links {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-links::-webkit-scrollbar { display: none; }
.site-link {
  display: inline-block;
  padding: 8px 13px;
  border-radius: 12px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .14s, color .14s;
}
.site-link:hover { background: var(--cream-2); color: var(--ink); }
.site-link.active {
  background: #e1ebf4;
  color: #235a82;
  box-shadow: none;
}
.site-right {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-user {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 170px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 2px 7px rgba(32, 52, 47, .04);
  transition: background .14s, color .14s;
}
.site-user:hover { background: var(--cream-2); color: var(--ink); }
.site-user.active {
  background: #e1ebf4;
  color: #235a82;
  border-color: #c7dbea;
}
.site-user .su-emoji { flex: none; }
.site-user #siteUserName {
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-game {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border: 1px solid var(--butter-d);
  border-radius: 12px;
  background: var(--butter);
  color: #7a5a10;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(183, 124, 28, .16);
  transition: transform .12s;
  white-space: nowrap;
}
.site-game:active { transform: translateY(2px); }

/* ---------------- 内容区 ---------------- */
.site-main {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 24px 56px;
  box-sizing: border-box;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.page-head h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: .4px;
  color: var(--ink);
}
.page-head small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
}
.page-actions { display: flex; gap: 8px; align-items: center; }

/* 全屏页（百万纳指 / 估值历史）：和鸡舍首页一样，不要外面的框，内容直接铺在页面上 */
.page-stage {
  position: relative;
  width: 100%;
  height: calc(100dvh - 64px);
  margin: 0 auto;
  padding: 0;
}
.page-stage .screen {
  position: absolute;
  inset: 0;
  height: auto;
  transform: none;
  opacity: 0;
  pointer-events: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.page-stage .screen.open { opacity: 1; pointer-events: auto; }
.page-stage .scr-back { display: none; }      /* 导航在顶部，不需要页内 ☰ */

/* 页头：和鸡舍的 .page-head 对齐（标题在左、操作在右，不要底色和分割线） */
.page-stage .scr-head {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 20px 24px 12px;
  background: transparent;
  border-bottom: 0;
}
.page-stage .scr-head .scr-title b { font-size: 21px; letter-spacing: .4px; }
.page-stage .scr-head .scr-title small { font-size: 12px; }
.page-stage .scr-body {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0 24px 48px;
}

/* ---------------- 我的：账号页 ---------------- */
.mine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  max-width: 1000px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(32, 52, 47, .045);
  padding: 18px;
}
.card h3 { margin: 0 0 12px; font-size: 15px; color: var(--ink); }
.mine-avatar {
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: #e3edf6; font-size: 26px;
  margin-bottom: 10px;
}
.mine-name { font-size: 17px; font-weight: 800; color: var(--ink); }
.mine-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.field span { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.field input {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  box-shadow: inset 0 1px 2px rgba(32, 52, 47, .035);
}
.field input:focus { border-color: var(--pink); }
.btn-primary-site {
  padding: 10px 18px;
  border: 1px solid var(--pink-d);
  border-radius: 13px;
  background: var(--pink);
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(47, 116, 103, .18);
}
.btn-primary-site:active { transform: translateY(2px); }
.btn-ghost-site {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(32, 52, 47, .04);
}
.msg { min-height: 20px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.msg.good { color: var(--fall-d); }

@media (max-width: 760px) {
  .site-top-inner { padding: 8px 12px; gap: 8px; }
  .page-stage { height: calc(100dvh - 58px); }
  .page-stage .scr-head { padding: 14px 12px 8px; }
  .page-stage .scr-head .scr-title b { font-size: 18px; }
  .page-stage .scr-body { padding: 0 12px 32px; }
  .site-brand .brand-text { display: none; }
  .site-user { max-width: 96px; padding: 6px 9px; font-size: 12px; }
  .site-link { padding: 7px 10px; font-size: 12.5px; }
  .site-main { padding: 16px 12px 40px; }
}

/* ---------------- 登录页 ---------------- */
.login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  box-sizing: border-box;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 18px 50px rgba(32, 52, 47, .09);
  padding: 30px 26px 24px;
  box-sizing: border-box;
  text-align: center;
}
.login-brand { font-size: 44px; line-height: 1; }
.login-card h1 { margin: 12px 0 6px; font-size: 22px; letter-spacing: .5px; color: var(--ink); }
.login-sub { margin: 0 0 20px; font-size: 12.5px; line-height: 1.7; color: var(--ink-3); }
.login-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  border-radius: 99px;
  background: var(--cream-2);
}
.login-tab {
  flex: 1;
  padding: 8px 4px;
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.login-tab.active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--inner);
}
.login-card form { text-align: left; }
.login-submit { width: 100%; padding: 11px 18px; font-size: 14px; }
.login-note { margin: 18px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--ink-3); }
.login-note a { color: var(--pink-d); font-weight: 700; text-decoration: none; }

/* ---------------- 我的：一张账号卡片 ---------------- */
.account-card {
  max-width: 860px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(32, 52, 47, .055);
  overflow: hidden;
}
.account-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 24px;
}
.account-avatar {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e3edf6;
  font-size: 30px;
}
.account-name { font-size: 19px; font-weight: 800; color: var(--ink); }
.account-sub { margin-top: 4px; font-size: 12px; line-height: 1.6; color: var(--ink-3); }
.account-section { padding: 20px 24px; border-top: 1px solid var(--line); }
.account-section h3 { margin: 0 0 14px; font-size: 14px; color: var(--ink); }
.pw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.account-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: #f5f8fc;
}
.account-foot b { font-size: 13px; color: var(--ink); }

@media (max-width: 700px) {
  .pw-grid { grid-template-columns: 1fr; }
  .account-head { padding: 18px; }
  .account-section { padding: 16px 18px; }
  .account-avatar { width: 54px; height: 54px; font-size: 26px; }
}


/* 我的：数据备份 */
.backup-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.backup-info { font-size: 12px; color: var(--ink-3); }
