/* ===== MOBILE OPTIMIZE ===== */
/* MOBILE */
@media (max-width: 990.98px) {
    html {
        font-size: 24px !IMPORTANT;
    }
	.fs-4 {
		font-size: calc(1.25rem + .3vw) !important;
	}
	.break-sm-1 {
        display: block;
        margin-top: 6px;
    }
	.break-sm-2 {
        display: block;
        margin-top: 6px;
    }
	.nav-item-ex {
		display: inline;
	}
	.container {
        padding-left: 8px !important;
        padding-right: 8px !important;
        max-width: 100% !important;
    }

    .alert {
        font-size: 1.1rem;
        padding: 14px;
    }

    #timer {
        font-size: 1.4rem;
    }

    /* CÂU HỎI */
    .card {
        margin-bottom: 14px;
    }

    .card-body {
        padding: 30px;
    }

    .card-body h5 {
        font-size: 1.15rem;
        line-height: 1.4;
    }

    /* ĐÁP ÁN – vùng bấm to */
    .form-check {
        padding: 15px 0 10px 50px;
        border-radius: 8px;
        border: 1px solid #eee;
        margin-bottom: 5px;
    }

    .form-check-input {
        transform: scale(1.3);
        margin-top: 0.35rem;
    }

    .form-check-label {
        font-size: 1.05rem;
        margin-left: 8px;
        display: block;
    }

    /* INPUT dự đoán */
    #predictInput {
        font-size: 1.2rem;
        padding: 12px;
    }

    /* NÚT NỘP */
    button[type="submit"] {
        font-size: 1.2rem;
        padding: 14px;
        width: 100%;
    }
}
/* TABLET + LAPTOP */
@media (min-width: 991px) and (max-width: 1399.98px) {
	html {
        font-size: 22px !IMPORTANT;
    }
	.fs-4 {
		font-size: calc(1.2rem + .3vw) !important;
	}
	.break-sm-1 {
        display: inline;
    }
	.break-sm-2 {
        display: block;
        margin-top: 6px;
    }
	.nav-item-ex {
        display: none !IMPORTANT;
    }
	.brand-text {
        display: none !IMPORTANT;
    }
    .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
        max-width: 100% !important;
    }

    .alert {
        font-size: 1.1rem;
        padding: 14px;
    }

    #timer {
        font-size: 1.4rem;
    }

    /* CÂU HỎI */
    .card {
        margin-bottom: 14px;
    }

    .card-body {
        padding: 23px;
    }

    .card-body h5 {
        font-size: 1.15rem;
        line-height: 1.4;
    }

    /* ĐÁP ÁN – vùng bấm to */
    .form-check {
        padding: 15px 0 10px 50px;
        border-radius: 8px;
        border: 1px solid #eee;
        margin-bottom: 5px;
    }

    .form-check-input {
        transform: scale(1.3);
        margin-top: 0.35rem;
    }

    .form-check-label {
        font-size: 1.05rem;
        margin-left: 8px;
        display: masonry;
    }

    /* INPUT dự đoán */
    #predictInput {
        font-size: 1.2rem;
        padding: 12px;
    }

    /* NÚT NỘP */
    button[type="submit"] {
        font-size: 1.2rem;
        padding: 14px;
        width: 100%;
    }
}
@media (min-width: 1400px) {
    html {
        font-size: 16px;
    }
	.break-sm-1 {
        display: inline;
    }
	.break-sm-2 {
        display: inline;
    }
	.nav-item-ex {
		display: inline;
	}
}
html, body {
    -webkit-user-select: none; /* Chrome, Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE/Edge cũ */
    user-select: none;         /* Chuẩn */
}

input,
textarea,
select,
.questions-scroll {
    user-select: text !important;
}
.card-divider {
    height: 2px;
    margin: 30px 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        #0b6cb985 20%,
        #0b6cb963 50%,
        transparent 100%
    );
}
/* NAVBAR LUÔN HIỆN */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1050; /* cao hơn content */
}
.nav-item {
    cursor: pointer;
}
.brand-logo {
    opacity: 0;
    transform: scale(0.85);
    animation: logoFadeZoom 0.8s ease-out forwards;
}
/* ===== NAVBAR ANIMATION ===== */
.navbar {
    transition: all 0.3s ease;
    padding-top: 12px;
    padding-bottom: 12px;
}

/* Logo */
.brand-logo {
    height: 62px;
    transition: all 0.3s ease;
}

/* Text */
.brand-text {
    line-height: 1.2;
    transition: all 0.3s ease;
}

/* ===== KHI SCROLL ===== */
.navbar.navbar-shrink {
    padding-top: 4px;
    padding-bottom: 4px;
}

.navbar.navbar-shrink .brand-logo {
    height: 36px;
}

.navbar.navbar-shrink .brand-text {
    font-size: 0.85rem;
    opacity: 0.95;
}

.navbar.navbar-shrink .brand-text small {
    font-size: 0.75rem;
}
@keyframes logoFadeZoom {
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.brand-text {
    opacity: 0;
    transform: translateX(-20px);
    animation: textFadeSlide 0.8s ease-out forwards;
    animation-delay: 0.25s;
}

@keyframes textFadeSlide {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.brand-animate {
    overflow: hidden; /* tránh lệch layout */
}
.form-check {
    cursor: pointer;
}
.form-check-label {
    cursor: pointer;
}
.form-check-input:checked + .form-check-label {
    font-weight: bold;
    color: #0d6efd;
}
.nav-link {
    color: #fff;
}
.questions-scroll {
	min-height: 300px;
    max-height: calc(100vh - 300px); /* trừ timer + footer */
    overflow-y: auto;
    padding-right: 5px;
}
.ratings-scroll {
	min-height: 300px;
    max-height: calc(100vh - 300px); /* trừ timer + footer */
    overflow-y: auto;
    padding-right: 5px;
}
.about-scroll {
	min-height: 300px;
    max-height: calc(100vh - 705px); /* trừ timer + footer */
    overflow-y: auto;
    padding-right: 5px;
}

.fixed-bottom-box {
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 100;
}
.count-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.count-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 35px rgba(0,0,0,.12);
}

.count-number {
    font-size: 42px;
    font-weight: 800;
    color: #0d6efd;
    line-height: 1;
}

.count-label {
    margin-top: 6px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
}

/* Mobile */
@media (max-width: 576px) {
    .count-number {
        font-size: 34px;
    }
}

/* HERO */
.hero-section {
    background: url("assets/img/hero-doan.jpg") center/cover no-repeat;
    position: relative;
}

.hero-overlay {
    background: rgba(0, 80, 160, 0.75);
}

.hero-title {
    font-family: "Times New Roman", serif;
    font-size: 2.6rem;
    font-weight: bold;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* STORY BOX */
.story-box {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    height: 100%;
}

.story-box h4 {
    color: #0d6efd;
    font-weight: bold;
    margin-bottom: 12px;
}

/* CALLOUT */
.callout-box {
    background: #f8f9fa;
    padding: 50px 20px;
    border-radius: 20px;
}

/* FONT */
body {
    font-family: "Roboto", sans-serif;
	font-optical-sizing: auto;
}
span.d-none.d-md-inline {
    font-family: "Josefin Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: <weight>;
    font-style: normal;
}
.fade-down {
    filter: blur(4px);
}

@keyframes fadeDown {
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}
.fade-down-on-scroll {
    opacity: 0;
    transform: translateY(-40px);
    transition: all 0.8s ease-out;
}

.fade-down-on-scroll.show {
    opacity: 1;
    transform: translateY(0);
}
.footer-fade-up-scroll{
    opacity:0;
    transform:translateY(60px);
    transition:all .8s ease;
}

.footer-fade-up-scroll.show{
    opacity:1;
    transform:translateY(0);
}
.footer-text{
    opacity:0;
    transform:translateY(30px);
    transition:all .7s ease;
}

.footer-text.show{
    opacity:1;
    transform:translateY(0);
}
.rank-title-main{
    text-align:center;
    font-weight:900;
    font-size:42px;
    color:#c4161c;
    letter-spacing:4px;
    text-shadow:2px 2px 0 #f5c542;
}
.rank-sub{
    text-align:center;
    font-size:22px;
    color:#1d3faa;
    margin-bottom:30px;
}

.top-wrapper{
    display:flex;
    justify-content:center;
    gap: 20px;
    margin-bottom:50px;
}
.slider-slide {
    padding: 0 38px 30px 38px;
}
.rank-box{
    width:300px;
    background:#ffffff5e;
    border-radius:20px;
    padding:30px 20px;
    text-align:center;
    box-shadow: 0 15px 30px rgba(0,0,0,.12);

    opacity:0;
    animation: fadeIn .6s ease forwards;

    transition: 
        transform .25s cubic-bezier(.4,0,.2,1),
        background .25s ease,
        box-shadow .25s ease;

    will-change: transform;
}
.rank-box:hover{
    box-shadow: 0 18px 45px rgba(0,0,0,.18);
    background:#fff;
}
.rank-box.gold{
    border:4px solid #f5c542;
    transform:scale(1.05);
    animation-delay:.2s;
    z-index:2;
}
.rank-box.gold:hover{
    transform:scale(1.1);
}
.rank-box.silver{
    border:4px solid #cfd8dc;
    transform:scale(.95);
    animation-delay:.6s;
}
.rank-box.silver:hover{
    transform:scale(1);
}
.rank-box.bronze{
    border:4px solid #f0a04b;
    transform:scale(.95);
    animation-delay:.9s;
}
.rank-box.bronze:hover{
    transform:scale(1);
}
.rank-box.gold .rank-medal {
	font-size: 56px;
}
.rank-box.silver .rank-medal,
.rank-box.bronze .rank-medal {
	font-size: 44px;
}
.rank-other {
	opacity: 0;
	transform: translateY(20px);
	animation: fadeInRank 0.8s ease forwards;
	animation-delay: 1s;
}

@keyframes fadeInRank {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
@keyframes fadeScale{
    to{
        opacity:1;
        transform:scale(1);
    }
}
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}
.rank-medal{
    width:70px;
    height:70px;
    line-height:70px;
    border-radius:50%;
    margin:0 auto 10px;
    font-size: 50px;
    color:#fff;
    font-family: "Lilita One", sans-serif;
    font-weight: 400;
    font-style: normal;
}
.gold .rank-medal{ background:#f5c542; }
.silver .rank-medal{ background:#b0bec5; }
.bronze .rank-medal{ background:#f0a04b; }

.rank-label{
    font-weight:700;
    color:#ff9800;
}
.rank-name{
    font-size:20px;
    font-weight:700;
    color:#0d2c7d;
}
.rank-score{
    font-size:38px;
    font-weight:900;
    color:#0d2c7d;
}

/* ===== OTHERS ===== */
.other-title{
    text-align:center;
    font-weight:800;
    font-size:26px;
    color:#1d3faa;
    margin-bottom:25px;
}
.ratings-title{
    text-align:center;
    font-weight:800;
    font-size:26px;
    color:#1d3faa;
    margin-bottom: 5px;
}
.ratings-note {
	text-align:center;
	font-size: 16px;
	color: #6b7280;
	margin-bottom: 45px;
}
.rank-item{
    background:#fff;
    border-radius:14px;
    padding: 15px 33px 15px 33px;
    box-shadow:0 8px 20px rgba(0,0,0,.06);
    position:relative;
    height:100%;
    overflow: hidden;
}

.rank-index{
    position:absolute;
    top: 33%;
    right: -3%;
    color: #0000000f;
    width: 33px;
    height: 33px;
    display:flex;
    align-items:center;
    font-size: 146px;
    font-family: "Lilita One", sans-serif;
    font-weight: 200;
    font-style: normal;
    justify-content: flex-end;
}

.rank-item-name{
    font-weight:700;
    color:#0d2c7d;
}
.rank-item-total{
    color:#1d4ed8;
    font-weight:600;
    font-size:14px;
}
.slider-viewport {
    overflow: hidden;
}

.slider-track {
    display: flex;
    transition: transform .5s ease;
}

.slider-slide {
    min-width: 100%;
}

/* nút */
.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    /* background: #0b6cb95e; */
    color: #1d3faa7a;
    border: none;
    /* width: 40px; */
    /* height: 40px; */
    /* border-radius: 28%; */
    z-index: 10;
    transition: all 0.25s ease;
    font-size: xx-large;
}
.slide-btn:hover {
	color: #1d3faa;
    transform: translateY(-50%) scale(1.08);
}
.slide-btn.prev { left: -10px; }
.slide-btn.next { right: -10px; }
.slider-dots {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 15px;
	position: absolute;
	bottom: 0px;
	margin-bottom: -23px;
}

.slider-dots .dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #d1d5db; /* xám */
	cursor: pointer;
	transition: all 0.3s ease;
}

.slider-dots .dot.active {
	background: #0b6cb9; /* xanh */
	transform: scale(1.3);
}
.nav-exam {
	border: 2px solid #ffffff;       /* viền xanh */
	border-radius: 999px;            /* bo tròn pill */
	padding: 5px 10px;
	/* margin-left: 10px; */
	/* transition: all 0.3s ease; */
	font-weight: 600;
}

.nav-exam:hover {
	background-color: #ffffff;
	color: #0b6cb9 !important;
}

.nav-exam i {
	margin-right: 6px;
}
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}
.rules-note ul {
    padding-left: 0;
    margin: 0;
    list-style: none;
}

.rules-note li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 14px;
    line-height: 1.65;
    color: #374151;
}

/* Nhấn mạnh thời gian */
.rules-note strong {
    color: #dc2626;
    font-weight: 700;
}
.title-responsive .line {
    display: inline;
}
/* Mobile dễ đọc hơn */
@media (max-width: 991px) {
	body {
        font-size: larger;
    }
	.title-responsive .line {
        display: block;
    }
}