/* =========================
   IMAGE MODAL
========================= */

.modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeIn var(--transition);
}

.modal.active {
    display: flex;
}

.modal button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow);
}

.modal button:hover {
    background: var(--danger);
    transform: scale(1.1);
}

.modal button:active {
    transform: scale(0.98);
}

.modal img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: var(--radius-lg);
    object-fit: contain;
    box-shadow: var(--shadow-xl);
    animation: zoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

/* =========================
   TOAST
========================= */

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    z-index: var(--z-toast);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    padding: 14px 20px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
    font-size: 14px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    opacity: 0;
    transition: all var(--transition);
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

@media (max-width: 640px) {
    .toast {
        left: 16px;
        right: 16px;
        transform: translateY(120px);
    }

    .toast.show {
        transform: translateY(0);
    }
}
