/* Core Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

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

@keyframes scan {
    0% {
        background: linear-gradient(180deg, transparent 0%, rgba(33, 150, 243, 0.3) 50%, transparent 100%);
        background-size: 100% 50px;
        background-position: 0 -50px;
    }
    100% {
        background-position: 0 200%;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* Enhanced Button Animation Effects - Applied via InteractiveDemo.css base styles */
.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

/* Part Styles */
.part {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    background: linear-gradient(45deg, #e8eaf6, #c5cae9);
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.part:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.part.enhanced {
    animation: glow 2s infinite;
}

/* Progress Bar Styles */
.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Demo Area Styles */
.demo-area {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin: 10px 0;
}

/* Highlight Boxes */
.highlight {
    padding: 12px;
    border-radius: 8px;
    margin: 8px 0;
    border-left: 4px solid;
    transition: transform 0.3s ease;
    font-size: 0.9em;
}

.highlight:hover {
    transform: translateX(5px);
}

.highlight-info {
    background: #e3f2fd;
    border-left-color: #2196F3;
}

.highlight-success {
    background: #e8f5e9;
    border-left-color: #4CAF50;
}

.highlight-warning {
    background: #fff3e0;
    border-left-color: #FF9800;
}

/* Virtual Car Grid */
.virtual-car-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
    min-height: 100px;
}

.virtual-car {
    font-size: 2em;
    text-align: center;
    transition: all 0.5s ease;
}

/* Tech Layer Styles */
.tech-layer {
    padding: 10px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9em;
}

.tech-layer:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Status Indicator */
.status-indicator {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1001;
}

.notification.show {
    transform: translateX(0);
}

.notification.info {
    border-left: 4px solid #2196F3;
}

.notification.success {
    border-left: 4px solid #4CAF50;
}

.notification.warning {
    border-left: 4px solid #FF9800;
}

.notification.error {
    border-left: 4px solid #f44336;
}

/* Car Production Animation */
.car-production {
    font-size: 4em;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.3s ease;
}

.car-production:hover {
    transform: scale(1.1);
}

/* Stats Panel */
.stats-panel {
    background: #e3f2fd;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    font-size: 0.9em;
}

/* Quiz Button */
.quiz-button {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 15px;
    text-align: left;
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-button:hover {
    background: #e8eaf6;
    border-color: #667eea;
    transform: translateX(5px);
}

.quiz-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}