/* ==========================================================================
   BẢNG MÀU CHỦ ĐẠO - Bộ màu "XANH DƯƠNG CHÍNH QUYỀN SỐ PHÚ THỌ"
   Dựng theo ảnh thiết kế Cổng thi trực tuyến Tìm hiểu Cải cách hành chính
   tỉnh Phú Thọ năm 2026:
     - Thanh đầu trang (gradient)        : #0A3A78 -> #1565D8 -> #1E88E5
     - Nút chính / tab đang chọn         : #1565D8
     - Nút hover / khối đậm              : #0D4AA8
     - Xanh nhạt điểm nhấn               : #4D9BEE
     - Nền chân trang / thẻ giải tập thể : #0A3A78, #0D3F86
     - Vàng kim (biểu tượng, badge)      : #EFB13A, #FFD35C, #E0A93C
     - Nền trang / dải sóng              : #F3F7FC, #E8F2FD, #DBEAFB

   LƯU Ý: Các token vẫn giữ tên tiền tố "--brick-*" để tương thích ngược với
   toàn bộ View và mã JavaScript hiện có (đọc biến qua getPropertyValue).
   ========================================================================== */
:root {
    /* Xanh dương chủ đạo */
    --brick-primary: #1565D8;
    --brick-dark: #0D4AA8;
    --brick-deep: #0A3A78;
    --brick-light: #4D9BEE;
    --brick-subtle: #EEF5FE;
    /* Nền tối cho thanh đầu trang & chân trang */
    --secondary-dark: #0A3A78;
    /* Vàng kim điểm nhấn */
    --gold-accent: #EFB13A;
    --gold-bright: #FFD35C;
    --gold-ribbon: #E0A93C;
    --gold-light: #FDF3DC;
    /* Xanh phụ trợ */
    --steel-blue: #2E7BD6;
    --navy-blue: #0A3A78;
    --sky-tint: #E8F2FD;
    --sky-tint-2: #DBEAFB;
    /* Chữ & đường viền tông lạnh hòa với nền xanh nhạt */
    --text-main: #16243B;
    --text-muted: #5B6B84;
    --border-color: #DCE7F5;
    --card-shadow: 0 4px 20px rgba(10, 58, 120, 0.08);
    --card-shadow-hover: 0 10px 30px rgba(10, 58, 120, 0.16);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: #F3F7FC;
    line-height: 1.6;
}

/* ==================== HEADER & NAVBAR ==================== */
.top-header {
    background: linear-gradient(115deg, var(--secondary-dark) 0%, var(--brick-primary) 62%, #1E88E5 100%);
    color: #FFFFFF;
    padding: 14px 0;
    position: relative;
    overflow: hidden;
    /* Dải ruy-băng vàng kim mảnh chạy dưới header */
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--gold-accent) 0%, var(--gold-bright) 50%, var(--gold-ribbon) 100%) 1;
}

/* Hoa văn vòng tròn công nghệ mờ ở góc phải thanh đầu trang */
.top-header::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -120px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 65%, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 62%);
    pointer-events: none;
}

.top-header > .container {
    position: relative;
    z-index: 2;
}

/* Khung logo quốc huy bo tròn viền vàng bên trái thanh đầu trang */
.brand-logo-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.28));
    transition: transform 0.25s ease;
}

.brand-logo-img:hover {
    transform: scale(1.05);
}

.brand-emblem {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 211, 92, 0.55);
    color: var(--gold-bright);
    font-size: 1.7rem;
    flex-shrink: 0;
}

.brand-title {
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #FFFFFF;
    margin-bottom: 2px;
    line-height: 1.25;
}

.brand-subtitle {
    font-size: 0.88rem;
    color: #FFD35C;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    line-height: 1.25;
}

/* Khẩu hiệu nghiêng góc phải thanh đầu trang (theo ảnh thiết kế) */
.header-slogan {
    font-style: italic;
    font-size: 0.78rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
    border-left: 1px solid rgba(255, 255, 255, 0.28);
    padding-left: 18px;
    margin-left: 18px;
    white-space: nowrap;
}

.header-meta {
    font-size: 0.8rem;
    line-height: 1.6;
}

.header-meta i {
    color: var(--gold-bright);
    width: 16px;
}

.main-navbar {
    background: #FFFFFF;
    box-shadow: 0 2px 10px rgba(10, 58, 120, 0.08);
    padding: 0;
}

.main-navbar .nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: #3B4A61;
    padding: 14px 18px !important;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.main-navbar .nav-link:hover,
.main-navbar .nav-link.active {
    color: var(--brick-primary);
    background-color: var(--brick-subtle);
    border-bottom: 3px solid var(--brick-primary);
}

/* Ô tìm kiếm thu gọn trên thanh điều hướng */
.navbar-search-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #3B4A61;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.navbar-search-btn:hover {
    background: var(--brick-subtle);
    color: var(--brick-primary);
}

.btn-brick {
    background-color: var(--brick-primary);
    color: #FFFFFF;
    border: none;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-brick:hover {
    background-color: var(--brick-dark);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(21, 101, 216, 0.3);
}

.btn-outline-brick {
    border: 2px solid var(--brick-primary);
    color: var(--brick-primary);
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-outline-brick:hover {
    background-color: var(--brick-primary);
    color: #FFFFFF;
}

/* Tiện ích chữ theo màu chủ đạo (thay cho .text-danger của Bootstrap) */
.text-brick {
    color: var(--brick-primary) !important;
}

/* ==================== TICKER MARQUEE ==================== */
.ticker-container {
    background: var(--sky-tint);
    border-bottom: 1px solid var(--border-color);
    padding: 9px 0;
    overflow: hidden;
}

.ticker-wrap {
    display: flex;
    align-items: center;
}

.ticker-badge {
    background-color: var(--brick-primary);
    color: #FFFFFF;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 6px 16px;
    border-radius: 30px;
    white-space: nowrap;
    margin-right: 18px;
    box-shadow: 0 2px 8px rgba(21, 101, 216, 0.28);
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    font-weight: 500;
    font-size: 0.9rem;
    color: #2B3A52;
}

/* Liên kết "Xem chi tiết" cố định bên phải thanh thông báo */
.ticker-more {
    white-space: nowrap;
    margin-left: 18px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brick-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.ticker-more:hover {
    color: var(--brick-dark);
    transform: translateX(3px);
}

.ticker-move {
    display: inline-block;
    padding-left: 20px;
    animation: marquee 45s linear infinite;
}

.ticker-move:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* ==================== HERO BANNER & COUNTDOWN ==================== */
/* Hero tông sáng: nền xanh da trời chuyển sắc phủ lên ảnh trụ sở, giống ảnh thiết kế */
.hero-section {
    background-size: cover !important;
    background-position: left bottom !important;
    color: var(--text-main);
    padding: 38px 0 78px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0 !important;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-text-col {
        padding-left: clamp(40px, 5vw, 80px);
    }
    .hero-title {
        font-size: 1.3rem;
    }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .hero-text-col {
        padding-left: clamp(160px, 14vw, 210px);
    }
}

@media (min-width: 1400px) {
    .hero-text-col {
        padding-left: clamp(180px, 16vw, 240px);
    }
}

/* Vầng sáng công nghệ toả từ góc phải trên của hero */
.hero-section::before {
    content: '';
    position: absolute;
    right: -8%;
    top: -28%;
    width: 620px;
    height: 620px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 68%);
    pointer-events: none;
}

/* Dải sóng trắng khép đáy hero (wave divider) */
.hero-section::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 92px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath fill='%23F3F7FC' d='M0,64 C240,120 480,8 720,40 C960,72 1200,120 1440,72 L1440,120 L0,120 Z'/%3E%3C/svg%3E") no-repeat center bottom;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 3;
}

.hero-section > .container {
    position: relative;
    z-index: 4;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid var(--gold-accent);
    color: #8A5B0B;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 7px 18px;
    border-radius: 30px;
    margin-bottom: 18px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(10, 58, 120, 0.1);
}

.hero-title {
    font-size: clamp(1.15rem, 1.35vw, 1.55rem);
    font-weight: 900;
    line-height: 1.25;
    color: var(--secondary-dark);
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.95), 0 0 16px rgba(255, 255, 255, 0.85);
    margin-bottom: 12px;
    text-transform: uppercase;
}

.hero-title-line-1 {
    display: block;
    font-size: 1.22em;
    font-weight: 900;
    letter-spacing: 0.4px;
    color: #004FB6;
    margin-bottom: 3px;
    line-height: 1.2;
}

.hero-title-line-2 {
    display: block;
    font-size: 1.02em;
    font-weight: 900;
    color: #003073;
    letter-spacing: -0.2px;
    margin-bottom: 3px;
}

/* Dòng thứ ba của tiêu đề hero tô vàng kim (VD: "TỈNH PHÚ THỌ NĂM 2026") */
.hero-title-accent {
    display: block;
    font-size: 1.02em;
    font-weight: 900;
    color: var(--gold-ribbon);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9), 0 0 14px rgba(255, 255, 255, 0.8);
    letter-spacing: 0.2px;
}

.hero-lead {
    font-size: clamp(0.85rem, 0.9vw, 0.92rem);
    font-weight: 600;
    color: #1E293B;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95), 0 0 10px rgba(255, 255, 255, 0.8);
    max-width: 480px;
    line-height: 1.55;
    margin-bottom: 18px;
}

/* Các nút hành động chính ở Hero */
.btn-hero-primary {
    background: linear-gradient(135deg, #0056B3 0%, #003882 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 11px 22px !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
    box-shadow: 0 6px 18px rgba(0, 56, 130, 0.28) !important;
    transition: all 0.25s ease !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-hero-primary:hover {
    background: linear-gradient(135deg, #004494 0%, #002B66 100%) !important;
    color: #FFFFFF !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 56, 130, 0.38) !important;
}
.btn-hero-secondary {
    background: #FFFFFF !important;
    color: #003882 !important;
    border: 1.5px solid #0056B3 !important;
    border-radius: 10px !important;
    padding: 10px 20px !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 14px rgba(0, 56, 130, 0.12) !important;
    transition: all 0.25s ease !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-hero-secondary:hover {
    background: #F0F6FD !important;
    color: #002B66 !important;
    border-color: #003882 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 56, 130, 0.2) !important;
}

@media (max-width: 575.98px) {
    .hero-title-line-1, .hero-title-line-2, .hero-title-accent {
        white-space: normal !important;
    }
}

/* Cụm biểu tượng "Chính quyền số" nổi bên phải hero */
.hero-orbit {
    position: relative;
    min-height: 190px;
}

.hero-orbit-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    color: var(--brick-primary);
    font-size: 1.35rem;
    box-shadow: 0 6px 18px rgba(10, 58, 120, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.hero-orbit-caption {
    color: var(--brick-dark);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.5;
}

/* ==================== COUNTDOWN BOX (SANG TRỌNG & HIỆN ĐẠI) ==================== */
.countdown-col {
    align-self: center;
}

@media (min-width: 992px) {
    .countdown-col {
        margin-top: 0;
        margin-bottom: 0;
    }
    .countdown-box {
        margin-left: auto;
        margin-right: 0;
    }
}

@media (max-width: 991.98px) {
    .hero-text-col {
        text-align: center;
    }
    .hero-text-col .hero-lead {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-text-col .d-flex.flex-wrap {
        justify-content: center;
    }
    .countdown-col {
        margin-top: 1.5rem;
    }
    .countdown-box {
        margin: 0 auto;
    }
}

.countdown-box {
    background: #FFFFFF;
    border: 1px solid rgba(0, 56, 130, 0.12);
    border-radius: 24px;
    padding: 24px 14px 20px;
    box-shadow: 0 24px 50px rgba(0, 56, 130, 0.18), 
                0 6px 18px rgba(0, 56, 130, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 1);
    position: relative;
    overflow: hidden;
    max-width: 380px;
    margin: 0 auto;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    z-index: 4;
}

.countdown-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 50px rgba(0, 56, 130, 0.17), 
                0 6px 18px rgba(0, 56, 130, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 1);
}

/* Dải viền chuyển sắc vàng kim - xanh trên đỉnh card */
.countdown-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-accent) 0%, var(--gold-bright) 50%, var(--brick-primary) 100%);
}

.countdown-heading {
    color: #003882;
    text-transform: uppercase;
    font-weight: 800;
    font-size: 0.94rem;
    letter-spacing: 0.8px;
}

.countdown-icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #EBF3FD;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #0055BD;
    box-shadow: 0 2px 6px rgba(0, 85, 189, 0.15);
    flex-shrink: 0;
}

.countdown-title-text {
    font-size: 0.92rem;
    font-weight: 800;
    color: #003882;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.countdown-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseGreen 1.8s infinite;
    margin-left: 2px;
    flex-shrink: 0;
}

@keyframes pulseGreen {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.timer-digits {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Ô số đếm ngược giao diện Chronometer sang trọng */
.digit-card {
    position: relative;
    background: linear-gradient(150deg, #0A60D4 0%, #004DB8 50%, #003380 100%);
    color: #FFFFFF;
    padding: 13px 8px 9px;
    border-radius: 14px;
    min-width: 72px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 20px rgba(0, 56, 130, 0.25), 
                inset 0 1px 1px rgba(255, 255, 255, 0.45),
                inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.digit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 56, 130, 0.35), 
                inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* Vạch phân cách kính giữa ô số */
.digit-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.25);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

.digit-glare {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 48%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 100%);
    border-top-left-radius: 13px;
    border-top-right-radius: 13px;
    pointer-events: none;
}

.digit-num {
    font-size: 2.35rem;
    font-weight: 900;
    line-height: 1;
    display: block;
    color: #FFFFFF;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-shadow: 0 2px 5px rgba(0, 20, 60, 0.38);
    letter-spacing: -0.5px;
}

.digit-label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #FFD35C; /* Màu vàng kim sang trọng trên nền xanh hoàng gia */
    margin-top: 6px;
    display: block;
    letter-spacing: 0.9px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.digit-separator {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0055BD;
    opacity: 0.7;
    line-height: 1;
    margin-top: -12px;
    animation: blinkSeparator 1.5s ease-in-out infinite;
    user-select: none;
}

@keyframes blinkSeparator {
    0%, 100% { opacity: 0.85; transform: scale(1); }
    50% { opacity: 0.2; transform: scale(0.9); }
}

/* Dòng "Thời gian diễn ra cuộc thi" bên dưới bộ đếm */
.countdown-range {
    background: linear-gradient(135deg, #F0F6FE 0%, #E8F2FC 100%);
    border: 1px solid #D0E2F7;
    border-radius: 14px;
    padding: 10px 18px;
    font-size: 0.92rem;
    color: #2B3A52;
    box-shadow: inset 0 1px 2px rgba(0, 56, 130, 0.03);
}

.countdown-range strong {
    color: #004295;
    font-weight: 700;
}

.range-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    box-shadow: 0 1px 4px rgba(0, 56, 130, 0.1);
    flex-shrink: 0;
}

.countdown-quote {
    font-style: italic;
    font-size: 0.82rem;
    color: #003882;
    line-height: 1.4;
    font-weight: 500;
    border-top: 1px dashed rgba(0, 85, 189, 0.18);
    margin-top: 6px;
}

/* ==================== PRIZE STRUCTURE ==================== */
/* Tiêu đề mục: thanh vàng kim dọc bên trái + chữ xanh navy (theo ảnh thiết kế) */
.section-title {
    position: relative;
    font-weight: 800;
    color: var(--secondary-dark);
    text-transform: uppercase;
    font-size: 1.45rem;
    margin-bottom: 8px;
    padding-left: 16px;
    display: inline-block;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 26px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold-accent) 100%);
}

.section-title::after {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(100% + 18px);
    transform: translateY(-50%);
    width: 150px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--gold-accent) 0%, rgba(239, 177, 58, 0) 100%);
}

.section-title.center {
    padding-left: 0;
}

.section-title.center::before {
    display: none;
}

.section-title.center::after {
    top: auto;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    background: linear-gradient(90deg, rgba(239, 177, 58, 0) 0%, var(--gold-accent) 50%, rgba(239, 177, 58, 0) 100%);
}

/* Liên kết "Xem tất cả →" đặt cùng hàng với tiêu đề mục */
.section-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--brick-primary);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.section-link:hover {
    color: var(--brick-dark);
}

.section-link i {
    transition: transform 0.2s ease;
}

.section-link:hover i {
    transform: translateX(4px);
}

/* Nền xanh nhạt cho khu vực Cơ cấu giải thưởng */
/* Nền sang trọng cho khu vực Cơ cấu giải thưởng */
.prize-section-bg {
    background: linear-gradient(180deg, #F0F6FC 0%, #FFFFFF 100%);
    padding: 35px 0 55px;
    position: relative;
}

.prize-card {
    background: #FFFFFF;
    border-radius: 18px;
    border: 1px solid rgba(0, 56, 130, 0.1);
    box-shadow: 0 10px 30px -5px rgba(0, 40, 100, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
}

.prize-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -6px rgba(0, 56, 130, 0.15), 0 8px 18px -4px rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 85, 189, 0.25);
}

.prize-header {
    padding: 18px 24px;
    font-weight: 800;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: 0.3px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

/* Giải tập thể: Royal Navy Blue sang trọng đồng bộ thương hiệu */
.prize-header.team {
    background: linear-gradient(135deg, #003882 0%, #0055BD 100%);
    color: #FFFFFF;
}

/* Giải cá nhân: Sapphire Blue năng động & nổi bật */
.prize-header.individual {
    background: linear-gradient(135deg, #004B9E 0%, #0077FE 100%);
    color: #FFFFFF;
}

.prize-item {
    display: flex;
    align-items: center;
    padding: 15px 18px;
    border-bottom: 1px solid rgba(0, 56, 130, 0.06);
    transition: all 0.25s ease;
    border-radius: 12px;
    margin: 4px 6px;
}

.prize-item:last-child {
    border-bottom: none;
}

.prize-item:hover {
    background: linear-gradient(90deg, #F3F8FF 0%, #FAFCFF 100%);
    transform: translateX(4px);
}

.prize-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-right: 14px;
    flex-shrink: 0;
}

.prize-name {
    font-weight: 700;
    color: #1E293B;
    font-size: 1.05rem;
    margin-bottom: 3px;
}

/* Số tiền giải thưởng tông đỏ ruby rực rỡ và chuyên nghiệp */
.prize-val {
    font-weight: 800;
    color: #DC2626;
    font-size: 1.25rem;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.prize-currency {
    font-size: 0.82rem;
    font-weight: 700;
    color: #991B1B;
    margin-left: 2px;
}

/* ==================== CONTEST CARD (DANH SÁCH CUỘC THI) ==================== */
.contest-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.contest-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

.contest-card.is-selected {
    border-color: var(--brick-primary);
    box-shadow: 0 8px 26px rgba(21, 101, 216, 0.18);
}

/* Bảng xanh bên trái mỗi thẻ cuộc thi, chứa biểu tượng và badge "Đang diễn ra" */
.contest-card-aside {
    background: linear-gradient(150deg, var(--brick-primary) 0%, var(--secondary-dark) 100%);
    color: #FFFFFF;
    padding: 28px 20px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.contest-card-aside .contest-icon {
    font-size: 2.9rem;
    color: var(--gold-bright);
}

.contest-status-badge {
    background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold-accent) 100%);
    color: #5A3B04;
    font-weight: 800;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 7px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.contest-meta {
    font-size: 0.86rem;
    color: #4A5A72;
}

.contest-meta i {
    color: var(--brick-primary);
}

/* Cột thao tác bên phải thẻ cuộc thi */
.contest-card-actions {
    background: var(--brick-subtle);
    border-left: 1px solid var(--border-color);
    padding: 22px 18px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contest-countdown-box {
    background: #FFFFFF !important;
    border: 1px solid var(--border-color) !important;
}

.mini-timer-unit {
    background: var(--brick-subtle) !important;
    border-color: var(--border-color) !important;
    min-width: 40px;
}

/* ==================== STAT CARDS (THANH NÚT THỐNG KÊ VIÊN THUỐC SANG TRỌNG, TINH GỌN, SIÊU SẮC NÉT) ==================== */
.stats-pill-section {
    margin-top: 65px;
    margin-bottom: 55px;
}

@media (max-width: 991.98px) {
    .stats-pill-section {
        margin-top: 40px;
        margin-bottom: 45px;
    }
}

@media (max-width: 575.98px) {
    .stats-pill-section {
        margin-top: 28px;
        margin-bottom: 38px;
    }
}

.stat-pill-badge {
    position: relative;
    border-radius: 16px;
    padding: 10px 18px 9px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 78px;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.32);
    box-shadow: 0 6px 18px -2px rgba(0, 32, 80, 0.18), 
                0 2px 6px -1px rgba(0, 0, 0, 0.08),
                inset 0 1px 1px rgba(255, 255, 255, 0.35);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.2s ease;
    user-select: none;
    height: 100%;
    width: 100%;
    max-width: 290px;
    margin: 0 auto;
    isolation: isolate;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.stat-pill-badge:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.45);
}

/* Ánh sáng mờ mặt kính nhẹ nhàng, tinh tế (Subtle Frosted Glass Sheen - không lóa mắt) */
.stat-pill-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 48%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 15px 15px 40% 40% / 15px 15px 6px 6px;
    pointer-events: none;
    z-index: 2;
}

/* Biến thể 1: Đỏ cam san hô quý phái (Người tham gia) */
.stat-pill-red {
    background: linear-gradient(135deg, #E6351E 0%, #CE2008 55%, #A81400 100%);
    box-shadow: 0 6px 18px -2px rgba(206, 32, 8, 0.35), 
                0 2px 6px -1px rgba(0, 0, 0, 0.08),
                inset 0 1px 1px rgba(255, 255, 255, 0.35);
}
.stat-pill-red:hover {
    box-shadow: 0 10px 24px -2px rgba(206, 32, 8, 0.45), 
                inset 0 1px 1px rgba(255, 255, 255, 0.45);
}

/* Biến thể 2: Xanh hoàng gia Royal Azure (Lượt thi) */
.stat-pill-blue {
    background: linear-gradient(135deg, #0076EC 0%, #0056C8 55%, #003B94 100%);
    box-shadow: 0 6px 18px -2px rgba(0, 86, 200, 0.35), 
                0 2px 6px -1px rgba(0, 0, 0, 0.08),
                inset 0 1px 1px rgba(255, 255, 255, 0.35);
}
.stat-pill-blue:hover {
    box-shadow: 0 10px 24px -2px rgba(0, 86, 200, 0.45), 
                inset 0 1px 1px rgba(255, 255, 255, 0.45);
}

/* Biến thể 3: Xanh ngọc lục bảo Emerald sang trọng (Cơ quan tham gia) */
.stat-pill-emerald {
    background: linear-gradient(135deg, #059669 0%, #047554 55%, #02573E 100%);
    box-shadow: 0 6px 18px -2px rgba(4, 117, 84, 0.35), 
                0 2px 6px -1px rgba(0, 0, 0, 0.08),
                inset 0 1px 1px rgba(255, 255, 255, 0.35);
}
.stat-pill-emerald:hover {
    box-shadow: 0 10px 24px -2px rgba(4, 117, 84, 0.45), 
                inset 0 1px 1px rgba(255, 255, 255, 0.45);
}

/* Hàng trên: Icon sắc nét + Số đếm */
.stat-pill-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    position: relative;
    z-index: 3;
    line-height: 1;
}

/* Icons tinh tế, sắc nét */
.stat-icon-glow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
    color: #FFFFFF;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

/* Số đếm màu trắng siêu nét, tương phản cực đại, font Segoe UI / system-ui sắc sảo */
.stat-pill-number {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 2.15rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

/* Hàng dưới: Nhãn chữ trắng thanh nhã */
.stat-pill-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    z-index: 3;
    margin-top: 4px;
}

.stat-pill-label {
    color: #FFFFFF;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
    opacity: 0.95;
}

@media (max-width: 1199px) {
    .stat-pill-badge {
        max-width: 275px;
        min-height: 74px;
        padding: 8px 14px 7px 14px;
    }
    .stat-pill-number {
        font-size: 1.95rem;
    }
    .stat-icon-glow {
        font-size: 1.45rem;
    }
    .stat-pill-label {
        font-size: 0.88rem;
    }
}

@media (max-width: 991px) {
    .stat-pill-badge {
        max-width: 320px;
        min-height: 76px;
    }
    .stat-pill-number {
        font-size: 2.1rem;
    }
    .stat-icon-glow {
        font-size: 1.55rem;
    }
    .stat-pill-label {
        font-size: 0.92rem;
    }
}

@media (max-width: 575px) {
    .stat-pill-badge {
        max-width: 290px;
        min-height: 72px;
        padding: 8px 14px 7px 14px;
    }
    .stat-pill-number {
        font-size: 1.9rem;
    }
    .stat-icon-glow {
        font-size: 1.4rem;
    }
    .stat-pill-label {
        font-size: 0.86rem;
    }
}

/* ==================== EXAM ROOM ==================== */
.main-navbar.sticky-top {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1040 !important;
    background: #FFFFFF !important;
}

.exam-header {
    background: #FFFFFF !important;
    border-bottom: 2px solid var(--border-color) !important;
    padding: 12px 0 !important;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 55px !important;
    z-index: 1030 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08) !important;
}

.exam-palette-sticky {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 155px !important;
    z-index: 990 !important;
}

@media (max-width: 991.98px) {
    .exam-header {
        top: 50px !important;
        padding: 10px 0 !important;
    }
    .exam-palette-sticky {
        position: static !important;
        top: auto !important;
        z-index: 1 !important;
    }
}

.exam-timer-badge {
    background: var(--brick-subtle);
    border: 2px solid var(--brick-primary);
    color: var(--brick-primary);
    font-size: 1.25rem;
    font-weight: 900;
    padding: 6px 18px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.exam-timer-badge.warning {
    background: #FEE2E2;
    border-color: #DC2626;
    color: #DC2626;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.palette-btn {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.82rem;
    border-radius: 5px;
    border: 1px solid #CBD5E1;
    background: #F8FAFC;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    padding: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.palette-btn:hover {
    background: #E2E8F0;
    transform: translateY(-1px);
}

.palette-btn.answered {
    background: var(--brick-primary);
    color: #FFFFFF;
    border-color: var(--brick-dark);
}

.question-card, #prediction_card, #examForm {
    scroll-margin-top: 175px;
}

.question-card {
    background: #FFFFFF;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 24px;
    margin-bottom: 20px;
}

.question-num {
    background: var(--brick-primary);
    color: #FFFFFF;
    font-weight: 800;
    font-size: 0.88rem;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-item:hover {
    background-color: #F8FAFC;
    border-color: #CBD5E1;
}

.option-item.selected {
    background-color: var(--brick-subtle);
    border-color: var(--brick-primary);
    font-weight: 600;
    color: var(--brick-dark);
}

.option-item input[type="radio"] {
    margin-right: 12px;
    accent-color: var(--brick-primary);
    transform: scale(1.2);
}

/* ==================== CERTIFICATE ==================== */
.certificate-frame {
    background: #FFFFFF;
    border: 14px solid var(--gold-ribbon);
    border-image: linear-gradient(to bottom right, var(--gold-bright), var(--gold-accent), var(--gold-ribbon), #A87528) 1;
    padding: 45px 50px;
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    background-image: radial-gradient(#F5EFE6 1px, transparent 1px);
    background-size: 20px 20px;
}

.cert-emblem {
    width: 80px;
    height: 80px;
    margin-bottom: 12px;
}

.cert-header {
    text-align: center;
    border-bottom: 2px solid var(--gold-ribbon);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.cert-title {
    font-family: 'Times New Roman', serif;
    font-size: 2.3rem;
    font-weight: 900;
    color: var(--brick-dark);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.cert-recipient {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--brick-primary);
    text-transform: uppercase;
    margin: 15px 0 5px;
    border-bottom: 2px dashed #CBD5E1;
    display: inline-block;
    padding-bottom: 4px;
}

/* ==================== OFFICIAL SEAL & SIGNATURE ==================== */
.signature-stamp-box {
    position: relative;
    height: 95px;
    margin: 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.official-seal {
    position: absolute;
    left: 20%;
    top: 50%;
    transform: translateY(-50%) rotate(-10deg);
    width: 105px;
    height: 105px;
    pointer-events: none;
    z-index: 2;
}

.seal-outer {
    width: 100%;
    height: 100%;
    border: 3px double #DC2626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 6px rgba(220, 38, 38, 0.2);
}

.seal-inner {
    width: 86px;
    height: 86px;
    border: 1px dashed rgba(220, 38, 38, 0.65);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #DC2626;
    padding: 2px;
}

.seal-star {
    font-size: 0.85rem;
    color: #DC2626;
    line-height: 1;
    margin-bottom: 2px;
}

.seal-dept {
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.seal-province {
    font-size: 0.52rem;
    font-weight: 800;
    line-height: 1.1;
}

.seal-sub {
    font-size: 0.50rem;
    font-weight: 700;
    margin-top: 2px;
    border-top: 1px solid rgba(220, 38, 38, 0.4);
    padding-top: 1px;
}

.digital-signature {
    position: absolute;
    right: 18%;
    top: 50%;
    transform: translateY(-50%) rotate(-6deg);
    font-family: 'Dancing Script', 'Charm', 'Caveat', cursive;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--navy-blue);
    z-index: 1;
    opacity: 0.95;
    letter-spacing: 0.5px;
    text-shadow: 0 0 1px rgba(30, 58, 138, 0.4);
    white-space: nowrap;
}

/* ==================== FOOTER ==================== */
.main-footer {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, #072C5C 100%);
    color: #D6E4F6;
    padding: 45px 0 20px;
    /* Dải vàng kim khép trên chân trang, đồng bộ với ruy-băng đầu trang */
    border-top: 4px solid transparent;
    border-image: linear-gradient(90deg, var(--gold-ribbon) 0%, var(--gold-bright) 50%, var(--gold-accent) 100%) 1;
    margin-top: 50px;
}

/* Chữ phụ trong chân trang dùng tông xanh nhạt thay cho màu xám mặc định của Bootstrap */
.main-footer .text-secondary {
    color: #A9C4E4 !important;
}

.footer-heading {
    color: #FFFFFF;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 8px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 3px;
    background-color: var(--gold-bright);
}

.footer-links a {
    color: #BBD3EE;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--gold-bright);
    padding-left: 4px;
}

/* ==================== PRIZE TABS STYLING ==================== */
#prizeTabs .nav-link {
    color: var(--navy-blue) !important;
    background-color: var(--brick-subtle) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    transition: all 0.2s ease-in-out;
}

#prizeTabs .nav-link i {
    color: var(--steel-blue) !important;
    transition: color 0.2s;
}

#prizeTabs .nav-link:hover {
    background-color: var(--brick-subtle) !important;
    color: var(--brick-primary) !important;
}

#prizeTabs .nav-link.active {
    color: #FFFFFF !important;
    background-color: var(--brick-primary) !important;
    border-color: var(--brick-primary) !important;
    box-shadow: 0 4px 12px rgba(21, 101, 216, 0.28) !important;
}

#prizeTabs .nav-link.active i {
    color: #FFFFFF !important;
}

/* ==================== SMOOTH ANIMATIONS & MICRO-INTERACTIONS ==================== */

/* 1. Global Transitions & Easing */
.card, .admin-card, .prize-card, .question-card {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
    will-change: transform, box-shadow;
}

.card:hover, .admin-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(10, 58, 120, 0.14) !important;
}

.btn {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: translateY(1px) scale(0.98);
}

.btn-brick {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-brick:hover {
    background-color: var(--brick-dark);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(21, 101, 216, 0.35);
}

/* Nút CTA Nổi bật với hiệu ứng quét ánh sáng (Shimmer / Shine) */
.btn-warning.shadow {
    position: relative;
    background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold-accent) 100%);
    border: none;
    color: #5A3B04;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-warning.shadow:hover {
    transform: translateY(-3px) scale(1.02);
    color: #5A3B04;
    box-shadow: 0 10px 25px rgba(239, 177, 58, 0.5) !important;
}

.btn-warning.shadow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(30deg);
    transition: none;
    animation: shineEffect 4.5s infinite;
    pointer-events: none;
}

@keyframes shineEffect {
    0% { left: -60%; }
    20% { left: 130%; }
    100% { left: 130%; }
}

/* 2. Keyframes Animation Library */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 24px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translate3d(-24px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate3d(24px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes zoomInSoft {
    from {
        opacity: 0;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes floatGently {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-6px);
    }
}

@keyframes pulseSubtle {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
}

@keyframes popAnswer {
    0% { transform: scale(0.85); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

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

/* 3. Utility Animation Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-zoom-in {
    animation: zoomInSoft 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-float {
    animation: floatGently 3.5s ease-in-out infinite;
}

.animate-pulse {
    animation: pulseSubtle 2.5s ease-in-out infinite;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* 4. Scroll Reveal Animations (Kích hoạt khi cuộn tới) */
.reveal-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-scroll.reveal-left {
    transform: translateX(-30px);
}

.reveal-scroll.reveal-right {
    transform: translateX(30px);
}

.reveal-scroll.reveal-zoom {
    transform: scale(0.92);
}

.reveal-scroll.is-revealed {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* 5. Countdown Box & Digits Enhancements */
.countdown-box {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.countdown-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}

.digit-card {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.digit-card:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* 6. Dropdown & Modal Transitions */
.dropdown-menu.show {
    animation: dropDownSlide 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12) !important;
}

.modal.fade .modal-dialog {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* 7. Exam Room Options & Palette Interaction */
.option-item {
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.option-item:hover {
    transform: translateX(5px);
    background-color: #F8FAFC !important;
    border-color: #94A3B8 !important;
}

.option-item.selected {
    transform: translateX(7px);
    background-color: var(--brick-subtle) !important;
    border-color: var(--brick-primary) !important;
    box-shadow: 0 4px 12px rgba(21, 101, 216, 0.12);
}

.palette-btn {
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.palette-btn:hover {
    transform: scale(1.14);
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.palette-btn.answered {
    animation: popAnswer 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 8. Nút Cuộn Về Đầu Trang (Back to Top) */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--brick-primary);
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 6px 18px rgba(21, 101, 216, 0.38);
    cursor: pointer;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.85);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top-btn:hover {
    background: var(--brick-dark);
    color: #FFFFFF;
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 10px 24px rgba(21, 101, 216, 0.48);
}

/* ==================== HERO TECH GRAPHIC (ORBIT) ==================== */
.hero-tech-graphic {
    position: relative;
    width: 220px;
    height: 170px;
    margin: 0 auto 16px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-orbit-ring {
    position: absolute;
    width: 146px;
    height: 146px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(224, 237, 253, 0.8) 0%, rgba(200, 225, 252, 0.4) 60%, transparent 80%);
    border: 2px dashed rgba(59, 130, 246, 0.38);
    animation: orbitRotate 40s linear infinite;
}

@keyframes orbitRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.tech-orbit-center {
    position: relative;
    z-index: 2;
    text-align: center;
    line-height: 1.25;
}

.tech-orbit-title {
    display: block;
    font-size: 0.82rem;
    font-weight: 800;
    color: #0055BD;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.tech-orbit-sub {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    color: #003882;
    letter-spacing: 0.3px;
}

.tech-orbit-node {
    position: absolute;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid #93C5FD;
    box-shadow: 0 4px 12px rgba(0, 85, 189, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0055BD;
    font-size: 1rem;
    z-index: 3;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tech-orbit-node:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(0, 85, 189, 0.32);
    border-color: #3B82F6;
}

.tech-orbit-node.node-doc {
    top: 0px;
    left: 45px;
}

.tech-orbit-node.node-users {
    top: 15px;
    right: 18px;
}

.tech-orbit-node.node-gear {
    bottom: 35px;
    left: 8px;
}

.tech-orbit-node.node-chart {
    bottom: 10px;
    right: 30px;
}

/* ==================== HERO WAVE DIVIDER ==================== */
.hero-wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 4;
    pointer-events: none;
}

.hero-wave-divider svg {
    position: relative;
    display: block;
    width: 100%;
    height: 60px;
}

/* Một ô chọn cơ quan/đơn vị có thể gõ: select gốc vẫn giữ giá trị và validation. */
.organization-unit-combobox {
    position: relative;
}

.organization-unit-input {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%235B6B84' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 6 5 5 5-5'/%3E%3C/svg%3E");
    background-position: right 0.9rem center;
    background-repeat: no-repeat;
    cursor: text;
}

.organization-unit-combobox-ready select[name="OrganizationUnitId"] {
    display: none;
}

.organization-unit-options {
    position: absolute;
    z-index: 1050;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 8px 20px rgba(10, 58, 120, 0.16);
}

.organization-unit-options[hidden] {
    display: none;
}

.organization-unit-group {
    padding: 0.45rem 0.75rem;
    background: #F3F7FC;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.organization-unit-option,
.organization-unit-empty {
    padding: 0.55rem 0.75rem;
}

.organization-unit-option {
    cursor: pointer;
}

.organization-unit-option:hover,
.organization-unit-option.active {
    background: var(--brick-subtle);
    color: var(--brick-dark);
}

.organization-unit-empty {
    color: var(--text-muted);
}

/* ==================== SECTION TITLE WITH BAR ==================== */
.section-title-with-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 800;
    color: #003882;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.section-title-with-bar::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 22px;
    background-color: #E5A93B;
    border-radius: 3px;
    flex-shrink: 0;
}

.section-title-line-after {
    flex-grow: 1;
    height: 2px;
    background: linear-gradient(90deg, #E5A93B 0%, rgba(229, 169, 59, 0.08) 100%);
    max-width: 150px;
    border-radius: 2px;
}

/* ==================== PRIZE CUSTOM BADGES & MEDALS ==================== */
.prize-rank-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
    position: relative;
    transition: transform 0.25s ease;
}

.prize-item:hover .prize-rank-badge {
    transform: scale(1.1) rotate(5deg);
}

.prize-rank-badge.rank-1 {
    background: linear-gradient(135deg, #FFE259 0%, #FFA751 60%, #D97706 100%);
    color: #FFFFFF;
    font-size: 1.35rem;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.45);
    border: 2px solid #FFFFFF;
}

.prize-rank-badge.rank-2 {
    background: linear-gradient(135deg, #F8FAFC 0%, #94A3B8 60%, #64748B 100%);
    color: #FFFFFF;
    font-weight: 900;
    font-size: 1.35rem;
    box-shadow: 0 6px 16px rgba(148, 163, 184, 0.4);
    border: 2px solid #FFFFFF;
}

.prize-rank-badge.rank-3 {
    background: linear-gradient(135deg, #FED7AA 0%, #EA580C 60%, #9A3412 100%);
    color: #FFFFFF;
    font-weight: 900;
    font-size: 1.35rem;
    box-shadow: 0 6px 16px rgba(234, 88, 12, 0.4);
    border: 2px solid #FFFFFF;
}

.prize-rank-badge.rank-star {
    background: linear-gradient(135deg, #FEF08A 0%, #EAB308 60%, #CA8A04 100%);
    color: #FFFFFF;
    font-size: 1.25rem;
    box-shadow: 0 6px 16px rgba(234, 179, 8, 0.4);
    border: 2px solid #FFFFFF;
}

.badge-gold-custom {
    background: linear-gradient(135deg, #FFD35C 0%, #F59E0B 100%) !important;
    color: #451A03 !important;
    font-weight: 800 !important;
    font-size: 0.78rem !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.28);
}

.badge-prize-red {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%) !important;
    color: #FFFFFF !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    padding: 4px 9px !important;
    border-radius: 6px !important;
    display: inline-block !important;
    margin-top: 4px !important;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.text-navy {
    color: #003882 !important;
}

/* ==================== LOGIN PAGE CONTEST TITLE (ĐÚNG 2 DÒNG) ==================== */
.login-contest-title-2line {
    margin-bottom: 0;
    line-height: 1.32;
}

.login-title-line1 {
    display: block;
    font-size: 1.34rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1.25;
    margin-bottom: 3px;
}

.login-title-line2 {
    display: block;
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: 0.2px;
    line-height: 1.3;
    white-space: nowrap;
}

@media (max-width: 575px) {
    .login-title-line1 {
        font-size: 1.15rem;
        letter-spacing: 0.3px;
    }
    .login-title-line2 {
        font-size: 0.94rem;
        letter-spacing: -0.15px;
        white-space: nowrap;
    }
}

/* ==================== REQUIRED FIELD MARK (*) ==================== */
.required-mark,
.text-danger-real {
    color: #DC2626 !important;
    font-weight: 700;
    margin-left: 3px;
}
