:root {
  --bg: #0d1117; --panel: #161b22; --panel2: #1c2330; --border: #2d3646;
  --text: #e6edf3; --muted: #8b98a9; --accent: #f5b940; --accent2: #3fb68b;
  --danger: #e5534b; --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: 'Be Vietnam Pro', system-ui, sans-serif; font-size: 15px; line-height: 1.6; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 20px 18px 110px; }
header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 6px; }
.logo { display: flex; align-items: center; gap: 12px; }
.hub-back { text-decoration: none; color: var(--muted); font-size: 22px; font-weight: 800; padding: 4px 8px; border: 1px solid var(--border); border-radius: 8px; transition: .15s; }
.hub-back:hover { color: var(--accent); border-color: var(--accent); }
.logo-badge { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #f5b940, #e5843f); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #161b22; font-size: 18px; }
h1 { font-size: 20px; font-weight: 800; letter-spacing: .3px; }
h1 span { color: var(--accent); }
.sub { font-size: 12.5px; color: var(--muted); }
.sync-state { font-size: 11.5px; color: var(--muted); margin-bottom: 16px; min-height: 16px; }
.btn { border: 1px solid var(--border); background: var(--panel2); color: var(--text); border-radius: 10px; padding: 9px 16px; font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: .15s; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: linear-gradient(135deg, #f5b940, #e5843f); color: #161b22; border: none; font-weight: 800; font-size: 15px; padding: 13px 28px; }
.btn.primary:hover { filter: brightness(1.08); color: #161b22; }
.btn.primary:disabled, .btn.green:disabled { opacity: .5; cursor: not-allowed; }
.btn.green { background: linear-gradient(135deg, #3fb68b, #2d9e8f); color: #0d1117; border: none; font-weight: 800; font-size: 15px; padding: 13px 28px; }
.btn.green:hover { filter: brightness(1.08); color: #0d1117; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.mic.rec { background: var(--danger); border-color: var(--danger); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(229, 83, 75, .5); } 50% { box-shadow: 0 0 0 8px rgba(229, 83, 75, 0); } }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.card h2 { font-size: 14px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card h2.green { color: var(--accent2); }
textarea, input[type=password], input[type=text], select { width: 100%; background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-family: inherit; font-size: 14px; padding: 11px 13px; outline: none; transition: .15s; }
textarea:focus, input:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 150px; }
#ideaInput { min-height: 190px; font-size: 15px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.lbl { font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; font-weight: 600; }
.drop { border: 2px dashed var(--border); border-radius: 10px; padding: 14px; text-align: center; color: var(--muted); font-size: 13px; margin-top: 10px; cursor: pointer; transition: .15s; }
.drop.over { border-color: var(--accent2); color: var(--accent2); background: rgba(63, 182, 139, .06); }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.check { display: flex; align-items: center; gap: 9px; background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-size: 13.5px; font-weight: 600; transition: .15s; user-select: none; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.check.on { border-color: var(--accent); color: var(--accent); }
.settings label { font-size: 12.5px; font-weight: 700; color: var(--muted); display: block; margin: 12px 0 5px; }
.gen-area { margin: 22px 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.status { font-size: 13px; color: var(--muted); min-height: 20px; text-align: center; }
.status.err { color: var(--danger); font-weight: 600; }
.outputs { display: grid; gap: 16px; margin-top: 8px; }
.out-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.out-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; background: var(--panel2); border-bottom: 1px solid var(--border); }
.out-head .title { font-weight: 800; font-size: 14px; }
.out-head .title small { color: var(--muted); font-weight: 500; margin-left: 8px; }
.out-head .title small .over { color: var(--danger); font-weight: 700; }
.out-body { padding: 16px; white-space: pre-wrap; font-size: 14.5px; max-height: 520px; overflow-y: auto; }
.copy-btn { font-size: 12px; padding: 6px 14px; }
.copy-btn.done { border-color: var(--accent2); color: var(--accent2); }
.hist-item { padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; cursor: pointer; font-size: 13px; transition: .15s; background: var(--panel2); }
.hist-item:hover { border-color: var(--accent); }
.hist-item .d { color: var(--muted); font-size: 11.5px; margin-bottom: 3px; }
.hist-item .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { display: inline-block; font-size: 10.5px; padding: 2px 8px; border-radius: 20px; background: rgba(245, 185, 64, .12); color: var(--accent); margin-right: 5px; font-weight: 700; }
.empty { color: var(--muted); font-size: 13px; text-align: center; padding: 20px 0; }
footer { margin-top: 36px; text-align: center; color: var(--muted); font-size: 12px; }
.tabs { display: flex; gap: 8px; margin: 6px 0 18px; flex-wrap: wrap; }
.tab { border: 1px solid var(--border); background: var(--panel); color: var(--muted); border-radius: 10px; padding: 9px 20px; font-weight: 700; font-size: 13.5px; cursor: pointer; transition: .15s; }
.tab.active { background: linear-gradient(135deg, #f5b940, #e5843f); color: #161b22; border-color: transparent; }
.tabpage { display: none; }
.tabpage.show { display: block; }
.profile-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.profile-bar select { width: auto; min-width: 200px; font-weight: 700; }
.mascot-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.mthumb { position: relative; width: 86px; height: 86px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.mthumb img { width: 100%; height: 100%; object-fit: cover; }
.mthumb .rm { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: rgba(13, 17, 23, .85); color: var(--danger); border: none; cursor: pointer; font-size: 12px; font-weight: 800; line-height: 1; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 14px; }
.gimg { background: var(--panel2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.gimg img { width: 100%; display: block; background: #000; }
.gimg .bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; font-size: 11.5px; color: var(--muted); }
.gimg .bar a { color: var(--accent2); font-weight: 700; text-decoration: none; font-size: 12px; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--accent2); border-radius: 50%; animation: sp .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes sp { to { transform: rotate(360deg); } }
.sample-item { display: flex; justify-content: space-between; gap: 10px; align-items: center; background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; margin-bottom: 7px; font-size: 12.5px; }
.sample-item .txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.batch-item { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.batch-item .bh { display: flex; justify-content: space-between; align-items: center; background: var(--panel2); padding: 10px 14px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.batch-item .bb { display: none; padding: 14px; white-space: pre-wrap; font-size: 14px; border-top: 1px solid var(--border); }
.batch-item.open .bb { display: block; }
.progress { height: 8px; background: var(--panel2); border-radius: 8px; overflow: hidden; margin: 10px 0; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #3fb68b, #f5b940); width: 0%; transition: .3s; }
#gate { position: fixed; inset: 0; background: var(--bg); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.gate-box { width: 100%; max-width: 430px; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 34px 30px; text-align: center; }
.gate-box .logo-badge { margin: 0 auto 14px; width: 60px; height: 60px; font-size: 26px; border-radius: 16px; }
.gate-box h1 { font-size: 22px; margin-bottom: 4px; }
.gate-box p { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.gate-box input { text-align: center; font-size: 16px; letter-spacing: 2px; font-weight: 700; }
.gate-box .btn.primary { width: 100%; margin-top: 12px; }
.gate-err { color: var(--danger); font-size: 12.5px; min-height: 18px; margin-top: 8px; font-weight: 600; }
.gate-hub { display: inline-block; margin-top: 14px; color: var(--muted); font-size: 12px; text-decoration: none; }
.gate-hub:hover { color: var(--accent); }
#chatFab { position: fixed; right: 22px; bottom: 22px; z-index: 150; width: 60px; height: 60px; border-radius: 50%; border: none; background: linear-gradient(135deg, #3fb68b, #2d9e8f); color: #0d1117; font-size: 24px; font-weight: 800; cursor: pointer; box-shadow: 0 6px 24px rgba(63, 182, 139, .4); }
#chatPanel { position: fixed; right: 22px; bottom: 94px; z-index: 150; width: 390px; max-width: calc(100vw - 34px); height: 540px; max-height: calc(100vh - 130px); background: var(--panel); border: 1px solid var(--border); border-radius: 16px; display: none; flex-direction: column; overflow: hidden; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); }
#chatPanel.open { display: flex; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; background: var(--panel2); border-bottom: 1px solid var(--border); font-weight: 800; font-size: 13.5px; }
.chat-head small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 13px; border-radius: 12px; font-size: 13.5px; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: rgba(245, 185, 64, .15); border: 1px solid rgba(245, 185, 64, .3); }
.msg.bot { align-self: flex-start; background: var(--panel2); border: 1px solid var(--border); }
.chat-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
.chat-input textarea { min-height: 44px; max-height: 120px; flex: 1; font-size: 13.5px; }
.chat-input .btn { align-self: flex-end; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
