* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Consolas', monospace;
    background: #0a0e17;
    color: #e2e8f0;
    margin: 0;
    padding: 0 0 80px 0;
    font-size: 12px;
    line-height: 1.5;
}

.app-container {
    max-width: 100%;
    padding: 12px 12px 20px 12px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.header h1 {
    font-size: 18px;
    margin: 0;
}
.badge-container {
    display: flex;
    gap: 8px;
}
.badge {
    background: #1e293b;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 11px;
}
.risk-badge {
    background: #1e293b;
}
.risk-badge.critical { background: #7f1a1a; color: #fecaca; }
.risk-badge.high { background: #78350f; color: #fed7aa; }
.risk-badge.medium { background: #713f12; color: #fef08a; }
.risk-badge.low { background: #14532d; color: #bbf7d0; }

/* Stats Dashboard */
.stats-dashboard {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.stat-card {
    background: #0f1724;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 12px 16px;
    min-width: 80px;
    text-align: center;
}
.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #3b82f6;
}
.stat-label {
    font-size: 10px;
    color: #64748b;
    margin-top: 4px;
}

/* Section Headers */
.section-header {
    background: #1e2a3a;
    padding: 8px 12px;
    border-radius: 10px;
    margin: 16px 0 12px 0;
    font-weight: bold;
    font-size: 13px;
    border-left: 4px solid #3b82f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Upload Zone */
.upload-zone {
    background: #0f1724;
    border: 2px dashed #334155;
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}
.upload-zone.drag-over {
    border-color: #3b82f6;
    background: #1e293b;
}
.upload-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

/* Buttons */
.btn {
    display: inline-block;
    background: #3b82f6;
    color: white;
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: bold;
    margin: 4px;
    cursor: pointer;
    border: none;
    font-family: inherit;
    touch-action: manipulation;
}
.btn-small {
    background: #3b82f6;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    cursor: pointer;
    border: none;
}
.btn-secondary {
    background: #475569;
}
.btn-secondary:hover { background: #5b6d8c; }

/* Filter Bar */
.filter-bar {
    margin-bottom: 12px;
}
.filter-input {
    width: 100%;
    background: #1e293b;
    border: 1px solid #334155;
    color: #f1f5f9;
    padding: 12px 14px;
    border-radius: 40px;
    font-size: 13px;
    font-family: inherit;
    margin-bottom: 10px;
}
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-chip {
    background: #1e293b;
    border: none;
    color: #94a3b8;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 11px;
    cursor: pointer;
}
.filter-chip.active {
    background: #3b82f6;
    color: white;
}

/* Log Container */
.log-container {
    background: #0f1724;
    border-radius: 16px;
    padding: 8px 0;
    margin-top: 8px;
    overflow-x: hidden;
    word-break: break-word;
    max-height: 55vh;
    overflow-y: auto;
}
.log-line {
    padding: 8px 12px;
    border-bottom: 1px solid #1e293b;
    font-family: monospace;
    font-size: 11px;
    white-space: pre-wrap;
    word-break: break-all;
    cursor: pointer;
    transition: background 0.1s;
}
.log-line:active { background: #2d3a4e; }
.log-line.copied { background: #2a3a5e; }
.log-line.filter-hidden { display: none; }

/* Highlighting */
.attention { color: #f87171; font-weight: bold; }
.nofile { color: #4ade80; }
.custom-highlight { background-color: #854d0e; color: #fde047; border-radius: 4px; padding: 0 2px; }
.empty-state { padding: 40px; text-align: center; color: #64748b; }

/* Jump Menu */
.jump-menu {
    background: #1e293b;
    border-radius: 30px;
    padding: 8px 12px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 90px;
    overflow-y: auto;
}
.jump-item {
    background: #334155;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 10px;
    color: #e2e8f0;
    cursor: pointer;
    white-space: nowrap;
}

/* Panels */
.panel { display: none; }
.panel.active-panel { display: block; }

/* Navigation */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0f1724;
    border-top: 1px solid #1e293b;
    display: flex;
    justify-content: space-around;
    padding: 8px 4px 12px 4px;
    z-index: 200;
    backdrop-filter: blur(12px);
    background: rgba(15, 23, 36, 0.95);
}
.nav-btn {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 500;
    border-radius: 30px;
    cursor: pointer;
}
.nav-btn.active { color: #3b82f6; background: #1e293b; }

/* Threat List */
.threat-list {
    background: #0f1724;
    border-radius: 16px;
    padding: 8px;
    max-height: 60vh;
    overflow-y: auto;
}
.threat-item {
    background: #1e293b;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    border-left: 4px solid;
}
.threat-item.critical { border-left-color: #dc2626; }
.threat-item.high { border-left-color: #f97316; }
.threat-item.medium { border-left-color: #eab308; }
.threat-item.low { border-left-color: #22c55e; }
.threat-title {
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 6px;
}
.threat-score {
    font-size: 10px;
    color: #64748b;
    margin-bottom: 6px;
}
.threat-desc {
    font-size: 10px;
    color: #94a3b8;
    margin-bottom: 8px;
    word-break: break-all;
}
.threat-remediation {
    font-size: 10px;
    background: #0f1724;
    padding: 8px;
    border-radius: 8px;
    font-family: monospace;
}
.threat-add-btn {
    margin-top: 8px;
    background: #334155;
    border: none;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    cursor: pointer;
}

/* Forms */
textarea, input[type="text"], input[type="file"] {
    width: 100%;
    background: #1e293b;
    border: 1px solid #475569;
    color: #e2e8f0;
    font-family: monospace;
    font-size: 11px;
    padding: 12px;
    border-radius: 12px;
}
.fixlist-editor {
    font-family: monospace;
    font-size: 11px;
}
.extract-input { flex: 1; margin-right: 8px; }

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Keywords */
.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}
.keyword-tag {
    background: #854d0e;
    color: #fde047;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
}
.threat-quick-add {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.quick-add-btn {
    background: #334155;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 10px;
    cursor: pointer;
}

.vt-result {
    background: #0f1724;
    border-radius: 12px;
    padding: 12px;
    margin-top: 12px;
    font-size: 10px;
    word-break: break-all;
}

hr {
    border-color: #1e293b;
    margin: 16px 0;
}

.toast {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #4ade80;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    z-index: 1000;
    pointer-events: none;
    white-space: nowrap;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-content {
    background: #0f1724;
    border-radius: 24px;
    width: 95%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 20px;
    border: 1px solid #334155;
}