/* ===========================================================
   漫境 AiReelToon · 认证 + 语言切换 样式（共享）
   =========================================================== */
body.auth-open { overflow: hidden; }

/* ---------------- 登录/注册弹层 ---------------- */
.auth-modal {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(6,6,10,.72); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; transition: opacity .26s; overflow-y: auto;
}
.auth-modal.on { opacity: 1; }

.auth-panel {
  width: 100%; max-width: 430px; position: relative;
  background: linear-gradient(170deg, #16161F 0%, #101017 100%);
  border: 1px solid #2a2a38; border-radius: 24px;
  padding: 30px 28px 26px; box-shadow: 0 26px 70px rgba(0,0,0,.7);
  animation: pop .3s cubic-bezier(.22,.8,.35,1) both;
  margin: auto;
}
.auth-hd { text-align: center; margin-bottom: 24px; position: relative; }
.auth-logo {
  width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  box-shadow: 0 8px 24px rgba(255,46,77,.4);
}
.auth-hd h2 { margin: 0 0 8px; font-size: 21px; font-weight: 800; letter-spacing: -.3px; }
.auth-hd p { margin: 0; font-size: 12.5px; color: var(--txt-2); line-height: 1.6; }
.auth-close {
  position: absolute; right: -6px; top: -6px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-3); color: var(--txt-2); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.auth-close:hover { background: #2c2c3a; color: #fff; }

.auth-form.hidden { display: none; }
.af-label { font-size: 12.5px; color: var(--txt-2); font-weight: 600; margin-bottom: 8px; }

/* 手机号行 */
.phone-row { display: flex; gap: 10px; }
.cc-btn {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px;
  padding: 0 12px; height: 50px; font-size: 14px; font-weight: 600;
  transition: .16s; min-width: 104px;
}
.cc-btn:hover { background: #242432; border-color: #3a3a4c; }
.cc-btn .fl { font-size: 19px; }
.cc-btn .dl { color: var(--txt-2); }
.cc-btn .ar { color: var(--txt-3); font-size: 10px; margin-left: auto; }

.phone-input, .code-input, .invite-input, .full-input {
  flex: 1; min-width: 0; height: 50px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px;
  padding: 0 16px; color: #fff; font-size: 15px; font-family: inherit;
  outline: 0; transition: .16s; width: 100%;
}
.phone-input:focus, .code-input:focus, .invite-input:focus, .full-input:focus {
  border-color: var(--brand); background: #1e1e29;
  box-shadow: 0 0 0 3px rgba(255,46,77,.12);
}
.phone-input::placeholder, .code-input::placeholder,
.invite-input::placeholder, .full-input::placeholder { color: #55556a; }

/* 验证码行 */
.code-row { display: flex; gap: 10px; }
.code-input { flex: 1; letter-spacing: 5px; font-weight: 700; }
.code-btn {
  flex: 0 0 auto; min-width: 118px; height: 50px; border-radius: 12px;
  background: var(--bg-3); border: 1px solid var(--line);
  color: var(--txt-2); font-size: 13.5px; font-weight: 700; transition: .16s;
}
.code-btn:hover:not(.counting) { background: #242432; color: #fff; }
.code-btn.ready { background: linear-gradient(135deg,var(--brand),var(--brand-2)); color: #fff; border-color: transparent; }
.code-btn.counting { color: var(--txt-3); cursor: default; }

.code-hint { font-size: 12px; min-height: 18px; margin-top: 8px; line-height: 1.5; }
.code-hint.err { color: #ff6b7d; }
.code-hint.ok { color: #4ade80; }

.invite-row { margin-top: 14px; }
.invite-input { height: 44px; font-size: 13.5px; }

/* 协议 */
.agree-row { display: flex; gap: 10px; margin: 18px 0 20px; cursor: pointer; align-items: flex-start; }
.cbx {
  flex: 0 0 18px; width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid #3c3c50; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff; transition: .16s; margin-top: 1px;
}
.cbx.on { background: var(--brand); border-color: var(--brand); }
.agree-txt { font-size: 12px; color: var(--txt-2); line-height: 1.65; }
.agree-txt .lk { color: var(--brand); text-decoration: none; }
.agree-txt .lk:hover { text-decoration: underline; }

.auth-submit {
  width: 100%; height: 50px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 15.5px; font-weight: 800; transition: .18s;
  box-shadow: 0 6px 20px rgba(255,46,77,.3);
}
.auth-submit:hover { filter: brightness(1.08); }
.auth-submit:active { transform: scale(.985); }
.auth-submit.ghost { background: var(--bg-3); border: 1px solid var(--line); box-shadow: none; color: var(--txt-2); font-weight: 600; }

.newuser-tip {
  text-align: center; font-size: 12px; color: var(--gold);
  margin-top: 14px; padding: 9px; border-radius: 10px;
  background: rgba(255,197,61,.09); border: 1px solid rgba(255,197,61,.22);
}

.other-way {
  text-align: center; font-size: 11.5px; color: var(--txt-3);
  margin: 22px 0 14px; position: relative;
}
.other-way::before, .other-way::after {
  content: ''; position: absolute; top: 50%; width: 28%; height: 1px; background: var(--line);
}
.other-way::before { left: 0; }
.other-way::after { right: 0; }

.social-row { display: flex; gap: 12px; justify-content: center; }
.soc {
  width: 50px; height: 50px; border-radius: 13px;
  background: var(--bg-3); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 800; color: var(--txt-2); transition: .16s;
}
.soc:hover { background: #242432; color: #fff; transform: translateY(-2px); }

/* 性别选择 */
.gender-row { display: flex; gap: 10px; }
.g-btn {
  flex: 1; height: 44px; border-radius: 11px;
  background: var(--bg-3); border: 1px solid var(--line);
  color: var(--txt-2); font-size: 13.5px; font-weight: 600; transition: .16s;
}
.g-btn.on { background: rgba(255,46,77,.14); border-color: var(--brand); color: var(--brand); }

/* ---------------- 国家选择弹层 ---------------- */
.cc-sheet {
  position: absolute; left: 50%; top: 50%; z-index: 310;
  transform: translate(-50%, -46%) scale(.96);
  width: 100%; max-width: 430px; max-height: 74vh;
  background: #15151d; border: 1px solid #2a2a38; border-radius: 20px;
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; pointer-events: none; transition: .24s cubic-bezier(.22,.8,.35,1);
  box-shadow: 0 26px 70px rgba(0,0,0,.7);
}
.cc-sheet.on { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.cc-search-wrap { padding: 0 16px 12px; }
.cc-search {
  width: 100%; height: 42px; background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 11px; padding: 0 14px; color: #fff; font-size: 13.5px;
  outline: 0; font-family: inherit;
}
.cc-search:focus { border-color: var(--brand); }
.cc-list { flex: 1; overflow-y: auto; padding: 0 8px 12px; }
.cc-group { font-size: 11px; color: var(--txt-3); font-weight: 700; padding: 10px 10px 6px; letter-spacing: .5px; }
.cc-item {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 12px; border-radius: 10px; cursor: pointer; transition: .14s;
}
.cc-item:hover { background: var(--bg-3); }
.cc-item.on { background: rgba(255,46,77,.1); }
.cc-item .fl { font-size: 21px; }
.cc-item .nm { flex: 1; font-size: 14px; }
.cc-item .dl { font-size: 13px; color: var(--txt-3); }
.cc-item .ck { color: var(--brand); font-size: 13px; font-weight: 800; }
.cc-none { text-align: center; color: var(--txt-3); font-size: 13px; padding: 36px 0; }

/* ---------------- 语言切换器 ---------------- */
/* 内联下拉（后台） */
.lang-select { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 13px; font-size: 13px; font-weight: 600; transition: .16s;
}
.lang-btn:hover { background: #242432; border-color: #3a3a4c; }
.lang-btn i { color: var(--txt-3); font-size: 9px; font-style: normal; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 80;
  min-width: 190px; background: #191922; border: 1px solid #2e2e3e;
  border-radius: 13px; padding: 6px; box-shadow: 0 16px 44px rgba(0,0,0,.6);
  opacity: 0; pointer-events: none; transform: translateY(-6px); transition: .18s;
  max-height: 340px; overflow-y: auto;
}
.lang-menu.open { opacity: 1; pointer-events: auto; transform: none; }
.lang-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 9px; font-size: 13px; cursor: pointer; transition: .14s;
}
.lang-item:hover { background: var(--bg-3); }
.lang-item.on { color: var(--brand); }
.lang-item .fl { font-size: 16px; }
.lang-item .nm { flex: 1; }
.lang-item .ck { font-size: 12px; font-weight: 800; }

/* 底部弹层（APP） */
.lang-sheet {
  position: fixed; left: 50%; transform: translate(-50%, 100%); bottom: 0;
  width: 100%; max-width: 520px; max-height: 76vh; z-index: 300;
  background: #15151d; border-radius: 22px 22px 0 0;
  border-top: 1px solid var(--line); display: flex; flex-direction: column;
  transition: transform .3s cubic-bezier(.22,.8,.35,1);
}
.lang-sheet.on { transform: translate(-50%, 0); }
.ls-head {
  display: flex; align-items: center; padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.ls-head h3 { margin: 0; font-size: 16px; flex: 1; }
.ls-head button { font-size: 17px; color: var(--txt-3); }
.ls-body { flex: 1; overflow-y: auto; padding: 10px 12px calc(20px + env(safe-area-inset-bottom, 0px)); }
.ls-item {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 14px; border-radius: 12px; cursor: pointer; transition: .14s;
}
.ls-item:hover, .ls-item:active { background: var(--bg-3); }
.ls-item.on { background: rgba(255,46,77,.1); }
.ls-item .fl { font-size: 23px; }
.ls-item .nm { font-size: 14.5px; font-weight: 600; }
.ls-item .en { flex: 1; font-size: 11.5px; color: var(--txt-3); }
.ls-item .ck { color: var(--brand); font-weight: 800; }

/* 顶栏语言按钮 */
.lang-pill {
  display: flex; align-items: center; gap: 5px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 11px; font-size: 12.5px; font-weight: 600; transition: .16s;
}
.lang-pill:hover { background: #242432; }

/* 未登录入口按钮 */
.login-entry {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 20px; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 13.5px; font-weight: 800;
  box-shadow: 0 5px 16px rgba(255,46,77,.32); transition: .18s;
}
.login-entry:hover { filter: brightness(1.08); }
.login-entry.outline {
  background: transparent; border: 1px solid var(--line); color: #fff; box-shadow: none;
}

@media (max-width: 560px) {
  .auth-panel { padding: 24px 20px 22px; border-radius: 20px; }
  .auth-hd h2 { font-size: 19px; }
  .code-btn { min-width: 104px; font-size: 12.5px; }
  .cc-btn { min-width: 92px; }
}
