/* 뉴스 관련 스타일 - 기존 디자인 시스템과 통일 */

/* 뉴스 필터 셀렉트 박스 - 다른 탭과 통일 */
#news-source-filter {
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 14px;
    color: #fff;
    min-width: 180px;
    transition: all 0.3s ease;
}

#news-source-filter:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.3);
}

#news-source-filter:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

/* 뉴스 아이템 카드 */
.news-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(52, 152, 219, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

/* 카드 전체 클릭 시 효과 */
.news-item:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.1);
}

/* 뉴스 헤더 */
.news-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.news-source {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-date {
    color: #888;
    font-size: 13px;
}

/* 뉴스 제목 */
.news-title-link {
    display: block;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer;
}

.news-title-link:hover {
    color: #3498db;
    text-decoration: underline;
}

/* 뉴스 설명 */
.news-description {
    color: #aaa;
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 읽기 버튼 */
.news-read-more {
    display: inline-block;
    margin-top: 10px;
    color: #3498db;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-read-more:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 페이지네이션 버튼 - 기존 스타일과 통일 */
.pagination-btn {
    padding: 8px 12px;
    margin: 0 2px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.pagination-btn:hover:not(.active):not(:disabled) {
    background: rgba(52, 152, 219, 0.2);
    border-color: rgba(52, 152, 219, 0.5);
}

.pagination-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    font-weight: 600;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 로딩 스피너 */
.news-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #888;
}

.news-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.news-loading-text {
    margin-top: 15px;
    font-size: 14px;
}

/* 뉴스가 없을 때 */
.no-news {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 16px;
}

.no-news-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 새로고침 버튼 애니메이션 */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

button:active .refresh-icon {
    animation: rotate 0.5s ease-in-out;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .news-item {
        padding: 15px;
    }
    
    .news-title-link {
        font-size: 15px;
    }
    
    .news-description {
        font-size: 13px;
    }
    
    #news-source-filter {
        width: 100%;
        min-width: 100%;
    }
    
    #news-last-updated {
        text-align: center !important;
        margin-top: 10px;
    }
}

/* 라이트 모드 대응 */
body.light-theme #news-source-filter {
    background: rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(0, 0, 0, 0.3) !important;
    color: #212121 !important;
}

body.light-theme #news-source-filter:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(139, 92, 246, 0.5);
}

body.light-theme #news-source-filter option {
    background: #fff;
    color: #333;
}

body.light-theme .news-item {
    background: #f8f8f8 !important;
    border: 2px solid #d0d0d0 !important;
}

body.light-theme .news-item:hover {
    background: #f0f0f0 !important;
    border-color: #3498db !important;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

body.light-theme .news-title-link {
    color: #212121 !important;
}

body.light-theme .news-title-link:hover {
    color: #1976d2 !important;
}

body.light-theme .news-description {
    color: #555555 !important;
}

body.light-theme .news-date {
    color: #757575 !important;
}

body.light-theme .news-read-more {
    color: #2980b9;
}

body.light-theme .news-read-more:hover {
    color: #1e6ba8;
}

body.light-theme .pagination-btn {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
}

body.light-theme .pagination-btn:hover:not(.active):not(:disabled) {
    background: rgba(52, 152, 219, 0.15);
    border-color: rgba(52, 152, 219, 0.6);
}

body.light-theme .pagination-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

body.light-theme .pagination-btn:disabled {
    opacity: 0.5;
    color: #999;
}

body.light-theme #news-last-updated {
    color: #666;
}

body.light-theme .no-news {
    color: #666;
}

body.light-theme .news-loading-text {
    color: #666;
}