/* General Styles - Dark Mode */
body {
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: #1e1e1e; /* Dark background */
    color: #f0f0f0; /* Light text for contrast */
    padding: 20px;
    position: relative; /* Added for positioning footer */
}

/* "Made by" signature */
.made-by {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.9em;
    color: #a0a0a0; /* Subtle color for signature */
}

/* Main heading */
h1 {
    color: #f0f0f0;
    margin-bottom: 30px;
}

/* Neural Network Visualization Layout */
.network-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 80px;
    margin: 0 auto;
    max-width: 1000px;
}

/* SVG for Connections */
.connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Layer Styles */
.layer {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.input-layer,
.output-layer {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Node Styles */
.node {
    background-color: #2c2c2c;
    padding: 10px;
    border: 2px solid #444;
    border-radius: 6px;
    width: 120px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    position: relative;
}

.layer.hidden-layer .node {
    width: 120px;
}

/* Label Styles */
.node label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9em;
    color: #f0f0f0;
}

/* Input Fields (Number and Range) */
.node input[type="number"],
.node input[type="range"] {
    width: 90%;
    padding: 3px;
    font-size: 0.8em;
    margin: 0 auto;
    background-color: #3a3a3a;
    color: #f0f0f0;
    display: block;
    border: 1px solid #555;
    border-radius: 4px;
}

/* Optionally, if you want the labels to align better */
.node label, .weight-value {
    text-align: center;  /* Center align the labels and weight values */
    display: block;
}


/* Displaying Weight Values */
.weight-value {
    display: block;
    margin-top: 3px;
    font-size: 0.8em;
    color: #a0a0a0;
}

/* Input Layer Margin Adjustment */
.input-layer .node {
    margin-top: 180px;
}

/* Output Layer Styles */
.output-layer .node {
    margin-top: 180px;
    width: 120px;
}

#output {
    display: block;
    margin-top: 5px;
    font-size: 1.2em;
    font-weight: bold;
    color: #1e90ff; /* Bright blue for output emphasis */
}

/* Responsive Design */
@media (max-width: 1200px) {
    .network-container {
        gap: 60px;
    }

    .node {
        width: 100px;
        padding: 8px;
    }

    .layer.hidden-layer .node {
        width: 100px;
    }
}

@media (max-width: 800px) {
    .network-container {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .layer {
        flex-direction: row;
        gap: 10px;
    }
}

/* "Made by Arpan Roy" Text */
body::before {
    content: "Made by Arpan Roy";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.9em;
    color: #a0a0a0;
}

/* Explanation Sections */
.explanation,
.types,
.bias,
.epochs,
.overfitting,
.evaluation,
.learning-curves,
.backpropagation,
.hyperparameters,
.applications,
.regularization {
    font-size: 1.1em;
    line-height: 1.6;
    color: #f0f0f0;
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

/* Heading Styles for All Sections */
.explanation h2,
.types h2,
.bias h2,
.epochs h2,
.overfitting h2,
.evaluation h2,
.learning-curves h2,
.backpropagation h2,
.hyperparameters h2,
.applications h2,
.regularization h2 {
    font-size: 1.5em;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 15px;
    text-align: left;
}

/* Paragraph Styles for Consistency */
.explanation p,
.types p,
.bias p,
.epochs p,
.overfitting p,
.evaluation p,
.learning-curves p,
.backpropagation p,
.hyperparameters p,
.applications p,
.regularization p {
    font-weight: 400;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Math Explanation Section */
.math-explanation {
    font-size: 1.1em;
    line-height: 1.6;
    color: #f0f0f0;
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.math-explanation h2 {
    font-size: 1.5em;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 15px;
    text-align: left;
}

.math-explanation p {
    font-weight: 400;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Neural Equation Section */
#neural-equation {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    margin-top: 20px;
    line-height: 1.6;
    text-align: left;
}

/* Ensure Equation Headings Align Left */
h3 {
    text-align: left;
}
