/* Reset y Variables CSS */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a4a;
    --shadow-color: rgba(31, 38, 135, 0.37);
    --hover-scale: 1.05;
    --transition-speed: 0.3s;
}

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

/* Asegurar que HTML y body ocupen toda la pantalla */
html {
    width: 100% !important;
    height: 100% !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Fondo animado con gradiente */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    margin: 0;
    padding: 0;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Estilos para lista vacía */
.empty-list-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    margin: 40px auto;
    max-width: 400px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px var(--shadow-color);
    animation: fadeInUp 0.6s ease-out;
}

.empty-list-icon {
    font-size: 4rem;
    margin-bottom: 24px;
    animation: bounce 2s infinite;
}

.empty-list-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    opacity: 0.9;
}

.empty-list-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    opacity: 0.8;
    line-height: 1.4;
}

.empty-list-tips {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-speed) ease;
}

.tip-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.tip-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.tip-item span:last-child {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Contenedor principal con glassmorphism - SIN TRANSFORM */
#root {
    max-width: 600px;
    margin: 20px auto;
    margin-bottom: 150px; /* Espacio extra para el botón de micrófono */
    background: var(--glass-bg);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    padding: 30px;
    transition: box-shadow var(--transition-speed);
    position: relative;
    z-index: 1;
    overflow-x: hidden;
}

/* Título con efecto de texto moderno */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    animation: titleFloat 3s ease-in-out infinite;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
    animation: underlineGlow 2s ease-in-out infinite;
}

@keyframes underlineGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.5);
        width: 100px;
    }
    50% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
        width: 150px;
    }
}

@keyframes titleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Inputs modernos */
input[type="text"], input[type="password"] {
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 15px;
    border: 2px solid transparent;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    transition: all var(--transition-speed);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

input[type="text"]:focus, input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

/* Inputs para edición inline dentro de items - sin transform problemáticos */
.item-container input[type="text"],
.category input[type="text"] {
    width: 100% !important;
    padding: 8px 12px !important;
    margin: 0 !important;
    border: 2px solid rgba(102, 126, 234, 0.3) !important;
    border-radius: 8px !important;
    background: white !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease !important;
    transform: none !important;
}

.item-container input[type="text"]:focus,
.category input[type="text"]:focus {
    outline: none !important;
    border-color: #667eea !important;
    transform: none !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}




button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

button:active {
    transform: translateY(0);
}

/* Botones específicos con efectos avanzados */
.btn-advanced {
    position: relative;
    overflow: hidden;
}

.btn-advanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transition: left 0.5s;
}

.btn-advanced:hover::before {
    left: 100%;
}

/* Categorías con diseño moderno - más compactas */
.category {
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-speed);
    animation: slideIn 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 2s ease;
}

.category:hover::before {
    left: 100%;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.category.drop-zone-active {
    transform: scale(1.02);
    background: rgba(102, 126, 234, 0.2);
    border: 2px dashed #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    animation: dropZonePulse 1s infinite;
}

@keyframes dropZonePulse {
    0%, 100% { 
        border-color: #667eea;
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
    }
    50% { 
        border-color: #764ba2;
        box-shadow: 0 0 30px rgba(118, 75, 162, 0.7);
    }
}

.category h2 {
    font-size: 1.3rem;
    margin-bottom: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    transition: color var(--transition-speed);
    padding: 6px 10px;
    border-radius: 8px;
    border: 2px solid transparent;
}

.category h2:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    border-color: rgba(102, 126, 234, 0.1);
}

/* Items con diseño flotante - DEFINICIÓN UNIFICADA */
.item-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 5px 5px;
    margin-bottom: 2px;
    transition: all var(--transition-speed);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
    border: 2px solid transparent;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    
    /* Propiedades de cursor y selección */
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    
    /* Animaciones */
    animation: itemSlideIn 0.4s ease-out;
    animation-fill-mode: both;
}

.item-container .item-name {
    flex: 1;
    min-width: 0;
}

.item-container .move-btn.modern {
    flex-shrink: 0;
    width: 35px !important;
    height: 35px !important;
    min-width: 35px !important;
}

.item-container .delete-btn {
    flex-shrink: 0;
    width: 55px !important;
    height: 40px !important;
    min-width: 55px !important;
}

.item-container .move-btn.modern svg {
    width: 16px;
    height: 16px;
}

.item-container .delete-btn svg {
    width: 20px;
    height: 20px;
}

.item-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.item-container.dragging {
    opacity: 0.8;
    transform: scale(1.1) rotate(3deg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #667eea;
    z-index: 1000;
    pointer-events: none;
}

/* Estilos de swipe eliminados */





/* Botón de mover super moderno */
.move-btn.modern {
    width: 45px !important;
    height: 45px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    border-radius: 15px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    cursor: pointer;
    margin-right: 15px;
    transition: all var(--transition-speed) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    position: relative;
    overflow: hidden;
    color: white !important;
    padding: 0 !important;
    font-size: 16px !important;
    font-weight: normal !important;
    min-width: 45px;
    flex-shrink: 0;
}

.move-btn.modern svg {
    width: 18px;
    height: 18px;
    stroke: white;
    fill: none;
}

.move-btn.modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.move-btn.modern:hover {
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
}

.move-btn.modern:hover::before {
    left: 100%;
}

.move-btn.modern:active {
    transform: translateY(0) scale(0.95) !important;
}

/* Definición duplicada eliminada - consolidada arriba */

.item-container:active {
    cursor: grabbing;
}

/* Indicador de long press para drag */
.item-container::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: rgba(102, 126, 234, 0.3);
    border-radius: 2px;
    transition: all var(--transition-speed);
}

.item-container:hover::before {
    background: rgba(102, 126, 234, 0.6);
    width: 6px;
}

/* Efecto de long press */
.item-container.long-pressing {
    animation: longPressEffect 0.4s ease-out;
    background: rgba(102, 126, 234, 0.1);
}

@keyframes longPressEffect {
    0% { 
        transform: scale(1);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
}

/* Efecto cuando está siendo arrastrado */
.item-container.dragging::before {
    background: #667eea;
    width: 8px;
    animation: dragIndicator 1s infinite;
}

@keyframes dragIndicator {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Nombre del item */
.item-name {
    flex-grow: 1;
    font-size: 15px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 8px;
    transition: all var(--transition-speed);
    border: 2px solid transparent;
    font-weight: 500;
}

.item-name:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

/* Botón de eliminar con animación mejorada */
.delete-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    color: white !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 20px !important;
    cursor: pointer;
    transition: all var(--transition-speed) !important;
    box-shadow: 0 2px 10px rgba(245, 87, 108, 0.3) !important;
    font-size: 1.2rem !important;
    min-width: 55px !important;
    width: 55px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.delete-btn svg {
    width: 20px;
    height: 20px;
    stroke: white;
    fill: none;
}

.delete-btn:hover {
    transform: scale(1.1) rotate(5deg) !important;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.5) !important;
}

.delete-btn:active {
    transform: translateY(0) scale(0.95) !important;
}

/* Botón de micrófono flotante mejorado */
.mic-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all var(--transition-speed);
    z-index: 1000;
}

.mic-button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary-gradient);
    opacity: 0.3;
    animation: ripple 2s infinite;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.mic-button:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 35px rgba(102, 126, 234, 0.5);
}

.mic-button.listening {
    background: var(--secondary-gradient);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.mic-icon {
    width: 35px;
    height: 35px;
    fill: white;
}

/* Modal mejorado con glassmorphism */
.modal-overlay, .confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

/* Modal de mover super moderno */
.modern-move-modal {
    background: rgba(0, 0, 0, 0.8);
}

.move-modal-content {
    background: rgba(255, 255, 255, 0.98) !important;
    border-radius: 30px !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4) !important;
    max-width: 400px !important;
    width: calc(100vw - 40px) !important;
    overflow: hidden;
    border: 2px solid rgba(102, 126, 234, 0.3) !important;
    transform: none !important;
    position: relative !important;
}

.move-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px 20px;
    background: var(--primary-gradient);
    color: white;
    margin-bottom: 0;
    border-bottom: none;
}

.move-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.move-item-emoji {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.move-item-info h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.modal-close.modern {
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    color: white !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all var(--transition-speed) !important;
    padding: 0 !important;
    font-size: 16px !important;
    font-weight: normal !important;
    box-shadow: none !important;
}

.modal-close.modern:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: rotate(90deg) scale(1.1) !important;
    box-shadow: none !important;
}

.move-categories-grid {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.category-move-btn {
    display: flex !important;
    align-items: center !important;
    gap: 15px;
    padding: 18px 20px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid transparent !important;
    border-radius: 20px !important;
    cursor: pointer;
    transition: all var(--transition-speed) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    position: relative;
    overflow: hidden;
    font-weight: normal !important;
    font-size: 16px !important;
    color: var(--text-primary) !important;
}

.category-move-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    transition: left 0.4s ease;
    z-index: -1;
}

.category-move-btn:hover {
    transform: translateX(10px) !important;
    border-color: var(--primary-gradient) !important;
    color: white !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3) !important;
}

.category-move-btn:hover::before {
    left: 0;
}

.category-move-btn:hover .category-icon,
.category-move-btn:hover .category-name,
.category-move-btn:hover .move-arrow {
    color: white !important;
    filter: brightness(1.2);
}

.category-icon {
    font-size: 1.5rem;
    min-width: 30px;
    text-align: center;
}

.category-name {
    flex-grow: 1;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.move-arrow {
    color: #999;
    transition: all var(--transition-speed);
}

.category-move-btn:hover .move-arrow {
    transform: translateX(5px);
}

.move-modal-footer {
    padding: 0 30px 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cancel-move-btn {
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    padding: 12px 25px !important;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 25px !important;
    cursor: pointer;
    font-weight: 600 !important;
    transition: all var(--transition-speed) !important;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3) !important;
}

.cancel-move-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.4) !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content, .confirmation-modal-content {
    background: white;
    border-radius: 25px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(102, 126, 234, 0.2);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: all var(--transition-speed);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-close:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #f5576c;
    transform: rotate(90deg);
}

/* Botones de confirmación */
.product-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.product-emoji {
    font-size: 2rem;
    line-height: 1;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.confirmation-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.confirm-btn, .cancel-btn {
    padding: 12px 30px !important;
    border: none !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all var(--transition-speed) !important;
}

.confirm-btn {
    background: var(--secondary-gradient) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3) !important;
}

.cancel-btn {
    background: rgba(108, 117, 125, 0.1) !important;
    color: #6c757d !important;
    border: 2px solid rgba(108, 117, 125, 0.2) !important;
    transition: all 0.3s ease !important;
}

.cancel-btn:hover {
    background: rgba(108, 117, 125, 0.15) !important;
    border-color: rgba(108, 117, 125, 0.4) !important;
    color: #495057 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.2) !important;
}

.confirm-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4) !important;
}

/* Lista de ingredientes */
.ingredient-list {
    list-style: none;
    padding: 0;
}

.ingredient-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    transition: all var(--transition-speed);
}

.ingredient-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Estados de carga y error */
.loading {
    text-align: center;
    font-style: italic;
    color: #666;
    padding: 20px;
    animation: fadeInOut 1.5s infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.error {
    color: #f5576c;
    background: rgba(245, 87, 108, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #f5576c;
    animation: shake 0.5s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Login form mejorado */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

/* Tooltip de instrucciones para móviles */
.touch-instructions {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2000;
    max-width: 280px;
    text-align: center;
}

.touch-instructions.show {
    opacity: 1;
    visibility: visible;
}

/* Responsivo */
@media (max-width: 768px) {
    #root {
        margin: 10px;
        padding: 20px;
        padding-bottom: 70px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .mic-button {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
    }
    
    .modal-content, .confirmation-modal-content {
        padding: 20px;
    }
    
    /* Hacer más visible el indicador de drag en móviles */
    .item-container::before {
        width: 6px;
        background: rgba(102, 126, 234, 0.5);
    }
    
    .item-container:active::before {
        background: #667eea;
        width: 8px;
    }
}

/* Animación de entrada para categorías */
.category {
    animation: slideInFromBottom 0.5s ease-out;
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sin efectos hover complicados */

/* Sección de controles */
.controls-section {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

/* Input con botón integrado */
.input-with-button {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.input-add-item {
    width: 100% !important;
    padding: 15px 60px 15px 20px !important;
    margin: 0 !important;
    border: 2px solid rgba(102, 126, 234, 0.2) !important;
    border-radius: 25px !important;
    background: white !important;
    font-size: 16px !important;
    transition: all var(--transition-speed) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.input-add-item:focus {
    outline: none !important;
    border-color: #667eea !important;
    transform: none !important;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3) !important;
}

.btn-add-inside {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: var(--primary-gradient) !important;
    border: none !important;
    color: white !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3) !important;
    transition: all 0.2s ease !important;
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: normal !important;
}

.btn-add-inside:hover {
    transform: translateY(-50%) scale(1.1) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
}

.btn-add-inside svg {
    width: 20px;
    height: 20px;
    stroke: white;
    fill: none;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: scale(1.1);
}

/* Definición duplicada eliminada - consolidada arriba */

.item-container:nth-child(1) { animation-delay: 0.1s; }
.item-container:nth-child(2) { animation-delay: 0.2s; }
.item-container:nth-child(3) { animation-delay: 0.3s; }
.item-container:nth-child(4) { animation-delay: 0.4s; }
.item-container:nth-child(5) { animation-delay: 0.5s; }

@keyframes itemSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Sin animaciones de floating */

/* Efecto de partículas en el fondo */
/* Sin efectos de fondo complicados */


/* Efecto de brillo solo en botones específicos */
.move-btn.modern:active,
.delete-btn:active {
    position: relative;
    overflow: hidden;
}

.move-btn.modern:active::after,
.delete-btn:active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%);
    animation: rippleEffect 0.6s ease-out;
}

@keyframes rippleEffect {
    to {
        width: 100px;
        height: 100px;
        opacity: 0;
    }
}

/* ===== MODALES SIMPLES Y EFECTIVOS ===== */

/* Modal de confirmación */
.confirmation-modal-simple {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Modal de mover */
.move-modal-simple {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Contenido del modal de mover */
.move-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.move-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.move-item-emoji {
    font-size: 1.5rem;
}

.move-modal-header h3 {
    flex: 1;
    margin: 0;
    font-size: 1.2rem;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
}

.move-categories {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-btn {
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
}

.category-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
}

/* Botón Productos en casa - moderno */
.productos-casa-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    margin-top: 15px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.productos-casa-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, rgba(102, 126, 234, 1), rgba(118, 75, 162, 1));
}

.productos-casa-btn svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.productos-casa-btn:hover svg {
    transform: scale(1.1);
}

/* Botón Cerrar Sesión - esquina superior derecha */
.logout-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    backdrop-filter: blur(10px);
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.logout-btn svg {
    transition: transform 0.3s ease;
}

.logout-btn:hover svg {
    transform: scale(1.1);
}

/* Botón Iniciar Sesión */
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 20px;
    margin-top: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

.login-btn svg {
    transition: transform 0.3s ease;
}

.login-btn:hover svg {
    transform: translateX(3px);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Modal de ingredientes arreglado */
.ingredient-modal-simple {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.ingredient-modal-content {
    background: white;
    border-radius: 25px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.ingredient-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 25px 25px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ingredient-modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.ingredient-input-section {
    padding: 15px 20px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.ingredient-input-with-button {
    position: relative;
    display: flex;
    align-items: center;
}

.ingredient-input {
    width: 100% !important;
    padding: 12px 50px 12px 15px !important;
    margin: 0 !important;
    border: 2px solid rgba(102, 126, 234, 0.2) !important;
    border-radius: 20px !important;
    background: rgba(102, 126, 234, 0.05) !important;
    font-size: 15px !important;
    transition: all 0.2s ease !important;
}

.ingredient-input:focus {
    outline: none !important;
    border-color: #667eea !important;
    background: white !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

.btn-add-ingredient {
    position: absolute !important;
    right: 6px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 35px !important;
    height: 35px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: var(--primary-gradient) !important;
    border: none !important;
    color: white !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: normal !important;
}

.btn-add-ingredient:hover {
    transform: translateY(-50%) scale(1.1) !important;
}

.ingredient-list-container {
    padding: 15px 20px;
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
}

.no-ingredients {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 30px;
}

.ingredient-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ingredient-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    border: 2px solid transparent;
    transition: all var(--transition-speed);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ingredient-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.ingredient-name {
    flex: 1;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    border: 2px solid transparent;
    font-size: 15px;
    color: var(--text-primary);
    transition: all var(--transition-speed);
}

.ingredient-name:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

.edit-ingredient-input {
    flex: 1 !important;
    padding: 5px 8px !important;
    margin: 0 !important;
    border: 2px solid #667eea !important;
    border-radius: 8px !important;
    background: white !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

.ingredient-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Los botones del modal de ingredientes más compactos */
.ingredient-actions .move-btn.modern,
.ingredient-actions .delete-btn {
    margin-right: 0;
    width: 35px !important;
    height: 35px !important;
    min-width: 35px !important;
}

.ingredient-actions .move-btn.modern svg,
.ingredient-actions .delete-btn svg {
    width: 16px;
    height: 16px;
}