/* Neural Network Playground Specific Styles */
.main-content {
    padding: 4rem 2rem;
    background-color: #f9f9f9;
    min-height: 80vh;
}

.playground-container {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    min-height: 600px;
}

/* Control Panel Styles */
.control-panel, .chart-panel {
    padding: 1.5rem;
    background-color: #f5f7fa;
    border-right: 1px solid #eee;
    overflow-y: auto;
    max-height: 80vh;
}

.chart-panel {
    border-right: none;
    border-left: 1px solid #eee;
}

.panel-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eaeaea;
}

.panel-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.panel-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

/* Architecture Controls */
.architecture-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.layer-control label, .neurons-control label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    display: block;
}

.layer-buttons {
    display: flex;
    gap: 0.5rem;
}

.layer-btn {
    width: 32px;
    height: 32px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.layer-btn:hover {
    border-color: #007aff;
}

.layer-btn.active {
    border-color: #007aff;
    background-color: #007aff;
    color: white;
}

.neurons-control {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.neurons-control input[type="range"] {
    width: 100%;
}

#neuronsValue {
    font-weight: 500;
    color: #333;
    text-align: center;
}

/* Parameter Controls */
.parameter-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.parameter-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.parameter-item label {
    font-size: 0.9rem;
    color: #666;
}

.parameter-item input[type="range"] {
    width: 100%;
}

.parameter-item select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
}

/* Dataset Controls */
.dataset-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.dataset-btn {
    padding: 0.5rem;
    border: 2px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.dataset-btn:hover {
    border-color: #007aff;
}

.dataset-btn.active {
    border-color: #007aff;
    background-color: rgba(0, 122, 255, 0.1);
    color: #007aff;
}

/* Training Controls */
.training-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.train-btn, .step-btn, .reset-btn {
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.train-btn {
    background-color: #34c759;
    color: white;
}

.train-btn:hover {
    background-color: #28a745;
}

.train-btn.training {
    background-color: #ff9500;
}

.step-btn {
    background-color: #007aff;
    color: white;
}

.step-btn:hover {
    background-color: #0056b3;
}

.reset-btn {
    background-color: #ff3b30;
    color: white;
}

.reset-btn:hover {
    background-color: #d70015;
}

/* Progress Info */
.progress-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.info-row span:first-child {
    color: #666;
}

.info-row span:last-child {
    font-weight: 500;
    color: #333;
}

/* Visualization Area */
.visualization-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 2rem;
}

.network-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1rem;
}

#networkCanvas {
    border-radius: 8px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.data-visualization {
    text-align: center;
}

.data-visualization h4 {
    margin-bottom: 1rem;
    color: #333;
    font-weight: 500;
}

#dataCanvas {
    border: 2px solid #eee;
    border-radius: 8px;
    background: white;
}

/* Chart Panel */
#lossChart {
    background: white;
    border-radius: 8px;
    border: 1px solid #eee;
}

/* Concept Explanations */
.concept-explanations {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.concept-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.concept-item h5 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #007aff;
}

.concept-item p {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

/* Educational Section */
.educational-section {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.educational-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 600;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.education-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.education-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.education-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.education-card p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    outline: none;
    transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #007aff;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #007aff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .playground-container {
        grid-template-columns: 250px 1fr 250px;
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .playground-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .control-panel, .chart-panel {
        max-height: none;
        border: none;
        border-bottom: 1px solid #eee;
    }
    
    .chart-panel {
        border-bottom: none;
    }
    
    .main-content {
        padding: 2rem 1rem;
    }
}

@media (max-width: 768px) {
    .dataset-controls {
        grid-template-columns: 1fr;
    }
    
    .layer-buttons {
        justify-content: space-between;
    }
    
    .educational-section h2 {
        font-size: 2rem;
    }
    
    .education-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .education-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .visualization-area {
        padding: 1rem;
    }
    
    #networkCanvas {
        width: 100%;
        height: auto;
        max-width: 400px;
    }
    
    #dataCanvas {
        width: 100%;
        height: auto;
        max-width: 250px;
    }
}