/* Machine Status Animations and Styles */

.machine-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.machine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.machine-card.available {
    border-color: #28a745;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
}

.machine-card.running {
    border-color: #007bff;
    background: linear-gradient(145deg, #e3f2fd, #bbdefb);
}

.machine-card.finishing {
    border-color: #ffc107;
    background: linear-gradient(145deg, #fff3cd, #ffeaa7);
}



.machine-icon-container {
    position: relative;
    display: inline-block;
}

.machine-icon {
    transition: all 0.3s ease;
}

.status-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.status-indicator.available {
    background-color: #28a745;
}

.status-indicator.running {
    background-color: #007bff;
}

.status-indicator.finishing {
    background-color: #ffc107;
}



/* Playful Animations */
@keyframes pulse-gentle {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes pulse-fast {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.7;
    }
}

@keyframes spin-slow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

@keyframes bounce-in {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.pulse-gentle {
    animation: pulse-gentle 3s infinite ease-in-out;
}

.pulse-fast {
    animation: pulse-fast 1s infinite ease-in-out;
}

.spin-slow {
    animation: spin-slow 3s linear infinite;
}

.shake {
    animation: shake 2s infinite;
}

.bounce-in {
    animation: bounce-in 0.6s ease-out;
}

/* Progress Bar Enhancements */
.progress-container {
    margin-top: 15px;
}

.progress {
    background-color: rgba(0,0,0,0.1);
    border-radius: 10px;
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    position: relative;
    overflow: hidden;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Update Notification */
.update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    font-weight: 500;
}

.update-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.update-notification i {
    animation: spin-slow 1s linear infinite;
}

/* Status Text Styling */
.status-text {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.time-remaining {
    font-size: 0.9em;
    margin-bottom: 10px;
}

/* Legend Styling */
.status-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .machine-card {
        margin-bottom: 20px;
    }
    
    .machine-icon {
        font-size: 2rem !important;
    }
    
    .update-notification {
        right: 10px;
        top: 10px;
        padding: 10px 16px;
        font-size: 0.9em;
    }
}

/* Loading Animation for New Cards */
.machine-card {
    animation: bounce-in 0.6s ease-out;
}

.machine-card:nth-child(even) {
    animation-delay: 0.1s;
}

.machine-card:nth-child(3n) {
    animation-delay: 0.2s;
}

/* Hover Effects */
.machine-card:hover .machine-icon {
    transform: scale(1.1);
}

.machine-card:hover .status-indicator {
    transform: scale(1.2);
}