* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #1a1a2e; color: #e0e0e0; min-height: 100vh; }
header { background: #16213e; border-bottom: 1px solid #333; padding: 16px 24px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; position: sticky; top: 0; z-index: 10; }
h1 { font-size: 20px; color: #e0e0e0; white-space: nowrap; }
h1 span { color: #4ade80; }
.controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
select, input { background: #0f3460; color: #e0e0e0; border: 1px solid #444; padding: 6px 12px; border-radius: 4px; font-size: 14px; }
select:focus, input:focus { outline: 2px solid #4ade80; outline-offset: -1px; }
.filter-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; width: 100%; }
.filter-controls { display: flex; gap: 4px; flex-shrink: 0; }
.filter-btn { padding: 4px 10px; border-radius: 4px; font-size: 11px; cursor: pointer; border: 1px solid #555; background: #0f3460; color: #aaa; transition: all 0.15s; }
.filter-btn:hover { border-color: #4ade80; color: #4ade80; }
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.pill { padding: 6px 14px; border-radius: 16px; font-size: 12px; cursor: pointer; border: 1px solid #555; background: transparent; color: #aaa; transition: all 0.15s; min-height: 32px; display: inline-flex; align-items: center; gap: 4px; }
.pill.active { border-color: #4ade80; color: #4ade80; background: rgba(74, 222, 128, 0.1); }
.pill:hover { border-color: #888; }
.pill:focus-visible { outline: 2px solid #4ade80; outline-offset: 2px; }
.pill .pill-count { opacity: 0.6; font-size: 11px; }
.result-count { font-size: 12px; color: #666; white-space: nowrap; margin-left: auto; }
main { padding: 24px; }
.summary-bar { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.stat-card { background: #16213e; border: 1px solid #333; border-radius: 8px; padding: 16px 20px; min-width: 140px; }
.stat-card .label { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card .value { font-size: 28px; font-weight: bold; margin-top: 4px; }
.stat-card .value.safe { color: #4ade80; }
.stat-card .value.keep { color: #fbbf24; }
.stat-card .value.unknown { color: #888; }
.stat-card .value.total { color: #e0e0e0; }

/* Coverage bar */
.coverage-bar-container { margin-bottom: 24px; }
.coverage-bar-label { font-size: 12px; color: #888; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.coverage-bar { height: 24px; border-radius: 12px; overflow: hidden; display: flex; background: #0f3460; }
.coverage-bar .seg { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: #fff; transition: width 0.3s ease; min-width: 0; overflow: hidden; white-space: nowrap; }
.coverage-bar .seg.safe { background: #4ade80; color: #1a1a2e; }
.coverage-bar .seg.keep { background: #fbbf24; color: #1a1a2e; }
.coverage-bar .seg.unknown { background: #333; color: #888; }
.coverage-legend { display: flex; gap: 16px; margin-top: 6px; font-size: 11px; color: #888; }
.coverage-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.coverage-legend .leg-safe::before { background: #4ade80; }
.coverage-legend .leg-keep::before { background: #fbbf24; }
.coverage-legend .leg-unknown::before { background: #333; }

.scan-info { font-size: 12px; color: #666; margin-bottom: 24px; }
.category-section { margin-bottom: 32px; }
.category-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; cursor: pointer; user-select: none; }
.category-header h2 { font-size: 16px; font-weight: 600; }
.category-count { font-size: 13px; color: #888; }
.category-header .arrow { font-size: 12px; color: #666; transition: transform 0.15s; }
.category-header.collapsed .arrow { transform: rotate(-90deg); }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.item-card { background: #16213e; border: 1px solid #333; border-radius: 6px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; transition: border-color 0.15s; }
.item-card:hover { border-color: #555; }
.item-details { flex: 1; min-width: 0; }
.item-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-name a { color: inherit; text-decoration: none; }
.item-name a:hover { text-decoration: underline; }
/* Wowhead injects inline icons via iconizeLinks — style them to fit cards */
.item-name .iconsmall, .item-name .iconsmall ins { display: inline-block; vertical-align: middle; margin-right: 4px; }
.item-name a ins { background-size: contain; }
.item-meta { font-size: 11px; color: #888; margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.verdict-badge { font-size: 10px; padding: 2px 8px; border-radius: 8px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.verdict-safe { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.verdict-keep { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.verdict-unknown { background: rgba(136, 136, 136, 0.15); color: #888; }
.confidence-badge { font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: 600; }
.conf-high { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.conf-medium { background: rgba(163, 214, 77, 0.2); color: #a3d64d; }
.conf-low { background: rgba(204, 204, 77, 0.2); color: #cccc4d; }
.loc-badge { font-size: 10px; padding: 1px 6px; border-radius: 8px; background: rgba(100, 100, 255, 0.15); color: #8888ff; }
.q0 { color: #9d9d9d; } .q1 { color: #ffffff; } .q2 { color: #1eff00; }
.q3 { color: #0070dd; } .q4 { color: #a335ee; } .q5 { color: #ff8000; }
.q6 { color: #e6cc80; } .q7 { color: #00ccff; }

/* Upload zone / empty state */
.empty-state { text-align: center; padding: 80px 24px; color: #666; }
.empty-state h2 { color: #888; margin-bottom: 12px; }
.empty-state p { max-width: 500px; margin: 0 auto; line-height: 1.6; }
.empty-state code { background: #0f3460; padding: 2px 8px; border-radius: 4px; font-size: 13px; }
.upload-zone { max-width: 500px; margin: 40px auto; padding: 48px 32px; border: 2px dashed #444; border-radius: 16px; cursor: pointer; transition: all 0.2s; }
.upload-zone:hover, .upload-zone.dragover { border-color: #4ade80; background: rgba(74, 222, 128, 0.05); }
.upload-zone .upload-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.upload-zone h3 { color: #ccc; font-size: 16px; margin-bottom: 8px; }
.upload-zone p { font-size: 13px; color: #666; line-height: 1.5; }
.upload-zone .browse-link { color: #4ade80; text-decoration: underline; cursor: pointer; }

/* Success toast */
.success-toast { background: rgba(74, 222, 128, 0.15); border: 1px solid #4ade80; border-radius: 8px; padding: 12px 20px; margin-bottom: 24px; color: #4ade80; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.success-toast .toast-icon { font-size: 16px; }

/* Loading */
.loading-state { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 80px 24px; color: #666; font-size: 14px; }
.spinner { width: 24px; height: 24px; border: 3px solid #333; border-top-color: #4ade80; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Drag overlay */
body.dragover::after { content: 'Drop data.json here'; position: fixed; inset: 0; background: rgba(26, 26, 46, 0.95); display: flex; align-items: center; justify-content: center; font-size: 24px; color: #4ade80; z-index: 100; border: 3px dashed #4ade80; margin: 16px; border-radius: 16px; pointer-events: none; }

.search-box { min-width: 200px; }
