/* Decision Trees Tutorial Specific Styles */

.tutorial-overview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.overview-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.learning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.learning-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.learning-item h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    color: #fff;
}

.learning-item p {
    margin: 0;
    opacity: 0.9;
    line-height: 1.6;
}

.chapters-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.chapter-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e1e5e9;
}

.chapter-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.chapter-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 1.5rem auto 1rem;
}

.chapter-content {
    padding: 0 1.5rem 1.5rem;
    text-align: center;
}

.chapter-content h3 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.chapter-content p {
    margin: 0 0 1.5rem 0;
    color: #7f8c8d;
    line-height: 1.6;
}

.chapter-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.duration {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.difficulty {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.difficulty.beginner {
    background: #d5f4e6;
    color: #27ae60;
}

.difficulty.intermediate {
    background: #fef5e7;
    color: #f39c12;
}

.difficulty.advanced {
    background: #fadbd8;
    color: #e74c3c;
}

.chapter-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.chapter-link:hover {
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.tutorial-footer {
    background: #f8f9fa;
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid #e1e5e9;
}

.tutorial-footer p {
    margin: 0 0 1.5rem 0;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.start-tutorial-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.start-tutorial-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

/* Python Code Styling */
.python-demo {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin: 1rem 0;
    overflow: hidden;
}

.python-demo-header {
    background: #2c3e50;
    color: white;
    padding: 0.75rem 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.python-demo-content {
    padding: 1rem;
}

.python-code {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-x: auto;
    margin: 1rem 0;
}

.python-output {
    background: #1a202c;
    color: #68d391;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 1rem 0;
    border-left: 4px solid #68d391;
}

/* Interactive Python Demo */
.interactive-python {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin: 1rem 0;
    overflow: hidden;
}

.interactive-python-header {
    background: #667eea;
    color: white;
    padding: 1rem;
    font-weight: 500;
}

.interactive-python-controls {
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
}

.interactive-python-output {
    padding: 1rem;
    min-height: 200px;
    background: white;
}

.run-python-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.run-python-btn:hover {
    background: #229954;
}

.run-python-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Decision Tree Visualization */
.tree-visualization {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.tree-node {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin: 0.25rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.tree-leaf {
    background: #27ae60;
}

.tree-split {
    background: #f39c12;
}

/* Calculator Visualization Styles */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.metric-card {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.metric-card h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    margin: 0.5rem 0;
}

.metric-range {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.data-summary {
    background: #e8f4f8;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.data-summary h4 {
    margin: 0 0 0.5rem 0;
    color: #0c5460;
}

.data-summary p {
    margin: 0.25rem 0;
    color: #0c5460;
}

.bar-chart {
    margin: 1rem 0;
}

.bar-container {
    display: flex;
    height: 40px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    overflow: hidden;
}

.bar {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

.class1-bar {
    background: #667eea;
}

.class2-bar {
    background: #764ba2;
}

.bar-label {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.metrics-comparison {
    margin: 1rem 0;
}

.metric-bar {
    margin: 0.5rem 0;
}

.metric-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #2c3e50;
}

.metric-bar-container {
    position: relative;
    height: 24px;
    background: #ecf0f1;
    border-radius: 12px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.3s ease;
}

.entropy-bar {
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.gini-bar {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.metric-bar-value {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.insights-box {
    background: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.insights-box h4 {
    margin: 0 0 0.5rem 0;
    color: #0066cc;
}

.insights-box ul {
    margin: 0;
    padding-left: 1.5rem;
}

.insights-box li {
    margin: 0.5rem 0;
    color: #0066cc;
    line-height: 1.5;
}

/* Formula and Step Styles */
.formula-box {
    background: #f8f9fa;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    text-align: center;
}

.formula-box h4 {
    margin: 0 0 0.5rem 0;
    color: #667eea;
    font-size: 1.3rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.step-by-step {
    margin: 1rem 0;
}

.step {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.step h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

.calculation {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.decision-guide {
    background: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.decision-guide h4 {
    margin: 0 0 0.5rem 0;
    color: #0066cc;
}

.criteria-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.criteria-card {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1rem;
}

.criteria-card h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
}

.result-item {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    border-left: 3px solid #667eea;
}

.example-table {
    margin: 1rem 0;
    overflow-x: auto;
}

.example-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.example-table th,
.example-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.example-table th {
    background: #667eea;
    color: white;
    font-weight: 500;
}

.example-table tr:hover {
    background: #f8f9fa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chapters-grid {
        grid-template-columns: 1fr;
    }
    
    .learning-grid {
        grid-template-columns: 1fr;
    }
    
    .chapter-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .overview-content {
        padding: 0 1rem;
    }
    
    .chapters-container {
        padding: 0 1rem 3rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .criteria-results {
        grid-template-columns: 1fr;
    }
    
    .bar-container {
        height: 30px;
    }
    
    .bar {
        font-size: 0.8rem;
    }
}
