:root {
    --brand-red: #e50914;
    --brand-blue: #0b5a99;
    --dark-blue: #064879;
    --soft-bg: #f4f7fb;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--soft-bg);
    color: #222;
}

.logo-red { color: var(--brand-red); }
.logo-blue { color: var(--brand-blue); }

.site-logo {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.navbar {
    background: var(--brand-blue);
}

.navbar .nav-link,
.navbar .navbar-brand {
    color: #fff !important;
    font-weight: 700;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    background: var(--brand-red);
    border-radius: .25rem;
}

.dropdown-menu {
    border: none;
    border-radius: 0 0 .5rem .5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
}

.dropdown-item {
    font-weight: 600;
    padding: .75rem 1rem;
}

.dropdown-item:hover {
    background: var(--brand-blue);
    color: #fff;
}

.hero-slide {
    min-height: 360px;
    background: linear-gradient(135deg, #0b5a99, #e50914);
    color: #fff;
    display: flex;
    align-items: center;
}

/* Fix: nút bên trong slide nổi trên carousel-control */
.hero-slide .btn {
    position: relative;
    z-index: 10;
}

.hero-slide.alt-1 { background: linear-gradient(135deg, #064879, #118ab2); }
.hero-slide.alt-2 { background: linear-gradient(135deg, #222, #0b5a99); }

.section-title {
    border-left: 6px solid var(--brand-red);
    padding-left: .75rem;
    font-weight: 800;
    color: var(--brand-blue);
}

.news-card {
    transition: transform .2s ease, box-shadow .2s ease;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .12);
}

.news-thumb {
    height: 180px;
    background: linear-gradient(135deg, #dbeafe, #0b5a99);
    color: white;
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-box {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.footer {
    background: #222;
    color: #eee;
}

@media (min-width: 992px) {
    .navbar .dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

@media (max-width: 767.98px) {
    .site-logo {
        font-size: 1.5rem;
    }

    .hero-slide {
        min-height: 260px;
        text-align: center;
    }

    .article-box {
        padding: 1.25rem;
    }
}


/* Hình ảnh bài viết lấy từ post.json/images */
.news-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.article-box .news-img {
    height: auto;
    max-height: 420px;
    object-fit: cover;
}

/* Banner: khung ngày giờ, thời tiết, xu hướng */
.hero-slide .container {
    position: relative;
    z-index: 5;
}

.hero-info-card {
    position: relative;
    z-index: 8;
    width: 100%;
    max-width: 430px;
    margin-left: auto;
    padding: 1.25rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .28);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
    backdrop-filter: blur(10px);
}

.hero-info-card.compact {
    padding: 1.5rem;
}

.hero-info-label {
    display: inline-block;
    color: #ffe1e6;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08rem;
}

.hero-info-title {
    margin: .25rem 0 0;
    color: #fff;
    font-size: 1.45rem;
    font-weight: 800;
}

.hero-info-icon {
    font-size: 2rem;
    color: #fff;
    opacity: .9;
}

.hero-info-row {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .7rem 0;
    border-top: 1px solid rgba(255, 255, 255, .2);
}

.hero-info-row i {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 1.15rem;
    flex: 0 0 auto;
}

.hero-info-row strong,
.hero-info-row span {
    display: block;
}

.hero-info-row span {
    color: #f3f6ff;
    font-size: .95rem;
}

.hero-trending {
    padding-top: .6rem;
    border-top: 1px solid rgba(255, 255, 255, .2);
}

.trend-pill {
    display: inline-flex;
    align-items: center;
    padding: .35rem .75rem;
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 700;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .26);
    transition: background .2s ease, transform .2s ease;
}

.trend-pill:hover {
    color: #fff;
    background: rgba(255, 255, 255, .3);
    transform: translateY(-2px);
}

.worldcup-box {
    padding: .85rem;
    border-radius: .9rem;
    background: rgba(0, 0, 0, .18);
    border: 1px solid rgba(255, 255, 255, .2);
}

.live-badge {
    padding: .2rem .55rem;
    border-radius: 999px;
    background: #e50914;
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .05rem;
}

@media (max-width: 991.98px) {
    .hero-info-card {
        max-width: 100%;
        margin: 1.5rem 0 0;
    }
}

@media (max-width: 767.98px) {
    .hero-info-card {
        text-align: left;
        padding: 1rem;
    }

    .hero-info-title {
        font-size: 1.2rem;
    }

    .hero-info-row {
        padding: .55rem 0;
    }
}

/* Box chạy chữ tin mới trên thanh menu */
.navbar .container {
    gap: 1rem;
}

.breaking-news-box {
    width: min(520px, 45vw);
    height: 42px;
    margin-left: auto;
    align-items: center;
    overflow: hidden;
    background: #ffffff;
    border-radius: .45rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}

.breaking-label {
    height: 100%;
    padding: 0 .9rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
    background: var(--brand-red);
    color: #ffffff;
    font-weight: 800;
}

.breaking-content {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.breaking-content span {
    display: inline-block;
    padding-left: 100%;
    color: var(--brand-blue);
    font-weight: 700;
    animation: breakingNewsRun 22s linear infinite;
}

.breaking-news-box:hover .breaking-content span {
    animation-play-state: paused;
}

@keyframes breakingNewsRun {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

@media (max-width: 1199.98px) {
    .breaking-news-box {
        width: min(420px, 38vw);
    }
}


/* Header: tìm kiếm + đăng nhập */
.header-actions {
    flex-wrap: nowrap;
}

.search-box .form-control {
    min-width: 220px;
}

.login-header-btn {
    white-space: nowrap;
    font-weight: 700;
}

.search-suggest-box {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: min(420px, 90vw);
    background: #fff;
    border-radius: .6rem;
    overflow: hidden;
    z-index: 2000;
    border: 1px solid #e6eaf0;
}

.suggest-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem;
    color: #222;
    text-decoration: none;
    border-bottom: 1px solid #eef1f5;
}

.suggest-item:hover {
    background: #f5f8fc;
    color: var(--brand-blue);
}

.suggest-item img {
    width: 58px;
    height: 42px;
    object-fit: cover;
    border-radius: .35rem;
}

.suggest-item small {
    display: block;
    color: #6c757d;
    margin-top: .15rem;
}

.suggest-empty {
    padding: .85rem;
    color: #6c757d;
}

/* Filter, tìm kiếm, sắp xếp */
.advanced-filter-box {
    background: #fff;
    padding: 1.25rem;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.filter-btn {
    font-weight: 700;
}

/* Trang đăng nhập */
.auth-page {
    min-height: 520px;
}

.auth-card {
    width: min(460px, 100%);
    background: #fff;
    padding: 1.75rem;
    border-radius: 1rem;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .08);
}

.auth-card .nav-link {
    font-weight: 700;
}

@media (max-width: 767.98px) {
    .site-header .container {
        align-items: flex-start !important;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch !important;
    }

    .search-box {
        width: 100%;
    }

    .search-box > .position-relative {
        flex: 1;
    }

    .search-box .form-control {
        min-width: 0;
        width: 100%;
    }

    .login-header-btn {
        width: 100%;
    }
}

/* User Avatar */
.avatar-circle {
    transition: all 0.3s ease;
    font-size: 14px;
    flex-shrink: 0;
}

.dropdown > .btn:hover .avatar-circle {
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.3);
}

.dropdown-menu {
    z-index: 2001 !important;
}

/* Dark Mode */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .bg-white,
body.dark-mode .card,
body.dark-mode .modal-content,
body.dark-mode .auth-card,
body.dark-mode .advanced-filter-box {
    background-color: #2d2d2d !important;
    color: #e0e0e0;
    border-color: #444 !important;
}

body.dark-mode .site-header {
    background-color: #2d2d2d !important;
    border-bottom-color: #444;
}

body.dark-mode .navbar {
    background-color: #1a1a1a !important;
}

body.dark-mode .search-suggest-box {
    background-color: #2d2d2d;
    border-color: #444;
}

body.dark-mode .form-control,
body.dark-mode .form-select {
    background-color: #3a3a3a;
    color: #e0e0e0;
    border-color: #444;
}

body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
    background-color: #3a3a3a;
    color: #e0e0e0;
    border-color: #0066cc;
    box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.25);
}

body.dark-mode .suggest-item:hover {
    background-color: #3a3a3a;
}

body.dark-mode .dropdown-menu {
    background-color: #2d2d2d;
    border-color: #444;
}

body.dark-mode .dropdown-item {
    color: #e0e0e0;
}

body.dark-mode .dropdown-item:hover,
body.dark-mode .dropdown-item:focus {
    background-color: #3a3a3a;
    color: #fff;
}

body.dark-mode .text-muted {
    color: #b0b0b0 !important;
}

body.dark-mode .footer {
    background-color: #2d2d2d;
    border-top-color: #444;
}

body.dark-mode .modal-header {
    border-bottom-color: #444;
}

body.dark-mode .modal-footer {
    border-top-color: #444;
}

body.dark-mode .dropdown-divider {
    border-color: #444;
}

body.dark-mode .list-group-item {
    background-color: #3a3a3a;
    border-color: #444;
    color: #e0e0e0;
}

.form-switch.ps-0 .form-check-input {
    margin-left: 0;
    margin-right: 0.5rem;
}
