:root {
    --bg: #0d0f14;
    --panel: #151923;
    --panel-2: #1d2330;
    --text: #f5f7fb;
    --muted: #9aa3b2;
    --line: rgba(255,255,255,.1);
    --accent: #97d4ff;
    --accent-2: #d8c7ff;
    --danger: #ff8f8f;
    --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif; }
a { color: inherit; text-decoration: none; }
img, video, canvas { max-width: 100%; display: block; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 14px 26px; backdrop-filter: blur(16px); background: rgba(13,15,20,.78); border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; letter-spacing: -.03em; font-size: 22px; }
.navlinks, .actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.shell { width: min(1240px, calc(100% - 36px)); margin: 28px auto 60px; }
.footer { color: var(--muted); padding: 24px; text-align: center; border-top: 1px solid var(--line); }
.button, button.button { border: 0; border-radius: 999px; padding: 12px 18px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0d0f14; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.button.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.button.small, .small { padding: 8px 12px; font-size: 13px; }
.link-button { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font: inherit; }
.link-button.danger { color: var(--danger); }
.inline-form { display: inline; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; padding: 42px 0; }
.hero h1, .page-header h1 { font-size: clamp(36px, 5vw, 72px); line-height: .95; margin: 6px 0 18px; letter-spacing: -.06em; }
.lede { color: #cbd2de; font-size: 20px; line-height: 1.55; max-width: 720px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 800; }
.muted { color: var(--muted); }
.hero-card, .card, .empty-state { background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025)); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.24); }
.narrow { max-width: 560px; margin: 0 auto; }
.before-after { display: grid; grid-template-columns: 1fr 1fr; height: 260px; overflow: hidden; border-radius: 16px; margin-bottom: 18px; }
.swatch.dark { background: radial-gradient(circle at 40% 20%, #604b40, #191414 70%); }
.swatch.light { background: radial-gradient(circle at 40% 20%, #ffe1ba, #6f8eb0 70%); }
.feature-list { display: grid; gap: 10px; color: #d6dce7; padding-left: 20px; }
.page-header { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 22px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.metric { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.metric strong { display: block; font-size: 34px; }
.metric span { color: var(--muted); }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.project-card { min-height: 170px; padding: 22px; background: linear-gradient(160deg, #202635, #121620); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 10px; transition: transform .18s ease, border-color .18s ease; }
.project-card:hover, .asset-card:hover { transform: translateY(-2px); border-color: rgba(151,212,255,.45); }
.project-card strong { font-size: 22px; }
.project-type { color: var(--accent); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.form-stack { display: grid; gap: 10px; }
.form-stack input, .form-stack select, .form-stack textarea, .preset-form input, .export-grid input, .export-grid select { width: 100%; background: #0f131b; border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 12px; }
.validation { color: var(--danger); font-size: 13px; }
.check-row { display: flex; align-items: center; gap: 8px; }
.batch-list { display: grid; gap: 10px; }
.batch-row, .preset-row { display: flex; justify-content: space-between; gap: 18px; align-items: center; background: #10141c; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.batch-row div, .preset-row div { display: grid; gap: 5px; }
.upload-panel { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: center; margin-bottom: 20px; }
.upload-panel.dragging { outline: 2px dashed var(--accent); }
.drop-zone { min-height: 140px; border: 2px dashed rgba(255,255,255,.18); border-radius: 18px; display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; background: rgba(255,255,255,.03); }
.drop-zone input { display: none; }
.upload-queue { grid-column: 1 / -1; display: grid; gap: 8px; }
.upload-row { display: grid; grid-template-columns: 1fr 180px 180px; gap: 12px; align-items: center; font-size: 14px; }
.upload-row.failed { color: var(--danger); }
.asset-toolbar { display: flex; justify-content: space-between; align-items: center; margin: 18px 0; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.asset-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: transform .18s ease, border-color .18s ease; }
.asset-card.saved-flash { border-color: var(--accent); }
.thumb { aspect-ratio: 4 / 3; background: #07090d; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb, .placeholder-thumb { color: var(--muted); font-weight: 800; }
.asset-meta { padding: 12px; display: grid; gap: 6px; }
.asset-meta strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rating-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rating-row select { background: #0f131b; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.editor-shell { width: min(1800px, calc(100vw - 28px)); margin: 0 auto; display: grid; grid-template-columns: 280px 1fr 340px; gap: 16px; }
.editor-sidebar { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; height: calc(100vh - 130px); overflow: auto; }
.editor-sidebar h1 { font-size: 22px; line-height: 1.1; overflow-wrap: anywhere; }
.back-link { color: var(--accent); display: inline-block; margin-bottom: 16px; }
.editor-stage { position: relative; min-height: calc(100vh - 130px); background: #050609; border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 16px; }
.editor-stage canvas, .editor-stage video { max-height: calc(100vh - 175px); border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.editor-stage-actions { position: absolute; left: 18px; bottom: 18px; display: flex; gap: 8px; }
.prediction-panel, .keyboard-card { display: grid; gap: 8px; background: #10141c; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 14px 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; }
.slider-panel { display: grid; gap: 10px; }
.slider-row { display: grid; grid-template-columns: 110px 1fr 46px; gap: 10px; align-items: center; font-size: 13px; }
.slider-row input { width: 100%; accent-color: var(--accent); }
.slider-row output { color: var(--muted); text-align: right; }
.preset-panel { display: flex; flex-wrap: wrap; gap: 8px; }
.preset-chip { background: #10141c; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 8px 10px; cursor: pointer; }
.preset-chip:hover { border-color: var(--accent); }
.preset-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.export-grid { display: grid; gap: 8px; margin-bottom: 10px; }
.preset-list { display: grid; gap: 12px; }
@media (max-width: 1100px) {
    .hero, .upload-panel, .editor-shell { grid-template-columns: 1fr; }
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .editor-sidebar { height: auto; }
    .editor-stage { min-height: 60vh; }
}
@media (max-width: 700px) {
    .page-header, .topbar { align-items: flex-start; flex-direction: column; }
    .metric-grid { grid-template-columns: 1fr; }
    .upload-row { grid-template-columns: 1fr; }
    .slider-row { grid-template-columns: 1fr; }
}
