/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    position: relative;
    background: linear-gradient(135deg, #0d3a8a, #1a5cc8, #0d3a8a);
    border: 2px solid rgba(245, 200, 66, 0.7);
    border-radius: 16px;
    padding: 36px 28px 28px;
    width: 100%;
    max-width: 620px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease;
}
.modal-overlay.open .modal-box {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover {
    background: rgba(255, 80, 80, 0.6);
}

.modal-title {
    font-family: "Oswald", "Kanit", sans-serif;
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 800;
    color: var(--gold);
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Modal Table */
.modal-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 360px;
}
.modal-table thead th {
    background: linear-gradient(to right, #b88a00, var(--gold), #b88a00);
    color: var(--navy);
    font-family: "Kanit", sans-serif;
    font-size: 14px;
    font-weight: 800;
    padding: 10px 12px;
    text-align: center;
}
.modal-table thead th:first-child {
    border-radius: 6px 0 0 0;
}
.modal-table thead th:last-child {
    border-radius: 0 6px 0 0;
}

.modal-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s;
}
.modal-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.07);
}

.modal-table tbody td {
    padding: 10px 12px;
    font-family: "Kanit", sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    vertical-align: middle;
}
.modal-table tbody td img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    padding: 4px;
}
.modal-table tbody td.td-point {
    color: var(--gold);
    font-weight: 800;
    font-size: 15px;
}
.modal-table tbody td.td-amount {
    font-weight: 700;
    color: #7fffff;
}

/* Responsive */
@media (max-width: 480px) {
    .modal-box {
        padding: 28px 14px 20px;
    }
    .modal-table {
        min-width: 280px;
    }
    .modal-table tbody td img {
        width: 38px;
        height: 38px;
    }
}
