﻿/* News Center Styles */

.news-categories {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    background: rgba(20, 30, 70, 0.4);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(60, 80, 160, 0.2);
}

.category-btn {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(60, 80, 160, 0.3);
    background: rgba(30, 40, 90, 0.3);
    color: #b0c4de;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background: rgba(60, 80, 160, 0.3);
}

.category-btn.active {
    background: linear-gradient(135deg, #4a69bd 0%, #6a89cc 100%);
    border-color: #4a69bd;
    color: #ffffff;
}

.news-container {
    padding: 0 0 80px 0;
    min-height: calc(100vh - 200px);
}

.news-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
}

.news-loading.hidden { display: none; }

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(80, 100, 200, 0.2);
    border-top-color: #4a69bd;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.news-item {
    background: rgba(20, 30, 70, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(60, 80, 160, 0.2);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-item:hover {
    background: rgba(30, 40, 80, 0.5);
    transform: translateY(-2px);
}

.news-item.with-image {
    display: flex;
    gap: 12px;
}

.news-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
}

.news-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.news-source {
    font-size: 12px;
    color: #4a69bd;
    font-weight: 500;
}

.news-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    background: rgba(74, 105, 189, 0.2);
    color: #6a89cc;
    border: 1px solid rgba(74, 105, 189, 0.3);
}

.news-title {
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
}

.news-description {
    font-size: 13px;
    color: #8b9dc3;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
}

.news-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 8px;
}

.news-time {
    font-size: 12px;
    color: #6b7c93;
}

.news-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #6b7c93;
}

.news-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-stat svg {
    width: 14px;
    height: 14px;
}

body.light-mode .news-categories {
    background: rgba(250, 252, 255, 0.8);
}

body.light-mode .category-btn {
    background: rgba(240, 245, 255, 0.6);
    color: #2d3748;
}

body.light-mode .news-item {
    background: rgba(255, 255, 255, 0.8);
}

body.light-mode .news-title {
    color: #1a202c;
}

body.light-mode .news-description {
    color: #4a5568;
}
