/* ===== ANIMACIONES ===== */
@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes themePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

/* ===== EFECTOS VISUALES ===== */
.page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 98%, rgba(0,0,0,0.1) 100%);
    pointer-events: none;
    border-radius: 10px;
}

/* ===== TRANSICIONES DE TEMA ===== */
.theme-transition * {
    transition: background-color 0.3s ease, 
                color 0.3s ease, 
                border-color 0.3s ease,
                box-shadow 0.3s ease !important;
}

.theme-toggle:active {
    animation: themePulse 0.3s ease;
}

/* ===== MEJORAS DE RENDIMIENTO ===== */
.dish-item img {
    transition: transform 0.3s ease !important;
}

.modal-content {
    scroll-behavior: smooth;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== ESTADOS DE INTERACCIÓN ===== */
@media (hover: none) and (pointer: coarse) {
    .dish-item:hover img {
        transform: none;
    }
    
    .dish-item:active {
        transform: scale(0.95);
    }
    
    .dish-overlay {
        transform: translateY(0);
        background: rgba(0,0,0,0.7);
    }
    
    .nav-btn:active,
    .whatsapp-option:active,
    .quantity-btn:active,
    .add-to-order-btn:active {
        transform: scale(0.95);
    }
}

/* ===== ANIMACIONES DE FEEDBACK ===== */
.add-to-order-btn.added {
    animation: bounce 0.5s ease;
}

.quantity-badge, .cart-badge {
    animation: fadeIn 0.3s ease;
}

.dish-item.selected {
    animation: fadeIn 0.3s ease;
}

/* ===== SCROLL SUAVE ===== */
.menu-book, .modal-content {
    scroll-behavior: smooth;
}

/* ===== OPTIMIZACIONES MÓVILES ===== */
@media (max-width: 768px) {
    .modal-content {
        animation: slideInFromBottom 0.3s ease;
    }
    
    .whatsapp-btn:active {
        animation: themePulse 0.2s ease;
    }
}