@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes slideDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
    animation: fadeIn 300ms ease-out;
}

    .modal-overlay.closing {
        animation: fadeOut 300ms ease-out forwards;
    }

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    border: 0.5px solid #e5e5e5;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    animation: slideUp 300ms ease-out;
}

.modal-overlay.closing .modal-content {
    animation: slideDown 300ms ease-out forwards;
}

.modal-header {
    padding: 1.25rem;
    border-bottom: 0.5px solid #e5e5e5;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .modal-header h2 {
        font-size: 18px;
        font-weight: 500;
        color: #1a1a1a;
        margin: 0;
    }

.modal-close-hint {
    font-size: 12px;
    color: #999999;
    margin-left: 12px;
    white-space: nowrap;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    font-size: 15px;
    line-height: 1.6;
    color: #1a1a1a;
    word-wrap: break-word;
    white-space: pre-wrap;
}

    .modal-body::-webkit-scrollbar {
        width: 8px;
    }

    .modal-body::-webkit-scrollbar-track {
        background: transparent;
    }

    .modal-body::-webkit-scrollbar-thumb {
        background: #cccccc;
        border-radius: 4px;
    }

        .modal-body::-webkit-scrollbar-thumb:hover {
            background: #999999;
        }

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 0.5px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

button {
    padding: 10px 24px;
    border-radius: 8px;
    border: 0.5px solid #cccccc;
    background: #ffffff;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms ease;
}

    button:hover {
        background: #f0f0f0;
        border-color: #999999;
    }

    button:active {
        transform: scale(0.98);
    }

    button.primary {
        background: #0066cc;
        color: #ffffff;
        border-color: #0066cc;
    }

        button.primary:hover {
            background: #0052a3;
            opacity: 0.9;
        }
