* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Be Vietnam Pro", sans-serif;
    background: #f8fafc;
    color: #263445;
    font-size: 15px;
    line-height: 1.6;
}

header {
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #eee;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 23px;
    color: #1c4481;
    font-weight: 700;
    cursor: pointer;
}

.logo img {
    height: 35px;
    object-fit: contain;
}

nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
}

nav a {
    text-decoration: none;
    position: relative;
    color: #333;
    font-weight: 600;
    padding: 5px 8px;
    transition: 0.3s;
}


.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    padding: 2px 6px;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    background: white;
    position: fixed;
    top: 90px;
    left: 0;
    width: 100%;
    z-index: 9999;
    box-shadow: 0 16px 16px rgba(0, 0, 0, 0.2);

}

.mobile-menu a {
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    font-weight: 600;
    color: #000000;
}

.main {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 15px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 250px);
    gap: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    /* đẩy 2 bên */
    align-items: center;
    padding-bottom: 9px;
}

.title {
    font-size: 25px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 20px;
    color: #1c4481;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 15px;
}

.search-box input {
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    outline: none;
    width: 300px;
    font-family: inherit;
    font-size: 14px;

}

.search-box button {
    padding: 9px 12px;
    border: none;
    background: linear-gradient(135deg, #0d5189, #0648b1);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
}

.search-box button:hover {
    background: #3d90ef;
}

/* Mobile */
@media (max-width: 600px) {
    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        flex: 1;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}


.post {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.06);
    transition: 0.3s;
    cursor: pointer;
    text-decoration: none;
}

.post:hover {
    transform: translateY(-3px);
    background-color: #f0f7ff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.09);
}

.post img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.post-content {
    padding: 12px;
}

.meta {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.post h3 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 6px;
    color: #172b4d;
}

.post h2 {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.5;
    margin: 10px 0 6px;
    color: #172b4d;
}

.post p {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;
    color: #526174;
}

.post button {
    margin-top: 10px;
    padding: 8px 16px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(45deg, #42a5f5, #66bb6a);
    color: white;
    cursor: pointer;
    font-size: 14px;
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

@media (max-width: 768px) {
    nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }
}

/* Hiệu ứng đổi màu + scale nhẹ */
nav a:hover {
    color: #0648b1;
    transform: scale(1.1);
}

/* Gạch chân chạy từ giữa ra */
nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -4px;
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, #0d5189, #0648b1);
    transition: 0.3s;
    transform: translateX(-50%);
}

nav a:hover::after {
    width: 100%;
}

/* Mobile menu hover */
.mobile-menu a {
    transition: 0.3s;
}

.mobile-menu a:hover {
    background: #f5f5f5;
    padding-left: 20px;
    color: #028897;
}

.footer {
    background: linear-gradient(135deg, #0d5189, #0648b1);
    color: white;
    margin-top: 60px;
    padding-top: 40px;
}

.footer-container {
    max-width: 1100px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.footer-col h4 {
    margin-bottom: 10px;
    font-size: 18px;
}

.footer-col p {
    font-size: 14px;
    opacity: 0.9;
}

.footer-col a {
    display: block;
    text-decoration: none;
    color: white;
    margin: 6px 0;
    font-size: 14px;
    transition: 0.3s;
}

.footer-col a:hover {
    transform: translateX(5px);
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding: 15px;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.1);
}

#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #abc9f9;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-family: inherit;
}

.dots-loader {
    text-align: center;
}

.dots-loader span {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 5px;
    background: #057380;
    border-radius: 50%;
    animation: bounce 0.6s infinite alternate;
}

.dots-loader span:nth-child(2) {
    animation-delay: 0.2s;
}

.dots-loader span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    to {
        transform: translateY(-10px);
    }
}

.dots-loader p {
    margin-top: 10px;
    font-size: 16px;
}

.post-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background-size: cover;
    background-position: center;

    position: relative;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail-title {
    color: white;
    font-size: var(--font-size);
    font-weight: 800;
    padding: 11px;
    text-align: center;

    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.pagination {
    display: block;
    position: relative;
    width: 100%;
    margin: 30px auto;
    padding: 0 8px;
    text-align: center;
    clear: both;
    box-sizing: border-box;
}

.pagination-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.pagination-buttons button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    min-width: 38px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.2;
    -webkit-appearance: none;
    appearance: none;
}

.pagination-buttons button:hover {
    border-color: #1976d2;
    color: #1976d2;
}

.pagination-buttons button.active {
    background: #1976d2;
    border-color: #1976d2;
    color: #fff;
    font-weight: 600;
}

.pagination-dots {
    color: #777;
}

@media (max-width: 600px) {
    .pagination {
        margin: 24px auto;
        padding: 0 4px;
    }

    .pagination-buttons {
        gap: 6px;
    }

    .pagination-buttons button {
        min-width: 34px;
        min-height: 36px;
        padding: 0 9px;
        font-size: 13px;
    }
}

.vip-badge {
    padding: 2px 9px;
    background: linear-gradient(135deg, #cc3232, #980909);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    border-radius: 5px;
    white-space: nowrap;
    float: right;
}

.free-badge {
    padding: 2px 8px;
    background: linear-gradient(135deg, #21a51a, #0c8002);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    border-radius: 5px;
    white-space: nowrap;
    float: right;
}
button,
input,
select,
textarea {
    font-family: inherit;
}