/* Bundle Size Analyzer — Orange Dark */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #F97316;
  --primary-dim: rgba(249,115,22,0.12);
  --primary-glow: rgba(249,115,22,0.25);
  --accent: #6366F1;
  --accent-dim: rgba(99,102,241,0.12);
  --green: #10B981;
  --red: #EF4444;
  --bg: #0F172A;
  --bg-card: #1E293B;
  --border: rgba(249,115,22,0.10);
  --text: #F1E4D5;
  --text-dim: #94A3B8;
  --text-muted: #475569;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --transition: 0.2s ease;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.6; }

.header { border-bottom: 1px solid var(--border); background: rgba(30,41,59,0.95); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.header-inner { max-width: 800px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; }
.header-left { display: flex; align-items: center; gap: 10px; }
.header-actions { display: flex; gap: 6px; }
.logo-icon { font-size: 1.2rem; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--primary-dim); border-radius: var(--radius-sm); }
.header h1 { font-size: 1.05rem; font-weight: 700; }
.subtitle { font-size: 0.72rem; color: var(--text-dim); }

.main { max-width: 800px; margin: 0 auto; padding: 20px; }

.btn { padding: 8px 16px; font-family: var(--font); font-size: 0.78rem; font-weight: 600; border: none; border-radius: 6px; cursor: pointer; transition: all var(--transition); }
.btn-sm { padding: 5px 10px; font-size: 0.72rem; background: var(--primary-dim); color: var(--primary); border: 1px solid rgba(249,115,22,0.2); }

.drop-zone { padding: 32px; text-align: center; border: 2px dashed rgba(249,115,22,0.2); border-radius: var(--radius); margin-bottom: 14px; cursor: pointer; transition: all var(--transition); }
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--primary); background: rgba(249,115,22,0.04); }
.drop-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.drop-hint { font-size: 0.72rem; color: var(--text-muted); }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; text-align: center; }
.stat-label { display: block; font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { display: block; font-size: 1.1rem; font-weight: 700; color: var(--primary); margin-top: 2px; }

.treemap-card, .modules-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.panel-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.module-count { font-size: 0.68rem; font-weight: 600; color: var(--primary); background: var(--primary-dim); padding: 2px 8px; border-radius: 10px; }
.search-input { padding: 4px 8px; font-family: var(--font); font-size: 0.72rem; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 4px; outline: none; width: 140px; }

.treemap { height: 250px; padding: 4px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 2px; overflow: hidden; }
.treemap-cell { border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 0.58rem; font-weight: 600; color: rgba(255,255,255,0.9); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 4px; cursor: default; transition: opacity var(--transition); }
.treemap-cell.dimmed { opacity: 0.2; }

.modules-list { max-height: 300px; overflow-y: auto; }
.mod-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px; border-bottom: 1px solid rgba(249,115,22,0.04); }
.mod-name { font-family: var(--mono); font-size: 0.72rem; color: var(--text-dim); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mod-size { font-family: var(--mono); font-size: 0.72rem; color: var(--primary); min-width: 60px; text-align: right; }
.mod-bar { width: 60px; height: 6px; background: rgba(249,115,22,0.1); border-radius: 3px; overflow: hidden; margin-left: 8px; }
.mod-bar-fill { height: 100%; background: var(--primary); border-radius: 3px; }

.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column-reverse; gap: 8px; }
.toast { padding: 10px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 4px 24px rgba(0,0,0,0.5); font-size: 0.82rem; animation: toastIn 0.3s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
