/* AI 游戏工坊 */
.studio-nav { position: sticky; top: 0; z-index: 100; background: rgba(10,10,12,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.studio-nav-inner { display: flex; align-items: center; gap: 26px; height: 66px; }
.studio-links { display: flex; gap: 8px; }
.studio-links a { color: var(--txt-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 14px; border-radius: 8px; }
.studio-links a:hover { color: var(--txt); background: rgba(255,255,255,0.05); }
.studio-nav .nav-actions { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.balance-btn { font-family: var(--font-mono); font-size: 13px; color: var(--accent); border: 1px solid var(--accent-line); padding: 8px 14px; border-radius: 999px; text-decoration: none; background: var(--accent-soft); }

.studio { padding: 46px var(--gutter) 90px; max-width: var(--max); }
.studio-intro { text-align: center; margin-bottom: 40px; }
.studio-title { font-size: clamp(34px, 4.5vw, 56px); font-weight: 900; letter-spacing: -0.02em; }
.studio-title span { color: var(--accent); }
.studio-sub { color: var(--muted); max-width: 640px; margin: 16px auto 0; line-height: 1.7; }
.studio-gate { text-align: center; padding: 60px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); max-width: 620px; margin: 0 auto; }
.studio-gate-title { font-size: 28px; font-weight: 900; }
.studio-gate-title span { color: var(--accent); }
.studio-gate-sub { color: var(--muted); margin: 14px 0 22px; line-height: 1.7; }
.studio-gate-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.studio-grid { display: grid; grid-template-columns: 1fr 1.1fr 0.9fr; gap: 26px; align-items: start; }
.studio-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card-h { font-size: 18px; font-weight: 800; margin-bottom: 18px; }
.studio-card .field { margin-bottom: 16px; }
.studio-card textarea { background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--txt); font-size: 15px; font-family: var(--font); outline: none; resize: vertical; width: 100%; }
.studio-card textarea:focus, .studio-card input:focus, .studio-card input[type="text"] { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.studio-card input[type="text"] { width: 100%; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; color: var(--txt); font-size: 15px; font-family: var(--font); outline: none; }
.studio-card select { width: 100%; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; color: var(--txt); font-size: 15px; font-family: var(--font); outline: none; color-scheme: dark; }
.studio-card select option { background: #101014; color: var(--txt); }
.project-tools { margin: -6px 0 16px; }
.proj-del { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; background: rgba(240,90,90,0.12); color: #ff8a8a; border: 1px solid rgba(240,90,90,0.4); font-size: 13px; cursor: pointer; transition: background .2s; }
.proj-del:hover { background: rgba(240,90,90,0.22); }
.proj-history { margin: -4px 0 16px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(255,255,255,0.02); }
.proj-history b { font-size: 13px; color: var(--accent); display: block; margin-bottom: 6px; }
.proj-history div { font-size: 12px; color: var(--txt-2); padding: 4px 0; border-bottom: 1px solid var(--line-soft); line-height: 1.5; }
.proj-history div:last-child { border-bottom: none; }
.proj-clear { background: rgba(240,90,90,0.12); color: #ff8a8a; border: 1px solid rgba(240,90,90,0.4); border-radius: 8px; font-size: 12px; padding: 5px 10px; cursor: pointer; }
.proj-clear:hover { background: rgba(240,90,90,0.22); }
.proj-undo { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; background: rgba(75,193,240,0.12); color: #7cc4ff; border: 1px solid rgba(75,193,240,0.4); font-size: 13px; cursor: pointer; }
.proj-undo:hover { background: rgba(75,193,240,0.22); }
.proj-back { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; color: var(--txt-2); }
.proj-back button { margin-left: 8px; }
.proj-back .proj-undo.sm { padding: 4px 10px; font-size: 12px; }
.shot-list { display: flex; flex-wrap: wrap; gap: 8px; }
.shot { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-3); display: inline-block; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot button { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(10,10,12,0.7); color: #fff; border: none; cursor: pointer; font-size: 12px; line-height: 1; }
.shot button:hover { background: var(--warm); }
.studio-meta { display: flex; justify-content: space-between; gap: 10px; margin: 6px 0 16px; color: var(--muted); font-size: 13px; font-family: var(--font-mono); }
.recharge-link { display: block; text-align: center; margin-top: 14px; color: var(--accent); font-size: 14px; }

.preview-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.studio-frame { aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #000; margin-bottom: 16px; }
.studio-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.studio-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-3); cursor: pointer; }
.studio-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.studio-thumb .thumb-play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 46px; color: #fff; background: rgba(0,0,0,0.35); text-shadow: 0 6px 24px rgba(0,0,0,0.6); }
.studio-thumb .thumb-label { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font-size: 12px; color: #fff; background: rgba(0,0,0,0.5); padding: 4px; }
.studio-thumb:hover .thumb-play { background: rgba(0,0,0,0.2); }
.test-panel { width: min(88vw, 1200px); padding: 0; overflow: hidden; }
.test-panel .modal-close, .think-panel .modal-close { z-index: 30; background: rgba(10,10,12,0.7); border-color: rgba(255,255,255,0.25); color: #fff; }
.test-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.test-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.think-panel { width: min(560px, 92vw); }
.think-content { max-height: 60vh; overflow: auto; white-space: pre-wrap; font-size: 14px; line-height: 1.7; color: var(--txt-2); background: rgba(255,255,255,0.03); border: 1px solid var(--line-soft); border-radius: 10px; padding: 16px; }
.studio-model { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed rgba(155,225,93,0.35); border-radius: 12px; margin-bottom: 8px; font-size: 13px; cursor: grab; transition: border-color .2s, background .2s, box-shadow .2s; background: rgba(155,225,93,0.03); }
.studio-model:hover { border-color: rgba(155,225,93,0.75); background: rgba(155,225,93,0.09); box-shadow: 0 0 12px rgba(155,225,93,0.12); }
.studio-model:active { cursor: grabbing; }
.studio-model .model-name { display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--txt); flex: 1; min-width: 0; }
.studio-model .model-grip { color: var(--accent); font-size: 15px; flex-shrink: 0; }
.studio-model .model-actions { display: flex; gap: 6px; flex-shrink: 0; }
.studio-model .model-actions .btn-mini { padding: 5px 10px; font-size: 12px; }
.studio-model .model-actions .btn-primary.btn-mini { background: var(--accent); color: #0a0a0c; border-color: var(--accent); }
.studio-model .model-actions .btn-primary.btn-mini:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(155,225,93,0.3); }
.model-filter { margin: 4px 0 8px; }
.model-upload { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.model-upload-row { display: flex; align-items: center; gap: 12px; }
.model-upload-row .upload-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; background: rgba(200,240,75,0.12); border: 1px solid rgba(200,240,75,0.45); color: var(--accent); font-size: 13px; cursor: pointer; transition: background .2s, box-shadow .2s; }
.model-upload-row .upload-btn:hover { background: rgba(200,240,75,0.22); box-shadow: 0 0 14px rgba(200,240,75,0.15); }
.model-upload-hint { color: var(--muted); font-size: 12px; }
.model-drop { border: 1px dashed rgba(200,240,75,0.35); border-radius: 12px; padding: 18px 12px; text-align: center; color: var(--txt-2); font-size: 13px; transition: border-color .2s, background .2s; }
.model-drop:hover { border-color: rgba(200,240,75,0.6); }
.model-drop.is-over { border-color: var(--accent); background: rgba(200,240,75,0.08); }
.model-search { width: 100%; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--txt); font-size: 13px; }
.model-search:focus { border-color: var(--accent); outline: none; }
.model-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.model-cat { padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); color: var(--txt-2); font-size: 12px; cursor: pointer; transition: background .15s,color .15s,border-color .15s; }
.model-cat:hover { background: rgba(255,255,255,0.09); }
.model-cat.is-active { background: var(--accent); color: #0a0a0c; border-color: var(--accent); }
.model-cat-tag { margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,0.06); color: var(--muted); font-size: 11px; }
.model-pick-box { border: 1px dashed rgba(155,225,93,0.4); border-radius: 12px; padding: 12px; margin-bottom: 14px; background: rgba(155,225,93,0.04); }
.model-pick-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.model-pick-head b { font-size: 13px; color: var(--txt); }
.model-pick-list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; }
.model-pick-item { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: rgba(155,225,93,0.12); border: 1px solid rgba(155,225,93,0.4); color: var(--accent); border-radius: 999px; font-size: 12px; }
.model-pick-item span { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-pick-item .proj-clear.sm { padding: 0 4px; font-size: 12px; color: #ff8a8a; }
.model-pick-empty { color: var(--muted); font-size: 12px; padding: 10px 4px; }
.model-pick-box .proj-clear.sm { padding: 4px 8px; font-size: 12px; }
.model-pick-standalone { margin: 6px 0 18px; padding: 14px 14px 16px; border: 1px solid rgba(200,240,75,0.55); background: linear-gradient(180deg, rgba(200,240,75,0.10), rgba(200,240,75,0.03)); border-radius: 14px; box-shadow: 0 0 20px rgba(200,240,75,0.10); }
.model-pick-standalone .model-pick-head { margin-bottom: 12px; }
.model-pick-standalone .model-pick-head .field-label { font-size: 14px; font-weight: 700; }
.model-pick-standalone .model-pick-item { background: rgba(200,240,75,0.16); border-color: rgba(200,240,75,0.5); color: var(--accent); }
.model-pick-standalone .model-pick-list { min-height: 52px; padding: 8px; border: 1px dashed rgba(200,240,75,0.35); border-radius: 10px; }
.model-pick-standalone .model-pick-empty { color: var(--txt-2); }
.gen-progress { margin: 10px 0 4px; padding: 10px 12px; border: 1px solid rgba(200,240,75,0.35); border-radius: 10px; background: rgba(200,240,75,0.05); }
.gen-progress-bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.gen-progress-bar span { display: block; height: 100%; width: 2%; background: linear-gradient(90deg, #9be15d, #d4ff3d); transition: width .9s linear; }
.gen-progress-text { margin: 8px 0 0; color: var(--txt-2); font-size: 12px; }
.model-select { width: 100%; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; color: var(--txt); font-size: 14px; }
.model-select:focus { border-color: var(--accent); outline: none; }

@media (max-width: 860px) { .studio-grid { grid-template-columns: 1fr; } .studio-links { display: none; } }
