﻿/* === MAIN LAYOUT === */
.main-layout {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    background: #f5f7fa;
}

/* === SIDEBAR === */
#sidebar {
    position: fixed;
    top: 100px;
    left: 0;
    width: 260px;
    height: calc(100vh - 100px);
    background: #0d47a1;
    color: #fff;
    padding: 25px 20px;
    overflow-y: auto;
    border-top-right-radius: 12px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.15);
}

    #sidebar .sidebar-box {
        background: rgba(255, 255, 255, 0.1);
        padding: 15px;
        border-radius: 10px;
        box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
    }

    #sidebar h3 {
        font-size: 22px;
        margin-bottom: 20px;
        font-weight: 600;
        text-align: center;
    }

    #sidebar a {
        color: #fff;
        display: block;
        margin: 6px 0;
        padding: 10px 14px;
        border-radius: 6px;
        text-decoration: none;
        transition: all 0.3s ease;
    }

        #sidebar a:hover,
        #sidebar a.active {
            background: #1976d2;
            padding-left: 20px;
        }

/* === CONTENT AREA === */
#content {
    flex: 1;
    margin-left: 280px;
    margin-right: 360px;
    margin-top: 100px;
    padding: 25px;
}

.content-box {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    padding: 25px;
    margin-bottom: 25px;
}

.section-title {
    color: #1565c0;
    font-weight: bold;
    border-bottom: 2px solid #1976d2;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

p.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

pre.code-block {
    background: #f1f8e9;
    border-left: 6px solid #2e7d32;
    padding: 15px;
    border-radius: 10px;
    color: #263238;
    font-size: 15px;
}

/* === RIGHT CALCULATOR BOX === */
#calculator, #universal-calculator {
    position: fixed;
    top: 100px;
    right: 0;
    width: 360px;
    height: calc(100vh - 100px);
    background: #1976d2;
    padding: 20px;
    overflow-y: auto;
    border-top-left-radius: 12px;
    box-shadow: -3px 0 12px rgba(0, 0, 0, 0.2);
}

.calculator-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#calculator h4,
#universal-calculator h4 {
    background: #0d47a1;
    color: #fff;
    border-radius: 10px;
    padding: 10px;
    font-size: 1.2rem;
    text-align: center;
}

/* === INPUTS & BUTTONS === */
.equation-entry input {
    font-family: "Courier New", monospace;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 8px;
    text-align: center;
    border: 2px solid #bbdefb;
    border-radius: 8px;
    width: 100%;
    transition: 0.3s;
}

    .equation-entry input:focus {
        border-color: #1565c0;
        box-shadow: 0 0 6px rgba(21, 101, 192, 0.4);
        outline: none;
    }

#methodSelect {
    border-radius: 8px;
}

#solveBtn {
    font-weight: 600;
    background: linear-gradient(90deg, #1565c0, #0d47a1);
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    color: #fff;
    transition: 0.3s;
}

    #solveBtn:hover {
        background: linear-gradient(90deg, #0d47a1, #002171);
    }

/* === RESULT BOX === */
.result-box {
    background: #f1f8e9;
    border-left: 5px solid #2e7d32;
    border-radius: 10px;
    padding: 12px;
    min-height: 100px;
    font-size: 15px;
}

.solution-steps {
    font-family: "Segoe UI", sans-serif;
    font-size: 15px;
    color: #1b5e20;
    line-height: 1.5;
    margin-top: 8px;
    white-space: pre-line;
}

/* === TABLE === */
.table {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
}

/* === FORMS === */
.form-label {
    font-weight: 600;
    color: #0d47a1;
    font-size: 14px;
}

input.form-control {
    font-size: 15px;
    font-weight: 500;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 991px) {
    .main-layout {
        flex-direction: column;
    }

    #sidebar{
        position: relative;
        width: 100%;
        height: auto;
        margin-top: 20px;
    }

    #content {
        margin: 20px 0;
    }
}
