#disclaimerOverlay .modal {
    overflow: hidden;
}

#disclaimerOverlay .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px 0;
}

#disclaimerOverlay .modal-header h2 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.25;
    color: #FDD77E;
}

#disclaimerOverlay .modal-close {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    background: rgba(255,255,255,.05);
    color: rgba(255,255,255,.82);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s, color .2s;
}

#disclaimerOverlay .modal-close:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.2);
    color: #fff;
}

#disclaimerOverlay .modal-body {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(253,215,126,.45) rgba(255,255,255,.06);
}

#disclaimerOverlay .modal-body::-webkit-scrollbar {
    width: 10px;
}

#disclaimerOverlay .modal-body::-webkit-scrollbar-track {
    background: rgba(255,255,255,.05);
    border-radius: 999px;
}

#disclaimerOverlay .modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(253,215,126,.75), rgba(207,34,171,.75));
    border-radius: 999px;
    border: 2px solid rgba(0,0,0,.15);
}

#disclaimerOverlay .modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(253,215,126,.92), rgba(207,34,171,.92));
}

#disclaimerOverlay .scrollable-content {
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(0,0,0,.28);
    border: 1px solid rgba(255,255,255,.08);
    color: rgba(255,255,255,.82);
    font-size: .82rem;
    line-height: 1.62;
    scrollbar-width: thin;
    scrollbar-color: rgba(253,215,126,.45) rgba(255,255,255,.06);
}

#disclaimerOverlay .scrollable-content::-webkit-scrollbar {
    width: 10px;
}

#disclaimerOverlay .scrollable-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,.05);
    border-radius: 999px;
}

#disclaimerOverlay .scrollable-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(253,215,126,.75), rgba(207,34,171,.75));
    border-radius: 999px;
    border: 2px solid rgba(0,0,0,.15);
}

#disclaimerOverlay .scrollable-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(253,215,126,.92), rgba(207,34,171,.92));
}

#disclaimerOverlay .scrollable-content h3,
#disclaimerOverlay .scrollable-content h4 {
    margin: 14px 0 8px;
    color: #FDD77E;
    font-size: .95rem;
}

#disclaimerOverlay .scrollable-content p {
    margin-bottom: 10px;
}

#disclaimerOverlay .scrollable-content ul {
    margin: 0 0 12px 18px;
    padding: 0;
}

#disclaimerOverlay .scrollable-content li + li {
    margin-top: 6px;
}

#disclaimerOverlay .language-selector {
    margin-bottom: 18px;
    text-align: center;
}

#disclaimerOverlay .language-selector label {
    display: inline-block;
    margin: 0 10px 0 0;
    color: #FDD77E;
    font-size: .84rem;
    font-weight: 700;
    vertical-align: middle;
}

#disclaimerOverlay .language-selector #language {
    width: auto;
    min-width: 170px;
    padding: 9px 40px 9px 12px;
    border-radius: 10px;
    background-color: rgba(0,0,0,.36);
    color: #fff;
    border: 1px solid rgba(253,215,126,.24);
    cursor: pointer;
    min-height: 42px;
    font-family: inherit;
    font-size: .9rem;
    line-height: 1.2;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FDD77E' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    vertical-align: middle;
    margin-bottom: 0;
}

#disclaimerOverlay .language-selector #language:focus {
    outline: none;
    border-color: rgba(253,215,126,.52);
    box-shadow: 0 0 0 3px rgba(253,215,126,.12);
}

#disclaimerOverlay .language-selector #language option {
    background: #201c24;
    color: #fff;
}

/* ========================================
   MODAL COMPONENTS
   ======================================== */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

/* Modal Container */
.modal {
    background-color: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease-out;
    border: 1px solid rgba(253, 215, 126, 0.1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 16px;
}

.modal-header h2 {
    font-size: clamp(18px, 5vw, 24px);
    font-weight: 600;
    margin: 0;
    background: linear-gradient(90deg, #FDD77E, #EB9A2B, #FE526F, #CF22AB, #520587);
    background-clip: border-box;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    flex: 1;
}

/* Close Button */
.modal-close {
    background: rgba(253, 215, 126, 0.05);
    border: none;
    color: #aaa;
    font-size: 28px;
    cursor: pointer;
    padding: 8px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    border-radius: 6px;
}

.modal-close:hover {
    color: #FDD77E;
    background-color: rgba(253, 215, 126, 0.1);
    transform: scale(1.1);
}

/* Modal Body */
.modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.modal-body > p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Modal Tabs Navigation */
.modal-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid rgba(253, 215, 126, 0.2);
    padding: 0;
    margin: 0;
    background-color: rgba(0, 0, 0, 0.3);
}

.modal-tab-btn {
    flex: 1;
    padding: 16px 24px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-family: "Plus Jakarta Sans", "Kantumruy Pro", sans-serif;
    font-weight: 500;
    font-size: 0.95em;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    text-align: center;
    position: relative;
}

.modal-tab-btn:hover {
    color: rgba(255, 255, 255, 0.9);
    background-color: rgba(253, 215, 126, 0.05);
}

.modal-tab-btn.active {
    color: #FDD77E;
    border-bottom-color: #FDD77E;
    background-color: rgba(253, 215, 126, 0.1);
}

/* Modal Tab Content */
.modal-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.modal-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Footer */
.modal-footer {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-footer button {
    padding: 12px 24px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-family: "Plus Jakarta Sans", "Kantumruy Pro", sans-serif;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95em;
}

.modal-footer .btn-cancel {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal-footer .btn-cancel:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.modal-footer .btn-submit {
    background-color: #FDD77E;
    color: #1a1a1a;
}

.modal-footer .btn-submit:hover {
    background-color: #FFF0A0;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(253, 215, 126, 0.3);
}

/* Form in Modal */
.modal .form-container {
    gap: 16px;
    padding: 0;
    background: none;
    border: none;
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal label {
    font-size: 14px;
    font-weight: 500;
    color: #FDD77E;
    margin-bottom: 6px;
}

.modal input[type="text"],
.modal input[type="password"],
.modal input[type="email"],
.modal input[type="number"],
.modal select,
.modal textarea {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    min-height: 44px;
}

.modal select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.modal select option {
    background-color: #2a2a2a;
    color: #fff;
    padding: 10px;
}

.modal select option:checked {
    background: linear-gradient(#FDD77E, #FDD77E);
    background-color: #FDD77E;
    color: #1a1a1a;
}

.modal input[type="text"]:focus,
.modal input[type="password"]:focus,
.modal input[type="email"]:focus,
.modal input[type="number"]:focus,
.modal select:focus,
.modal textarea:focus {
    outline: none;
    background-color: rgba(0, 0, 0, 0.4);
    border-color: #FDD77E;
    box-shadow: 0 0 8px rgba(253, 215, 126, 0.2);
}

/* Checkbox in Modal */
.modal .checkbox-container {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    padding: 12px;
    background-color: rgba(253, 215, 126, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(253, 215, 126, 0.1);
}

.modal .checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    margin-top: 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #FDD77E;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.modal .checkbox-container input[type="checkbox"]:hover {
    border-color: #FDD77E;
    background-color: rgba(253, 215, 126, 0.1);
}

.modal .checkbox-container input[type="checkbox"]:checked {
    background-color: #FDD77E;
    border-color: #FDD77E;
}

.modal .checkbox-container label {
    margin-bottom: 0;
    color: #fff;
    font-size: 13px;
    line-height: 1.6;
    cursor: pointer;
    flex: 1;
}

/* Table in Modal */
.modal .custom-table {
    margin: 20px 0;
}

.modal .table-row {
    display: grid;
    grid-template-columns: 1fr 2fr 80px;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: center;
}

.modal .table-header {
    background-color: rgba(253, 215, 126, 0.08);
    font-weight: 600;
    color: #FDD77E;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* Modal Responsive */
@media (max-width: 768px) {
    .modal {
        max-width: 100%;
        max-height: 100vh;
        width: 100%;
        border-radius: 12px 12px 0 0;
        animation: modalSlideUpMobile 0.3s ease-out;
    }

    @keyframes modalSlideUpMobile {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .modal-header {
        padding: 20px 16px;
    }

    .modal-body {
        padding: 20px 16px;
    }

    .modal-footer {
        padding: 20px 16px;
        flex-direction: column-reverse;
    }

    .modal-footer button {
        width: 100%;
        padding: 12px;
    }

    .modal .table-row {
        grid-template-columns: 1fr;
    }

    .modal .table-row::before {
        content: attr(data-label);
        font-weight: 600;
        color: #FDD77E;
        font-size: 12px;
    }
}

/* Utility */
.modal-hidden {
    display: none !important;
}

.modal-visible {
    display: flex !important;
}
