/* Reset & base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f6f9fc;
    color: #1a2634;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 14px 0;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.6rem;
    color: #0b3b5c;
}

.logo__icon {
    font-size: 1.8rem;
}

.logo__text {
    letter-spacing: -0.5px;
}

.nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.nav__link {
    text-decoration: none;
    color: #3d4e63;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
}

.nav__link:hover,
.nav__link.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
}

.header__time {
    font-size: 0.9rem;
    color: #6b7a8c;
    background: #eef3f7;
    padding: 4px 12px;
    border-radius: 30px;
    white-space: nowrap;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #e3f0fa 0%, #ffffff 100%);
    padding: 40px 0 32px;
    border-bottom: 1px solid #e6edf4;
}

.hero__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.hero__title {
    font-size: 2.0rem;
    font-weight: 700;
    color: #0b2a41;
    margin-bottom: 8px;
}

.hero__subtitle {
    font-size: 1.1rem;
    color: #3d5a73;
}

.hero__badge {
    background: #ff5e5e;
    color: #fff;
    padding: 8px 18px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255,94,94,0.3);
    white-space: nowrap;
}

.badge__live {
    animation: pulse 1.2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* News section */
.news {
    padding: 30px 0 20px;
}

.news__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #0b2a41;
}

.btn-refresh {
    background: #fff;
    border: 1px solid #d0dbe8;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 500;
    color: #1a2634;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-refresh:hover {
    background: #eef3f7;
    border-color: #b0c4d8;
}

.btn-refresh:active {
    transform: rotate(30deg);
}

.news__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
    color: #6b7a8c;
    font-size: 1.1rem;
}

/* News card */
.news-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    padding: 20px;
    transition: transform 0.15s ease, box-shadow 0.2s;
    border: 1px solid #edf2f7;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

.news-card__source {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0066cc;
    background: #e6f0fa;
    padding: 2px 12px;
    border-radius: 30px;
    align-self: flex-start;
    margin-bottom: 10px;
}

.news-card__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0b2a41;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-card__title a {
    color: inherit;
    text-decoration: none;
}

.news-card__title a:hover {
    color: #0066cc;
}

.news-card__excerpt {
    font-size: 0.95rem;
    color: #3d5a73;
    margin-bottom: 12px;
    flex-grow: 1;
}

.news-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #7a8b9e;
    border-top: 1px solid #eef3f7;
    padding-top: 12px;
    margin-top: 4px;
}

.news-card__date {
    white-space: nowrap;
}

/* Load more button */
.news__load-more {
    text-align: center;
    margin: 20px 0 30px;
}

.btn-load {
    background: #fff;
    border: 1.5px solid #0066cc;
    color: #0066cc;
    padding: 10px 40px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-load:hover {
    background: #0066cc;
    color: #fff;
}

.btn-load:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Sidebar (popular) */
.sidebar {
    margin-bottom: 30px;
}

.sidebar__popular {
    background: #fff;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.03);
    border: 1px solid #edf2f7;
}

.sidebar__title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #0b2a41;
    margin-bottom: 14px;
}

.popular-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popular-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f5fa;
}

.popular-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-list .rank {
    font-weight: 700;
    color: #b0c4d8;
    font-size: 0.9rem;
    min-width: 24px;
}

.popular-list .popular-title {
    font-weight: 500;
    color: #1a2634;
    font-size: 0.95rem;
    transition: color 0.2s;
    cursor: default;
}

.popular-list .popular-title:hover {
    color: #0066cc;
}

/* Footer */
.footer {
    background: #fff;
    border-top: 1px solid #e6edf4;
    padding: 24px 0;
    margin-top: 20px;
    color: #6b7a8c;
    font-size: 0.85rem;
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .header__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .nav {
        justify-content: center;
        gap: 14px;
    }
    .hero__title {
        font-size: 1.6rem;
    }
    .hero__inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .news__grid {
        grid-template-columns: 1fr;
    }
    .sidebar__popular {
        padding: 16px;
    }
    .footer__inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo__text {
        font-size: 1.4rem;
    }
    .nav__link {
        font-size: 0.85rem;
    }
    .hero__title {
        font-size: 1.3rem;
    }
}