.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.851);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

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

.modal {
    display: none;
    background: #0f0f0fc3;
    padding: 2rem;
    border-radius: 6px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(230, 0, 42, 0.334);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: #999;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    margin-bottom: 1.5rem;
    color: #ccc;
}

.modal-body p {
    margin: 0.7rem 0;
    line-height: 1.6;
}

.modal-body a {
    color: #807bb9;
}

.modal-body h4 {
    margin: 1.5rem 0 0.5rem 0;
    font-weight: 800;
    color: rgb(165 0 30);
}

.modal-body ul {
    margin: 0.7rem 0;
}

.modal-body li {
    margin: 0.4rem 0;
}

.modal-body .form-group {
    margin-bottom: 1.5rem;
}

.modal-body label {
    display: block;
    margin-bottom: 0.5rem;
    color: #999;
}

.modal-body input,
.modal-body textarea {
    width: 100%;
    padding: 0.75rem;
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
}

.modal-body input:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: #666;
}

.modal-body pre {
    background-color: #2a2a2a;
    padding: 1rem;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    text-wrap-mode: wrap;
}

.modal-body .closed {
    background-color: #980000;
    width: fit-content;
    padding: 4px 11px;
    color: #fff;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 24px;
}
.modal-body .closed:hover {

}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid #333;
    padding-top: 1rem;
}

/* 스크롤바 스타일링 */
.modal::-webkit-scrollbar {
    width: 8px;
}

.modal::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.modal::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.modal::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* 모바일 반응형 스타일 */
@media screen and (max-width: 768px) {
    .modal {
        width: 95%;
        padding: 1.5rem;
        margin: 1rem;
        max-height: 80vh;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    .modal-body {
        font-size: 0.95rem;
    }

    .modal-body h4 {
        font-size: 1.1rem;
        margin-top: 1.5rem;
    }

    .modal-body p {
        margin-bottom: 1rem;
    }

    .modal-body ul {
        padding-left: 1.2rem;
    }

    .modal-body li {
        margin-bottom: 0.5rem;
    }

    .modal-footer {
        flex-direction: column;
        gap: 0.75rem;
    }

    .modal-footer .btn {
        width: 100%;
    }

    /* 모바일에서 스크롤바 숨기기 */
    .modal::-webkit-scrollbar {
        width: 4px;
    }
}

/* 작은 모바일 화면 */
@media screen and (max-width: 480px) {
    .modal {
        padding: 1rem;
        margin: 0.5rem;
        max-height: 70vh;
    }

    .modal-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    .modal-header h2 {
        font-size: 1.1rem;
    }

    .modal-body {
        font-size: 0.9rem;
    }

    .modal-body h4 {
        font-size: 1rem;
        margin-top: 1.25rem;
    }

    .modal-close {
        font-size: 1.25rem;
        padding: 0.25rem;
    }
}
