:root {
    --accent: #6366f1; --accent-hover: #4f46e5;
    --bg: #09090b; --surface: #18181b;
    --text: #fafafa; --text-dim: #a1a1aa;
    --border: #27272a; --success: #22c55e;
    --danger: #ef4444; --card-bg: #111;
}

[data-theme="light"] {
    --accent: #4f46e5; --bg: #f4f4f5; --surface: #ffffff;
    --text: #09090b; --text-dim: #71717a; --border: #e4e4e7;
    --success: #16a34a; --card-bg: #fafafa;
}

[data-theme="inferno"] {
    --accent: #f97316; --bg: #0c0500; --surface: #1a0a00;
    --text: #fff7ed; --text-dim: #fdba74; --border: #431407;
    --success: #fbbf24; --card-bg: #2a0e00;
}

@keyframes flicker {
    0%, 100% { border-color: #431407; box-shadow: 0 0 5px rgba(249, 115, 22, 0.2); }
    50% { border-color: #f97316; box-shadow: 0 0 15px rgba(249, 115, 22, 0.5); }
}

* { box-sizing: border-box; transition: background 0.2s, color 0.2s; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); margin: 0; display: flex; height: 100vh; overflow: hidden; }

.sidebar { width: 300px; background: var(--surface); border-right: 1px solid var(--border); padding: 20px; display: flex; flex-direction: column; gap: 20px; overflow-y: auto; flex-shrink: 0; }
.header-row { display: flex; justify-content: space-between; align-items: center; }
h1 { font-size: 1.1rem; margin: 0; color: var(--accent); font-weight: 800; line-height: 1.2; }

.theme-toggle { background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 8px; border-radius: 8px; cursor: pointer; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.control-group { display: flex; flex-direction: column; gap: 8px; width: 100%; }
label { font-size: 0.65rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }

select, input { background: var(--bg); color: var(--text); border: 1px solid var(--border); padding: 10px; border-radius: 6px; outline: none; font-size: 0.85rem; width: 100%; }
input[type="color"] { height: 40px; padding: 2px; cursor: pointer; }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border-radius: 6px; font-weight: 600; cursor: pointer; border: none; transition: 0.2s; font-size: 0.85rem; }
.btn-primary { background: var(--accent); color: white; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-success { background: var(--success); color: #000; font-weight: 800; margin-top: auto; }
.btn-success:disabled { opacity: 0.1; cursor: not-allowed; }

.main { flex-grow: 1; overflow-y: auto; padding: 30px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }

.asset-card { background: var(--surface); border-radius: 10px; border: 1px solid var(--border); overflow: hidden; display: flex; flex-direction: column; }
[data-theme="inferno"] .asset-card { animation: flicker 4s infinite alternate; }

.asset-header { padding: 10px 14px; background: rgba(0,0,0,0.1); display: flex; justify-content: space-between; align-items: center; font-size: 0.7rem; }
.canvas-container { padding: 15px; background: var(--card-bg); display: flex; justify-content: center; cursor: crosshair; }
canvas { max-width: 100%; height: auto; border-radius: 4px; }

.card-actions { padding: 10px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); }
.strategy-select { font-size: 0.7rem; padding: 4px; height: auto; background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 4px; }