/* ==========================================
   STANDARD LAB STYLES
   ========================================== */

/* Output Pane Specifics */
.placeholder-text {
    color: #666;
    font-style: italic;
    text-align: center;
    margin-top: 50px;
}

.loading-spinner {
    color: #0077b6;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
}

/* Header Styles */
.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.exp-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    color: #333;
}

.download-btn {
    background-color: #F57C2A;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px rgba(245, 124, 42, 0.3);
    transition: transform 0.1s, background-color 0.2s;
}

.download-btn:hover {
    background-color: #d66a20;
    transform: translateY(-1px);
}

.download-btn:active {
    transform: translateY(1px);
}

.restart-btn {
    background-color: #1f2937 !important;
    color: #fff !important;
    margin-top: auto;
}

.restart-btn:hover {
    background-color: #111827 !important;
}


.output-text {
    margin-bottom: 5px;
    line-height: 1.4;
}

.output-success {
    color: #6686ec;
    font-weight: bold;
    margin-top: 5px;
}

/* Scoped style for code box to keep variables/comments black */
.code-box .output-success {
    color: #333;
    font-weight: normal;
}

.output-header {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #000;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: white;
    font-size: 0.8rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
    padding: 8px 5px;
    border: 1px solid #dee2e6;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 700;
}

.stats-table th {
    background-color: #e9ecef;
}

/* Table Wrapper for Horizontal Scrolling */
.table-wrapper {
    width: 100%;
    padding-right: 15px;
    box-sizing: border-box;
}

.table-wrapper .table-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    padding-bottom: 8px;
}

.table-wrapper .table-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper .table-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-wrapper .table-scroll-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-wrapper .table-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.table-wrapper .data-table {
    margin-top: 0;
}

.table-wrapper .data-table th,
.table-wrapper .data-table td {
    white-space: nowrap;
    padding: 8px 12px;
}

/* Global Styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    background-color: #ffffff;
    color: #333;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 98%;
    max-width: 1600px;
    height: 98vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.main-layout {
    display: flex;
    height: 100%;
    width: 100%;
    overflow: hidden;
    gap: 5px;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 10px 15px;
    margin-right: 5px;
    height: 100%;
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    padding-left: 0;
    width: fit-content;
}

.sidebar-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    padding-left: 30px;
    padding-right: 30px;
    text-transform: uppercase;
    position: relative;
}

/* Bottom-Right Corner Triangle */
.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: 5px;
    right: 0;
    width: 0;
    height: 0;
    border-bottom: 22px solid #000;
    border-left: 22px solid transparent;
}

/* Decorative corner triangle for "STEPS" label */
.corner-triangle-top-left {
    position: absolute;
    top: 5px;
    left: 0;
    width: 0;
    height: 0;
    border-top: 22px solid #000;
    border-right: 22px solid transparent;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-btn {
    appearance: none;
    border: none;
    background-color: #5FA8E4;
    color: white;
    padding: 14px 15px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: transform 0.1s ease, background-color 0.2s;
    box-shadow: 0 4px 6px rgba(255, 107, 107, 0.2);
    position: relative;
}

.step-btn:hover {
    background-color: #ff6b6b;
    transform: translateY(-2px);
}

.step-btn.active {
    transform: scale(1.02);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid #fff;
    outline: 2px solid #333;
    z-index: 5;
}

.step-btn.disabled {
    background-color: #e0e0e0;
    color: #a0a0a0;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.step-btn.completed {
    background-color: #A6CE63;
    box-shadow: 0 4px 6px rgba(166, 206, 99, 0.3);
}

.step-btn.in-progress {
    background-color: #F57C2A;
    box-shadow: 0 4px 6px rgba(245, 124, 42, 0.3);
    color: #fff;
}

/* Content Area Styles */
.content-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px;
    padding-bottom: 50px;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

.pane {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
}

/* Top Pane (Code) */
.top-pane {
    flex: 0 0 auto;
}

.code-box-container {
    position: relative;
    background-color: white;
    border: 2px solid #5994d3;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 32vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.code-header-bar {
    background-color: #94cefb;
    color: #1d3557;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 45px;
    box-sizing: border-box;
    display: none;
}

.code-box {
    width: 100%;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    align-items: flex-start;
    padding: 20px;
    padding-right: 85px;
    box-sizing: border-box;
}

.code-box pre {
    margin: 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1rem;
    color: #333;
    white-space: pre-wrap;
    width: 100%;
}

.run-button {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background-color: #F57C2A;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: white;
    box-shadow: 0 4px 10px rgba(247, 160, 114, 0.4);
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
    z-index: 10;
}

.run-button:hover {
    background-color: #f63c3c;
    transform: translateY(-50%) scale(1.1);
}

.run-button:active {
    transform: translateY(-50%) scale(0.95);
}

.run-button.completed {
    background-color: #A6CE63;
}

/* Bottom Pane (Output) */
.bottom-pane {
    background-color: #f0f0f0;
    border-radius: 30px;
    border: 2px solid #545151;
    padding: 20px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    box-sizing: border-box;
    transition: background-color 0.5s ease;
    min-height: 62vh;
    height: auto;
    width: 100%;
    overflow-y: visible;
    overflow-x: hidden;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
}

/* Active Output State */
.bottom-pane.active-output {
    background-color: #d6e1f0;
    border: 3px solid #78ad1c;
}

.bottom-pane.completed-output {
    border-color: #78ad1c;
    background-color: #f1f8e9;
}

.run-button.arrow-mode {
    background-color: #5FA8E4;
}

.output-content {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
    color: #1d3557;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .main-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .steps-container {
        flex-direction: row;
    }

    .step-btn {
        min-width: 150px;
    }
}