/* OG Builder — Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #3B82F6; --primary-light: #60A5FA;
  --accent: #F97316;
  --bg: #0B0F1A; --bg-card: rgba(255,255,255,0.04);
  --bg-glass: rgba(255,255,255,0.06); --border: rgba(255,255,255,0.08);
  --text: #E8E8E8; --text-dim: #9CA3AF; --text-muted: #6B7280;
  --radius: 12px; --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif; --mono: 'JetBrains Mono', monospace;
  --shadow: 0 4px 24px rgba(0,0,0,0.3); --transition: 250ms ease;
}
html { font-size: 16px; } body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; -webkit-font-smoothing: antialiased; }

.header { position: sticky; top: 0; z-index: 100; background: rgba(11,15,26,0.85); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.header__inner { max-width: 900px; margin: 0 auto; padding: 0.75rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.header__brand { display: flex; align-items: center; gap: 0.6rem; }
.header__icon { font-size: 1.3rem; } .header__title { font-size: 1.15rem; font-weight: 700; }
.header__actions { display: flex; gap: 0.5rem; }

.btn { display: inline-flex; align-items: center; gap: 0.4rem; border: none; cursor: pointer; font-family: var(--font); font-size: 0.85rem; font-weight: 500; border-radius: var(--radius-sm); transition: all var(--transition); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn--ghost { background: var(--bg-glass); color: var(--text-dim); padding: 0.5rem 0.85rem; border: 1px solid var(--border); }
.btn--ghost:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.btn--sm { font-size: 0.78rem; padding: 0.35rem 0.7rem; }

.main { max-width: 900px; margin: 0 auto; padding: 1.25rem 1.5rem 3rem; }

.canvas-section { margin-bottom: 1rem; }
.canvas-wrapper { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; justify-content: center; background: #000; }
canvas { width: 100%; max-width: 100%; height: auto; display: block; }

.controls { display: flex; flex-direction: column; gap: 0.5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.control-label { font-size: 0.72rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; display: block; margin-bottom: 0.2rem; }
.ctrl-input { width: 100%; padding: 0.45rem 0.7rem; background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: var(--font); font-size: 0.88rem; }
.ctrl-input:focus, .ctrl-select:focus { outline: none; border-color: var(--primary); }
.ctrl-select { padding: 0.45rem 0.5rem; background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: var(--font); font-size: 0.85rem; cursor: pointer; }
.ctrl-color { width: 40px; height: 36px; border: 2px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; background: none; padding: 2px; }
.ctrl-color::-webkit-color-swatch-wrapper { padding: 0; }
.ctrl-color::-webkit-color-swatch { border-radius: 4px; border: none; }
.control-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.control-row .control-group { flex: 1; min-width: 100px; }

.export-section { margin-top: 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.export-section[hidden] { display: none; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); }
.panel-title { font-size: 0.78rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.code-output { padding: 0.75rem; background: rgba(0,0,0,0.3); font-family: var(--mono); font-size: 0.78rem; overflow-x: auto; margin: 0; color: var(--text); }
.code-output code { white-space: pre; }

.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; padding: 0.6rem 1.25rem; border-radius: var(--radius); font-size: 0.85rem; font-weight: 500; box-shadow: var(--shadow); z-index: 500; animation: toastIn 300ms ease; }
.toast[hidden] { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 600px) { .main { padding: 1rem; } }
