﻿
/* Loading overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    backdrop-filter: blur(4px);
}

    .loading-overlay.fade-out {
        opacity: 0;
        visibility: hidden;
    }

.spinner {
    width: 52px;
    height: 52px;
    border: 4px solid rgba(255,255,255,0.12);
    border-left-color: #12a085;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

/* ========================
       CONTAINER CHÍNH - 2 CỘT
       ======================== */
.event-wrap {
    width: 100%;
    /* max-width: 1248px; */
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    display: grid;
    /* grid-template-columns: 64fr 36fr; */
/*    box-shadow: 0 20px 60px rgba(0,0,0,0.5);*/
    animation: fadeInUp 0.6s ease both;
    position: relative;
}

/* ========================
       CỘT TRÁI: BANNER PROMO
       ======================== */
.col-banner {
    background-color: var(--teal-bg);
    background-image: linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    display: flex;
    flex-direction: column;
    color: var(--white);
}

/* Phần TRÊN: Ảnh banner (tiêu đề + voucher + icons) */
.banner-img-block {
    width: 100%;
    display: block;
    line-height: 0;
}

    .banner-img-block img {
        width: 100%;
        height: auto;
        display: block;
        object-fit: cover;
    }

/* Phần DƯỚI: Text + Form (HTML thuần) */
.banner-bottom {
    /* padding: 14px 28px 20px 28px; */
    display: flex;
    flex-direction: column;
    gap: 0px;
    position: absolute;
    bottom: 80px;
    padding: 0 0 0 50px;
    width: 443px;
}

/* Caption text */
.banner-caption {
    text-align: center;
    font-size: 12.5px;
    color: rgba(255,255,255,0.92);
    line-height: 1.5;
}

    .banner-caption a {
        color: white;
        font-weight: 700;
        text-decoration: underline;
    }

/* Form pill nhập SBD */
.form-pill {
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    border: 1.5px solid rgba(255,255,255,0.6);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    border: 1.2px solid #4D4D4D;
}

.form-pill-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 13px 20px;
    font-size: 13.5px;
    color: #555;
    background: transparent;
}

    .form-pill-input::placeholder {
        color: #bbb;
        font-weight: 400;
    }

.form-pill-sep {
    width: 1px;
    background: #ddd;
    align-self: center;
    height: 22px;
}

.form-pill-btn {
    border: none;
    background: white;
    padding: 13px 22px;
    /* font-size: 17px; */
    color: #5E5E5E;
    font-weight: 700;
    /* color: black; */
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
    transition: color 0.2s;
}

    .form-pill-btn:hover {
        color: #12a085;
    }

/* Số lượt tham gia */
.subscriber-note {
    text-align: center;
    font-size: 12.5px;
    color: rgba(255,255,255,0.85);
}

    .subscriber-note strong {
        font-weight: 800;
        color: white;
        font-size: 16px;
    }

/* ========================
       CỘT PHẢI: NOTEBOOK ĐIỀU KIỆN
       ======================== */
.col-notebook {
    /* background-color: #ffffff; */
    /* background-image: repeating-linear-gradient( to bottom, transparent 0px, transparent 30px, var(--notebook-line) 30px, var(--notebook-line) 31px ); */
    position: absolute;
    right: 0px;
    bottom: 21px;
    /* padding: 20px 28px 28px 28px; */
    /* display: flex; */
    transform: rotate( 353deg);
}

/* Lỗ lò xo binding */
.nb-binding {
    display: flex;
    justify-content: space-evenly;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.nb-hole {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #8ecfbe;
    border: 2px solid #6ab5a5;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
}

/* Ghim cờ đỏ góc trên phải */
.nb-pin {
    position: absolute;
    top: 10px;
    right: 14px;
    z-index: 3;
}

/* Tiêu đề Điều Kiện */
.nb-title {
    font-size: 36px;
    font-weight: 700;
    font-style: italic;
    color: var(--notebook-title);
    text-align: center;
    margin-bottom: 6px;
    line-height: 1.2;
    position: relative;
    z-index: 2;
    padding-right: 28px;
}

/* Danh sách điều kiện */
.nb-list {
    list-style: none;
    flex: 1;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0;
    gap: 0px;
    /* white-space: normal; */
}

.nb-item {
    font-size: 11.5px;
    color: #2d3748;
    line-height: 1.5;
    align-items: flex-start;
    gap: 6px;
    font-weight: 500;
    white-space: normal;
    width: 235px;
}

    .nb-item::before {
        content: "•";
        color: #333;
        font-size: 18px;
        line-height: 31px;
        flex-shrink: 0;
    }

    .nb-item span {
        white-space: nowrap;
    }

.nb-red {
    /* color: var(--red-text); */
    color: var(--text-icon-red-secondary, #D02B26);
    font-weight: 700;
}

/* Nút XEM THỂ LỆ */
.nb-footer {
    display: flex;
    justify-content: center;
    margin-top: auto;
    padding-top: 20px;
    position: relative;
    z-index: 2;
}

.btn-xem-the-le {
    background-color: var(--red-btn);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 12px 32px;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(212,37,30,0.4);
    transition: all 0.2s ease;
}

    .btn-xem-the-le:hover {
        background-color: #b71c1c;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(212,37,30,0.5);
    }

/* ========================
       POPUP MODAL KẾT QUẢ ĐIỂM THI
       ======================== */
#edutradiem-msg-modal.modal {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    max-width: 520px !important;
    border-radius: 16px !important;
    overflow: visible !important;
}

    #edutradiem-msg-modal.modal a.close-modal {
        display: none !important;
    }

.score-popup-wrap {
    position: relative;
}

.score-card {
    position: relative;
    background-color: white;
    background-image: linear-gradient(rgba(203,213,225,0.3) 1px, transparent 1px), linear-gradient(90deg, rgba(203,213,225,0.3) 1px, transparent 1px);
    background-size: 20px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 36px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
}

.tape {
    position: absolute;
    width: 120px;
    height: 34px;
    background-color: rgba(246,243,230,0.88);
    z-index: 10;
    clip-path: polygon(0% 0%, 3% 15%, 0% 30%, 3% 45%, 0% 60%, 3% 75%, 0% 90%, 2% 100%, 100% 100%, 97% 90%, 100% 75%, 97% 60%, 100% 45%, 97% 30%, 100% 15%, 97% 0%);
}

.tape-tl {
    top: -10px;
    left: -28px;
    transform: rotate(-28deg);
}

.tape-br {
    bottom: -10px;
    right: -28px;
    transform: rotate(-35deg);
}

.close-popup-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    z-index: 20;
    padding: 4px;
    background: none;
    border: none;
    line-height: 1;
}

.card-header {
    /* display: flex; */
    /* align-items: center; */
    justify-content: center;
    gap: 8px;
    background: unset;
    padding: 0;
    width: unset;
}

.card-title {
    font-size: 26px;
    font-weight: 700;
    /* color: var(--accent-red); */
    color: #C92828;
    margin: 0;
    padding: 0;
}

.heart-icon {
    animation: pulse 2s infinite ease-in-out;
}

.score-section {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 18px;
    align-items: stretch;
    position: relative;
}

.subjects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 10px;
}

.subject-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.subject-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.subject-value {
    background: var(--input-bg);
    background: var(--Neutral-600, #EAEBF0);
    border: 1.5px solid var(--input-border);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    border: 0.2px solid var(--text-icon-base-main, #191919);
    text-align: start;
}

.avg-box {
    background: #e6f4ea;
    border: 1.5px solid #a7f3d0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.avg-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--green-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(167,243,208,0.5);
    padding: 8px;
    text-align: center;
    border-bottom: 1.5px solid var(--green-border);
}

.avg-val {
    font-size: 58px;
    font-weight: 800;
    color: #006555;
    text-align: center;
    margin: auto 0;
    line-height: 1.1;
    padding: 14px 0;
}

.arrow-deco {
    position: absolute;
    right: 10px;
    bottom: -20px;
    width: 44px;
    height: 44px;
    pointer-events: none;
    animation: floatArrow 2.5s infinite ease-in-out;
}

.voucher-result {
    background: var(--Green-Brand-200, #C2E7E1);
    border: 1px solid var(--Green-Brand-600, #009981);
    border-radius: 8px;
    padding: 7px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.voucher-result-icon {
    flex-shrink: 0;
    color: var(--green-text);
}

.voucher-result-text {
    font-size: 13px;
    font-weight: 500;
    color: #191919;
    line-height: 1.45;
    margin: 0;
}

.popup-footer {
    display: flex;
    justify-content: center;
}

.popup-cta {
    /* background: linear-gradient(180deg, #1d7f6c 0%, #116254 100%); */
    background: linear-gradient(261.95deg, #47B75C -19.58%, #124B9A 106.28%);
    border: 1px solid #0d463c;
    border-radius: 8px;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 28px;
    text-decoration: none;
    transition: all 0.2s ease;
}

    .popup-cta:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    }

.welcome-btn-tradiem {
    border: unset;
    background: unset;
    height: 30px;
    position: absolute;
    width: 130px;
    right: 50px;
    bottom: -10px;
}

#game-rules-tradiem {
    width: 620px;
    max-width: 92vw;
    max-height: 90vh;
    padding: 0;
    border: none;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 15px 45px rgba(0,0,0,.3);
}

    #game-rules-tradiem::backdrop {
        background: rgba(0,0,0,.55);
    }

    #game-rules-tradiem .btn-close {
        position: absolute;
        top: 15px;
        right: 15px;
        width: 34px;
        height: 34px;
        border: none;
        border-radius: 50%;
        background: #ff5a5f;
        color: #fff;
        cursor: pointer;
        font-size: 22px;
        font-weight: 700;
    }

    #game-rules-tradiem .dialog-content {
        padding: 28px 32px 15px;
        overflow-y: auto;
        max-height: calc(90vh - 90px);
        color: #444;
        line-height: 1.8;
    }

    #game-rules-tradiem h2 {
        margin: 0;
        text-align: center;
        color: #0b9c8d;
        font-size: 28px;
        font-weight: 800;
    }

    #game-rules-tradiem h3 {
        margin: 0px 0 10px;
        text-align: center;
        color: #0b9c8d;
        font-size: 24px;
        font-weight: 800;
    }

    #game-rules-tradiem ol {
        padding-left: 22px;
    }

    #game-rules-tradiem li {
        margin-bottom: 18px;
    }

    #game-rules-tradiem ul {
        margin: 12px 0 0;
        padding-left: 20px;
    }

    #game-rules-tradiem .voucher-box {
        margin-top: 18px;
        border-radius: 16px;
        background: #f7fbfb;
        border: 1px solid #d8efec;
        padding: 20px;
    }

    #game-rules-tradiem .voucher-title {
        text-align: center;
        font-size: 30px;
        font-weight: 800;
        color: #222;
    }

        #game-rules-tradiem .voucher-title span {
            color: #0b9c8d;
            font-size: 56px;
        }

    #game-rules-tradiem .voucher-box p {
        text-align: center;
        margin-bottom: 15px;
    }

    #game-rules-tradiem .rule-block {
        margin-top: 28px;
    }

    #game-rules-tradiem .rule-title {
        font-size: 19px;
        font-weight: 700;
        margin-bottom: 10px;
    }

    #game-rules-tradiem .dialog-footer {
        position: sticky;
        bottom: 0;
        padding: 18px;
        background: #fff;
        text-align: center;
        border-top: 1px solid #eee;
    }

    #game-rules-tradiem .btn-confirm {
        width: 220px;
        height: 48px;
        border: none;
        border-radius: 999px;
        background: #0b9c8d;
        color: #fff;
        font-size: 17px;
        font-weight: 700;
        cursor: pointer;
        transition: .2s;
    }

        #game-rules-tradiem .btn-confirm:hover {
            background: #088374;
        }

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%,100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes floatArrow {
    0%,100% {
        transform: translate(0,0);
    }

    50% {
        transform: translate(-2px,4px);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .event-wrap {
        grid-template-columns: 1fr;
    }
}
