:root { --bg-dark: #111111; --bg-card: #1a1a1a; --bg-hover: #2a2a2a; --border: #333; --accent: #3b82f6; --text: #eee; --text-muted: #888; }
* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }
body { font-family: 'Inter', sans-serif; background: var(--bg-dark); color: var(--text); overflow: hidden; }
#app { display: grid; grid-template-columns: 280px 1fr 320px; grid-template-rows: 48px 1fr; height: 100vh; }
.header { grid-column: 1 / -1; background: var(--bg-card); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 1rem; }
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.9rem; }
.logo-badge { background: var(--accent); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.65rem; font-weight: 700; color: white; }
.btn { padding: 0.35rem 0.7rem; border-radius: 6px; font-size: 0.75rem; font-weight: 500; cursor: pointer; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); display: inline-flex; align-items: center; gap: 0.3rem; transition: all 0.15s; }
.btn:hover { background: var(--bg-hover); border-color: var(--accent); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.sidebar { background: var(--bg-card); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.sidebar-section { padding: 0.75rem; border-bottom: 1px solid var(--border); }
.sidebar-title { font-size: 0.6rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.5rem; display: flex; justify-content: space-between; }
.drop-zone { border: 2px dashed var(--border); border-radius: 8px; padding: 1rem; text-align: center; cursor: pointer; transition: 0.2s; }
.drop-zone:hover { border-color: var(--accent); background: rgba(59, 130, 246, 0.1); }
.drop-zone-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.viewport { position: relative; background: #000; }
#viewer-container { width: 100%; height: 100%; }
.viewport-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.viewport-placeholder { text-align: center; color: var(--text-muted); }
.viewport-placeholder-icon { font-size: 2.5rem; opacity: 0.3; margin-bottom: 0.5rem; }
.viewport-toolbar { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 0.3rem 0.6rem; display: flex; gap: 0.5rem; }
.toolbar-btn { width: 32px; height: 32px; border: none; background: transparent; color: var(--text-muted); border-radius: 50%; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; }
.toolbar-btn:hover { background: var(--bg-hover); color: var(--accent); }
.panel { background: var(--bg-card); border-left: 1px solid var(--border); display: flex; flex-direction: column; }
.panel-tabs { display: flex; border-bottom: 1px solid var(--border); }
.panel-tab { flex: 1; padding: 0.8rem; font-size: 0.75rem; text-align: center; border-bottom: 2px solid var(--accent); color: var(--accent); font-weight: 600; }
.panel-content { flex: 1; overflow-y: auto; padding: 1rem; }
.property-row { display: flex; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.75rem; }
.property-name { color: var(--text-muted); }
.property-value { font-family: 'JetBrains Mono', monospace; text-align: right; }
.loading-overlay { position: fixed; inset: 0; background: rgba(0,0,0, 0.9); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 999; opacity: 0; pointer-events: none; transition: 0.2s; }
.loading-overlay.active { opacity: 1; pointer-events: all; }
.loading-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { margin-top: 1rem; color: var(--text-muted); font-size: 0.85rem; }
.toast-container { position: fixed; bottom: 1rem; right: 1rem; z-index: 1000; }
.toast { background: var(--bg-card); border: 1px solid var(--border); padding: 0.75rem 1rem; border-radius: 6px; margin-top: 0.5rem; font-size: 0.8rem; border-left: 3px solid var(--accent); }
.filter-item { display: flex; justify-content: space-between; padding: 0.4rem 0.6rem; font-size: 0.75rem; cursor: pointer; border-radius: 4px; margin-bottom: 2px; }
.filter-item:hover { background: var(--bg-hover); }
.filter-item.active { background: var(--accent); color: white; }
.filter-header { display: flex; justify-content: space-between; cursor: pointer; padding: 0.5rem; background: var(--bg-hover); border-radius: 4px; font-size: 0.75rem; margin-bottom: 0.5rem; }
.filter-content { display: none; margin-bottom: 1rem; max-height: 200px; overflow-y: auto; }
.filter-header.open + .filter-content { display: block; }
.tree-container { margin-top: 0.5rem; overflow-y: auto; max-height: 400px; }
.tree-item { padding: 0.3rem 0.5rem; font-size: 0.75rem; cursor: pointer; border-radius: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text-muted); }
.tree-item:hover { background: var(--bg-hover); color: var(--text); }
.tree-item.selected { color: var(--accent); background: rgba(59, 130, 246, 0.1); font-weight: 600; }
.hidden { display: none !important; }
.selection-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; background: var(--bg-hover); padding: 0.5rem; border-radius: 6px; font-size: 0.75rem; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.5rem; }
.stat-card { background: var(--bg-hover); padding: 0.5rem; border-radius: 4px; text-align: center; }
.stat-value { font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; }
.property-group-title { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-top: 1.5rem; margin-bottom: 0.5rem; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }