/* ================================================================= */
/* CVE FEED STYLES */
/* ================================================================= */

/* CVE List Page */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    color: var(--primary-orange);
    font-size: 2rem;
    margin-bottom: 10px;
}

.page-description {
    color: #666;
    font-size: 1rem;
}

.cve-loading,
.cve-error {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.cve-error {
    color: #d32f2f;
    background-color: #ffebee;
    border: 1px solid #ef9a9a;
    border-radius: 8px;
    padding: 20px;
}

/* CVE Card */
.cve-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cve-card {
    background-color: var(--bg-card-light);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.cve-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.cve-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.cve-id {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.cve-id a {
    color: var(--primary-orange);
    text-decoration: none;
    transition: color 0.2s ease;
}

.cve-id a:hover {
    color: var(--secondary-orange);
    text-decoration: underline;
}

.cve-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.cve-severity {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    color: white;
}

.cve-trend {
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.cve-trend-high {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.cve-trend-medium {
    background-color: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

.cve-trend-low {
    background-color: #f1f8e9;
    color: #558b2f;
    border: 1px solid #aed581;
}

.cve-content {
    margin-top: 15px;
}

.cve-description {
    color: #333;
    line-height: 1.7;
    margin-bottom: 15px;
}

.cve-affected {
    margin: 15px 0;
    padding: 12px;
    background-color: #f5f5f5;
    border-radius: 6px;
}

.cve-affected strong {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 0.9rem;
}

.cve-software-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cve-software-tag {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    border: 1px solid #90caf9;
}

.cve-software-more {
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
}

.cve-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 10px;
}

.cve-date {
    color: #666;
    font-size: 0.9rem;
}

.cve-read-more {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.cve-read-more:hover {
    color: var(--secondary-orange);
    text-decoration: underline;
}

/* CVE Single Page */
.cve-single .cve-meta-container {
    margin: 20px 0;
}

.cve-severity-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.cve-metrics {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.metric-item {
    margin: 10px 0;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.metric-item:last-child {
    border-bottom: none;
}

.metric-item strong {
    color: #666;
    margin-right: 10px;
}

.metric-item code {
    background-color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.cve-affected-list {
    list-style: none;
    padding: 0;
}

.cve-affected-list li {
    padding: 10px;
    margin: 8px 0;
    background-color: #f5f5f5;
    border-radius: 6px;
    border-left: 4px solid var(--primary-orange);
}

.cve-affected-list strong {
    color: var(--primary-orange);
}

.cve-version {
    color: #666;
    font-size: 0.9em;
    margin-left: 10px;
}

.cve-references {
    list-style: none;
    padding: 0;
}

.cve-references li {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.cve-references li:last-child {
    border-bottom: none;
}

.cve-references a {
    color: var(--primary-orange);
    text-decoration: none;
    word-break: break-all;
}

.cve-references a:hover {
    text-decoration: underline;
}

.cve-dates {
    margin-top: 30px;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.cve-dates p {
    margin: 8px 0;
    color: #666;
}

/* Dark Mode */
body.dark .cve-card {
    background-color: var(--card-dark);
    border-color: #444;
}

body.dark .cve-card:hover {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

body.dark .cve-description {
    color: #e0e0e0;
}

body.dark .cve-affected {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark .cve-software-tag {
    background-color: rgba(74, 144, 226, 0.2);
    color: #90caf9;
    border-color: rgba(90, 157, 226, 0.4);
}

body.dark .cve-footer {
    border-top-color: #444;
}

body.dark .cve-date {
    color: #aaa;
}

body.dark .cve-metrics {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark .metric-item {
    border-bottom-color: #444;
}

body.dark .cve-affected-list li {
    background-color: rgba(255, 255, 255, 0.05);
    border-left-color: #ffcc80;
}

body.dark .cve-references li {
    border-bottom-color: #444;
}

body.dark .cve-dates {
    background-color: rgba(255, 255, 255, 0.05);
}

/* CVE Detail Overlay */
.cve-detail-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    align-items: flex-start;
    justify-content: center;
}

.cve-detail-container {
    background-color: var(--bg-card-light);
    border-radius: 12px;
    padding: 30px;
    max-width: 900px;
    width: 100%;
    margin: 40px auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cve-detail-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.cve-detail-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.cve-detail-content {
    margin-top: 20px;
}

body.dark .cve-detail-container {
    background-color: var(--card-dark);
}

body.dark .cve-detail-close {
    color: #aaa;
}

body.dark .cve-detail-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .cve-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cve-id {
        font-size: 1.25rem;
    }
    
    .cve-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cve-detail-container {
        padding: 20px;
        margin: 20px;
    }
    
    .cve-detail-close {
        top: 10px;
        right: 10px;
    }
}

