.modal-content {
    position: relative;
    padding: 1.75rem 2rem 2rem;
    background: var(--bg-secondary, #1e1e2e);
    border: 1px solid var(--border-default);
}

    .modal-content.scryfall-import-modal {
        padding: 0;
        border: 1px solid var(--border-default);
        border-radius: var(--radius-lg);
        background: var(--bg-card);
        box-shadow: var(--shadow-elevated);
        overflow: hidden;
    }

    .modal-content h2 {
        margin: 0 0 1.25rem;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-primary);
        padding-right: 2rem;
    }

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
    color: var(--text-secondary);
    transition: color .15s;
    user-select: none;
}

    .close-modal:hover {
        color: var(--text-primary);
    }

.modal-actions {
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.mtg-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 15000;
    background: rgba(0, 0, 0, 0.70);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.mtg-modal-dialog {
    width: 100%;
    max-width: 420px;
    background: var(--bg-secondary, #16161a);
    border: 1px solid var(--border-default, rgba(255,255,255,0.12));
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    overflow: hidden;
    animation: mtgModalSlideIn 0.2s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes mtgModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.mtg-modal-head {
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--border-default, rgba(255,255,255,0.08));
}

.mtg-modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #f0f0f6);
}

.mtg-modal-body {
    padding: 1.5rem 1.75rem;
}

    .mtg-modal-body p {
        margin: 0;
        font-size: 0.95rem;
        line-height: 1.6;
        color: var(--text-secondary, #9898a8);
    }

.mtg-modal-foot {
    padding: 1rem 1.75rem 1.5rem;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

    .mtg-modal-foot .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

    .mtg-modal-foot .btn-danger {
        background: var(--accent-red, #dc2626);
        color: #fff;
        border: none;
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
        border-radius: 8px;
        font-weight: 500;
        cursor: pointer;
        transition: background 0.2s;
    }

        .mtg-modal-foot .btn-danger:hover {
            background: var(--accent-red-hover, #b91c1c);
        }

.mtg-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--text-secondary, #9898a8);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .mtg-modal-close:hover {
        color: var(--text-primary, #f0f0f6);
    }

    .mtg-modal-close svg {
        width: 20px;
        height: 20px;
        stroke-width: 2;
        stroke: currentColor;
        fill: none;
    }

.mtg-modal-field {
    margin-bottom: 1.25rem;
}

    .mtg-modal-field:last-child {
        margin-bottom: 0;
    }

.mtg-modal-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary, #f0f0f6);
    margin-bottom: 0.5rem;
}

.mtg-optional {
    font-weight: 400;
    color: var(--text-tertiary, #6e6e7e);
    font-size: 0.8rem;
}

.input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--bg-elevated, #242430);
    border: 1px solid var(--border-default, rgba(255,255,255,0.12));
    border-radius: 8px;
    color: var(--text-primary, #f0f0f6);
    font-size: 0.95rem;
    transition: border-color 0.2s, background 0.2s;
}

    .input:focus {
        outline: none;
        border-color: var(--accent-blue, #4e8dff);
        background: var(--bg-secondary, #16161a);
    }

    .input::placeholder {
        color: var(--text-tertiary, #6e6e7e);
    }

    .input:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.primary {
    background: var(--accent-blue, #4e8dff);
    color: #fff;
    border: none;
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .primary:hover:not(:disabled) {
        background: var(--accent-blue-hover, #3d7aeb);
    }

    .primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }
