* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Inter, sans-serif;
    background: #f3f4f6;
    color: #222;
    padding: 60px;
}

body.modal-open {
    overflow: hidden;
}

.container {
    max-width: 700px;
    margin: auto;
    text-align: center;
}

h1 {
    margin-bottom: 30px;
}

button {
    cursor: pointer;
    font-family: inherit;
}

.open-modal {
    padding: 14px 22px;
    margin: 10px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: white;
    font-size: 15px;
    transition: .25s;
}

.open-modal:hover {
    background: #1d4ed8;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(3px);
    opacity: 1;
    transition: .3s;
    z-index: 90;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.92);
    width: min(92%, 500px);
    opacity: 1;
    transition: .3s ease;
    z-index: 100;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: 18px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .18);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #eee;
    font-size: 24px;
}

.close-modal:hover {
    background: #ddd;
}

.primary-btn {
    padding: 13px;
    background: #2563eb;
    border: none;
    color: white;
    border-radius: 10px;
}

.secondary-btn {
    padding: 12px 18px;
    border: none;
    background: #e5e7eb;
    border-radius: 10px;
}

.danger-btn {
    padding: 12px 18px;
    border: none;
    background: #dc2626;
    color: white;
    border-radius: 10px;
}

.actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

input {
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
}

.hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.modal:not(.hidden) {
    transform: translate(-50%, -50%) scale(1);
}

@media(max-width:600px) {

    body {
        padding: 30px;
    }

    .modal-content {
        padding: 24px;
    }

    .actions {
        flex-direction: column;
    }

    .actions button {
        width: 100%;
    }

}