/* Main styles for CVE Security Checker */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #FFE0B2 0%, #FFA726 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h2 {
    color: #2c3e50;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.input-group input, .input-group select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    background: linear-gradient(135deg, #66BB6A 0%, #2E7D32 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.results {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-top: 20px;
}

.results h3 {
    color: #66BB6A;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.cve-item {
    background: #f8f9fa;
    border-left: 4px solid #66BB6A;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
}

.cve-severity {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.severity-critical { background: #dc3545; color: white; }
.severity-high { background: #fd7e14; color: white; }
.severity-medium { background: #ffc107; color: black; }
.severity-low { background: #28a745; color: white; }
code{
        background-color: #ededed !important;
    border: solid .5px #d3d3d3;
}
.header-item {
    /* display: flex;
    justify-content: space-between; */
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #28a745;
}

.header-missing {
    border-left-color: #dc3545;
}

.status {
    font-weight: bold;
}

.status.present { color: #28a745; }
.status.missing { color: #dc3545; }

.loading {
    text-align: center;
    padding: 20px;
    color: #66BB6A;
}

.error {
    color: #dc3545;
    background: #f8d7da;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 2rem;
    }
}

.recommended-headers {
    margin-top: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.header-code {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin-top: 10px;
    white-space: pre-wrap;
}

.recommendation-section {
    background: #effaf5;
    border-left: 4px solid #28a745;
    padding: 15px;
    margin-top: 15px;
    border-radius: 8px;
}

.recommendation-item {
    background: white;
    border-left: 4px solid #2196f3;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.code-implementation {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin: 10px 0;
    white-space: pre-wrap;
    border-left: 3px solid #2196f3;
}

.implementation-location {
    background: #fff3cd;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 8px;
    font-size: 0.9rem;
}

.tab-buttons {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
    flex-wrap: wrap;
}

.tab-button {
    padding: 10px 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    margin-right: 5px;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.tab-button.active {
    background: white;
    color: #66BB6A;
    border-bottom: 2px solid #66BB6A;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.inline-btn {
    background: linear-gradient(135deg, #66BB6A 0%, #2E7D32 100%);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.inline-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.vulnerability-tips {
    background: #fff8e1;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #ffc107;
}

.project-scan-section {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
    margin-top: 20px;
}

.file-upload {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    cursor: pointer;
}

.file-list {
    max-height: 200px;
    overflow-y: auto;
    margin: 15px 0;
    background: #f8f9fa;
    border-radius: 5px;
    padding: 10px;
}

.file-item {
    padding: 5px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.9rem;
}

.scan-progress {
    height: 8px;
    width: 100%;
    background: #e0e0e0;
    border-radius: 4px;
    margin: 15px 0;
    overflow: hidden;
}

.scan-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(135deg, #66BB6A 0%, #2E7D32 100%);
    transition: width 0.3s ease;
}

.issue-item {
    background: #fff8e1;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    border-left: 4px solid #ffc107;
}

.issue-critical {
    border-left-color: #dc3545;
}

.issue-high {
    border-left-color: #fd7e14;
}

.issue-medium {
    border-left-color: #ffc107;
}

.issue-low {
    border-left-color: #28a745;
}

.cdn-vulnerability {
    background: #ffe6e6;
    border-left-color: #dc3545;
}

.cdn-outdated {
    background: #fff3cd;
    border-left-color: #ffc107;
}

/* CWE Lookup Styles */
.cwe-categories {
    margin-top: 20px;
}

.cwe-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.cwe-link-btn {
    background: linear-gradient(135deg, #FF9800 0%, #E65100 100%);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
}

.cwe-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #E65100 0%, #FF9800 100%);
}

.cwe-result {
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.cwe-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
}

.severity-badge, .likelihood-badge {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.related-cwe-btn {
    transition: all 0.2s ease;
}

.related-cwe-btn:hover {
    background: #0056b3 !important;
    transform: scale(1.05);
}

/* CVE Database Integration Styles */
.save-cve-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.save-cve-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.save-cve-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.btn-small {
    background: #667eea;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-right: 5px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.database-cve {
    border-left: 4px solid #28a745 !important;
}

.cwe-tag {
    transition: all 0.2s ease;
}

.cwe-tag:hover {
    background: #0056b3 !important;
    transform: scale(1.05);
}

.saved-cve-item {
    transition: all 0.2s ease;
}

.saved-cve-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.status-group {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
}

/* Loading spinner */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Code implementation blocks */
.code-implementation {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    overflow-x: auto;
    margin: 10px 0;
}

/* CVE Search Results */
.cve-result-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.cve-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.cve-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.severity-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: 10px;
}

.severity-critical {
    background: #e74c3c;
    color: white;
}

.severity-high {
    background: #fd7e14;
    color: white;
}

.severity-medium {
    background: #ffc107;
    color: #000;
}

.severity-low {
    background: #28a745;
    color: white;
}

.severity-unknown {
    background: #6c757d;
    color: white;
}

.cve-description {
    color: #333;
    line-height: 1.6;
}

.cve-details p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #666;
}

.cve-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border: none;
    border-radius: 4px;
    background: #667eea;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-small:hover {
    background: #5a6fd8;
}

.suggestion-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 15px 0;
}

.suggestion-btn {
    padding: 8px 16px;
    border: 1px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-btn:hover {
    background: #667eea;
    color: white;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.search-actions {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.database-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}
.header-results {
                padding: 20px;
                background: #fff;
                border-radius: 8px;
                box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            }
            .results-header {
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-bottom: 20px;
            }
            .headers-summary {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                gap: 15px;
                margin-bottom: 30px;
            }
            .stats-box {
                background: #f8f9fa;
                padding: 15px;
                border-radius: 6px;
                text-align: center;
            }
            .stat-number {
                font-size: 24px;
                font-weight: bold;
                color: #667eea;
                display: block;
            }
            .stat-label {
                font-size: 14px;
                color: #666;
            }
            .headers-grid {
                display: block;
                grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
                gap: 20px;
                margin-top: 20px;
            }
            .header-item.present {
                border-left: 4px solid #28a745;
            }
            .header-item.missing {
                border-left: 4px solid #dc3545;
            } 
            .header-title {
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-bottom: 10px;
            }
            .importance-badge {
                padding: 4px 8px;
                border-radius: 4px;
                font-size: 12px;
                font-weight: bold;
            }
            .importance-badge.critical { background: #dc3545; color: white; }
            .importance-badge.high { background: #fd7e14; color: white; }
            .importance-badge.medium { background: #ffc107; color: #000; }
            .header-content {
                font-size: 14px;
            }
            .header-value code, .header-recommendation code {
                display: block;
                padding: 8px;
                background: #f8f9fa;
                border-radius: 4px;
                margin-top: 5px;
                word-break: break-all;
                font-size: 12px;
            }
            .security-score {
                font-size: 32px;
                font-weight: bold;
                padding: 15px;
                border-radius: 50%;
                width: 60px;
                height: 60px;
                display: flex;
                align-items: center;
                justify-content: center;
                color: white;
                margin-bottom: 5px;
            }
            .score-high { background: #28a745; }
            .score-medium { background: #ffc107; }
            .score-low { background: #dc3545; }
            .results-footer {
                margin-top: 30px;
                text-align: center;
                padding-top: 20px;
                border-top: 1px solid #eee;
            }