:root {
  --bg: #070b17;
  --panel: rgba(18, 25, 48, .78);
  --panel-solid: #11182d;
  --panel-soft: #161f39;
  --line: rgba(148, 163, 184, .16);
  --text: #edf3ff;
  --muted: #8f9bb5;
  --primary: #7c5cff;
  --primary-2: #20c8ff;
  --success: #35d49a;
  --warning: #ffb84d;
  --danger: #ff647c;
  --shadow: 0 24px 70px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 8% 3%, rgba(124, 92, 255, .18), transparent 30rem),
    radial-gradient(circle at 92% 8%, rgba(32, 200, 255, .13), transparent 28rem),
    #070b17;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 20;
  width: 230px; padding: 26px 18px;
  background: rgba(7, 11, 23, .88); border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 28px; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px;
  font-weight: 900; background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 10px 28px rgba(81, 100, 255, .38);
}
.brand strong { display: block; font-size: 17px; letter-spacing: .04em; }
.brand small { display: block; color: var(--muted); margin-top: 3px; }
.nav-group { margin-bottom: 22px; }
.nav-title { padding: 0 12px 8px; color: #61708f; font-size: 11px; letter-spacing: .12em; }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px; margin: 4px 0;
  border-radius: 11px; color: #aeb9cf; transition: .18s ease;
}
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(124, 92, 255, .14); transform: translateX(2px); }
.nav-icon { width: 21px; text-align: center; opacity: .9; }
.sidebar-foot { position: absolute; left: 18px; right: 18px; bottom: 22px; }
.user-mini { padding: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 13px; }
.user-mini strong { display:block; }
.user-mini small { color: var(--muted); }
.logout { display:block; color:#ff9aac; font-size:13px; margin-top:9px; }

.main { width: 100%; min-width: 0; padding: 28px 32px 60px; margin-left: 230px; }
.topbar { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:26px; }
.topbar h1 { font-size:28px; margin:0 0 7px; letter-spacing:-.03em; }
.topbar p { margin:0; color:var(--muted); }
.top-actions { display:flex; align-items:center; gap:10px; }

.btn {
  border: 1px solid var(--line); background: rgba(255,255,255,.055); color: var(--text);
  padding: 9px 15px; border-radius: 10px; cursor: pointer; transition: .18s ease; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(124,92,255,.48); background: rgba(124,92,255,.12); }
.btn-primary { border:0; background:linear-gradient(135deg,var(--primary),#5b8cff); box-shadow:0 10px 25px rgba(103,87,255,.25); }
.btn-primary:hover { background:linear-gradient(135deg,#8c71ff,#65a0ff); }
.btn-danger { color:#ff9bad; border-color:rgba(255,100,124,.3); }
.btn-success { color:#75edbd; border-color:rgba(53,212,154,.32); }
.btn-sm { padding:6px 10px; border-radius:8px; font-size:13px; }
.btn:disabled { opacity:.48; cursor:not-allowed; transform:none; }

.grid { display:grid; gap:18px; }
.grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4,minmax(0,1fr)); }
.stat-card, .panel, .project-card, .asset-card {
  background: var(--panel); border:1px solid var(--line); border-radius:17px; box-shadow:var(--shadow); backdrop-filter:blur(14px);
}
.stat-card { padding:19px; position:relative; overflow:hidden; }
.stat-card:after { content:""; position:absolute; width:80px; height:80px; border-radius:50%; right:-25px; top:-25px; background:var(--accent,#7c5cff); opacity:.11; filter:blur(2px); }
.stat-label { color:var(--muted); font-size:13px; }
.stat-value { margin-top:10px; font-size:28px; font-weight:800; }
.stat-note { margin-top:6px; color:#64728e; font-size:12px; }
.section-head { display:flex; justify-content:space-between; align-items:center; margin:30px 0 14px; }
.section-head h2 { margin:0; font-size:18px; }
.section-head span { color:var(--muted); font-size:13px; }
.panel { padding:20px; }

.project-card { min-height:250px; overflow:hidden; position:relative; transition:.2s ease; }
.project-card:hover { transform:translateY(-4px); border-color:rgba(124,92,255,.35); }
.project-cover { height:135px; background:linear-gradient(135deg,#1f2b51,#23204b); position:relative; overflow:hidden; }
.project-cover img { width:100%; height:100%; object-fit:cover; opacity:.86; }
.project-cover:after { content:""; position:absolute; inset:0; background:linear-gradient(transparent,rgba(8,12,25,.55)); }
.cover-placeholder { position:absolute; inset:0; display:grid; place-items:center; font-size:42px; color:rgba(255,255,255,.24); }
.project-body { padding:17px; }
.project-title { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.project-title h3 { margin:0; font-size:17px; }
.project-meta { display:flex; gap:17px; margin-top:13px; color:var(--muted); font-size:13px; }
.project-actions { display:flex; gap:8px; margin-top:16px; }

.badge { display:inline-flex; align-items:center; gap:5px; padding:4px 8px; border-radius:999px; font-size:12px; border:1px solid var(--line); color:var(--muted); }
.badge.success { color:#6ce6b2; background:rgba(53,212,154,.09); border-color:rgba(53,212,154,.2); }
.badge.warning { color:#ffc36a; background:rgba(255,184,77,.09); border-color:rgba(255,184,77,.2); }
.badge.danger { color:#ff879a; background:rgba(255,100,124,.09); border-color:rgba(255,100,124,.2); }
.badge.info { color:#70dfff; background:rgba(32,200,255,.09); border-color:rgba(32,200,255,.2); }

.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
.form-group { min-width:0; }
.form-group.full { grid-column:1/-1; }
.form-label { display:block; margin:0 0 8px; color:#b7c1d7; font-size:13px; }
.input, .select, .textarea {
  width:100%; color:var(--text); background:#0c1328; border:1px solid var(--line); border-radius:11px;
  outline:none; padding:11px 13px; transition:.18s ease;
}
.input:focus, .select:focus, .textarea:focus { border-color:rgba(124,92,255,.75); box-shadow:0 0 0 3px rgba(124,92,255,.12); }
.select option { background:#11182d; }
.textarea { min-height:160px; line-height:1.75; resize:vertical; }
.help { color:#6f7d99; font-size:12px; margin-top:7px; }

.table-wrap { overflow:auto; border:1px solid var(--line); border-radius:14px; }
.table { width:100%; border-collapse:collapse; min-width:760px; }
.table th { text-align:left; color:#7f8ca6; font-size:12px; font-weight:600; padding:12px 14px; background:rgba(255,255,255,.025); }
.table td { padding:13px 14px; border-top:1px solid var(--line); vertical-align:middle; font-size:14px; }
.table tr:hover td { background:rgba(124,92,255,.035); }
.table-actions { display:flex; flex-wrap:wrap; gap:7px; }
.empty { text-align:center; padding:50px 20px; color:var(--muted); }

.filter-bar { display:flex; gap:10px; align-items:end; flex-wrap:wrap; margin-bottom:18px; }
.filter-bar .form-group { min-width:155px; }
.asset-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:15px; }
.asset-card { overflow:hidden; transition:.18s ease; }
.asset-card:hover { transform:translateY(-3px); border-color:rgba(124,92,255,.36); }
.asset-preview { height:145px; background:#0b1122; display:grid; place-items:center; overflow:hidden; position:relative; }
.asset-preview img, .asset-preview video { width:100%; height:100%; object-fit:cover; }
.asset-preview audio { width:88%; }
.asset-type { position:absolute; top:9px; left:9px; background:rgba(7,11,23,.76); border:1px solid rgba(255,255,255,.12); border-radius:8px; padding:4px 7px; font-size:11px; }
.asset-body { padding:13px; }
.asset-name { font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.asset-sub { color:var(--muted); font-size:12px; margin:7px 0 11px; }
.asset-actions { display:flex; gap:7px; flex-wrap:wrap; }

.workspace { display:grid; grid-template-columns:300px minmax(420px,1fr) 280px; gap:16px; align-items:start; }
.workspace-panel { background:var(--panel); border:1px solid var(--line); border-radius:17px; overflow:hidden; min-height:640px; }
.workspace-title { padding:15px 17px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; }
.workspace-title strong { font-size:14px; }
.asset-picker { max-height:580px; overflow:auto; padding:12px; }
.picker-tabs { display:flex; gap:6px; padding:10px 12px 0; }
.picker-tab { padding:6px 9px; color:var(--muted); border:0; border-radius:8px; background:transparent; cursor:pointer; font-size:12px; }
.picker-tab.active { color:#fff; background:rgba(124,92,255,.16); }
.picker-item { display:flex; gap:10px; align-items:center; padding:9px; border:1px solid transparent; border-radius:11px; cursor:pointer; transition:.15s; }
.picker-item:hover { background:rgba(255,255,255,.04); }
.picker-item.selected { border-color:rgba(124,92,255,.48); background:rgba(124,92,255,.1); }
.picker-thumb { width:45px; height:45px; border-radius:9px; object-fit:cover; background:#18213a; display:grid; place-items:center; color:#6f7d99; flex:none; }
.picker-info { min-width:0; flex:1; }
.picker-info strong { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:13px; }
.picker-info small { color:var(--muted); }
.editor-area { padding:17px; }
.selected-strip { display:flex; flex-wrap:wrap; gap:7px; min-height:38px; margin-bottom:13px; }
.material-chip { border:1px solid rgba(124,92,255,.25); background:rgba(124,92,255,.1); padding:6px 9px; border-radius:9px; font-size:12px; cursor:pointer; }
.material-chip:hover { border-color:var(--primary); }
.prompt-editor { min-height:390px; font-size:15px; line-height:1.8; }
.prompt-wrap { position:relative; }
.mention-menu { position:absolute; z-index:30; left:10px; right:10px; top:58px; max-height:240px; overflow:auto; padding:7px; background:#111a31; border:1px solid rgba(124,92,255,.4); border-radius:12px; box-shadow:0 18px 50px rgba(0,0,0,.45); }
.mention-menu[hidden] { display:none; }
.mention-option { width:100%; display:flex; align-items:center; gap:10px; padding:9px 10px; border:0; border-radius:8px; background:transparent; text-align:left; cursor:pointer; }
.mention-option strong { color:#b7a9ff; min-width:58px; }
.mention-option span { color:#aab6cd; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mention-option:hover,.mention-option.active { background:rgba(124,92,255,.18); }
.submit-zone { padding:16px; border-top:1px solid var(--line); }
.submit-zone .btn { width:100%; padding:13px; }
.param-body { padding:16px; }
.param-body .form-group { margin-bottom:15px; }

.task-card { padding:17px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:14px; border-bottom:1px solid var(--line); }
.task-card:last-child { border-bottom:0; }
.task-title { display:flex; gap:10px; align-items:center; margin-bottom:8px; }
.task-title strong { font-size:14px; }
.task-prompt { color:#9da9c0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:720px; }
.task-meta { display:flex; flex-wrap:wrap; gap:14px; color:#667591; font-size:12px; margin-top:9px; }
.detail-grid { display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:18px; }
.detail-grid > * { min-width:0; }
.video-result { min-height:280px; background:#050810; border-radius:14px; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.video-result video { display:block; width:auto; height:auto; max-width:100%; max-height:min(72vh,760px); object-fit:contain; }
.code-block { white-space:pre-wrap; word-break:break-all; background:#090f21; border:1px solid var(--line); border-radius:11px; padding:13px; color:#aab6cd; font:12px/1.65 Consolas,monospace; max-height:280px; overflow:auto; }
.info-list { display:grid; grid-template-columns:100px 1fr; gap:11px; font-size:13px; }
.info-list dt { color:var(--muted); }
.info-list dd { margin:0; word-break:break-all; }

.alert { margin-bottom:18px; padding:12px 15px; border-radius:11px; border:1px solid var(--line); }
.alert.success { color:#82efc3; background:rgba(53,212,154,.09); border-color:rgba(53,212,154,.22); }
.alert.error { color:#ff9cad; background:rgba(255,100,124,.09); border-color:rgba(255,100,124,.22); }
.alert.warning { color:#ffd08a; background:rgba(255,184,77,.09); border-color:rgba(255,184,77,.22); }
.toast { position:fixed; right:24px; top:22px; z-index:100; padding:13px 16px; border-radius:11px; background:#18213b; border:1px solid var(--line); box-shadow:var(--shadow); animation:toast-in .2s ease; }
.toast.error { color:#ff9cad; border-color:rgba(255,100,124,.3); }
.toast.success { color:#82efc3; border-color:rgba(53,212,154,.3); }
@keyframes toast-in { from { transform:translateY(-8px); opacity:0; } }

.login-page { min-height:100vh; display:grid; place-items:center; padding:28px; overflow:hidden; position:relative; }
.login-orb { position:absolute; border-radius:50%; filter:blur(3px); opacity:.35; animation:float 8s ease-in-out infinite; }
.login-orb.one { width:360px; height:360px; background:#5a35ff; left:-120px; top:-100px; }
.login-orb.two { width:310px; height:310px; background:#0abbe8; right:-90px; bottom:-100px; animation-delay:-3s; }
@keyframes float { 50% { transform:translateY(25px) scale(1.05); } }
.login-card { width:min(940px,100%); display:grid; grid-template-columns:1.05fr .95fr; border:1px solid var(--line); background:rgba(10,15,31,.82); border-radius:25px; overflow:hidden; box-shadow:0 35px 100px rgba(0,0,0,.48); backdrop-filter:blur(22px); position:relative; z-index:2; }
.login-art { padding:56px; min-height:570px; background:linear-gradient(145deg,rgba(124,92,255,.24),rgba(32,200,255,.06)); display:flex; flex-direction:column; justify-content:space-between; }
.login-art h1 { font-size:43px; line-height:1.12; margin:25px 0 15px; letter-spacing:-.045em; }
.login-art p { color:#a2afc6; line-height:1.75; }
.login-visual { height:180px; position:relative; }
.film-frame { position:absolute; width:230px; height:130px; border-radius:16px; background:linear-gradient(135deg,#29396a,#37266c); border:1px solid rgba(255,255,255,.13); box-shadow:0 18px 45px rgba(0,0,0,.32); }
.film-frame:first-child { left:14px; top:10px; transform:rotate(-8deg); }
.film-frame:last-child { right:10px; bottom:0; transform:rotate(7deg); background:linear-gradient(135deg,#15425d,#222f61); }
.film-frame:after { content:"▶"; position:absolute; inset:0; display:grid; place-items:center; font-size:34px; color:rgba(255,255,255,.72); }
.login-form { padding:62px 54px; display:flex; flex-direction:column; justify-content:center; }
.login-form h2 { font-size:27px; margin:0 0 7px; }
.login-form > p { color:var(--muted); margin:0 0 30px; }
.login-form .form-group { margin-bottom:17px; }
.login-form .btn { margin-top:7px; width:100%; padding:13px; }

@media (max-width:1100px) {
  .grid-4 { grid-template-columns:repeat(2,1fr); }
  .workspace { grid-template-columns:250px minmax(360px,1fr); }
  .workspace > :last-child { grid-column:1/-1; min-height:auto; }
  .param-body { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
  .param-body .form-group { margin:0; }
}
@media (max-width:820px) {
  .sidebar { position:static; width:100%; height:auto; }
  .app-shell { display:block; }
  .main { margin:0; padding:20px 16px 45px; }
  .sidebar-foot { position:static; margin-top:20px; }
  .grid-2,.grid-3,.grid-4,.detail-grid,.workspace { grid-template-columns:1fr; }
  .form-grid { grid-template-columns:1fr; }
  .workspace > :last-child { grid-column:auto; }
  .login-card { grid-template-columns:1fr; }
  .login-art { display:none; }
  .login-form { padding:45px 28px; }
  .topbar { flex-direction:column; }
  .video-result { min-height:180px; }
  .video-result video { max-height:65vh; }
}
