/* AI 生视频：登录页 + 视频工作台，仅作用于 body.ai-video-page */
body.ai-video-page { background: #0b0f24; }

/* ---------- 登录页 ---------- */
.vlogin-stage { position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: radial-gradient(900px 520px at 78% -8%, rgba(91,91,246,.42), transparent 62%), radial-gradient(600px 420px at 6% 108%, rgba(37,134,255,.2), transparent 60%), #0b0f24; color: #fff; }
.vlogin-stage::after { content: ""; position: absolute; inset: 0; opacity: .3; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 58px 58px; mask-image: linear-gradient(to bottom, #000, transparent 78%); pointer-events: none; }
.vlogin-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 24px 32px; }
.vlogin-top .brand { color: #fff; }
.vlogin-top .brand-accent { color: #a5acff; }
.vlogin-top .brand-mark { background: linear-gradient(135deg, #6d6dfb, #a05cf5); }
.vlogin-back { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: #aab4d4; font-weight: 600; }
.vlogin-back .ico { width: 15px; height: 15px; transform: rotate(180deg); }
.vlogin-back:hover { color: #fff; }
.vlogin-stage-inner { position: relative; z-index: 1; flex: 1; display: grid; place-items: center; padding: 40px 20px 60px; }

.vlogin-card { width: 100%; max-width: 430px; background: rgba(255,255,255,.97); color: var(--ink); border: 1px solid rgba(255,255,255,.2); border-radius: 22px; box-shadow: 0 32px 80px rgba(0,0,0,.42); padding: 40px 38px 34px; }
.vlogin-card-head { text-align: center; margin-bottom: 28px; }
.vlogin-logo { width: 54px; height: 54px; border-radius: 15px; margin: 0 auto 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #6d6dfb, #a05cf5); box-shadow: 0 10px 24px rgba(109,109,251,.4); }
.vlogin-logo .ico { width: 27px; height: 27px; }
.vlogin-card-head h1 { font-size: 24px; letter-spacing: -.6px; margin: 0 0 8px; }
.vlogin-card-head p { color: var(--muted); font-size: 13px; margin: 0; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; }
.field input { width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; font-size: 14px; font-family: inherit; outline: none; transition: border-color .18s, box-shadow .18s; }
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,91,246,.12); }
.vlogin-card .btn { width: 100%; margin-top: 10px; }
.vlogin-error { color: #dc2626; font-size: 13px; min-height: 20px; margin: 2px 0 6px; }
.vdemo-hint { margin-top: 20px; padding: 13px 15px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-deep); font-size: 13px; line-height: 1.7; }
.vdemo-hint b { letter-spacing: .02em; }
.vlogin-foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; padding: 22px 20px 26px; font-size: 12px; color: #8791b5; }
.vlogin-foot a { color: #8791b5; }
.vlogin-foot a:hover { color: #aab4d4; }

/* ---------- 工作台 ---------- */
.vstudio { display: none; min-height: 100vh; background: #f5f7fc; }
.vstudio.on { display: block; }
body.ai-video-page.studio-mode #guestView { display: none; }
.vstudio-bar { height: 68px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; position: sticky; top: 0; z-index: 20; }
.vstudio-bar .brand-name { font-size: 16px; }
.vstudio-bar-right { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.vcredit { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-deep); font-weight: 700; }
.vcredit .ico { width: 14px; height: 14px; }
.vlogout { background: none; border: 1px solid var(--line); border-radius: 9px; padding: 7px 12px; font-size: 12px; color: var(--ink-2); cursor: pointer; font-family: inherit; }
.vlogout:hover { border-color: var(--brand); color: var(--brand); }
.vstudio-body { max-width: 1180px; margin: 0 auto; padding: 32px 28px 70px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; align-items: start; }
.vpanel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--shadow-sm); }
.vpanel h2 { font-size: 19px; margin: 0 0 6px; }
.vpanel > p.sub { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.vpanel label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin: 18px 0 8px; }
.vpanel textarea { width: 100%; min-height: 118px; resize: vertical; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; font-size: 14px; font-family: inherit; line-height: 1.7; outline: none; }
.vpanel textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,91,246,.12); }
.vopts { display: flex; gap: 8px; flex-wrap: wrap; }
.vopt { flex: 1; min-width: 88px; text-align: center; padding: 10px 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; cursor: pointer; color: var(--ink-2); font-family: inherit; }
.vopt.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-deep); font-weight: 700; }
.vpanel .btn { width: 100%; margin-top: 24px; }
.vcost-line { margin-top: 13px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.vcost-line b { color: var(--brand-deep); }
.voutput { min-height: 560px; display: flex; flex-direction: column; }
.voutput-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.voutput-head h2 { margin: 0; }
.vstate { font-size: 12px; color: var(--muted); }
.vscreen { flex: 1; min-height: 380px; border-radius: 14px; background: linear-gradient(150deg, #11182f, #1d2050); display: grid; place-items: center; text-align: center; color: #8c97be; padding: 28px; position: relative; overflow: hidden; }
.vscreen::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 260px at 50% 40%, rgba(91,91,246,.22), transparent 70%); pointer-events: none; }
.vscreen > * { position: relative; }
.vscreen-placeholder .ico { width: 38px; height: 38px; color: #6a74a8; margin-bottom: 12px; }
.vscreen-placeholder b { display: block; color: #d3daf2; font-size: 15px; margin-bottom: 6px; }
.vscreen-placeholder span { font-size: 12px; }
.vprogress { width: min(320px, 100%); }
.vprogress .ring { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%; border: 4px solid rgba(255,255,255,.12); border-top-color: #8b8bff; animation: vspin 1s linear infinite; }
@keyframes vspin { to { transform: rotate(360deg); } }
.vprogress b { display: block; color: #fff; font-size: 16px; margin-bottom: 8px; }
.vprogress .bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 14px; }
.vprogress .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6d6dfb, #b47cff); transition: width .35s ease; }
.vresult { width: 100%; text-align: left; }
.vresult-frame { aspect-ratio: 16 / 10; border-radius: 12px; background: linear-gradient(145deg, #25306b, #6b3ea8 52%, #d06a97); position: relative; overflow: hidden; display: grid; place-items: center; }
.vresult-frame::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 26% 26%, rgba(255,255,255,.34), transparent 44%), radial-gradient(circle at 78% 80%, rgba(255,196,124,.34), transparent 45%); }
.vresult-frame span { position: relative; z-index: 1; font-size: 13px; font-weight: 700; letter-spacing: .16em; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.vresult-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 12px; color: var(--muted); gap: 10px; }
.vresult-actions { display: flex; gap: 8px; margin-top: 16px; }
.vresult-actions .btn { margin: 0; flex: 1; padding: 10px 12px; font-size: 13px; }
.vempty-credit { margin-top: 18px; padding: 16px; border-radius: 12px; border: 1px dashed #c7cbf5; background: #f7f8ff; font-size: 13px; color: var(--ink-2); line-height: 1.7; display: none; }
.vempty-credit.on { display: block; }
.vempty-credit .btn { margin-top: 12px; padding: 9px 16px; font-size: 13px; }
.vtoast { position: fixed; right: 24px; bottom: 24px; z-index: 90; background: #111827; color: #fff; padding: 13px 18px; border-radius: 11px; font-size: 13px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(8px); transition: .24s ease; pointer-events: none; }
.vtoast.on { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .vstudio-body { grid-template-columns: 1fr; gap: 34px; }
  .voutput { min-height: 0; }
}
@media (max-width: 600px) {
  .vlogin-top { padding: 18px 18px; }
  .vlogin-card { padding: 30px 22px 26px; }
  .vlogin-foot { flex-direction: column; gap: 6px; }
  .vstudio-bar { padding: 0 18px; }
  .vstudio-body { padding: 22px 18px 50px; }
  .vpanel { padding: 20px; }
}
