/* AI Loading Bar */
.loading-bar-container {
    width: 100%;
    height: 10px;
    background: #333;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.loading-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #FFD700, #FFA500, #FFD700);
    background-size: 200% 100%;
    animation: loading-fill 2s ease-in-out forwards, gradient-move 1s linear infinite;
    border-radius: 5px;
}

@keyframes loading-fill {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

@keyframes gradient-move {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.loading-steps .step {
    opacity: 0.5;
    transition: all 0.3s;
}
.loading-steps .step.active {
    opacity: 1;
    color: #FFD700;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* AI Terminal */
.log-line {
    color: #00ff88;
    margin-bottom: 5px;
    font-family: 'Consolas', monospace;
    opacity: 0;
    animation: fade-in 0.2s forwards;
    display: flex;
    align-items: center;
    gap: 8px;
}

.log-line.error { color: #ff5f56; }
.log-line.warn { color: #ffbd2e; }
.log-line.info { color: #5865F2; }

@keyframes fade-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* AI Blueprint Area */
.blueprint-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
}

.ai-node {
    position: absolute;
    width: 140px;
    height: 50px;
    background: #2f3136;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9em;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 2;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-node.visible {
    opacity: 1;
    transform: scale(1);
}

.ai-node.trigger { border-left: 4px solid #5865F2; }
.ai-node.action { border-left: 4px solid #00ff88; }
.ai-node.condition { border-left: 4px solid #ffbd2e; }

.ai-connection {
    position: absolute;
    height: 2px;
    background: #555;
    transform-origin: left center;
    z-index: 1;
    width: 0;
    transition: width 0.5s ease-out;
}

.ai-connection.visible {
    /* Width will be set inline by JS */
}

/* Success Overlay */
@keyframes scale-in {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
