/* 新闻模态框样式 */
.news-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.news-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    max-height: 80vh;
    width: 90%;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.3s ease;
}

.news-modal-header {
    background: var(--primary-color, #2c5aa0);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.news-modal-close {
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.news-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.news-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.news-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.news-date {
    color: #666;
    font-size: 0.9rem;
}

.news-author {
    color: #666;
    font-size: 0.9rem;
}

.news-content {
    line-height: 1.8;
    color: #333;
    font-size: 1rem;
}

.news-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

/* 加载状态样式 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color, #2c5aa0);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-container p {
    margin: 0;
    font-size: 1rem;
}

/* 错误状态样式 */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
}

.error-message {
    color: #e74c3c;
    font-size: 1rem;
    margin-bottom: 20px;
    text-align: center;
}

.retry-btn {
    background: var(--primary-color, #2c5aa0);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.retry-btn:hover {
    background: var(--secondary-color, #1e3d72);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .news-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .news-modal-header {
        padding: 15px;
    }
    
    .news-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .news-modal-body {
        padding: 15px;
        max-height: 70vh;
    }
    
    .news-meta {
        flex-direction: column;
        gap: 10px;
    }
} 