/* Modern Malware Detection Interface Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-900: #111827;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--gray-900);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Upload Section */
.upload-box {
    border: 3px dashed var(--gray-300);
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-box:hover {
    border-color: var(--primary-color);
    background: var(--gray-50);
}

.upload-box.dragover {
    border-color: var(--primary-color);
    background: var(--gray-50);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-box h2 {
    color: var(--gray-700);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.upload-info {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.btn-primary:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-large {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    margin-top: 20px;
}

/* Selected Files */
.selected-files {
    margin-top: 30px;
}

.selected-files h3 {
    color: var(--gray-700);
    margin-bottom: 15px;
}

.file-list {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
}

.file-name {
    font-weight: 500;
    color: var(--gray-700);
    flex: 1;
}

.file-size {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-right: 10px;
}

.file-remove {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.file-remove:hover {
    background: #DC2626;
}

/* Loader */
.loader {
    border: 3px solid var(--gray-200);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results Section */
.results-section {
    margin-top: 40px;
}

.results-section h2 {
    color: var(--gray-900);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: var(--gray-50);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--gray-200);
}

.summary-card.card-benign {
    background: #ECFDF5;
    border-color: var(--success-color);
}

.summary-card.card-malware {
    background: #FEF2F2;
    border-color: var(--danger-color);
}

.card-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.card-label {
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Results Table */
.results-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table thead {
    background: var(--gray-100);
}

.results-table th {
    padding: 14px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-table td {
    padding: 14px;
    border-bottom: 1px solid var(--gray-200);
}

.results-table tbody tr:hover {
    background: var(--gray-50);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-benign {
    background: #D1FAE5;
    color: #065F46;
}

.status-malware {
    background: #FEE2E2;
    color: #991B1B;
}

/* Risk Level Badges */
.risk-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.risk-safe {
    background: #D1FAE5;
    color: #065F46;
}

.risk-low {
    background: #FEF3C7;
    color: #92400E;
}

.risk-medium {
    background: #FED7AA;
    color: #9A3412;
}

.risk-high {
    background: #FECACA;
    color: #991B1B;
}

.risk-critical {
    background: #FEE2E2;
    color: #7F1D1D;
    font-weight: 700;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    padding: 20px;
}

.footer p {
    margin: 5px 0;
}

.footer-note {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 20px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .upload-box {
        padding: 40px 20px;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .results-table {
        font-size: 0.85rem;
    }

    .results-table th,
    .results-table td {
        padding: 10px;
    }
}
