/* Bayesian Statistics Page Styles */

/* Light background with dark text color as requested */
body {
    background-color: #f8f9fa;
    color: #212529;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn-explore {
    background: linear-gradient(45deg, #ff7675, #fd79a8);
    color: white;
    border: none;
    font-weight: 600;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-explore:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    color: white;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    background: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.breadcrumb {
    background: transparent;
    margin: 0;
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 50px;
    padding-top: 30px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 15px;
}

.section-title p {
    font-size: 1.1rem;
    color: #636e72;
    max-width: 700px;
    margin: 0 auto;
}

.section-title::after {
    content: '';
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    display: block;
    margin: 20px auto 0;
    border-radius: 2px;
}

/* Definition Card */
.definition-section {
    padding: 80px 0;
    background: white;
}

.definition-card {
    background: #f8f9fa;
    border-left: 5px solid #6c5ce7;
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.definition-card h3 {
    color: #2d3436;
    font-weight: 600;
    margin-bottom: 20px;
}

.definition-card p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
    color: #2d3436;
}

/* Keyword Badges */
.keyword-badge {
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.keyword-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.badge-primary {
    background: linear-gradient(45deg, #6c5ce7, #74b9ff);
}

.badge-success {
    background: linear-gradient(45deg, #00b894, #55efc4);
}

.badge-info {
    background: linear-gradient(45deg, #0984e3, #74b9ff);
}

.badge-warning {
    background: linear-gradient(45deg, #fdcb6e, #ffeaa7);
}

.badge-danger {
    background: linear-gradient(45deg, #e17055, #fab1a0);
}

.badge-secondary {
    background: linear-gradient(45deg, #636e72, #b2bec3);
}

/* Interactive Sections */
.interactive-section, .distribution-section, .mcmc-section {
    padding: 80px 0;
    background: #f1f2f6;
}

.simulation-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
}

.simulation-container h4 {
    color: #2d3436;
    font-weight: 600;
    margin-bottom: 20px;
}

.simulation-container p {
    color: #636e72;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 500;
    color: #2d3436;
    margin-bottom: 5px;
}

.form-control-range {
    width: 100%;
}

.result-display {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 3px solid #6c5ce7;
}

.result-display h5 {
    color: #2d3436;
    margin-bottom: 15px;
}

.result-display p {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.visualization-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Canvas container */
#bayesTheoremCanvas {
    border: 1px solid #ddd;
    border-radius: 5px;
    max-width: 100%;
}

/* Chart containers */
#bayesChart, #distributionChart, #mcmcTracePlot, #mcmcDensityPlot {
    width: 100%;
    height: 200px;
    margin: 10px 0;
}

/* Comparison Section */
.comparison-section {
    padding: 80px 0;
    background: white;
}

.approach-card {
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
    transition: all 0.3s ease;
}

.approach-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.bayesian-card {
    border-top: 5px solid #6c5ce7;
    background: linear-gradient(135deg, #f8f7ff 0%, #eef0ff 100%);
}

.frequentist-card {
    border-top: 5px solid #00b894;
    background: linear-gradient(135deg, #f5fff9 0%, #e8fff5 100%);
}

.approach-card h4 {
    color: #2d3436;
    font-weight: 600;
    margin-bottom: 20px;
}

.approach-card ul {
    padding-left: 20px;
}

.approach-card li {
    margin-bottom: 10px;
    color: #2d3436;
}

/* Calculator Section */
.calculator-section {
    padding: 80px 0;
    background: #f1f2f6;
}

.calculator-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    height: 100%;
    transition: all 0.3s ease;
    border-top: 5px solid #6c5ce7;
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.calculator-card h4 {
    color: #2d3436;
    font-weight: 600;
    margin-bottom: 15px;
}

.calculator-card p {
    color: #636e72;
    margin-bottom: 20px;
}

.btn-calculator {
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    color: white;
    border: none;
    font-weight: 600;
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-calculator:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    color: white;
}

/* Export/Import Section */
.export-section {
    padding: 80px 0;
    background: white;
}

.export-card, .import-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    height: 100%;
}

.export-card h4, .import-card h4 {
    color: #2d3436;
    font-weight: 600;
    margin-bottom: 15px;
}

.export-card p, .import-card p {
    color: #636e72;
    margin-bottom: 20px;
}

.btn-export, .btn-import {
    background: linear-gradient(45deg, #0984e3, #74b9ff);
    color: white;
    border: none;
    font-weight: 600;
    padding: 8px 15px;
    font-size: 0.9rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin: 5px;
}

.btn-export:hover, .btn-import:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    color: white;
}

.form-control-file {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .definition-card {
        padding: 25px;
    }
    
    .simulation-container, .visualization-container {
        padding: 20px;
    }
    
    .approach-card, .calculator-card, .export-card, .import-card {
        margin-bottom: 20px;
    }
    
    /* Calculator modal adjustments for mobile */
    .calculator-modal-content {
        width: 95%;
        margin: 2% auto;
        padding: 15px;
        max-height: 90vh;
    }
    
    .calculator-modal-content h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .calculator-modal-content {
        width: 98%;
        margin: 1% auto;
        padding: 10px;
        max-height: 95vh;
    }
    
    .calculator-modal-content h3 {
        font-size: 1.2rem;
    }
    
    .form-control {
        font-size: 0.9rem;
        padding: 0.25rem 0.5rem;
    }
    
    .calculate-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .btn-explore:hover, .keyword-badge:hover, .approach-card:hover, 
    .calculator-card:hover, .btn-calculator:hover, .btn-export:hover, 
    .btn-import:hover {
        transform: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    body {
        background-color: #ffffff;
        color: #000000;
    }
    
    .hero-section {
        background: #333333;
    }
    
    .definition-card {
        border-left: 5px solid #000000;
    }
    
    .keyword-badge {
        border: 2px solid currentColor;
    }
}

/* Focus Styles for Keyboard Navigation */
a:focus, button:focus, input:focus {
    outline: 2px solid #6c5ce7;
    outline-offset: 2px;
}

/* Calculator Modal Styles */
.calculator-modal {
    display: block;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.calculator-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.close-calculator {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close-calculator:hover,
.close-calculator:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.calculate-btn {
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    color: white;
    border: none;
    font-weight: 600;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin: 15px 0;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    color: white;
}

.calculator-result {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 3px solid #6c5ce7;
}

.calculator-result h4 {
    color: #2d3436;
    margin-top: 0;
}

.calculator-result p {
    margin: 5px 0;
}

.calculator-result .error {
    color: #e17055;
    font-weight: bold;
}

/* Form Controls */
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #a29bfe;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(108, 92, 231, 0.25);
}

/* Print Styles */
@media print {
    .hero-section, .breadcrumb-nav, .btn-explore, .btn-calculator, 
    .btn-export, .btn-import, .form-control-range, .calculator-modal {
        display: none;
    }
    
    .section-title, .definition-card, .simulation-container, 
    .visualization-container, .approach-card, .calculator-card {
        box-shadow: none;
        border: 1px solid #000;
    }
}