/* React Props Visualizer — Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #06B6D4; --primary-light: #22D3EE;
  --accent: #A855F7; --accent-glow: rgba(168,85,247,0.15);
  --success: #10B981; --danger: #EF4444; --warning: #F59E0B;
  --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: 1100px; 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--accent { background: var(--primary); color: #fff; padding: 0.55rem 1.1rem; font-weight: 600; width: 100%; margin-top: 0.5rem; justify-content: center; }
.btn--accent:hover { filter: brightness(1.15); }
.btn--sm { font-size: 0.78rem; padding: 0.35rem 0.7rem; }

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

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; min-height: 400px; }
@media (max-width: 768px) { .split { grid-template-columns: 1fr; } }

.panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.panel-bar { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); }
.panel-label { font-size: 0.72rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }

.code-area { flex: 1; resize: none; padding: 0.75rem; background: rgba(0,0,0,0.3); border: none; color: var(--text); font-family: var(--mono); font-size: 0.82rem; line-height: 1.65; min-height: 300px; }
.code-area:focus { outline: none; }
.panel--left { padding: 0; display: flex; flex-direction: column; }
.panel--left .panel-bar, .panel--left .btn--accent { margin: 0; }
.panel--left .btn--accent { border-radius: 0; margin: 0; }

.tree-container { flex: 1; padding: 1rem; overflow: auto; min-height: 300px; position: relative; }
.placeholder-msg { font-size: 0.88rem; color: var(--text-muted); text-align: center; padding-top: 3rem; }

/* Tree nodes */
.tree-node { margin-left: 1.25rem; border-left: 2px solid var(--border); padding-left: 0.75rem; }
.tree-node:first-child { margin-top: 0; }
.tree-root { margin-left: 0; border-left: none; padding-left: 0; }
.node-row { display: flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0; cursor: default; }
.node-row:hover { background: rgba(255,255,255,0.03); border-radius: 4px; }
.node-name { font-family: var(--mono); font-size: 0.82rem; font-weight: 600; color: var(--primary-light); }
.node-optional { color: var(--text-muted); font-size: 0.72rem; }
.node-type { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); }
.node-toggle { cursor: pointer; background: none; border: none; color: var(--text-dim); font-size: 0.75rem; padding: 0.1rem 0.3rem; }

.output-section { margin-top: 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.output-section.hidden { display: none; }
.output-code { padding: 0.75rem; background: rgba(0,0,0,0.3); font-family: var(--mono); font-size: 0.78rem; overflow-x: auto; margin: 0; }
.output-code code { white-space: pre; color: var(--text); }

.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; } }
