/* MAIN WRAPPER (compact width) */
#python-compiler {
    width: 100%;
    max-width: 1000px;
}

/* Ensure row stays side-by-side compact */
#python-compiler .row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

/* Compact columns */
#python-compiler .col-md-6 {
    flex: 0 0 48%;
    max-width: 48%;
}

#python-compiler .info-text {
    color: #a8e4ff;
    text-align: left;
    font-size: 16px;
    line-height: 1.7;
    font-weight: 400;
    margin: 0 auto 20px auto;
    max-width: 90%;
}

#python-compiler .info-text a {
    color: #48eaff;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(72, 234, 255, 0.6);
    padding-bottom: 2px;
    transition: 0.25s ease;
}

#python-compiler .info-text a:hover {
    color: #0be881;
    border-bottom-color: #0be881;
}


/* Section Title */
.section-title {
    color: #89CFF0;
    font-weight: 600;
    margin-bottom: 10px;
}

/* COMPACT Code Editor Box */
.code-area {
    background: #0d0d20;
    color: #00d0ff;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 12px;
    font-family: "Courier New", monospace;
    font-size: 15px;
    width: 100%;
    height: 200px;
    resize: none;
    line-height: 1.2 !important;
    /* FIXED SPACING */
}

/* COMPACT Output Box */
.output-area {
    background: #000;
    color: #76ff96;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 15px;
    width: 100%;
    height: 200px;
    /* MATCHING HEIGHT */
    font-size: 16px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* Center the run button container */
#python-compiler .text-center {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

/* Beautiful futuristic button (Cognilume theme) */
.run-btn {
    background: linear-gradient(135deg, #0be881, #00d27f) !important;
    border: none;
    border-radius: 25px;
    padding: 10px 35px;
    font-size: 18px;
    font-weight: 600;
    color: #000 !important;
    box-shadow: 0px 0px 10px #0be881aa;
    transition: 0.25s ease;
    cursor: pointer;
}

/* Hover effect */
.run-btn:hover {
    transform: scale(1.08);
    box-shadow: 0px 0px 18px #0be881dd;
}

/* ==============================
   INPUT AREA STYLING (NEW BLOCK)
   ============================== */

#inputArea {
    display: none;
    margin-top: 12px;
    gap: 10px;
    align-items: center;
    width: 100%;
}

/* Input box */
#userInput {
    flex: 1;
    padding: 8px 12px;
    background: #0d0d20;
    color: #e2e8f0;
    border: 1px solid #444;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: 0.3s ease;
}

#userInput:focus {
    border-color: #00d27f;
    box-shadow: 0 0 10px #00d27f;
}

/* Submit Button */
#submitInputBtn {
    background: linear-gradient(135deg, #00d27f, #0be881);
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    transition: 0.25s ease;
}

#submitInputBtn:hover {
    transform: scale(1.07);
    box-shadow: 0 0 12px #0be881aa;
}

/* Remove excessive top margin only on compiler page */
#python-compiler {
    margin-top: 5px !important;
    padding-top: 0 !important;
}

/* Also override container spacing for just this page */
#python-compiler.container,
#python-compiler .container {
    margin-top: 20px !important;
}

/* ------------ Responsive ------------- */

@media (max-width: 992px) {
    #python-compiler .row {
        flex-direction: column;
    }

    #python-compiler .col-md-6 {
        max-width: 100%;
        flex: 100%;
    }

    .code-area,
    .output-area {
        height: 220px;
        /* adjust for small devices */
    }

    #inputArea {
        flex-direction: column;
        align-items: stretch;
    }

    #submitInputBtn {
        width: 100%;
        margin-top: 6px;
    }
}

/* Mobile optimization */
@media (max-width: 600px) {
    #python-compiler .info-text {
        font-size: 14px;
        /* slightly smaller, fits well */
        line-height: 1.6;
        text-align: left;
        /* more readable on mobile */
        max-width: 100%;
        /* full width */
        padding: 0 12px;
        /* give breathing room */
        margin-top: 10px;
    }

    #python-compiler .info-text a {
        display: inline-block;
        border-bottom: 1px solid rgba(72, 234, 255, 0.4);
        /* prevents weird wrapping */
        margin-top: 5px;
    }

    #python-compiler {
        padding: 0 10px !important;
        /* reduce side pressure */
    }
}