/* ==========================================================================
   游寺集团 · 登录页（深空 + 3D 地球 + 玻璃卡片）
   体验参照 TOURIST CRM：左"故事区"+右"登录卡"，深色场景 + 点缀色、
   柔和字重、统一缓动；所有交互靠边框/文字/背景的柔和变化。
   2026-09-24：点缀色由企业金改为玫瑰金，与登录后的玫瑰主题连成一套。
   ========================================================================== */

:root {
  /* 下面这几个变量原来被引用却从未定义 —— 结果 border-radius/transition 全部失效
     （登录页的胶囊按钮其实一直是直角、切换没有过渡）。这里补齐。 */
  --ys-font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ys-font-display: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ys-ease: cubic-bezier(.4, .16, .2, 1);
  --ys-radius-pill: 999px;
  /* 玫瑰金（变量名沿用 gold，避免改动大量调用点） */
  --ys-gold: #eaa9c0;
  --ys-gold-light: #ffd9e4;
  --ys-gold-deep: #bf6e8e;
  --ys-gold-glow: rgba(234, 169, 192, .55);
  --ys-gold-shadow: rgba(191, 110, 142, .26);
  --ys-gold-shadow-2: rgba(191, 110, 142, .36);
  --ys-gold-wash: rgba(234, 169, 192, .14);
}

.login-screen {
  position: fixed; inset: 0; z-index: 50;
  display: block;                       /* 覆盖旧的居中布局 */
  /* 柔光背景（静态写死：页面首帧就是它，避免 JS 加上去时跳一下造成"闪屏"） */
  background:
    radial-gradient(900px 620px at 82% 16%, rgba(126, 86, 214, .32), transparent 62%),
    radial-gradient(760px 560px at 12% 82%, rgba(214, 92, 148, .24), transparent 60%),
    radial-gradient(680px 520px at 92% 88%, rgba(228, 140, 178, .20), transparent 60%),
    radial-gradient(1400px 900px at 18% 8%, #1b1226 0%, #120b1c 45%, #07040c 100%);
  color: #eef3fa;
  overflow: hidden;
  font-family: var(--ys-font);
  letter-spacing: .01em;
}
#ys-space { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .9s ease; }
#ys-space.ready { opacity: 1; }
.login-screen::after {             /* 边缘暗角，让地球更有纵深 */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 20% 40%, transparent 40%, rgba(8, 4, 12, .58) 100%);
}

/* ---------- 顶栏 ---------- */
.ys-login-top {
  position: relative; z-index: 2;
  height: 64px; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.ys-wordmark { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .03em; font-size: 13px; color: #e8eef8; }
.ys-wordmark .ys-mark {
  width: 10px; height: 10px; border-radius: 4px;
  background: linear-gradient(135deg, var(--ys-gold-light), var(--ys-gold-deep));
  box-shadow: 0 0 12px var(--ys-gold-glow);
}
.ys-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #9fb2c9; }
.ys-meta .ys-status {
  width: 7px; height: 7px; border-radius: 50%; background: #57d6a9;
  box-shadow: 0 0 10px rgba(87, 214, 169, .8);
}

/* ---------- 主布局 ---------- */
.ys-login-main {
  position: relative; z-index: 2;
  height: calc(100% - 64px);
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 28px 28px;
  gap: 24px;
}

/* ---------- 左侧故事区 ---------- */
.ys-story { max-width: 560px; padding-left: 8px; position: relative; }
.ys-eyebrow {
  margin: 0 0 14px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ys-gold); font-weight: 600;
}
.ys-hero {
  margin: 0 0 16px; font-size: 46px; line-height: 1.18; font-weight: 750;
  color: #f6f2ea; letter-spacing: .01em; font-family: var(--ys-font-display);
}
.ys-hero em { font-style: normal; color: var(--ys-gold-light); }
.ys-lede { margin: 0 0 22px; font-size: 14px; color: #a9bacd; max-width: 420px; }
.ys-caption { display: flex; align-items: center; gap: 10px; font-size: 11.5px; letter-spacing: .09em; color: #7f93aa; text-transform: uppercase; }
.ys-caption .ys-line { width: 42px; height: 1px; background: linear-gradient(90deg, var(--ys-gold), transparent); }

.ys-story-bottom { margin-top: 34px; display: flex; flex-direction: column; gap: 18px; }
.ys-stats { display: flex; gap: 30px; }
.ys-stat { display: flex; flex-direction: column; gap: 2px; }
.ys-stat strong { font-size: 26px; font-weight: 750; color: #fff; font-family: var(--ys-font-display); }
.ys-stat strong span { font-size: 12px; font-weight: 600; color: #9fb2c9; margin-left: 2px; }
.ys-stat > span { font-size: 11.5px; color: #7f93aa; letter-spacing: .06em; }

.ys-scene-controls { display: flex; gap: 8px; }
.ys-scene-btn {
  border: 1px solid rgba(213, 231, 249, .18);
  background: rgba(11, 28, 47, .5);
  color: #cfdced; border-radius: var(--ys-radius-pill);
  padding: 7px 14px; font-size: 12px; font-weight: 600;
  transition: border-color .25s var(--ys-ease), background .25s var(--ys-ease), color .25s var(--ys-ease);
}
.ys-scene-btn:hover, .ys-scene-btn.active {
  border-color: var(--ys-gold);
  color: var(--ys-gold-light);
  background: var(--ys-gold-wash);
}

/* 地球悬停提示 */
.ys-earth-hud {
  position: absolute; left: 50%; top: 18%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: var(--ys-radius-pill);
  background: rgba(11, 28, 47, .72); border: 1px solid rgba(213, 231, 249, .16);
  font-size: 12px; color: #d7e3f2;
  opacity: 0; transition: opacity .3s var(--ys-ease);
  pointer-events: none;
}
.ys-earth-hud.show { opacity: 1; }
.ys-earth-hud .hud-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ys-gold); box-shadow: 0 0 10px var(--ys-gold-glow); }

/* ---------- 右侧登录卡（玻璃拟态） ---------- */
.ys-login-col { display: flex; justify-content: center; }
.ys-card {
  width: 100%; max-width: 600px;
  padding: 34px 38px 28px;
  border-radius: 22px;
  background: rgba(11, 28, 47, .78);
  border: 1px solid rgba(95, 190, 231, .10);
  backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 32px 75px rgba(0, 0, 0, .38), 0 0 0 1px rgba(95, 190, 231, .06), inset 0 1px rgba(255, 255, 255, .13);
}
.ys-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.ys-card-head > span:first-child { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8fa3ba; font-weight: 600; }
.ys-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: #cfe6d9;
  background: rgba(46, 113, 92, .28); border: 1px solid rgba(87, 214, 169, .28);
  border-radius: var(--ys-radius-pill); padding: 3px 10px; font-weight: 600;
}
.ys-card h2 { margin: 0 0 6px; font-size: 27px; font-weight: 750; color: #f6f2ea; font-family: var(--ys-font-display); letter-spacing: .01em; }
.ys-card-intro { margin: 0 0 22px; font-size: 13px; color: #9fb2c9; }
.ys-card label { display: block; margin: 14px 0 6px; font-size: 12px; color: #a9bacd; font-weight: 600; }
.ys-card input {
  width: 100%; height: 46px; padding: 0 16px;
  background: rgba(7, 20, 35, .72);
  border: 1px solid rgba(213, 231, 249, .16);
  border-radius: 10px; color: #eef3fa; font-size: 14px;
  transition: border-color .25s var(--ys-ease), background .25s var(--ys-ease), box-shadow .25s var(--ys-ease);
}
.ys-card input::placeholder { color: #6e8299; }
.ys-card input:hover { border-color: rgba(213, 231, 249, .3); }
.ys-card input:focus {
  outline: none; border-color: var(--ys-gold);
  background: rgba(7, 20, 35, .9);
  box-shadow: 0 0 0 3px var(--ys-gold-wash);
}
.ys-card .login-error { min-height: 20px; margin-top: 8px; font-size: 12px; color: #f2a39c; }
.ys-submit {
  width: 100%; height: 46px; margin-top: 10px;
  border: 0; border-radius: 11px; cursor: pointer;
  font-size: 14px; font-weight: 700; letter-spacing: .02em; color: #3a1526;
  background: linear-gradient(180deg, var(--ys-gold-light), var(--ys-gold));
  box-shadow: 0 11px 24px var(--ys-gold-shadow), inset 0 1px rgba(255, 255, 255, .5);
  transition: filter .25s var(--ys-ease), box-shadow .25s var(--ys-ease), transform .25s var(--ys-ease);
}
.ys-submit:hover { filter: brightness(1.06); box-shadow: 0 15px 30px var(--ys-gold-shadow-2), inset 0 1px rgba(255, 255, 255, .58); }
.ys-submit:active { transform: translateY(1px); }
.ys-card-foot { margin-top: 18px; text-align: center; font-size: 11px; color: #6e8299; letter-spacing: .04em; }

/* ---------- 窄屏适配 ---------- */
@media (max-width: 1080px) {
  .ys-login-main { grid-template-columns: 1fr; align-content: center; }
  .ys-story { display: none; }
  .ys-login-col { justify-content: center; }
}
@media (max-width: 520px) {
  .ys-card { padding: 24px 20px 20px; border-radius: 18px; }
  .ys-login-top { padding: 0 16px; }
}

/* 登录成功后整块隐藏（app.js 会设 display:none） */
.login-screen[style*="none"] { display: none !important; }


/* ==================== 地球上的国家标签（跟随 3D 投影） ==================== */
#ysLabels { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.ys-label {
  position: absolute; left: 0; top: 0;
  display: flex; align-items: center; gap: 5px;
  padding: 3px 9px 3px 6px;
  border-radius: var(--ys-radius-pill);
  background: rgba(8, 20, 34, .82);   /* 去掉毛玻璃：改用更实的底色，避免 32 个模糊层造成拖影 */
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .38);
  font-size: 11.5px; line-height: 1.25; color: #e8f0fa; white-space: nowrap;
  opacity: 0;
  transition: opacity .25s var(--ys-ease);
}
.ys-label::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--pin, #57d6a9); box-shadow: 0 0 8px var(--pin, #57d6a9);
  flex: 0 0 auto;
}
.ys-label .ys-name { font-weight: 650; letter-spacing: .01em; }
.ys-label .ys-meta2 { font-size: 10px; color: #9fb2c9; letter-spacing: .03em; }
.ys-label.main {
  background: rgba(46, 20, 33, .82);
  border-color: rgba(234, 169, 192, .6);
  color: var(--ys-gold-light);
  box-shadow: 0 6px 20px var(--ys-gold-shadow);
  font-size: 12.5px;
}
.ys-label.main .ys-meta2 { color: #e8bfd0; }
@media (max-width: 1080px) { #ysLabels { display: none; } }


/* ==================== 真实银河背景 + 选择器 ==================== */
.login-screen.has-photo::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(3,8,16,.62) 0%, rgba(3,8,16,.34) 42%, rgba(2,6,12,.78) 100%);
}


/* ==================== 背景三档风格 ==================== */
.login-screen.ys-style-space { background: radial-gradient(1200px 800px at 20% 10%, #1a1230 0%, #110a1c 45%, #05030a 100%); }
.login-screen.ys-style-glow {
  background:
    radial-gradient(900px 620px at 82% 16%, rgba(126, 86, 214, .32), transparent 62%),
    radial-gradient(760px 560px at 12% 82%, rgba(214, 92, 148, .24), transparent 60%),
    radial-gradient(680px 520px at 92% 88%, rgba(228, 140, 178, .20), transparent 60%),
    radial-gradient(1200px 800px at 20% 10%, #17102a 0%, #0f0a18 45%, #05030a 100%);
}
.ys-style-btn {
  border: 1px solid rgba(255,255,255,.18); background: rgba(8, 20, 34, .55);
  color: #cfdced; border-radius: var(--ys-radius-pill); padding: 4px 12px;
  font-size: 11.5px; font-weight: 650; cursor: pointer;
  transition: border-color .2s var(--ys-ease), background .2s var(--ys-ease), color .2s var(--ys-ease);
}
.ys-style-btn:hover { border-color: rgba(255,255,255,.5); color: #fff; }
.ys-style-btn.active { border-color: var(--ys-gold); color: var(--ys-gold-light); background: var(--ys-gold-wash); }


/* ==================== 荧光粒子层（在地球之上、登录卡片之下） ==================== */
#ys-particles {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}


/* ==================== 国旗图片（替代失败的 emoji） ==================== */
.ys-flag-img {
  display: inline-block; vertical-align: -2px;
  margin: 0 2px; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.22), 0 1px 4px rgba(0,0,0,.5);
  background: rgba(255,255,255,.06);
}
.ys-name { margin-right: 2px; }

/* 国家标签：简称 · 国家名 · 国旗 · 洲 */
.ys-pcode {
  font-weight: 700; font-size: 11px; letter-spacing: .06em;
  color: #ffd79a; margin-right: 4px; opacity: .95;
}
.ys-sep { margin: 0 4px; opacity: .45; }

/* 标签引线层 + 挪远后的样式 */
.ys-leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ys-label.off::before { opacity: .28; }
