/**
 * CRYPTO TEK AI - NEWS PAGE STYLES
 * Modern news feed design with smooth animations
 */

.news-container {
    padding-bottom: 20px;
}

/* ==================== HEADER ==================== */

.news-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.news-header-top h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.news-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin: 0;
}

.news-refresh-btn {
    background: rgba(255, 107, 53, 0.15);
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FF6B35;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-refresh-btn:hover {
    background: rgba(255, 107, 53, 0.25);
    border-color: rgba(255, 107, 53, 0.5);
    transform: scale(1.05);
}

.news-refresh-btn:active {
    transform: scale(0.95) rotate(180deg);
}

.news-refresh-btn i {
    transition: transform 0.6s ease;
}

.news-refresh-btn:active i {
    transform: rotate(360deg);
}

/* ==================== FILTERS ==================== */

.news-filters {
    margin: 20px 0;
    overflow: hidden;
}

.news-filter-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.news-filter-scroll::-webkit-scrollbar {
    display: none;
}

.news-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-filter-btn i {
    font-size: 16px;
    opacity: 0.8;
}

.news-filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 107, 53, 0.3);
    transform: translateY(-2px);
}

.news-filter-btn.active {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.25) 0%, rgba(247, 147, 26, 0.25) 100%);
    border-color: #FF6B35;
    color: #FF6B35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.news-filter-btn.active i {
    opacity: 1;
}

.news-filter-locked {
    opacity: 0.5;
    position: relative;
}

.news-filter-locked::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

/* ==================== COIN FILTERS ==================== */

.news-coin-filters,
.news-category-filters {
    margin: 16px 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.news-section-locked {
    opacity: 0.6;
    position: relative;
}

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

.news-section-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-section-header h3 i {
    color: #FF6B35;
    font-size: 14px;
}

.news-lock-icon {
    color: #FFD700;
    font-size: 14px;
}

.news-coin-scroll,
.news-category-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.news-coin-scroll::-webkit-scrollbar,
.news-category-scroll::-webkit-scrollbar {
    display: none;
}

.news-coin-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-coin-btn:hover:not(.news-coin-locked) {
    background: rgba(255, 107, 53, 0.15);
    border-color: rgba(255, 107, 53, 0.3);
    color: #FF6B35;
}

.news-coin-btn.active {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931A 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.news-coin-locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.news-category-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-category-btn i {
    font-size: 14px;
    opacity: 0.8;
}

.news-category-btn:hover:not(.news-category-locked) {
    background: rgba(255, 107, 53, 0.15);
    border-color: rgba(255, 107, 53, 0.3);
    color: #FF6B35;
}

.news-category-btn:hover:not(.news-category-locked) i {
    opacity: 1;
}

.news-category-btn.active {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.25) 0%, rgba(247, 147, 26, 0.25) 100%);
    border-color: #FF6B35;
    color: #FF6B35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.news-category-btn.active i {
    opacity: 1;
}

.news-category-locked {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== ACTIVE FILTER BADGE ==================== */

.news-active-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 12px 0;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(247, 147, 26, 0.15) 100%);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 10px;
}

.news-active-filter.hidden {
    display: none;
}

.news-active-filter span {
    color: #FF6B35;
    font-size: 14px;
    font-weight: 600;
}

.news-clear-filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 107, 53, 0.2);
    border: none;
    border-radius: 50%;
    color: #FF6B35;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.news-clear-filter-btn:hover {
    background: #FF6B35;
    color: white;
}

/* ==================== NEWS FEED ==================== */

.news-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-article {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInUp 0.4s ease forwards;
}

.news-article.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-article:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(255, 107, 53, 0.3);
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

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

.news-source {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #FF6B35;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 107, 53, 0.1);
    padding: 4px 10px;
    border-radius: 8px;
    flex-shrink: 0;
}

.news-source i {
    font-size: 12px;
}

.news-time {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    white-space: nowrap;
}

.news-time i {
    font-size: 11px;
}

.news-title {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin: 0 0 12px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-actions {
    display: flex;
    gap: 8px;
}

.news-read-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931A 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.news-read-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

.news-read-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.news-read-btn i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.news-read-btn:hover i {
    transform: translateX(4px);
}

/* ==================== LOADING STATE ==================== */

.news-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
}

.news-loading .loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 107, 53, 0.1);
    border-top-color: #FF6B35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.news-loading p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin: 0;
}

/* ==================== EMPTY STATE ==================== */

.news-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    gap: 12px;
}

.news-empty-state i {
    font-size: 64px;
    color: rgba(255, 107, 53, 0.3);
    margin-bottom: 8px;
}

.news-empty-state h3 {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin: 0;
}

.news-empty-state p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 16px 0;
    max-width: 280px;
}

/* ==================== LOCKED NEWS CARD ==================== */

.news-locked-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 165, 0, 0.03) 100%);
    border: 2px dashed rgba(255, 215, 0, 0.3);
    min-height: 120px;
}

.news-locked-card:hover {
    border-color: rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 165, 0, 0.05) 100%);
    transform: none;
}

.news-locked-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px 8px;
    gap: 12px;
}

.news-locked-icon {
    font-size: 28px;
    color: #FFD700;
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.4));
}

.news-locked-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    max-width: 240px;
    line-height: 1.4;
}

.btn-upgrade-news {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: none;
    border-radius: 12px;
    color: #1a1a2e;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);
}

.btn-upgrade-news:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.btn-upgrade-news:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 12px rgba(255, 215, 0, 0.3);
}

.btn-upgrade-news i {
    font-size: 14px;
}

/* ==================== LOAD MORE ==================== */

.news-load-more {
    margin-top: 24px;
    text-align: center;
}

.news-load-more.hidden {
    display: none;
}

.news-load-more .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-radius: 12px;
    color: #FF6B35;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-load-more .btn-primary:hover {
    background: rgba(255, 107, 53, 0.15);
    border-color: #FF6B35;
    transform: translateY(-2px);
}

.news-load-more .btn-primary:active {
    transform: translateY(0);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 480px) {
    .news-header-top h1 {
        font-size: 24px;
    }

    .news-subtitle {
        font-size: 13px;
    }

    .news-refresh-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .news-filter-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .news-title {
        font-size: 15px;
    }

    .news-description {
        font-size: 13px;
    }

    .news-article {
        padding: 14px;
    }
}

/* ==================== DARK MODE ENHANCEMENTS ==================== */

@media (prefers-color-scheme: dark) {
    .news-article {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .news-article:hover {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%);
    }
}

/* ==================== SMOOTH SCROLL ==================== */

.news-feed {
    scroll-behavior: smooth;
}

/* ==================== ACCESSIBILITY ==================== */

.news-read-btn:focus,
.news-filter-btn:focus,
.news-refresh-btn:focus {
    outline: 2px solid #FF6B35;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .news-article,
    .news-read-btn,
    .news-filter-btn,
    .news-refresh-btn {
        animation: none;
        transition: none;
    }
}
