:root {
  --bg: #080a10;
  --bg-soft: #0d1019;
  --panel: #121624;
  --panel-2: #171c2e;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #eef1f8;
  --muted: #8b93a8;
  --muted-2: #646d84;
  --brand: #7d8cff;
  --brand-2: #2ad4c4;
  --brand-3: #b16cff;
  --danger: #ff6b81;
  --warning: #ffbe5a;
  --success: #3ddc97;
  --radius: 16px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(125, 140, 255, .18), transparent 60%),
    radial-gradient(760px 520px at 100% 0%, rgba(42, 212, 196, .10), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: #a7b1ff; }
img { max-width: 100%; }
button { font-family: inherit; }

.container { width: min(1220px, calc(100% - 44px)); margin: 0 auto; }
.app-container { width: min(1320px, calc(100% - 44px)); }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(18px);
  background: rgba(8, 10, 16, .72);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; gap: 26px; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center;
  color: #08101a; font-weight: 900; font-size: 15px; letter-spacing: -.5px;
  box-shadow: 0 8px 26px rgba(125, 140, 255, .28);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 15px; letter-spacing: .2px; }
.brand-text small { font-size: 9px; letter-spacing: 1.8px; color: var(--muted); margin-top: 4px; }
.nav-main { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.nav-main a {
  color: #b7bdd0; font-size: 14px; padding: 8px 12px; border-radius: 9px;
}
.nav-main a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.nav-main a.active { color: #fff; background: rgba(125, 140, 255, .14); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-link-btn { color: #c2c7d8; font-size: 14px; padding: 8px 10px; }
.credit-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border: 1px solid rgba(125, 140, 255, .28);
  border-radius: 999px; background: rgba(125, 140, 255, .08); color: #cdd3ff; font-size: 12px;
}
.credit-chip b { color: #fff; font-size: 14px; }
.user-menu { position: relative; }
.user-trigger {
  display: flex; align-items: center; gap: 9px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03); color: var(--text); padding: 5px 11px 5px 5px;
  border-radius: 999px; cursor: pointer;
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-3), var(--brand)); color: #fff; font-weight: 700; font-size: 13px;
}
.user-name { font-size: 13px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 170px;
  padding: 7px; border: 1px solid var(--line-strong); border-radius: 13px;
  background: #121624; box-shadow: var(--shadow); display: none;
}
.user-menu.open .user-dropdown { display: block; }
.user-dropdown a, .user-dropdown button {
  display: block; width: 100%; text-align: left; padding: 9px 11px; border: 0; background: none;
  color: #cdd2e2; font-size: 13px; border-radius: 8px; cursor: pointer;
}
.user-dropdown a:hover, .user-dropdown button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 22px; margin-left: auto; }
.sub-nav { border-top: 1px solid var(--line); background: rgba(255, 255, 255, .015); }
.sub-nav-inner { display: flex; gap: 4px; height: 48px; align-items: center; overflow-x: auto; }
.sub-nav a { color: var(--muted); font-size: 13px; padding: 6px 12px; border-radius: 8px; white-space: nowrap; }
.sub-nav a.active, .sub-nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.announce-bar { background: linear-gradient(90deg, rgba(125, 140, 255, .16), rgba(42, 212, 196, .10)); border-bottom: 1px solid var(--line); font-size: 13px; color: #d8dcff; }
.announce-bar .container { padding: 9px 0; display: flex; gap: 9px; align-items: center; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 12px var(--brand-2); }

/* ---------------- Layout ---------------- */
.main { padding: 34px 0 88px; min-height: calc(100vh - 230px); }
.site-footer { border-top: 1px solid var(--line); background: rgba(0, 0, 0, .22); padding: 30px 0; color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-inner b { color: #dfe3f0; }
.footer-inner p { margin: 5px 0 0; max-width: 520px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: #fff; }

/* ---------------- Buttons / badges ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 11px; padding: 10px 18px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: .16s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), #6677f5); color: #fff; box-shadow: 0 12px 30px rgba(125, 140, 255, .25); }
.btn-primary:hover { color: #fff; filter: brightness(1.08); }
.btn-ghost { background: rgba(255, 255, 255, .03); border-color: var(--line-strong); color: #dfe3f0; }
.btn-ghost:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.btn-danger { background: rgba(255, 107, 129, .12); border-color: rgba(255, 107, 129, .28); color: #ffb3bd; }
.btn-success { background: rgba(61, 220, 151, .12); border-color: rgba(61, 220, 151, .3); color: #8cf0c3; }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn:disabled, .btn.disabled { opacity: .45; pointer-events: none; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0; }
.link-btn:hover { color: #fff; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .2px;
}
.badge-success { background: rgba(61, 220, 151, .12); color: var(--success); }
.badge-danger { background: rgba(255, 107, 129, .12); color: #ff9aa8; }
.badge-info { background: rgba(125, 140, 255, .14); color: #b9c2ff; }
.badge-warning { background: rgba(255, 190, 90, .12); color: var(--warning); }
.badge-muted { background: rgba(255, 255, 255, .06); color: #a4abc0; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, .05); color: #aab1c6; font-size: 11px; }

/* ---------------- Flash ---------------- */
.flash-stack { display: grid; gap: 8px; margin-bottom: 18px; }
.flash {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 11px 14px; border-radius: 11px; font-size: 13px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
}
.flash button { background: none; border: 0; color: currentColor; opacity: .6; font-size: 18px; line-height: 1; cursor: pointer; }
.flash-success { border-color: rgba(61, 220, 151, .28); background: rgba(61, 220, 151, .08); color: #a7f3d0; }
.flash-error { border-color: rgba(255, 107, 129, .3); background: rgba(255, 107, 129, .08); color: #ffbcc5; }
.flash-warning { border-color: rgba(255, 190, 90, .3); background: rgba(255, 190, 90, .08); color: #ffe0a6; }
.flash-info { border-color: rgba(125, 140, 255, .3); background: rgba(125, 140, 255, .08); color: #d3d9ff; }

/* ---------------- Hero ---------------- */
.hero { position: relative; padding: 54px 0 44px; display: grid; grid-template-columns: 1.08fr .92fr; gap: 42px; align-items: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: #c6ccff; border: 1px solid rgba(125, 140, 255, .3); background: rgba(125, 140, 255, .1); padding: 6px 11px; border-radius: 999px; }
.hero h1 { font-size: clamp(38px, 5.6vw, 68px); line-height: 1.06; letter-spacing: -2.4px; margin: 18px 0 18px; font-weight: 800; }
.hero h1 span { background: linear-gradient(110deg, #9ba7ff, #2ad4c4 55%, #b16cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: #a7aec2; font-size: 17px; max-width: 590px; line-height: 1.8; }
.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 30px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 24px; color: #fff; }
.hero-stats span { font-size: 12px; color: var(--muted); }
.hero-art {
  position: relative; min-height: 420px; border-radius: 24px; overflow: hidden;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(420px 260px at 70% 20%, rgba(177, 108, 255, .3), transparent 60%),
    radial-gradient(420px 280px at 20% 80%, rgba(42, 212, 196, .2), transparent 60%),
    linear-gradient(160deg, #141a2c, #090c14);
  box-shadow: var(--shadow);
}
.hero-art::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 42px 42px; mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 85%);
}
.hero-frame {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 62%; aspect-ratio: 9 / 16; border-radius: 20px;
  background: linear-gradient(160deg, rgba(125,140,255,.35), rgba(42,212,196,.12));
  border: 1px solid rgba(255,255,255,.2); box-shadow: 0 30px 90px rgba(0,0,0,.55);
  overflow: hidden;
}
.hero-frame::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 42%, rgba(0,0,0,.55)); }
.hero-frame::after { content: "AI SHORT DRAMA"; position: absolute; left: 18px; bottom: 16px; font-size: 10px; letter-spacing: 2.4px; color: rgba(255,255,255,.8); }
.hero-play {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  width: 62px; height: 62px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.12); backdrop-filter: blur(8px); display: grid; place-items: center;
  color: #fff; font-size: 20px; padding-left: 4px;
}
.floating-card {
  position: absolute; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: rgba(12, 15, 24, .82); backdrop-filter: blur(10px); font-size: 11px; color: #cbd1e3;
  box-shadow: 0 16px 50px rgba(0,0,0,.35);
}
.floating-card b { display: block; font-size: 14px; color: #fff; margin-bottom: 2px; }
.floating-card.one { left: 22px; top: 52px; }
.floating-card.two { right: 20px; bottom: 52px; }

/* ---------------- Sections / cards ---------------- */
.section { padding: 54px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { font-size: 28px; letter-spacing: -.8px; margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.panel {
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.panel-head h3 { margin: 0; font-size: 16px; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.model-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.model-card {
  position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 20px;
  background: linear-gradient(160deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  transition: .18s ease; overflow: hidden;
}
.model-card:hover { transform: translateY(-3px); border-color: rgba(125,140,255,.35); box-shadow: 0 18px 50px rgba(0,0,0,.3); }
.model-card::after { content: ""; position: absolute; width: 220px; height: 220px; right: -120px; top: -120px; background: radial-gradient(circle, rgba(125,140,255,.22), transparent 70%); }
.model-card h3 { margin: 0 0 5px; font-size: 17px; }
.model-card .desc { color: var(--muted); font-size: 13px; min-height: 44px; margin: 8px 0 14px; }
.model-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.model-price { color: #cbd2ff; font-size: 12px; }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step-card { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: rgba(255,255,255,.025); }
.step-no { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(125,140,255,.14); color: #bcc4ff; font-size: 12px; font-weight: 700; margin-bottom: 12px; }
.step-card h4 { margin: 0 0 5px; font-size: 14px; }
.step-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.cta-band {
  border-radius: 20px; padding: 38px; border: 1px solid rgba(125,140,255,.25);
  background: linear-gradient(120deg, rgba(125,140,255,.16), rgba(42,212,196,.08));
  display: flex; justify-content: space-between; align-items: center; gap: 22px; flex-wrap: wrap;
}
.cta-band h2 { margin: 0 0 6px; font-size: 26px; }
.cta-band p { margin: 0; color: #b9c0d4; }

/* ---------------- Forms ---------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12px; color: #c1c7d9; font-weight: 600; }
.field .hint { font-size: 11px; color: var(--muted-2); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], input[type="datetime-local"], select, textarea {
  width: 100%; background: #0a0d15; border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); padding: 10px 12px; font-size: 13px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: rgba(125,140,255,.6); box-shadow: 0 0 0 3px rgba(125,140,255,.12); }
input::placeholder, textarea::placeholder { color: #525b70; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; color: #b8bfd2; }
.check input { margin-top: 4px; width: auto; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.form-error { color: #ffb3bd; font-size: 12px; }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; color: #d8dce9; }
.table th { text-align: left; font-size: 11px; letter-spacing: .5px; color: var(--muted); font-weight: 600; padding: 11px 13px; background: rgba(255,255,255,.03); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 13px; border-bottom: 1px solid rgba(255,255,255,.045); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(255,255,255,.02); }
.table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table .mono { font-family: Consolas, "SFMono-Regular", monospace; font-size: 11px; color: #aeb5ca; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 14px; }
.empty b { display: block; color: #dfe3f0; margin-bottom: 6px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.stack { display: grid; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { border: 1px solid var(--line); border-radius: 14px; padding: 17px 18px; background: rgba(255,255,255,.025); }
.stat-card span { display: block; font-size: 11px; color: var(--muted); }
.stat-card b { display: block; font-size: 25px; margin-top: 5px; letter-spacing: -.6px; }
.stat-card small { color: var(--muted); font-size: 11px; }

/* ---------------- Auth ---------------- */
.page-auth { background: var(--bg); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-brand { position: relative; padding: 42px 56px; display: flex; flex-direction: column; overflow: hidden; border-right: 1px solid var(--line); background: radial-gradient(700px 500px at 30% 20%, rgba(125,140,255,.2), transparent 60%), radial-gradient(600px 480px at 80% 80%, rgba(42,212,196,.12), transparent 60%); }
.auth-brand .brand { margin-bottom: auto; }
.auth-brand-copy { margin: auto 0; max-width: 520px; position: relative; z-index: 2; }
.auth-brand-copy h1 { font-size: clamp(36px, 4.4vw, 58px); line-height: 1.12; letter-spacing: -2px; margin: 0 0 18px; }
.auth-brand-copy p { color: #aab1c6; font-size: 15px; }
.auth-brand-copy ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; color: #c4cadb; font-size: 13px; }
.auth-brand-copy li::before { content: "◆"; color: var(--brand-2); font-size: 9px; margin-right: 9px; }
.auth-glow { position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(125,140,255,.28), transparent 65%); filter: blur(20px); left: -100px; bottom: -120px; }
.auth-panel { display: grid; place-items: center; padding: 34px; }
.auth-card { width: min(430px, 100%); padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: rgba(18,22,36,.72); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.auth-back { display: inline-block; font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.auth-card h1 { font-size: 25px; margin: 0 0 5px; letter-spacing: -.6px; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.auth-card .form-grid { grid-template-columns: 1fr; }
.auth-card .btn { width: 100%; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--muted); }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row img { height: 40px; border-radius: 8px; cursor: pointer; border: 1px solid var(--line); }

/* ---------------- Studio ---------------- */
.studio-grid { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 20px; align-items: start; }
.studio-side { position: sticky; top: 136px; display: grid; gap: 14px; }
.studio-main { display: grid; gap: 16px; }
.model-picker { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.model-tab { flex: 0 0 auto; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: #bcc2d4; font-size: 12px; cursor: pointer; white-space: nowrap; }
.model-tab.active { border-color: rgba(125,140,255,.55); background: rgba(125,140,255,.14); color: #fff; }
.model-summary { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.model-summary h2 { margin: 0; font-size: 19px; }
.model-summary p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.param-schema { display: grid; gap: 14px; }
.param-group { display: grid; gap: 7px; }
.param-group > label { font-size: 12px; color: #c1c7d9; font-weight: 600; }
.param-group .help { font-size: 11px; color: var(--muted-2); }
.media-field { position: relative; border: 1px dashed var(--line-strong); border-radius: 12px; padding: 16px; text-align: center; background: rgba(255,255,255,.02); cursor: pointer; overflow: hidden; }
.media-field input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.media-field .media-placeholder { color: var(--muted); font-size: 12px; }
.media-field .media-placeholder b { display: block; color: #dfe3f0; font-size: 13px; margin-bottom: 4px; }
.media-preview { max-height: 220px; width: 100%; object-fit: contain; border-radius: 8px; display: block; }
.media-clear { position: absolute; top: 8px; right: 8px; z-index: 2; background: rgba(0,0,0,.65); color: #fff; border: 0; border-radius: 7px; padding: 3px 7px; cursor: pointer; font-size: 11px; }
.estimate-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid rgba(125,140,255,.24); background: rgba(125,140,255,.07); border-radius: 12px; padding: 12px 14px; }
.estimate-box b { font-size: 20px; color: #dfe3ff; }
.estimate-box span { font-size: 11px; color: var(--muted); }
.submit-bar { display: flex; gap: 10px; align-items: center; }
.submit-bar .btn { flex: 1; }
.result-stage { min-height: 420px; border: 1px solid var(--line); border-radius: 18px; background: radial-gradient(600px 300px at 50% 0%, rgba(125,140,255,.12), transparent 65%), #0b0e16; display: grid; place-items: center; padding: 18px; overflow: hidden; }
.result-stage video, .result-stage img { max-width: 100%; max-height: 620px; border-radius: 12px; }
.result-placeholder { text-align: center; color: var(--muted); }
.result-placeholder b { display: block; color: #dfe3f0; font-size: 16px; margin-bottom: 6px; }
.result-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.task-mini { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.task-mini:last-child { border-bottom: 0; }
.task-mini .thumb { width: 54px; height: 54px; border-radius: 9px; background: rgba(255,255,255,.05); object-fit: cover; display: grid; place-items: center; color: var(--muted); font-size: 11px; overflow: hidden; }
.task-mini .meta { min-width: 0; }
.task-mini .meta b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-mini .meta span { font-size: 11px; color: var(--muted); }

/* ---------------- Tables/task list ---------------- */
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.filter-bar input, .filter-bar select { width: auto; min-width: 130px; padding: 8px 10px; font-size: 12px; }
.task-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 110px 90px 150px; gap: 12px; align-items: center; }
.task-thumb { width: 40px; height: 40px; border-radius: 8px; background: rgba(255,255,255,.05); object-fit: cover; display: grid; place-items: center; color: var(--muted); font-size: 10px; overflow: hidden; }
.task-title { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-sub { font-size: 11px; color: var(--muted); }
.progress { height: 5px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: inherit; }

/* ---------------- Projects / storyboard ---------------- */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.project-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.025); transition: .16s ease; }
.project-card:hover { transform: translateY(-2px); border-color: rgba(125,140,255,.32); }
.project-cover { aspect-ratio: 16/9; background: linear-gradient(140deg, rgba(125,140,255,.22), rgba(42,212,196,.08)); display: grid; place-items: center; color: #dfe3f0; font-size: 13px; overflow: hidden; }
.project-cover img { width: 100%; height: 100%; object-fit: cover; }
.project-body { padding: 15px; }
.project-body h3 { margin: 0 0 4px; font-size: 15px; }
.project-body p { margin: 0; color: var(--muted); font-size: 12px; }
.project-stats { display: flex; gap: 12px; margin-top: 12px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 14px; color: var(--muted); font-size: 13px; border: 0; background: none; border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; }
.tabs a.active, .tabs button.active { color: #fff; border-bottom-color: var(--brand); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.shot-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.shot-table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 11px; padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.shot-table td { padding: 9px 8px; border-bottom: 1px solid rgba(255,255,255,.045); vertical-align: top; }
.shot-table textarea, .shot-table input { min-height: auto; padding: 7px 8px; font-size: 12px; }
.shot-no { font-family: Consolas, monospace; color: #b9c1de; }
.shot-media { width: 64px; height: 64px; border-radius: 8px; background: rgba(255,255,255,.04); object-fit: cover; display: grid; place-items: center; color: var(--muted); font-size: 10px; overflow: hidden; }
.storyboard-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.batch-card { border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; background: rgba(255,255,255,.025); }
.batch-card b { font-size: 13px; }
.batch-card .bar { margin-top: 9px; }

/* ---------------- Assets / gallery ---------------- */
.asset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.asset-card { border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: rgba(255,255,255,.025); }
.asset-preview { aspect-ratio: 4/3; background: #0b0e16; display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 11px; }
.asset-preview img, .asset-preview video { width: 100%; height: 100%; object-fit: cover; }
.asset-body { padding: 11px 12px; }
.asset-body b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-body span { font-size: 11px; color: var(--muted); }
.asset-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

/* ---------------- Billing / pricing ---------------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.price-card { border: 1px solid var(--line); border-radius: 18px; padding: 22px; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01)); }
.price-card.highlight { border-color: rgba(125,140,255,.4); box-shadow: 0 20px 60px rgba(125,140,255,.12); }
.price-card h3 { margin: 0 0 4px; font-size: 16px; }
.price-card .amount { font-size: 34px; font-weight: 800; letter-spacing: -1px; margin: 12px 0 2px; }
.price-card .amount small { font-size: 13px; color: var(--muted); font-weight: 400; }
.price-card .credits { color: #cbd2ff; font-size: 13px; margin-bottom: 16px; }
.billing-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; align-items: start; }
.list { display: grid; }
.list-item { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.list-item:last-child { border-bottom: 0; }
.list-item .amount.pos { color: var(--success); }
.list-item .amount.neg { color: #ff9aa8; }
.pager { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.pager ul { list-style: none; display: flex; gap: 5px; padding: 0; margin: 0; flex-wrap: wrap; }
.page-item .page-link { display: block; padding: 6px 10px; border-radius: 7px; border: 1px solid var(--line); color: #bcc2d4; font-size: 12px; }
.page-item.active .page-link { background: rgba(125,140,255,.18); border-color: rgba(125,140,255,.4); color: #fff; }
.page-item.disabled .page-link { opacity: .4; }
.pager-info { color: var(--muted); font-size: 12px; }

/* ---------------- Error / share ---------------- */
.error-page { min-height: 54vh; display: grid; place-items: center; text-align: center; }
.error-page h1 { font-size: 72px; margin: 0; background: linear-gradient(120deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page p { color: var(--muted); }
.share-page { max-width: 860px; margin: 0 auto; }
.share-player { background: #05070c; border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.share-player video, .share-player img { width: 100%; max-height: 72vh; object-fit: contain; border-radius: 10px; display: block; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { min-height: 380px; }
  .model-grid, .project-grid, .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .asset-grid { grid-template-columns: repeat(3, 1fr); }
  .studio-grid { grid-template-columns: 340px minmax(0, 1fr); }
  .task-row { grid-template-columns: 40px minmax(0, 1fr) 100px 80px; }
  .task-row .task-date { display: none; }
}
@media (max-width: 820px) {
  .nav-main { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 10px 0 14px; }
  .nav-main.open { display: flex; }
  .nav-wrap { flex-wrap: wrap; height: auto; padding: 12px 0; }
  .nav-toggle { display: block; }
  .nav-actions { width: 100%; justify-content: flex-end; margin: 8px 0 0; }
  .hero { padding-top: 26px; }
  .hero h1 { letter-spacing: -1.4px; }
  .hero-art { min-height: 340px; }
  .studio-grid { grid-template-columns: 1fr; }
  .studio-side { position: static; }
  .billing-grid, .grid-2, .grid-3, .grid-4, .model-grid, .project-grid, .pricing-grid { grid-template-columns: 1fr; }
  .asset-grid { grid-template-columns: repeat(2, 1fr); }
  .task-row { grid-template-columns: 40px minmax(0, 1fr) 90px; }
  .task-row .task-model { display: none; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { padding: 18px; }
  .auth-card { padding: 22px; }
  .footer-inner { flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .container, .app-container { width: calc(100% - 28px); }
  .hero h1 { font-size: 36px; }
  .hero-stats { gap: 18px; }
  .asset-grid { grid-template-columns: 1fr 1fr; }
  .credit-chip span { display: none; }
  .user-name { display: none; }
}
