/* AI Playground Section Styles */
#ai-playground {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

#ai-playground .section-heading {
    color: white;
    margin-bottom: 1rem;
}

#ai-playground .section-subheading {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
}

#ai-playground .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 20px;
    margin-bottom: 2rem;
}

#ai-playground .card-body {
    padding: 2rem;
}

/* Canvas Styles */
#drawingCanvas {
    background: white;
    border: 3px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s ease;
    touch-action: none; /* Prevent scrolling on touch devices */
}

#drawingCanvas:hover {
    border-color: #667eea;
}

/* Drawing Controls */
.drawing-controls {
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.drawing-controls .btn {
    min-width: 140px;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.drawing-controls .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Challenge Word */
#challengeWord .alert {
    border-radius: 15px;
    border: none;
    background: linear-gradient(45deg, #17a2b8, #20c997);
    color: white;
    font-size: 1.1rem;
}

/* Loading Indicator */
#loadingIndicator {
    padding: 2rem;
}

#loadingIndicator .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Prediction Results */
#predictionResults {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1rem;
}

#predictionResults h5 {
    color: #495057;
    margin-bottom: 1.5rem;
}

.progress {
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Instructions Card */
#ai-playground .card:last-child {
    background: rgba(255, 255, 255, 0.9);
}

#ai-playground .card:last-child .card-title {
    color: #495057;
    font-weight: 600;
}

#ai-playground .card:last-child li {
    padding: 0.5rem 0;
    color: #6c757d;
}

#ai-playground .card:last-child i {
    margin-right: 0.75rem;
    width: 20px;
}

/* Error Display */
#errorDisplay {
    border-radius: 15px;
    border: none;
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    #drawingCanvas {
        width: 100%;
        height: 300px;
        max-width: 350px;
    }

    #ai-playground .card-body {
        padding: 1rem;
    }

    .drawing-controls .btn {
        min-width: auto;
        margin-bottom: 0.5rem;
        margin-right: 0;
        display: block;
        width: 100%;
    }
}

@media (max-width: 576px) {
    #ai-playground {
        padding: 3rem 0;
    }

    #ai-playground .section-heading {
        font-size: 2rem;
    }

    #drawingCanvas {
        width: 280px;
        height: 280px;
    }
}

/* Animation for results */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#predictionResults,
#challengeWord,
#errorDisplay {
    animation: fadeInUp 0.5s ease;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    #ai-playground .card {
        background: rgba(33, 37, 41, 0.95);
        color: #fff;
    }

    #ai-playground .card:last-child .card-title {
        color: #fff;
    }

    #ai-playground .card:last-child li {
        color: #adb5bd;
    }

    #predictionResults {
        background: #343a40;
    }

    #predictionResults h5 {
        color: #fff;
    }

    #drawingCanvas {
        border-color: #495057;
    }
}
