/* MNIST 3D Visualization Page Styles */

/* Base styles */
body {
  width: 100%;
  height: 100%;
  background: #FFFAF0;
}

/* Navbar */
.navbar-nav {
  margin-left: auto;
}

.navbar-nav > li {
  margin: 0 30px;
}

/* Canvas styling */
#canvas {
    background-color: #000;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
    touch-action: none; /* Prevent scrolling on touch devices */
}

#canvas:active {
    cursor: grabbing;
}

/* Prediction Panel */
#prediction-panel {
    background-color: #f8f9fa;
}

#predicted-digit {
    font-weight: bold;
    color: #0d6efd;
    margin: 0;
}

#confidence {
    font-size: 0.9rem;
}

#top-3-list {
    font-size: 0.85rem;
}

.top-3-item {
    padding: 0.25rem 0;
    border-bottom: 1px solid #dee2e6;
}

.top-3-item:last-child {
    border-bottom: none;
}

/* 3D Visualization Container */
#visualization-container {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

#visualization-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Network Info Panel */
#network-info {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

/* Loading Indicator */
#loading-indicator {
    color: #6c757d;
}

/* Button Styles */
#btn-clear,
#btn-visualize {
    min-width: 100px;
    margin: 0 0.25rem;
}

/* Feature Maps Container */
#feature-maps-container {
    width: 100%;
    overflow-x: auto;
}

/* Responsive Design */
@media (max-width: 1200px) {
    /* Tablets - reduce spacing */
    #feature-maps-container svg {
        width: 40px !important;
    }
}

@media (max-width: 768px) {
    /* Mobile - Stack vertically */
    #canvas {
        width: 100%;
        max-width: 280px;
        height: 280px;
    }

    #visualization-container {
        height: 300px;
        margin-top: 2rem;
    }

    .col-md-4,
    .col-md-8 {
        margin-bottom: 1rem;
    }
    
    /* Feature maps - scroll horizontally on mobile */
    #feature-maps-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #feature-maps-container > div {
        flex-wrap: nowrap !important;
        min-width: max-content;
    }
    
    /* Reduce arrow size on mobile */
    #feature-maps-container svg {
        width: 30px !important;
        height: 60px !important;
    }
    
    /* Smaller canvas sizes for feature maps */
    #feature-maps-container canvas {
        width: 100px !important;
        height: 100px !important;
    }
    
    /* Stack predictions vertically on mobile */
    #prediction-panel-bottom {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    /* Small phones - further optimizations */
    h5 {
        font-size: 1rem;
    }
    
    #canvas {
        max-width: 240px;
        height: 240px;
    }
    
    #visualization-container {
        height: 240px;
    }
    
    /* Even smaller feature map canvases */
    #feature-maps-container canvas {
        width: 80px !important;
        height: 80px !important;
    }
    
    /* Compact buttons */
    #btn-clear,
    #btn-visualize {
        min-width: 80px;
        font-size: 0.85rem;
    }
    
    /* Reduce padding */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Instructions styling */
p b {
    color: #212529;
}

ul {
    margin-top: 0.5rem;
}

ul li {
    margin-bottom: 0.5rem;
}
