/* ============================================================
   悦洋设计 · 登录页（2026-10 重做）
   风格：暖调深咖 + 金色光束（左品牌舞台） ｜ 象牙白玻璃卡片（右登录区）
   说明：LOGO 按「PNG 透明通道」处理 —— 深色底 + drop-shadow，不加任何底板，
        避免出现白/黑方块。若换回带底色的图片，也不会显得突兀。
   ============================================================ */
:root {
  --yy-ink: #0f0c08;
  --yy-ink-2: #171208;
  --yy-gold: #f5b942;
  --yy-orange: #e8872a;
  --yy-amber: #ffcf7a;
  --yy-paper: #faf6ef;
  --yy-paper-2: #f2ebdf;
  --yy-ink-text: #2b2118;
  --yy-ink-muted: #8b7f6f;
  --yy-line-soft: #e7ddcd;
  --yy-font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --yy-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.yy-home {
  font-family: var(--yy-font);
  color: #f4efe6;
  background:
    radial-gradient(1200px 800px at 12% 18%, rgba(232, 135, 42, 0.16), transparent 62%),
    radial-gradient(900px 700px at 78% 82%, rgba(245, 185, 66, 0.12), transparent 60%),
    linear-gradient(160deg, var(--yy-ink-2) 0%, var(--yy-ink) 58%, #080604 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* 金橙微光粒子（由 home.js 绘制，这里只控制层次与浓度） */
#yySpark {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; opacity: 0.5;
}
.yy-glow {
  position: fixed; inset: -10%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 30% at 22% 26%, rgba(245, 185, 66, 0.16), transparent 70%),
    radial-gradient(34% 28% at 72% 74%, rgba(232, 135, 42, 0.14), transparent 72%);
  filter: blur(6px);
}

/* ---------- 骨架：左舞台 / 右表单 ---------- */
.yy-shell {
  /* ⚠ 不要设 z-index：祖先一旦成为层叠上下文，logo 的 mix-blend-mode 就只在该上下文内混合，
     黑底方块会重新出现。这里的层级靠 DOM 顺序保证（canvas/glow 在同层更靠前）。 */
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
}

/* ---------- 左侧品牌舞台 ---------- */
.yy-stage {
  position: relative;
  display: flex; flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 5vw, 76px);
  overflow: hidden;
}
.yy-beam {
  position: absolute; pointer-events: none; border-radius: 999px;
  filter: blur(42px); opacity: 0.55; mix-blend-mode: screen;
}
.yy-beam-a {
  width: 62%; height: 150%;
  left: -14%; top: -28%;
  background: linear-gradient(120deg, rgba(245, 185, 66, 0.5), rgba(232, 135, 42, 0.06) 62%, transparent);
  transform: rotate(16deg);
  animation: yyBeam 16s ease-in-out infinite alternate;
}
.yy-beam-b {
  width: 46%; height: 130%;
  right: -12%; bottom: -34%;
  background: linear-gradient(300deg, rgba(255, 207, 122, 0.42), rgba(232, 135, 42, 0.05) 66%, transparent);
  transform: rotate(-12deg);
  animation: yyBeam2 20s ease-in-out infinite alternate;
}
@keyframes yyBeam { from { transform: rotate(16deg) translateY(-2%); } to { transform: rotate(13deg) translateY(3%); } }
@keyframes yyBeam2 { from { transform: rotate(-12deg) translateY(2%); } to { transform: rotate(-9deg) translateY(-3%); } }

.yy-stage-inner {
  position: relative;
  max-width: 560px;
  /* 水平居中（原来贴左，看起来"太靠左"）；垂直方向由 .yy-stage 的 justify-content:center 负责 */
  margin-inline: auto;
  text-align: center;
}

/* LOGO：按「PNG 透明通道」处理 —— 不加白底，只用 drop-shadow 提亮；
   另加一层与透明同色的暗色渐隐底板（vignette）：
   · 透明 PNG → 看起来是柔和的光晕底座
   · 万一是带黑底的图（如当前这份 JPEG）→ 方块边缘会被渐隐吃掉，不露白/露黑边
   版式为竖长（706×1024），所以按高度约束、宽度自适应。 */
.yy-logo-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  /* ⚠ 这里（以及它的任何祖先）都不能有 filter / opacity 动画 / mix-blend-mode：
     一旦形成"隔离组"，下面 img 的 mix-blend-mode: screen 会失效，黑底方块就会露出来。
     经离屏渲染实测：screen 单独用 → 方块消失；加上 filter 或父级 opacity 动画 → 方块复现。 */
}
/* 光晕用兄弟层实现（不会隔离父级，因此不影响 img 的混合） */
.yy-logo-wrap::before {
  content: "";
  position: absolute;
  inset: -18% -12%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(245, 185, 66, 0.24), rgba(245, 185, 66, 0) 72%);
  filter: blur(18px);
  pointer-events: none;
}
.yy-logo-img {
  display: block;
  width: auto;
  height: auto;
  max-height: clamp(150px, 26vh, 270px);
  max-width: 100%;
  position: relative;
  /* 关键：screen 混合 —— 黑色底自动“消失”（黑是 screen 的单位元），亮色图形完整保留。
     · 透明 PNG：无副作用，边缘依旧干净
     · 万一替换成带黑底的图（如当前这份 JPEG）：也看不出方块
     注意：本元素不要加 filter —— 实测 filter 会重新引入隔离组，方块复现。 */
  mix-blend-mode: screen;
}
@keyframes yyLogoIn {
  from { opacity: 0; transform: translateY(18px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.yy-brand {
  margin: 0;
  font-family: var(--yy-serif);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  letter-spacing: 0.1em;
  background: linear-gradient(112deg, #fff7e6 6%, var(--yy-gold) 52%, var(--yy-orange) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: yyFadeUp 0.9s 0.12s both;
}
.yy-slogan {
  margin: 12px 0 26px;
  font-size: clamp(1rem, 2.1vw, 1.22rem);
  letter-spacing: 0.34em;
  color: #d9c7a4;
  animation: yyFadeUp 0.9s 0.22s both;
}
.yy-points {
  list-style: none; margin: 0 auto 34px; padding: 0;
  /* inline-grid + 父级 text-align:center → 整块居中，但每行文字仍左对齐（圆点不会跑偏） */
  display: inline-grid; gap: 12px;
  text-align: left;
  animation: yyFadeUp 0.9s 0.32s both;
}
.yy-points li {
  position: relative;
  padding-left: 22px;
  font-size: 0.95rem;
  color: #cbbda6;
  letter-spacing: 0.04em;
}
.yy-points li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 9px; height: 9px; border-radius: 999px;
  background: linear-gradient(135deg, var(--yy-gold), var(--yy-orange));
  box-shadow: 0 0 12px rgba(245, 185, 66, 0.6);
}
@keyframes yyFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.yy-start-btn {
  /* 卖点列表改成了 inline-grid，按钮必须独占一行（否则会并排到列表右侧） */
  display: block; margin-inline: auto;
  appearance: none; border: 0; cursor: pointer;
  min-width: 200px; padding: 15px 30px;
  border-radius: 999px;
  font-size: 1.02rem; font-weight: 700; letter-spacing: 0.08em;
  color: #23180a;
  background: linear-gradient(135deg, var(--yy-gold), var(--yy-orange));
  box-shadow: 0 12px 34px rgba(232, 135, 42, 0.34);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: yyFadeUp 0.9s 0.42s both;
}
.yy-start-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 16px 40px rgba(232, 135, 42, 0.46); }
.yy-start-btn:focus-visible { outline: 2px solid var(--yy-amber); outline-offset: 3px; }

.yy-footer-hint {
  /* 固定在左栏底部并水平居中（备案号必须随页面可见） */
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 18px;
  width: max-content; max-width: calc(100% - 48px);
  margin: 0 auto; text-align: center; line-height: 1.75;
  font-size: 12px; color: rgba(203, 189, 166, 0.6); letter-spacing: 0.06em;
}
.yy-icp {
  color: rgba(203, 189, 166, 0.78);
  text-decoration: none;
  border-bottom: 1px dotted rgba(203, 189, 166, 0.4);
  transition: color 0.18s ease, border-color 0.18s ease;
}
.yy-icp:hover { color: var(--yy-gold); border-bottom-color: var(--yy-gold); }
.yy-icp:focus-visible { outline: 2px solid var(--yy-amber); outline-offset: 2px; border-radius: 3px; }

/* ---------- 右侧：登录卡片（常显，不再是弹窗） ---------- */
.yy-modal-overlay {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(24px, 4vw, 56px);
  min-width: 0; overflow-x: hidden;
}
.yy-modal {
  /* 用 vw 兜底：无论父级怎么算，卡片都不会超出视口（左右各留 18px） */
  width: min(430px, 100%, calc(100vw - 36px));
  max-width: 100%;
  min-width: 0;
  background: linear-gradient(180deg, var(--yy-paper) 0%, var(--yy-paper-2) 100%);
  color: var(--yy-ink-text);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 22px;
  padding: 30px 28px 24px;
  position: relative;
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.42),
    0 2px 0 rgba(255, 255, 255, 0.5) inset,
    0 0 0 1px rgba(201, 146, 47, 0.12);
  animation: yyCardIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes yyCardIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
/* 点击「立即开始设计」时的可见反馈 */
.yy-modal-overlay.open .yy-modal { animation: yyPulse 0.9s ease; }
@keyframes yyPulse {
  0% { box-shadow: 0 30px 70px rgba(0,0,0,0.42), 0 0 0 0 rgba(232, 135, 42, 0.45); }
  60% { box-shadow: 0 30px 70px rgba(0,0,0,0.42), 0 0 0 12px rgba(232, 135, 42, 0); }
  100% { box-shadow: 0 30px 70px rgba(0,0,0,0.42), 0 0 0 0 rgba(232, 135, 42, 0); }
}

.yy-modal-head { margin-bottom: 16px; }
.yy-modal h2 { margin: 0; font-family: var(--yy-serif); font-size: 1.42rem; letter-spacing: 0.06em; }
.yy-modal-sub { margin: 6px 0 0; font-size: 12.5px; color: var(--yy-ink-muted); }

.yy-modal-close {
  position: absolute; top: 12px; right: 14px;
  border: 0; background: transparent; color: var(--yy-ink-muted);
  font-size: 22px; line-height: 1; cursor: pointer; display: none;
}

.yy-tabs {
  display: flex; gap: 6px; margin-bottom: 16px;
  background: #ece3d4; border-radius: 12px; padding: 4px;
}
.yy-tab {
  flex: 1; border: 0; background: transparent; cursor: pointer;
  color: var(--yy-ink-muted); border-radius: 9px;
  padding: 9px 0; font-size: 14px; font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease;
}
.yy-tab.active {
  color: #2a1c08;
  background: linear-gradient(135deg, var(--yy-gold), var(--yy-orange));
  box-shadow: 0 6px 16px rgba(232, 135, 42, 0.28);
}

.yy-field { margin-bottom: 13px; text-align: left; }
.yy-field label { display: block; font-size: 12.5px; color: var(--yy-ink-muted); margin-bottom: 6px; letter-spacing: 0.04em; }
.yy-field input[type="tel"],
.yy-field input[type="text"],
.yy-field input[type="number"] {
  width: 100%; border: 1px solid var(--yy-line-soft);
  background: #fffdfa; color: var(--yy-ink-text);
  border-radius: 11px; padding: 12px 13px; font-size: 14px;
  outline: none; transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.yy-field input::placeholder { color: #b6ab99; }
.yy-field input:focus { border-color: var(--yy-gold); box-shadow: 0 0 0 3px rgba(245, 185, 66, 0.22); }

.yy-row { display: flex; gap: 8px; }
/* min-width:0 必不可少：flex 子项默认 min-width:auto，会被 input/按钮的固有宽度撑开，
   窄屏时把整个卡片推出视口（表现为右侧被裁、按钮文字被切） */
.yy-row input { flex: 1; min-width: 0; }
.yy-send-code { flex: 0 0 auto; }

.yy-send-code, .yy-submit { border: 0; border-radius: 11px; cursor: pointer; font-weight: 700; }
.yy-send-code {
  white-space: nowrap; padding: 0 15px; font-size: 13px;
  background: #efe4d2; color: #8a5a12;
  transition: background 0.16s ease;
}
.yy-send-code:hover:not(:disabled) { background: #e7d7bd; }
.yy-send-code:disabled { opacity: 0.55; cursor: not-allowed; }

.yy-submit {
  width: 100%; margin-top: 10px; padding: 13px;
  font-size: 15px; letter-spacing: 0.12em;
  color: #23180a;
  background: linear-gradient(135deg, var(--yy-gold), var(--yy-orange));
  box-shadow: 0 12px 28px rgba(232, 135, 42, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.yy-submit:hover { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(232, 135, 42, 0.34); }

.yy-check {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 12px; color: var(--yy-ink-muted);
  margin: 12px 0 4px; text-align: left; line-height: 1.5;
}
.yy-check input { margin-top: 2px; accent-color: var(--yy-orange); }
.yy-check a { color: #b4771a; text-decoration: none; border-bottom: 1px solid rgba(180, 119, 26, 0.35); }

.yy-err { min-height: 18px; color: #d1452c; font-size: 13px; margin-bottom: 8px; text-align: left; }
.yy-hint { margin: 7px 0 0; font-size: 11.5px; color: #a79a86; }

.yy-captcha-line {
  margin-bottom: 8px; padding: 11px 13px;
  border-radius: 11px;
  background: #fffdfa; border: 1px dashed #dccdb2;
  color: #8a5a12; font-weight: 700; letter-spacing: 0.1em;
  font-size: 15px;
}
.yy-modal-foot { margin: 16px 0 0; text-align: center; font-size: 11.5px; color: #a79a86; letter-spacing: 0.04em; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .yy-shell { grid-template-columns: 1fr; }
  .yy-stage { justify-content: flex-start; padding: 40px 24px 8px; text-align: center; align-items: center; }
  .yy-stage-inner { max-width: 520px; }
  .yy-logo-wrap { margin-inline: auto; }
  .yy-logo-img { max-height: clamp(120px, 22vh, 180px); }
  .yy-brand { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .yy-slogan { letter-spacing: 0.22em; margin-bottom: 18px; }
  .yy-points { display: none; }
  .yy-start-btn { min-width: 170px; padding: 12px 24px; font-size: 0.95rem; }
  .yy-footer-hint { position: static; left: auto; transform: none; width: auto; margin: 18px auto 6px; text-align: center; }
  .yy-modal-overlay { padding: 18px 18px 40px; }
  .yy-modal { padding: 24px 20px 20px; }
}
@media (max-width: 400px) {
  .yy-modal h2 { font-size: 1.25rem; }
  .yy-send-code { padding: 0 11px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .yy-beam, .yy-logo-wrap, .yy-brand, .yy-slogan, .yy-points, .yy-start-btn, .yy-modal { animation: none !important; }
}
