/* 뉴스 페이지 스타일 */

.news-container {
    max-width: 1920px;
    margin: 0 auto;
    /* padding: 80px 20px 40px; -- Handled by content-top-bar.css */
    min-height: calc(100vh - 200px);
}

/* 로또 페이지와 동일한 헤더 스타일 */
.news-header {
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.1), rgba(255, 179, 71, 0.1));
    border: 2px solid rgba(247, 147, 26, 0.4);
    border-radius: 16px;
    /* padding: 30px; -- Handled by content-top-bar.css */
    text-align: center;
    /* margin-bottom: 40px; -- Handled by content-top-bar.css */
    margin-left: auto;
    margin-right: auto;
    max-width: 1400px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(247, 147, 26, 0.15);
}

.news-title {
    font-size: 1.8rem;
    font-weight: 600;
    background: linear-gradient(135deg, #f7931a, #ff6b00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    display: inline-block;
}

.news-subtitle {
    color: #e5e7eb;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.update-timestamp {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 10px;
}

/* 뉴스 그리드 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* 뉴스 아이템 */
.news-item {
    background: var(--card-bg);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.news-item.clickable {
    cursor: pointer;
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.6);
    background: rgba(255, 215, 0, 0.02);
}

.news-item.clickable:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

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

/* 키워드 배지 */
.news-keyword {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.keyword-bitcoin {
    background: linear-gradient(135deg, #f7931a, #ff9800);
    color: white;
}

.keyword-ethereum {
    background: linear-gradient(135deg, #627eea, #8299ff);
    color: white;
}

.keyword-ripple {
    background: linear-gradient(135deg, #00aae4, #00d4ff);
    color: white;
}

.keyword-altcoin {
    background: linear-gradient(135deg, #8e44ad, #b163d3);
    color: white;
}

.keyword-crypto {
    background: linear-gradient(135deg, #16a085, #1abc9c);
    color: white;
}

.keyword-fed {
    background: linear-gradient(135deg, #e74c3c, #ff6b6b);
    color: white;
}

.keyword-dollar {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.keyword-default {
    background: linear-gradient(135deg, #95a5a6, #bdc3c7);
    color: white;
}

/* 뉴스 시간 */
.news-time {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* 뉴스 제목 */
.news-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-primary);
}

.news-item.clickable:hover .news-item-title {
    color: var(--primary-color);
}

/* 뉴스 요약 */
.news-item-summary {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 뉴스 푸터 */
.news-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.news-source {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* 로딩 상태 */
.loading-news {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 에러 메시지 */
.error-message {
    text-align: center;
    padding: 40px;
    grid-column: 1 / -1;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.error-message button {
    margin-top: 20px;
    padding: 10px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.error-message button:hover {
    opacity: 0.9;
}

/* 뉴스 없음 */
.no-news {
    text-align: center;
    padding: 60px;
    grid-column: 1 / -1;
    color: var(--text-muted);
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 50px 0;
    padding: 20px;
    flex-wrap: wrap;
}

.page-btn,
.page-num {
    padding: 10px 16px;
    border: 2px solid rgba(255, 215, 0, 0.3);  /* 뉴스 아이템과 동일한 황금색 테두리 */
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 45px;
    text-align: center;
}

.page-btn:hover:not(.disabled),
.page-num:hover {
    background: rgba(255, 215, 0, 0.02);  /* 뉴스 아이템과 동일한 호버 효과 */
    border-color: rgba(255, 215, 0, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.2);
}

.page-num.active {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 140, 0, 0.1) 100%);
    border-color: rgba(255, 215, 0, 0.6);
    color: var(--primary-color);
    font-weight: 700;
}

.page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: rgba(255, 215, 0, 0.1);  /* 비활성 상태도 연한 황금색 */
}

.page-dots {
    padding: 0 8px;
    color: var(--text-muted);
    font-weight: 600;
    user-select: none;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .news-container {
        padding: 70px 15px 30px;
    }

    .news-header {
        padding: 30px 15px;
    }

    .news-title {
        font-size: 1.5rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .news-item {
        padding: 15px;
    }

    .news-item-title {
        font-size: 1rem;
    }

    .pagination {
        gap: 4px;
        padding: 15px;
    }

    .page-btn,
    .page-num {
        padding: 8px 12px;
        font-size: 0.9rem;
        min-width: 40px;
    }
}

@media (max-width: 480px) {
    .news-title {
        font-size: 1.5rem;
    }

    .news-subtitle {
        font-size: 1rem;
    }

    .page-btn,
    .page-num {
        padding: 6px 10px;
        font-size: 0.85rem;
        min-width: 35px;
    }
}