/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

:root {
    --vh: 1vh;
    /* Biến cho chiều cao viewport thực tế, sẽ được JavaScript cập nhật */
    --main-color: #4da6ff;
    /* Màu chính - xanh dương nhẹ */
    --secondary-color: #007bff;
    /* Màu phụ - xanh dương đậm */
    --main-gradient: linear-gradient(to right, var(--main-color), var(--secondary-color));
    /* Gradient chính */
    --main-bg-color: #000000;
    /* Màu nền đen */
    --text-color: #ffffff;
    /* Màu chữ trắng */
}

body {
    width: 100%;
    min-height: 100vh;
    /* Fallback */
    min-height: calc(var(--vh, 1vh) * 100);
    overflow-x: hidden;
    background: var(--main-bg-color);
    position: relative;
    color: var(--text-color);
}

.main-container {
    width: 100%;
    min-height: 100vh;
    /* Fallback */
    min-height: calc(var(--vh, 1vh) * 100);
    position: relative;
    background: var(--main-bg-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Background Wave */
.bg-wave {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url('../images/1920.png');
    background-size: cover;
    background-position: center;
    /* Tăng độ hiển thị để thấy rõ ảnh background */
    z-index: 0;
}

/* Header Button */
.header-button {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.btn-trang-chu,
.btn-dang-ky,
.btn-dang-nhap {
    background: linear-gradient(135deg, var(--main-color), var(--secondary-color));
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-trang-chu:hover,
.btn-dang-ky:hover,
.btn-dang-nhap:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, var(--secondary-color), var(--main-color));
}

.btn-trang-chu i,
.btn-dang-ky i,
.btn-dang-nhap i {
    margin-right: 6px;
}

.btn-dang-ky {
    background: linear-gradient(135deg, #32CD32, #008000);
}

.btn-dang-nhap {
    background: linear-gradient(135deg, #4169E1, #0000CD);
}

.btn-dang-ky:hover {
    background: linear-gradient(135deg, #008000, #32CD32);
}

.btn-dang-nhap:hover {
    background: linear-gradient(135deg, #0000CD, #4169E1);
}

/* Main Content */
.content-wrapper {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    min-height: 100vh;
    /* Fallback */
    min-height: calc(var(--vh, 1vh) * 100);
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

/* Left Side - Model Image */
.left-content {
    width: 50%;
    background-image: url('../images/model-with-gifts.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-left: 10px;
    padding-right: 0;
}

.left-image {
    max-width: 80%;
    min-width: 850px;
    width: auto;
    height: auto;
    z-index: 2;
    position: relative;
    margin-top: 60px;
    margin-left: -60px;
    border-radius: 0;
    box-shadow: none;
}

/* Right Side - Login Form */
.right-content {
    width: 50%;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: transparent;
    /* Không sử dụng nền riêng nữa */
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 30px;
    margin-top: 0;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    animation: pulse-zoom 1.5s infinite alternate ease-in-out;
    filter: drop-shadow(0 0 10px rgba(77, 166, 255, 0.6));
}

@keyframes pulse-zoom {
    0% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1.1);
    }
}

.logo-image {
    max-width: 450px;
    height: auto;
}

.slogan {
    color: var(--main-color);
    font-size: 25px;
    font-weight: bold;
    text-align: center;
    letter-spacing: 1px;
    margin-top: 10px;
    text-shadow: 0 0 8px rgba(77, 166, 255, 0.8);
    animation: glow 1.5s infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px rgba(77, 166, 255, 0.5);
    }

    to {
        text-shadow: 0 0 15px rgba(77, 166, 255, 0.8);
    }
}

.slogan span.char {
    transition: opacity 0.3s ease;
}

/* Redemption Form */
.redemption-form {
    width: 100%;
    max-width: 550px;
    background: rgba(255, 255, 255, 0.15);
    /* Giảm độ trong suốt */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(77, 166, 255, 0.3);
    /* Thêm viền xanh nhạt */
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(77, 166, 255, 0.2), 0 5px 15px rgba(0, 0, 0, 0.1);
    /* Thêm glow xanh */
    position: relative;
    margin-top: 40px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.redemption-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(77, 166, 255, 0.15), rgba(0, 123, 255, 0.1));
    /* Giảm độ đậm */
    z-index: -1;
}

.redemption-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.1);
}

.form-header {
    margin-bottom: 30px;
    text-align: center;
}

.header-image {
    max-width: 100%;
    width: 400px;
    /* Giảm kích thước nhẹ */
    height: auto;
    position: relative;
    top: -42px;
    /* Dịch xuống từ -40px xuống -25px */
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 4px 10px rgba(77, 166, 255, 0.2));
    /* Giảm đổ bóng để bớt nhòe */
    transition: transform 0.3s ease;
    transform: scale(1);
    /* Bỏ scale để hiển thị ảnh gốc */
    z-index: 10;
}

.header-image:hover {
    transform: scale(1.05);
    /* Giảm hiệu ứng hover */
    filter: drop-shadow(0 5px 12px rgba(77, 166, 255, 0.3));
}

/* Ẩn phần h2 cũ khi đã thay ảnh */
.form-header h2 {
    display: none;
}

.form-body {
    padding: 0 20px 20px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    color: #4da6ff;
    /* Đổi màu label thành xanh dương */
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 15px;
    letter-spacing: 0.5px;
    text-shadow: 0 0 3px rgba(77, 166, 255, 0.5);
    /* Thêm glow */
    transition: all 0.3s;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(77, 166, 255, 0.3);
    /* Border màu xanh nhạt */
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    /* Nền gần như đen */
    color: white;
    /* Chữ trắng */
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.form-control:focus {
    outline: none;
    border-color: var(--main-color);
    background-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0 8px 20px rgba(77, 166, 255, 0.3);
    transform: translateY(-2px);
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: var(--main-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.4s ease;
    text-align: center;
    margin: 30px 0 20px;
    box-shadow: 0 10px 25px rgba(77, 166, 255, 0.4);
    /* Tăng glow */
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    /* Thêm shadow cho chữ */
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

.btn-submit:hover {
    background: linear-gradient(to right, var(--secondary-color), var(--main-color));
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(77, 166, 255, 0.3);
    letter-spacing: 1.5px;
}

.btn-submit:hover::before {
    left: 100%;
}

.form-links {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.link-detail,
.link-code {
    display: inline-flex;
    align-items: center;
    padding: 12px 18px;
    background-color: rgba(0, 0, 0, 0.7);
    /* Nền đen */
    color: #4da6ff;
    /* Chữ xanh */
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(77, 166, 255, 0.1);
    border: 1px solid rgba(77, 166, 255, 0.3);
    /* Thêm viền xanh nhạt */
}

.link-detail i,
.link-code i {
    margin-left: 8px;
    color: var(--main-color);
    transition: all 0.3s ease;
}

.link-detail:hover,
.link-code:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    color: var(--secondary-color);
}

.link-detail:hover i,
.link-code:hover i {
    transform: translateX(3px);
    color: var(--secondary-color);
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .content-wrapper {
        flex-direction: column-reverse;
        min-height: auto;
    }

    .left-content,
    .right-content {
        width: 100%;
    }

    .left-content {
        height: 40vh;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding-top: 10px;
        padding-right: 0;
        padding-left: 0;
    }

    .left-image {
        max-width: 85%;
        min-width: 320px;
        margin: 0;
        margin-left: 0;
        transform: translateY(-70px);
        /* Dịch lên cao hơn từ -50px thành -70px */
        border-radius: 0;
    }

    .right-content {
        padding: 40px 20px;
        min-height: 60vh;
        background: transparent;
        /* Đảm bảo không có nền riêng */
    }

    .logo-container {
        margin-top: 50px;
        margin-bottom: 30px;
    }

    .logo-image {
        max-width: 200px;
    }

    .redemption-form {
        max-width: 90%;
        margin-top: 10px;
    }

    .bg-wave {
        background-image: url('../images/750.png');
    }

    .header-image {
        max-width: 100%;
        width: auto;
        margin-left: 0;
        top: -30px;
        transform: scale(1.1);
    }
}

@media screen and (max-width: 768px) {

    body,
    html {
        height: 100%;
        position: relative;
    }

    .main-container {
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 100vh;
    }

    .content-wrapper {
        flex: 1;
        min-height: auto;
        flex-direction: column-reverse;
    }

    .header-button {
        top: 10px;
        right: 10px;
        gap: 8px;
    }

    .btn-trang-chu,
    .btn-dang-ky,
    .btn-dang-nhap {
        padding: 8px 12px;
        font-size: 12px;
    }

    .form-links {
        flex-direction: column;
        gap: 10px;
    }

    .link-detail,
    .link-code {
        text-align: center;
        justify-content: center;
        width: 100%;
        padding: 12px;
    }

    .logo-image {
        max-width: 180px;
    }

    .slogan {
        font-size: 14px;
    }

    .header-image {
        max-width: 90%;
        width: auto;
        top: -20px;
        transform: scale(1);
        margin-left: 5%;
    }

    .left-content {
        height: 40vh;
        flex: 0 0 40vh;
        align-items: flex-start;
        padding-top: 0;
    }

    .left-image {
        max-width: 120%;
        /* Giảm từ 140% xuống 120% */
        min-width: 420px;
        /* Giảm từ 480px xuống 420px */
        transform: translateY(-150px);
        /* Dịch xuống một chút từ -170px thành -150px */
    }

    .right-content {
        padding: 20px 20px 40px;
        justify-content: flex-start;
        flex: 1;
        min-height: 70vh;
    }

    .logo-container {
        margin-top: 20px;
        margin-bottom: 30px;
    }

    .redemption-form {
        margin-top: 0;
        position: relative;
        top: -10px;
    }

    .form-header {
        margin-bottom: 30px;
    }

    .form-control {
        font-size: 16px;
        padding: 15px;
        /* Tăng kích thước để dễ nhấn trên mobile */
    }

    .btn-submit {
        padding: 15px;
        font-size: 16px;
    }

    .close-event {
        top: 20px;
        right: 15px;
        font-size: 14px;
        padding: 6px 12px;
    }

    .countdown-overlay {
        top: 30px;
        left: 30px;
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .main-container {
        min-height: 100vh;
        height: auto;
        display: flex;
        flex-direction: column;
    }

    .content-wrapper {
        display: flex;
        flex-direction: column-reverse;
        height: 100%;
        flex: 1;
    }

    .form-header h2 {
        font-size: 14px;
        padding: 8px 15px;
        top: -25px;
    }

    .logo-image {
        max-width: 300px;
    }

    .slogan {
        font-size: 20px;
    }

    .left-content {
        height: 30vh;
        flex: 0 0 30vh;
        min-height: 200px;
        align-items: flex-start;
        padding-top: 0;
    }

    .left-image {
        max-width: 95%;
        min-width: 300px;
        transform: translateY(-110px);
        /* Dịch xuống thêm từ -130px thành -110px */
    }

    .right-content {
        padding: 15px 15px 30px;
        justify-content: flex-start;
        height: auto;
        flex: 1;
        min-height: 80vh;
    }

    .logo-container {
        margin-bottom: 50px;
        margin-top: 50px;
    }

    .redemption-form {
        padding: 15px 10px;
        margin-top: 10px;
        position: relative;
        top: -45px;
        transform: translateY(0);
    }

    .form-header h2 {
        top: -22px;
    }

    .form-body {
        padding: 0 10px 10px;
        margin-top: 10px;
    }

    .form-group label {
        font-size: 14px;
    }

    .link-detail,
    .link-code {
        font-size: 12px;
    }

    .header-image {
        max-width: 85%;
        top: -15px;
        margin-left: 8%;
    }

    .header-button {
        flex-direction: row;
        width: auto;
        gap: 5px;
    }

    .btn-trang-chu,
    .btn-dang-ky,
    .btn-dang-nhap {
        padding: 6px 10px;
        font-size: 11px;
    }

    .btn-trang-chu i,
    .btn-dang-ky i,
    .btn-dang-nhap i {
        margin-right: 4px;
        font-size: 10px;
    }

    .countdown-overlay {
        top: 15px;
        left: 15px;
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .close-event {
        top: 20px;
        right: 15px;
        font-size: 12px;
        padding: 5px 10px;
        letter-spacing: 0.5px;
    }

    .event-modal-content h3 {
        font-size: 16px;
        padding: 10px 8px;
    }
}

@media screen and (max-width: 320px) {
    .countdown-overlay {
        top: 10px;
        left: 10px;
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .close-event {
        top: 15px;
        right: 10px;
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* Fix cho Safari iOS và các trình duyệt mobile khác */
@supports (-webkit-overflow-scrolling: touch) {

    .btn-submit,
    .form-control,
    .link-detail,
    .link-code {
        -webkit-appearance: none;
        border-radius: 5px;
    }

    /* Điều chỉnh cho iOS */
    @media screen and (max-width: 768px) {
        .content-wrapper {
            height: auto;
            min-height: calc(var(--vh, 1vh) * 100);
        }

        .right-content {
            position: relative;
            top: 0;
            padding-bottom: 50px;
            /* Thêm padding ở dưới để tránh bị che khuất */
        }

        /* Fix iOS Safari khi bàn phím hiện lên */
        input:focus {
            font-size: 16px;
            /* Ngăn iOS zoom khi focus */
        }

        /* Fix iOS viewport height */
        body,
        html {
            height: calc(var(--vh, 1vh) * 100);
            position: relative;
            width: 100%;
        }
    }

    /* Fix riêng cho iOS khi xoay ngang màn hình */
    @media screen and (max-width: 900px) and (orientation: landscape) {
        .content-wrapper {
            flex-direction: column-reverse;
        }

        .left-content {
            height: 35vh;
            min-height: 150px;
        }

        .left-image {
            max-width: 45%;
            transform: translateY(-90px);
            /* Dịch xuống thêm từ -110px thành -90px */
        }

        .redemption-form {
            transform: translateY(0);
            margin-top: 10px;
        }

        .right-content {
            padding-top: 10px;
        }

        .logo-container {
            margin-top: 20px;
            margin-bottom: 10px;
        }
    }
}

/* Modal kết quả kiểm tra code */
.result-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}

.result-modal-content {
    position: relative;
    background: rgba(15, 15, 15, 0.95);
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    overflow: hidden;
    padding: 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(77, 166, 255, 0.3);
    border: 1px solid rgba(77, 166, 255, 0.4);
    animation: modalFadeIn 0.4s ease;
    color: #ffffff;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    z-index: 5;
    transition: all 0.2s ease;
    height: 30px;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
}

.close-modal:hover {
    color: #ffffff;
    background: rgba(77, 166, 255, 0.3);
    transform: scale(1.1);
}

.result-header {
    background: linear-gradient(135deg, var(--main-color), var(--secondary-color));
    padding: 22px 20px;
    text-align: center;
    position: relative;
    border-bottom: none;
}

.result-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.result-logo {
    max-width: 100px;
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.result-header h2 {
    margin: 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 18px;
    letter-spacing: 1px;
    font-weight: 700;
}

.result-body {
    padding: 25px 20px;
    background: rgba(15, 15, 15, 0.95);
}

.result-info {
    margin-bottom: 25px;
}

.result-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.result-table tr {
    transition: all 0.2s ease;
    position: relative;
}

.result-table tr:hover {
    background: rgba(77, 166, 255, 0.05);
}

.result-table tr::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(77, 166, 255, 0.15), transparent);
}

.result-table tr:last-child::after {
    display: none;
}

.result-table td {
    padding: 12px 10px;
    font-size: 15px;
    vertical-align: middle;
}

.result-table td:first-child {
    width: 40%;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 13px;
}

.result-table td:last-child {
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.3px;
}

#result-code {
    color: var(--main-color);
    font-weight: 700;
    letter-spacing: 1px;
}

#result-status {
    font-weight: 700;
}

#result-points,
#result-money {
    font-weight: 700;
    color: var(--main-color);
}

.username-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(77, 166, 255, 0.4);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    transition: all 0.3s ease;
}

.username-input:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 8px rgba(77, 166, 255, 0.5);
    background: rgba(0, 0, 0, 0.5);
}

.username-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.result-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    gap: 12px;
}

.result-button {
    padding: 12px 0;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    margin: 0;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.result-button.confirm {
    background: linear-gradient(to right, var(--main-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(77, 166, 255, 0.3);
}

.result-button.cancel {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.result-button:hover {
    transform: translateY(-3px);
}

.result-button.confirm:hover {
    background: linear-gradient(to right, var(--secondary-color), var(--main-color));
    box-shadow: 0 6px 18px rgba(77, 166, 255, 0.4);
}

.result-button.cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Màu sắc cho các trạng thái */
.status-valid {
    color: #2ECC71 !important;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(46, 204, 113, 0.3);
}

.status-expired {
    color: #F39C12 !important;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(243, 156, 18, 0.3);
}

.status-invalid {
    color: #E74C3C !important;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(231, 76, 60, 0.3);
}

.status-used {
    color: #3498DB !important;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
}

.status-limit {
    color: #9B59B6 !important;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(155, 89, 182, 0.3);
}

/* Style cho phần hạn sử dụng hết hạn */
.expired-date {
    text-decoration: line-through;
    color: #F39C12 !important;
    font-weight: 700;
    opacity: 0.8;
}

/* CSS cho các trạng thái modal */
.result-header.valid {
    background: linear-gradient(to right, #2ECC71, #27AE60);
}

.result-header.expired {
    background: linear-gradient(to right, #F39C12, #D35400);
}

.result-header.invalid {
    background: linear-gradient(to right, #E74C3C, #C0392B);
}

.result-header.used {
    background: linear-gradient(to right, #3498DB, #2980B9);
}

/* Cập nhật màu sắc wave cho các trạng thái */
.result-header.valid::after {
    background-image: linear-gradient(45deg, transparent 33.333%, #2ECC71 33.333%, #2ECC71 66.667%, transparent 66.667%);
}

.result-header.expired::after {
    background-image: linear-gradient(45deg, transparent 33.333%, #F39C12 33.333%, #F39C12 66.667%, transparent 66.667%);
}

.result-header.invalid::after {
    background-image: linear-gradient(45deg, transparent 33.333%, #E74C3C 33.333%, #E74C3C 66.667%, transparent 66.667%);
}

.result-header.used::after {
    background-image: linear-gradient(45deg, transparent 33.333%, #3498DB 33.333%, #3498DB 66.667%, transparent 66.667%);
}

.result-header.limit-reached::after {
    background-image: linear-gradient(45deg, transparent 33.333%, #9B59B6 33.333%, #9B59B6 66.667%, transparent 66.667%);
}

/* Responsive cho modal */
@media screen and (max-width: 480px) {
    .result-modal-content {
        width: 95%;
        max-width: 340px;
    }

    .result-header h2 {
        font-size: 16px;
    }

    .result-logo {
        max-width: 80px;
    }

    .result-button {
        font-size: 13px;
        padding: 10px 0;
    }

    .result-table td {
        padding: 10px 5px;
        font-size: 14px;
    }

    .result-table td:first-child {
        font-size: 12px;
    }

    .result-body {
        padding: 20px 15px;
    }
}

/* Thiết kế cho sự kiện mới trong ngày */
.link-event {
    display: inline-flex;
    align-items: center;
    padding: 12px 18px;
    background-color: rgba(77, 166, 255, 0.3);
    color: #ffffff;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    justify-content: center;
    border: 1px solid rgba(77, 166, 255, 0.5);
}

.link-event i {
    margin-left: 8px;
    color: #ffffff;
    transition: all 0.3s ease;
}

.link-event:hover {
    background-color: rgba(77, 166, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    color: #ffffff;
}

.link-event:hover i {
    transform: translateX(3px);
    color: #ffffff;
}

/* Modal sự kiện */
.event-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    /* Tăng z-index để đảm bảo hiển thị trên cùng */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.event-modal.show {
    opacity: 1;
}

.event-modal-content {
    position: relative;
    background: rgba(15, 15, 15, 0.95);
    border-radius: 16px;
    width: 650px;
    max-width: 90%;
    max-height: 80vh;
    overflow: hidden;
    padding: 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(77, 166, 255, 0.3);
    border: 1px solid rgba(77, 166, 255, 0.4);
}

.close-event {
    position: absolute;
    top: 40px;
    /* Đưa nút lên phía trên */
    right: 20px;
    color: white;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.2s ease;
    padding: 8px 15px;
    border-radius: 5px;
    background: rgba(255, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.close-event:hover {
    color: #ffffff;
    background: rgba(255, 0, 0, 0.9);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* Disable close button style */
.close-event.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(100, 100, 100, 0.5);
}

.event-modal-content h3 {
    background: linear-gradient(135deg, var(--main-color), var(--secondary-color));
    color: white;
    padding: 18px;
    margin: 0;
    text-align: center;
    font-size: 22px;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1000;
}

.event-images {
    padding: 25px;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    max-height: calc(80vh - 70px);
    overflow-y: auto;
}

.event-images img {
    width: 580px;
    height: 200px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    position: relative;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.1);
}

.event-images img:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(77, 166, 255, 0.6);
}

.event-images img:active {
    transform: translateY(1px);
    box-shadow: 0 4px 15px rgba(77, 166, 255, 0.4);
}

/* Thanh cuộn tùy chỉnh cho modal sự kiện */
.event-images::-webkit-scrollbar {
    width: 8px;
}

.event-images::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.event-images::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--main-color), var(--secondary-color));
    border-radius: 10px;
}

.event-images::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Responsive cho modal sự kiện */
@media screen and (max-width: 768px) {
    .event-modal-content {
        width: 95%;
        max-width: 600px;
    }

    .event-images {
        padding: 15px;
    }

    .event-images img {
        width: 400px;
        height: 140px;
    }

    .event-modal-content h3 {
        font-size: 20px;
        padding: 15px;
    }

    .button-container {
        top: 80%;
        right: 20px;
        z-index: 100;
    }
}

@media screen and (max-width: 480px) {
    .event-modal-content {
        width: 95%;
        max-width: 300px;
        border-radius: 10px;
    }

    .event-images {
        padding: 8px;
        gap: 8px;
        max-height: 60vh;
    }

    .event-images img {
        width: 280px;
        height: 100px;
        border-radius: 5px;
    }

    .close-event {
        top: 20px;
        right: 15px;
        font-size: 12px;
        height: 30px;
        width: 30px;
    }

    .event-modal-content h3 {
        font-size: 16px;
        padding: 10px 8px;
    }
}

/* Điện thoại siêu nhỏ */
@media screen and (max-width: 320px) {
    .event-modal-content {
        width: 95%;
        max-width: 250px;
    }

    .event-images img {
        width: 220px;
        height: 80px;
    }

    .event-images {
        padding: 6px;
        gap: 6px;
    }

    .event-modal-content h3 {
        font-size: 14px;
        padding: 8px 6px;
    }
}

.countdown-overlay {
    position: absolute;
    top: 30px;
    left: 30px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    background-color: rgba(77, 166, 255, 0.9);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: pulse-countdown 1s infinite;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1002;
}

@keyframes pulse-countdown {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

@media screen and (max-width: 480px) {
    .countdown-overlay {
        top: 15px;
        left: 15px;
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .close-event {
        top: 20px;
        right: 15px;
        font-size: 12px;
        padding: 5px 10px;
    }
}

@media screen and (max-width: 320px) {
    .countdown-overlay {
        top: 10px;
        left: 10px;
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .close-event {
        top: 15px;
        right: 10px;
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* Button Container - Định vị button sang bên phải */
.button-container {
    position: fixed;
    top: 15%;
    right: 20px;
    transform: translateY(-15%);
    z-index: 100;
}

.gif-code {
    width: 100px;
    height: 100px;
    cursor: pointer;
}

.button {
    display: flex;
    justify-content: center;
    align-items: center;
}

.button .btn-trang-chu {
    background: linear-gradient(135deg, #32CD32, #008000);
    color: white;
    padding: 15px 25px;
    border-radius: 30px;
    font-weight: bold;
    text-decoration: none;
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 8px 20px rgba(50, 205, 50, 0.4);
    transition: all 0.3s ease;
    border: 2px solid rgba(50, 205, 50, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    min-width: 150px;
    position: relative;
    overflow: hidden;
}

.button .btn-trang-chu::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

.button .btn-trang-chu:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 25px rgba(50, 205, 50, 0.6);
    background: linear-gradient(135deg, #008000, #32CD32);
    border-color: rgba(50, 205, 50, 0.8);
}

.button .btn-trang-chu:hover::before {
    left: 100%;
}

.button .btn-trang-chu i {
    margin-right: 8px;
    font-size: 18px;
    animation: pulse-icon 2s infinite;
}

@keyframes pulse-icon {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Responsive cho button */
@media screen and (max-width: 768px) {
    .button-container {
        position: fixed;
        bottom: 20px;
        right: 15px;
        top: auto;
        transform: none;
    }

    .button .btn-trang-chu {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 120px;
    }

    .button .btn-trang-chu i {
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .button-container {
        position: fixed;
        bottom: 15px;
        right: 10px;
        top: auto;
        transform: none;
    }

    .button .btn-trang-chu {
        padding: 10px 15px;
        font-size: 12px;
        min-width: 100px;
    }

    .button .btn-trang-chu i {
        font-size: 14px;
        margin-right: 6px;
    }
}

/* Modal Account - Hacker Green Style */
.account-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-in-out;
    align-items: center;
    justify-content: center;
}

.account-modal-content {
    width: 100%;
    max-width: 550px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(77, 166, 255, 0.3);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(77, 166, 255, 0.2), 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    margin: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    animation: slideIn 0.4s ease-out;
    will-change: transform;
}

.account-modal-header {
    display: none;
}

.account-modal-header::before {
    display: none;
}

.account-modal-header h3 {
    display: none;
}

.close-account {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    padding: 8px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.close-account:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.account-modal-body .form-group {
    margin-bottom: 0px;
    position: relative;
}

.account-modal-body label {
    display: block;
    color: #4da6ff;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 15px;
    letter-spacing: 0.5px;
    text-shadow: 0 0 3px rgba(77, 166, 255, 0.5);
    transition: all 0.3s;
}

.account-modal-body .form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(77, 166, 255, 0.3);
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.account-modal-body .form-control:focus {
    outline: none;
    border-color: var(--main-color);
    background-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0 8px 20px rgba(77, 166, 255, 0.3);
    transform: translateY(-2px);
}

.account-modal-body .form-control::placeholder {
    color: #666;
}

.btn-submit-account {
    width: 100%;
    padding: 16px;
    background: var(--main-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.4s ease;
    text-align: center;
    margin-top: 30px;
    box-shadow: 0 10px 25px rgba(77, 166, 255, 0.4);
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-submit-account:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(77, 166, 255, 0.4);
    background: linear-gradient(135deg, var(--secondary-color), var(--main-color));
}

.btn-submit-account:active {
    transform: translateY(0);
}

.btn-submit-account::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-submit-account:hover::before {
    left: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Hiệu ứng particle cho modal */
.account-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(77, 166, 255, 0.15), rgba(0, 123, 255, 0.1));
    z-index: -1;
}

/* Responsive */
@media (max-width: 768px) {
    .account-modal-content {
        width: 95%;
        margin: 0;
    }

    .account-modal-header h3 {
        font-size: 16px;
    }
}


.error-msg {
    color: #E74C3C;
    font-size: 15px;
    margin-top: 10px;
    font-weight: bold;
}