:root {
    --bg: #050709;
    --panel: #0a0e12;
    --panel-2: #0e1318;
    --line: #263039;
    --text: #f4f6f7;
    --muted: #9ba5ad;
    --gold: #ffb000;
    --gold-2: #ff8f00;
    --danger: #ff6b35;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at 60% -10%, rgba(255,176,0,.08), transparent 30%), var(--bg);
    color: var(--text);
    /* Inter có đủ weight 400-900 thật + phủ đúng dấu tiếng Việt; Arial chỉ để fallback khi font chưa tải xong. */
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-size: 14px;
}

a {
    color: inherit;
    text-decoration: none;
}

.container-fluid.portal-container {
    max-width: 1550px;
    margin: auto;
    padding-left: 14px;
    padding-right: 14px;
}

/* ---------- HEADER ---------- */
.topbar {
    min-height: 68px;
    border-bottom: 1px solid #1d252c;
    background: rgba(3,5,7,.96);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.brand {
    line-height: 1;
    display: flex;
    align-items: center;
}

.brand-img {
    height: 42px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.brand-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -1px;
}

    .brand-title span {
        color: var(--gold);
    }

.brand-sub {
    display: block;
    margin-top: 5px;
    font-size: 8px;
    letter-spacing: 1.3px;
    color: #d2d5d7;
}

.main-nav .nav-link {
    color: #e7e9ea;
    padding: 25px 14px 21px;
    font-size: 12px;
    font-weight: 600;
    position: relative;
    text-transform: uppercase;
}

    .main-nav .nav-link:hover,
    .main-nav .nav-link.active {
        color: var(--gold);
    }

        .main-nav .nav-link.active::after {
            content: "";
            position: absolute;
            left: 14px;
            right: 14px;
            bottom: 0;
            height: 2px;
            background: var(--gold);
        }

.header-actions {
    white-space: nowrap;
}

/* Priority+ menu: desktop giữ mỗi mục 1 dòng, mục tràn được JS (fitMainNav ở _LayoutPortal) dồn vào dropdown "Thêm" */
@media (min-width: 992px) {
    .main-nav {
        flex-wrap: nowrap;
        min-width: 0;
    }

        .main-nav .nav-link {
            white-space: nowrap;
        }
}

.nav-more-menu .dropdown-item {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 8px 16px;
}

    .nav-more-menu .dropdown-item:hover,
    .nav-more-menu .dropdown-item.active {
        color: #d88900;
        background: transparent;
    }

.icon-btn {
    color: #fff;
    background: transparent;
    border: 0;
    padding: 8px 10px;
}

/* Lá cờ đổi ngôn ngữ trên header (_LayoutPortal) */
.lang-flag {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .25);
}

.lang-switcher .dropdown-menu {
    min-width: 10rem;
}

.header-welcome-text {
    color: #fff;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-input {
    width: 0;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    font-size: 12px;
    opacity: 0;
    overflow: hidden;
    transition: width .28s ease, opacity .2s ease, padding .28s ease, margin .28s ease;
}

    .search-input::placeholder {
        color: var(--muted);
        opacity: .85;
    }

    .search-input:focus {
        outline: none;
    }

.search-box.active .search-input {
    width: 170px;
    padding: 7px 10px;
    margin-right: 6px;
    opacity: 1;
    background: var(--panel-2);
    border-color: var(--line);
}

    .search-box.active .search-input:focus {
        border-color: var(--gold);
    }

.btn-signin {
    border: 1px solid #6a4d12;
    background: transparent;
    color: white;
    font-weight: 700;
    font-size: 11px;
    padding: 10px 16px;
}

    .btn-signin:hover {
        border-color: var(--gold);
        color: var(--gold);
    }

.btn-gold {
    background: linear-gradient(135deg, var(--gold), #ff9d00);
    color: #111;
    border: 0;
    font-weight: 800;
    font-size: 11px;
    padding: 11px 18px;
}

    .btn-gold:hover {
        color: #000;
        filter: brightness(1.08);
    }

/* ---------- GLOBAL ---------- */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-bottom: 0;
    background: #080c10;
}

    .section-title h2 {
        margin: 0;
        font-size: 14px;
        font-weight: 800;
        letter-spacing: .5px;
        text-transform: uppercase;
    }

.view-all {
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.panel {
    background: linear-gradient(145deg, #0b1015, #070a0d);
    border: 1px solid var(--line);
}

.gold {
    color: var(--gold);
}

/* ---------- HERO ---------- */
.hero {
    min-height: 335px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(3,7,10,.97) 0%, rgba(3,7,10,.82) 38%, rgba(3,7,10,.15) 72%, rgba(3,7,10,.72) 100%), url("https://images.unsplash.com/photo-1503736334956-4c8f8e92946d?auto=format&fit=crop&w=1800&q=85") center/cover;
}

    .hero::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(0deg, rgba(0,0,0,.75), transparent 55%);
        pointer-events: none;
    }

.hero-content {
    position: relative;
    z-index: 2;
    padding: 38px 32px 25px;
    max-width: 620px;
}

.eyebrow {
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .7px;
    text-transform: uppercase;
}

.hero h1 {
    color: #fff;
    font-size: clamp(38px, 4vw, 55px);
    line-height: .98;
    font-weight: 900;
    margin: 14px 0;
    text-transform: uppercase;
}

    .hero h1 span {
        color: var(--gold);
    }

.hero-description {
    color: #e2e5e7;
    max-width: 500px;
    line-height: 1.6;
    font-size: 14px;
}

.hero-buttons {
    margin-top: 17px;
}

.btn-outline-light-custom {
    border: 1px solid #555f66;
    color: #fff;
    background: rgba(0,0,0,.45);
    font-weight: 700;
    font-size: 11px;
    padding: 11px 18px;
}

    .btn-outline-light-custom:hover {
        border-color: var(--gold);
        color: var(--gold);
    }

/* ---------- TRENDING ---------- */
.trending {
    border: 1px solid var(--line);
    background: #080c10;
}

.trend-list {
    max-height: 340px;
    overflow-y: auto;
}

    .trend-list::-webkit-scrollbar {
        width: 6px;
    }

    .trend-list::-webkit-scrollbar-track {
        background: transparent;
    }

    .trend-list::-webkit-scrollbar-thumb {
        background: var(--line);
    }

        .trend-list::-webkit-scrollbar-thumb:hover {
            background: var(--gold);
        }

.trend-item {
    min-height: 67px;
    display: flex;
    gap: 10px;
    padding: 9px 11px;
    border-bottom: 1px solid #1b242b;
}

    .trend-item:last-child {
        border-bottom: 0;
    }

.trend-number {
    color: var(--gold);
    font-size: 20px;
    min-width: 28px;
}

.trend-body {
    flex: 1;
}

.trend-title {
    font-size: 11px;
    font-weight: 700;
}

.trend-desc {
    color: var(--muted);
    font-size: 9px;
    margin-top: 4px;
}

.trend-thumb {
    width: 57px;
    height: 48px;
    object-fit: cover;
    border: 1px solid #303941;
}

/* ---------- AI SPOTLIGHT ---------- */
.ai-card {
    position: relative;
    min-height: 238px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(7,11,15,.96), rgba(7,11,15,.48)), url("https://images.unsplash.com/photo-1535378917042-10a22c95931a?auto=format&fit=crop&w=900&q=80") center/cover;
}

.ai-content {
    position: relative;
    z-index: 2;
    padding: 27px 12px;
    width: 62%;
}

    .ai-content h3 {
        color: #fff;
        font-size: 15px;
        line-height: 1.35;
        margin: 9px 0;
    }

    .ai-content p {
        font-size: 10px;
        color: #c6cdd2;
        line-height: 1.55;
    }

.read-more {
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
}

/* ---------- STATS ---------- */
.stats {
    border: 1px solid var(--line);
    border-top: 0;
    background: #070b0e;
}

.stat {
    min-height: 68px;
    padding: 11px 13px;
    display: flex;
    gap: 10px;
    align-items: center;
    border-right: 1px solid #202930;
}

    .stat:last-child {
        border-right: 0;
    }

.stat-icon {
    width: 34px;
    color: var(--gold);
    font-size: 24px;
    text-align: center;
}

.stat-number {
    font-size: 15px;
    font-weight: 800;
}

.stat-label {
    color: #a8b0b6;
    font-size: 8px;
    text-transform: uppercase;
    margin-top: 3px;
}

/* ---------- CATEGORY ---------- */
.category-card {
    aspect-ratio: 6 / 5;
    position: relative;
    overflow: hidden;
    border: 1px solid #2a333b;
    background: #0b0f13;
    transition: .25s ease;
}

    .category-card:hover {
        transform: translateY(-3px);
        border-color: var(--gold);
        box-shadow: 0 8px 28px rgba(0,0,0,.35);
    }

.category-img {
    position: absolute;
    inset: 0 0 48px;
    background-size: cover;
    background-position: center;
    opacity: .72;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 20%, rgba(4,7,10,.93) 75%);
}

.category-content {
    position: absolute;
    z-index: 2;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 11px;
}

.category-icon {
    color: var(--gold);
    font-size: 18px;
    margin-bottom: 6px;
}

.category-name {
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.category-description {
    font-size: 9px;
    color: #aeb7bd;
    margin-top: 4px;
    line-height: 1.3;
}

.category-arrow {
    position: absolute;
    right: 10px;
    bottom: 13px;
    color: var(--gold);
}

/* ---------- LATEST ---------- */
.latest-card {
    display: flex;
    min-height: 135px;
    border: 1px solid var(--line);
    background: #090d11;
    overflow: hidden;
}

.latest-image {
    width: 37%;
    min-width: 105px;
    background-size: cover;
    background-position: center;
}

.latest-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px;
}

.latest-tag {
    color: var(--gold);
    text-transform: uppercase;
    font-size: 8px;
    font-weight: 800;
}

.latest-title {
    font-size: 12px;
    font-weight: 700;
    margin: 7px 0;
    line-height: 1.3;
}

.latest-description {
    color: #a8b1b8;
    font-size: 9px;
    line-height: 1.45;
}

.latest-meta {
    color: #7e8990;
    font-size: 8px;
    margin-top: 8px;
}

/* ---------- RIGHT COLUMN ---------- */
.activity-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    border-bottom: 1px solid #1e272e;
}

.avatar {
    width: 31px;
    height: 31px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #3a444b;
}

.activity-name {
    font-size: 10px;
    font-weight: 700;
}

.activity-text {
    color: #919ba2;
    font-size: 8px;
    margin-top: 3px;
}

.activity-time {
    margin-left: auto;
    color: #737e85;
    font-size: 8px;
    white-space: nowrap;
}

.event {
    display: flex;
    gap: 11px;
    padding: 10px;
    border-bottom: 1px solid #1e272e;
}

.event-date {
    min-width: 48px;
    text-align: center;
    border: 1px solid #3a444b;
    padding: 5px 3px;
}

.event-day {
    font-size: 21px;
    line-height: 1;
}

.event-month {
    color: var(--gold);
    font-size: 8px;
    font-weight: 700;
}

.event-title {
    font-size: 10px;
    font-weight: 700;
}

.event-meta {
    color: #89939a;
    font-size: 8px;
    line-height: 1.6;
    margin-top: 3px;
}

/* Chỉ giới hạn chiều cao + cho cuộn trên desktop (>=1200px, đúng breakpoint aside col-xl-2)
   để không phá layout khi danh sách có thêm item; mobile/tablet vẫn hiển thị đủ danh sách. */
@media (min-width: 1200px) {
    .activity-list,
    .event-list {
        max-height: 220px;
        overflow-y: auto;
    }

        .activity-list::-webkit-scrollbar,
        .event-list::-webkit-scrollbar {
            width: 6px;
        }

        .activity-list::-webkit-scrollbar-track,
        .event-list::-webkit-scrollbar-track {
            background: transparent;
        }

        .activity-list::-webkit-scrollbar-thumb,
        .event-list::-webkit-scrollbar-thumb {
            background: var(--line);
        }

            .activity-list::-webkit-scrollbar-thumb:hover,
            .event-list::-webkit-scrollbar-thumb:hover {
                background: var(--gold);
            }
}

/* ---------- IDEA CARD (ảnh giữ tỉ lệ cố định ở mọi kích thước màn hình) ---------- */
.idea-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    background: #090d11;
    overflow: hidden;
    color: inherit;
    transition: .2s ease;
}

    .idea-card:hover {
        border-color: var(--gold);
        transform: translateY(-3px);
        box-shadow: 0 8px 28px rgba(0,0,0,.35);
        color: inherit;
    }

.idea-card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    background-size: cover;
    background-position: center;
}

.idea-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 12px;
}

.idea-card-tag {
    color: var(--gold);
    text-transform: uppercase;
    font-size: 8px;
    font-weight: 700;
}

.idea-card-title {
    font-size: 12px;
    font-weight: 700;
    margin: 7px 0;
    line-height: 1.3;
}

.idea-card-description {
    color: #a8b1b8;
    font-size: 9px;
    line-height: 1.45;
    flex: 1;
}

.idea-card-meta {
    color: #7e8990;
    font-size: 8px;
    margin-top: 8px;
}

/* ---------- IDEA LIST PAGINATION ---------- */
.idea-pagination .page-link {
    background: #0b0f13;
    border-color: var(--line);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    padding: 8px 13px;
}

    .idea-pagination .page-link:hover {
        background: #10151a;
        border-color: var(--gold);
        color: var(--gold);
    }

.idea-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--gold), #ff9d00);
    border-color: var(--gold);
    color: #111;
}

.idea-pagination .page-item.disabled .page-link {
    background: #0b0f13;
    border-color: var(--line);
    color: #4d565c;
}

/* ---------- IDEA DETAIL ---------- */
.idea-detail-back {
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
}

    .idea-detail-back:hover {
        color: var(--gold);
    }

.idea-detail-hero-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: 0 24px 60px rgba(0,0,0,.45);
}

    .idea-detail-hero-wrap::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(3,5,7,.8) 100%);
        pointer-events: none;
    }

.idea-detail-hero {
    width: 100%;
    aspect-ratio: 21 / 9;
    background-size: cover;
    background-position: center;
    transition: transform .6s ease;
}

    .idea-detail-hero-wrap:hover .idea-detail-hero {
        transform: scale(1.03);
    }

.idea-detail-hero-tag {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 2;
    background: linear-gradient(135deg, var(--gold), #ff9d00);
    color: #111;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(0,0,0,.35);
}

.idea-detail-body {
    max-width: 780px;
    margin: 0 auto;
    padding: 24px 0 40px;
}

/* ---------- CONTACT PAGE ---------- */
.contact-page-body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 0 40px;
}

.contact-info-list {
    margin-top: 0;
}

    .contact-info-list li {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .contact-info-list i {
        width: 14px;
        font-size: 13px;
    }

.contact-map {
    width: 100%;
    height: 260px;
}

.idea-detail-title {
    color: var(--text);
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 900;
    line-height: 1.25;
    margin: 20px 0 10px;
}

.idea-detail-meta {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 20px;
}

.idea-detail-lead {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.7;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.idea-detail-content {
    color: #c3cbd1;
    font-size: 13px;
    line-height: 1.9;
    margin-top: 16px;
}

    .idea-detail-content p {
        margin-bottom: 14px;
    }

/* ---------- IDEA COMMENTS ---------- */
.idea-comments {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.idea-comments-heading {
    display: flex;
    align-items: center;
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.idea-comments-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    margin-left: 8px;
    border-radius: 10px;
    background: var(--gold);
    color: #111;
    font-size: 11px;
    font-weight: 800;
}

.idea-comment-form-card {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 28px;
}

.idea-comment-form-title {
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 14px;
}

.idea-comment-error {
    display: flex;
    align-items: center;
    color: var(--danger);
    background: rgba(255,107,53,.1);
    border: 1px solid rgba(255,107,53,.3);
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 12px;
    margin-bottom: 12px;
}

.idea-comment-counter {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

    .idea-comment-counter.idea-comment-counter-warn {
        color: var(--danger);
    }

.idea-comment-textarea {
    min-height: 84px;
    resize: vertical;
}

.idea-comment-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.idea-comment-hint {
    color: var(--muted);
    font-size: 11px;
}

.idea-comment-submit {
    white-space: nowrap;
}

.idea-comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.idea-comment-empty {
    color: var(--muted);
    font-size: 12px;
    font-style: italic;
}

.idea-comment-item {
    display: flex;
    gap: 12px;
}

.idea-comment-avatar {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), #ff9d00);
    color: #111;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .idea-comment-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }

.idea-comment-body {
    flex: 1;
    border-bottom: 1px solid var(--line);
    padding-bottom: 14px;
}

.idea-comment-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.idea-comment-author {
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.idea-comment-time {
    color: var(--muted);
    font-size: 10px;
    font-weight: 400;
    margin-left: 8px;
}

.idea-comment-pending-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 10px;
    background: rgba(255, 193, 7, 0.16);
    color: #ffc107;
    font-size: 10px;
    font-weight: 600;
}

/* Khung avatar Profile (Views/Account/MyProfile.cshtml) — bấm thẳng vào khung để tải + cắt ảnh (1x1, xem account_profile.js). */
.avatar-upload-frame {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid var(--line);
    box-shadow: 0 0 0 4px rgba(255, 176, 0, .12);
    background: var(--panel-2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s ease;
}

    .avatar-upload-frame:hover {
        border-color: var(--gold);
    }

.avatar-upload-placeholder {
    font-size: 42px;
    color: var(--muted);
}

.avatar-upload-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    font-size: 20px;
    opacity: 0;
    transition: opacity .2s ease;
}

    .avatar-upload-frame:hover .avatar-upload-overlay {
        opacity: 1;
    }

.idea-comment-text {
    color: #c3cbd1;
    font-size: 12px;
    line-height: 1.6;
    margin-top: 4px;
    white-space: pre-wrap;
    word-break: break-word;
}

.idea-comment-actions {
    display: flex;
    flex: none;
    gap: 8px;
}

.idea-comment-action-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 11px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}

    .idea-comment-action-link:hover {
        color: var(--gold);
        border-color: var(--gold);
        background: rgba(255, 176, 0, .1);
        text-decoration: none;
    }

    .idea-comment-action-link.text-danger:hover {
        color: #ff5c5c;
        border-color: #ff5c5c;
        background: rgba(255, 92, 92, .1);
    }

/* ---------- TRUSTED ---------- */
.trusted {
    border: 1px solid var(--line);
    padding: 8px 12px;
    margin-top: 13px;
    text-align: center;
}

.trusted-title {
    color: #8b959b;
    font-size: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 7px;
}

.brand-logo {
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aab1b5;
    font-weight: 800;
    font-size: 16px;
    padding: 0 13px;
    border-right: 1px solid #293239;
}

    .brand-logo:last-child {
        border-right: 0;
    }

    .brand-logo img {
        height: 100%;
        width: auto;
        max-width: 100%;
        object-fit: contain;
    }

/* ---------- FOOTER ---------- */
footer {
    margin-top: 7px;
    border-top: 1px solid var(--line);
    background: #06090c;
    padding: 20px 0 13px;
}

.footer-brand .brand-img {
    height: 36px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.footer-description {
    color: #89939a;
    font-size: 9px;
    line-height: 1.55;
    max-width: 210px;
    margin: 8px 0 11px;
}

.footer-contact {
    margin: 10px 0;
    padding: 0;
    list-style: none;
}

    .footer-contact li {
        display: flex;
        align-items: flex-start;
        gap: 6px;
        color: #89939a;
        font-size: 9px;
        line-height: 1.5;
        margin-bottom: 5px;
    }

    .footer-contact i {
        color: var(--gold);
        width: 11px;
        margin-top: 2px;
        flex-shrink: 0;
    }

.social a {
    display: inline-flex;
    width: 27px;
    height: 27px;
    align-items: center;
    justify-content: center;
    color: #9aa3a8;
    border: 1px solid #2b343b;
    margin-right: 3px;
    font-size: 11px;
}

    .social a:hover {
        color: var(--gold);
        border-color: var(--gold);
    }

.footer-heading {
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.footer-links a {
    display: block;
    color: #8d979e;
    font-size: 9px;
    padding: 2px 0;
}

    .footer-links a:hover {
        color: var(--gold);
    }

.newsletter {
    border: 1px solid #252e35;
    padding: 13px;
}

    .newsletter p {
        color: #8d979e;
        font-size: 9px;
        line-height: 1.5;
    }

    .newsletter .form-control {
        background: #0c1115;
        border-color: #303a42;
        color: white;
        font-size: 9px;
        border-radius: 0;
    }

        .newsletter .form-control::placeholder {
            color: var(--muted);
            opacity: .85;
        }

.copyright {
    border-top: 1px solid #1d252b;
    margin-top: 15px;
    padding-top: 10px;
    text-align: center;
    color: #6f797f;
    font-size: 8px;
}

/* ---------- MENU INFO MODAL ---------- */
.menu-info-modal .modal-content {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 0;
    overflow: hidden;
}

.menu-info-modal .btn-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    opacity: .9;
}

.menu-info-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: var(--panel-2);
}

.menu-info-body {
    padding: 20px;
}

.menu-info-title {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
}

.menu-info-contact {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .menu-info-contact li {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 0;
        border-top: 1px solid var(--line);
        color: var(--muted);
        font-size: 13px;
    }

        .menu-info-contact li:first-child {
            border-top: 0;
        }

        .menu-info-contact li i {
            width: 18px;
            color: var(--gold);
            font-size: 14px;
            text-align: center;
        }

/* ---------- AUTH MODALS (SIGN IN / REGISTER / FORGOT PASSWORD) ---------- */
.auth-modal .modal-content {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 0;
}

.auth-modal .btn-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    opacity: .9;
}

.auth-body {
    padding: 34px 30px 26px;
}

.auth-eyebrow {
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .7px;
    text-transform: uppercase;
}

.auth-title {
    margin: 8px 0 20px;
    color: var(--text);
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
}

.auth-hint {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    margin: -10px 0 18px;
}

.auth-label {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.auth-input {
    background: var(--panel-2);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 0;
}

    .auth-input:focus {
        background: var(--panel-2);
        color: var(--text);
        border-color: var(--gold);
        box-shadow: 0 0 0 .2rem rgba(255,176,0,.15);
    }

    .auth-input::placeholder {
        color: var(--muted);
        opacity: .85;
    }

    /* Bootstrap mặc định tô nền xám sáng cho :disabled/[readonly] -> chữ sáng trên nền sáng, mất tương phản ở dark mode.
       Giữ nền tối (nhạt hơn ô thường một chút) + viền nét đứt để vẫn nhận ra ô chỉ đọc (VD: Account Type ở My Profile). */
    .auth-input:disabled,
    .auth-input[readonly] {
        background: var(--panel);
        color: var(--muted);
        border-style: dashed;
        opacity: 1;
        cursor: not-allowed;
    }

.auth-check-label {
    color: var(--muted);
    font-size: 12px;
}

.auth-link-inline {
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
}

    .auth-link-inline:hover {
        text-decoration: underline;
    }

.auth-footer {
    margin-top: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

    .auth-footer a {
        color: var(--gold);
        font-weight: 700;
    }

        .auth-footer a:hover {
            text-decoration: underline;
        }

.auth-hint-strong {
    color: var(--text);
    font-weight: 700;
}

/* ---------- OTP (FORGOT PASSWORD STEP 2) ---------- */
.otp-group {
    display: flex;
    gap: 10px;
}

.otp-digit {
    width: 100%;
    height: 52px;
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    padding: 0;
}

.otp-timer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.btn-resend-otp {
    background: transparent;
    border: 0;
    padding: 0;
}

    .btn-resend-otp:disabled {
        color: var(--muted);
        cursor: not-allowed;
    }

/* ---------- WATCH VIDEO MODAL ---------- */
.video-modal .modal-dialog {
    max-width: 900px;
    transform: scale(.82) translateY(40px);
    opacity: 0;
    transition: transform .5s cubic-bezier(.16, 1, .3, 1), opacity .35s ease;
}

.video-modal.show .modal-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.video-modal .modal-content {
    background: #000;
    border: 1px solid rgba(255,176,0,.35);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255,176,0,.15), 0 30px 90px rgba(0,0,0,.65), 0 0 70px rgba(255,176,0,.14);
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: -4px;
    z-index: 5;
    opacity: .9;
}

    .video-modal-close:hover {
        opacity: 1;
    }

.video-modal-ratio {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
}

    .video-modal-ratio iframe {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border: 0;
    }

.video-modal-backdrop.show {
    opacity: .88;
}


/* ---------- LIGHT MODE ---------- */
body.light-mode {
    --bg: #f2f4f6;
    --panel: #ffffff;
    --panel-2: #f8fafb;
    --line: #d9dfe3;
    --text: #172027;
    --muted: #65717a;
    background: radial-gradient(circle at 60% -10%, rgba(255,176,0,.10), transparent 30%), #f2f4f6;
    color: var(--text);
}

    body.light-mode .topbar {
        background: rgba(255,255,255,.96);
        border-bottom-color: #dce1e5;
    }

    body.light-mode .brand-title,
    body.light-mode .main-nav .nav-link,
    body.light-mode .icon-btn,
    body.light-mode .header-welcome-text,
    body.light-mode .btn-outline-light-custom {
        color: #172027;
    }

        body.light-mode .main-nav .nav-link:hover,
        body.light-mode .main-nav .nav-link.active {
            color: #d88900;
        }

    body.light-mode .btn-signin {
        color: #172027;
        border-color: #c7cdd2;
    }

        body.light-mode .btn-signin:hover {
            border-color: var(--gold);
            color: #a96d00;
        }

    body.light-mode .section-title,
    body.light-mode .trending,
    body.light-mode .panel,
    body.light-mode .stats,
    body.light-mode .trusted,
    body.light-mode .latest-card,
    body.light-mode .category-card,
    body.light-mode .idea-card,
    body.light-mode footer,
    body.light-mode .newsletter {
        background: #ffffff;
        border-color: var(--line);
    }

    body.light-mode .section-title {
        background: #f8fafb;
    }

    body.light-mode .trend-item,
    body.light-mode .activity-item,
    body.light-mode .event,
    body.light-mode .stat,
    body.light-mode .copyright {
        border-color: #e1e5e8;
    }

    body.light-mode .trend-title,
    body.light-mode .latest-title,
    body.light-mode .idea-card-title,
    body.light-mode .activity-name,
    body.light-mode .event-title,
    body.light-mode .footer-heading {
        color: #172027;
    }

    body.light-mode .idea-detail-content,
    body.light-mode .idea-comment-text {
        color: #3d474d;
    }

    body.light-mode .idea-comments-heading,
    body.light-mode .idea-comment-author {
        color: #172027;
    }

    body.light-mode .idea-comments,
    body.light-mode .idea-comment-body {
        border-color: var(--line);
    }

    body.light-mode .idea-comment-form-card {
        background: #f8fafb;
        border-color: var(--line);
    }

    body.light-mode .idea-comment-form-title {
        color: #172027;
    }

    body.light-mode .idea-comments-count {
        color: #111;
    }

    body.light-mode .trend-desc,
    body.light-mode .latest-description,
    body.light-mode .idea-card-description,
    body.light-mode .idea-card-meta,
    body.light-mode .activity-text,
    body.light-mode .event-meta,
    body.light-mode .footer-description,
    body.light-mode .footer-contact li,
    body.light-mode .footer-links a,
    body.light-mode .newsletter p,
    body.light-mode .stat-label {
        color: #66727b;
    }

    body.light-mode .idea-pagination .page-link {
        background: #ffffff;
        border-color: var(--line);
        color: #66727b;
    }

        body.light-mode .idea-pagination .page-link:hover {
            background: #f8fafb;
            border-color: var(--gold);
            color: #a96d00;
        }

    body.light-mode .idea-pagination .page-item.active .page-link {
        color: #111;
    }

    body.light-mode .idea-pagination .page-item.disabled .page-link {
        background: #f2f4f6;
        border-color: var(--line);
        color: #b7bec3;
    }

    body.light-mode .brand-sub {
        color: #68737a;
    }

    body.light-mode .brand-logo {
        color: #5c666c;
        border-color: #e0e4e7;
    }

    body.light-mode .btn-outline-light-custom {
        background: rgba(255,255,255,.8);
        border-color: #bfc7cc;
    }

        body.light-mode .btn-outline-light-custom:hover {
            color: #a96d00;
            border-color: var(--gold);
        }

    body.light-mode .event-date,
    body.light-mode .social a {
        border-color: #d2d8dc;
    }

    body.light-mode .social a {
        color: #68737a;
    }

    body.light-mode .newsletter .form-control {
        background: #fff;
        color: #172027;
        border-color: #cfd6db;
    }

        body.light-mode .newsletter .form-control::placeholder {
            color: #8a949b;
        }

    body.light-mode .copyright {
        color: #7b858c;
    }

    body.light-mode .navbar-toggler {
        border-color: #bfc7cc;
    }

    body.light-mode .navbar-toggler-icon {
        filter: invert(1);
    }

    body.light-mode .hero {
        border-color: var(--line);
    }

    body.light-mode .menu-info-modal .btn-close-white,
    body.light-mode .auth-modal .btn-close-white {
        filter: none;
    }

/* ---------- MOBILE ---------- */
@media (max-width: 1199.98px) {
    .brand-img {
        height: 38px;
    }

    .main-nav .nav-link {
        padding-left: 8px;
        padding-right: 8px;
    }

        .main-nav .nav-link.active::after {
            left: 8px;
            right: 8px;
        }
}

@media (max-width: 991.98px) {
    .topbar {
        min-height: 58px;
    }

    .brand-title {
        font-size: 23px;
    }

    .brand-img {
        height: 36px;
    }

    .navbar-toggler {
        border-color: #444;
        color: #fff;
    }

    .main-nav .nav-link {
        padding: 10px 0;
        border-bottom: 1px solid #182027;
    }

        .main-nav .nav-link.active::after {
            display: none;
        }

    .header-actions {
        padding-bottom: 10px;
    }

    .hero {
        min-height: 390px;
    }

    .hero-content {
        padding: 32px 24px;
    }
}

@media (max-width: 575.98px) {
    body {
        font-size: 13px;
    }

    .hero {
        min-height: 440px;
        background-position: 65% center;
    }

    .hero-content {
        padding: 28px 19px;
    }

    .hero h1 {
        font-size: 37px;
    }

    .hero-description {
        font-size: 12px;
    }

    .stats .stat {
        border-bottom: 1px solid #202930;
    }

    .category-card {
        min-height: 145px;
    }

    .latest-card {
        min-height: 120px;
    }

    .latest-description {
        display: none;
    }

    .brand-logo {
        border-right: 0;
        border-bottom: 1px solid #293239;
    }
}

/* iOS Safari tự zoom vào ô nhập có font-size < 16px khi focus; vì đã cho phép zoom (bỏ maximum-scale) nên ép 16px trên thiết bị cảm ứng để không bị nhảy khung nhìn. */
@media (pointer: coarse) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="button"]):not([type="submit"]),
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Select2 (dropdown Country có ô tìm kiếm) theo theme tối của form auth — áp dụng trong modal Create Account (.auth-modal)
   và form My Profile (.portal-select2-scope); dropdownParent đặt về đúng 2 vùng này nên dropdown cũng nhận style. */
.auth-modal .select2-container--default .select2-selection--single,
.portal-select2-scope .select2-container--default .select2-selection--single {
    height: calc(1.5em + .75rem + 2px);
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 0;
}

    .auth-modal .select2-container--default .select2-selection--single .select2-selection__rendered,
    .portal-select2-scope .select2-container--default .select2-selection--single .select2-selection__rendered {
        color: var(--text);
        line-height: calc(1.5em + .75rem);
        padding-left: .75rem;
    }

    .auth-modal .select2-container--default .select2-selection--single .select2-selection__placeholder,
    .portal-select2-scope .select2-container--default .select2-selection--single .select2-selection__placeholder {
        color: var(--muted);
    }

    .auth-modal .select2-container--default .select2-selection--single .select2-selection__arrow,
    .portal-select2-scope .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: calc(1.5em + .75rem);
    }

.auth-modal .select2-container--default.select2-container--open .select2-selection--single,
.portal-select2-scope .select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--gold);
}

.auth-modal .select2-dropdown,
.portal-select2-scope .select2-dropdown {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 0;
    color: var(--text);
}

.auth-modal .select2-container--default .select2-search--dropdown .select2-search__field,
.portal-select2-scope .select2-container--default .select2-search--dropdown .select2-search__field {
    background: var(--panel);
    border: 1px solid var(--line);
    color: var(--text);
    outline: none;
}

.auth-modal .select2-container--default .select2-results__option--highlighted[aria-selected],
.portal-select2-scope .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--gold);
    color: #111;
}

.auth-modal .select2-container--default .select2-results__option[aria-selected=true],
.portal-select2-scope .select2-container--default .select2-results__option[aria-selected=true] {
    background: rgba(255,176,0,.15);
}
