/* IDE Body & Layout */
.ide-body {
    background-color: var(--background-color);
    color: var(--on-surface-text);
    font-family: var(--font-family);
    margin: 0;
    overflow: hidden;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

/* Force dark theme for IDE regardless of system preference */
.ide-body {
    --background-color: #1a1a1a;
    --surface-color: #242424;
    --bg-tertiary: #2d2d2d;
    --on-surface-text: #e8eaed;
    --secondary-text: #9aa0a6;
    --outline-color: #3c4043;
    --primary-accent: #8ab4f8;
    --primary-variant: #aecbfa;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.ide-header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--outline-color);
    height: 48px;
    padding: 0 20px;
}

.ide-header .container-fluid {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Force Monaco Editor Background to match theme */
.monaco-editor,
.monaco-editor-background,
.monaco-editor .margin {
    background-color: #1a1a1a !important;
}

/* Override .logo from style.css to fit IDE header */
.ide-header .logo {
    font-size: 1rem;
    color: var(--primary-accent);
}

.ide-header .logo .logo-img {
    height: 24px;
}

.ide-header .status-indicator {
    display: none;
    /* Hide System Ready indicator */
}

.ide-main {
    height: calc(100vh - 48px);
}

/* Grid Container */
.ide-container {
    display: grid;
    height: 100%;
    width: 100%;
    grid-template-columns: 1fr 360px;
    grid-template-rows: 70% 30%;
    grid-template-areas:
        "editor sidebar"
        "terminal sidebar";
}

.editor-pane {
    grid-area: editor;
    background-color: #1a1a1a;
    overflow: hidden;
}

.sidebar-pane {
    grid-area: sidebar;
    background-color: var(--surface-color);
    border-left: 1px solid var(--outline-color);
    display: flex;
    flex-direction: column;
    border-radius: 0;
}

.terminal-pane {
    grid-area: terminal;
    background-color: #1a1a1a;
    border-top: 1px solid var(--outline-color);
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 14px;
    padding: 16px;
    color: var(--secondary-text);
}

/* Sidebar Styles */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--outline-color);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-accent);
}

.sidebar-content {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--outline-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-footer .btn-group {
    display: flex;
    gap: 12px;
    width: 100%;
}

.sidebar-footer .btn {
    flex: 1;
    padding: 14px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 24px;
}

/* Turnstile Captcha Widget */
.turnstile-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.turnstile-wrapper:empty {
    display: none;
}

.turnstile-wrapper iframe {
    max-width: 100%;
}

/* Form Groups & Controls */
.form-group {
    margin-bottom: 24px;
}

.form-group label,
.form-group>label {
    display: block;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--on-surface-text);
}

/* Select Box */
.ide-container .form-control {
    width: 100%;
    padding: 12px 14px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--outline-color);
    border-radius: 12px;
    color: var(--on-surface-text);
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ide-container .form-control:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(138, 180, 248, 0.2);
}

/* --- Modern Checkbox --- */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.checkbox-wrapper input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.checkbox-wrapper label {
    display: flex;
    align-items: center;
    font-size: 15px;
    color: var(--on-surface-text);
    cursor: pointer;
}

.checkbox-wrapper label::before {
    content: '';
    width: 20px;
    height: 20px;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--outline-color);
    border-radius: 6px;
    margin-right: 14px;
    transition: background-color 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.checkbox-wrapper label::after {
    content: '✓';
    font-size: 12px;
    color: #ffffff;
    position: absolute;
    left: 4px;
    top: 3px;
    opacity: 0;
    transition: opacity 0.2s;
}

.checkbox-wrapper input[type="checkbox"]:checked+label::before {
    background-color: var(--primary-accent);
    border-color: var(--primary-accent);
}

.checkbox-wrapper input[type="checkbox"]:checked+label::after {
    opacity: 1;
}

.checkbox-wrapper input[type="checkbox"]:focus+label::before {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(138, 180, 248, 0.2);
}

/* --- Modern Slider --- */
.slider-container {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--secondary-text);
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: var(--outline-color);
    outline: none;
    border-radius: 4px;
    transition: opacity .2s;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: var(--primary-accent);
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid var(--surface-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s, transform 0.2s;
}

.slider:hover::-webkit-slider-thumb {
    background: var(--primary-variant);
    transform: scale(1.1);
}

.slider-label {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    color: var(--secondary-text);
}

/* Sidebar Tabs */
.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--outline-color);
}

.tab-link {
    flex-grow: 1;
    padding: 14px 12px;
    background: none;
    border: none;
    color: var(--secondary-text);
    cursor: pointer;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.tab-link:hover {
    color: var(--on-surface-text);
}

.tab-link.active {
    color: var(--primary-accent);
    border-bottom: 3px solid var(--primary-accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Info & Warning Boxes */
.ide-container .info-box,
.ide-container .warning-box {
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-top: 16px;
    line-height: 1.6;
}

.ide-container .info-box {
    background-color: rgba(138, 180, 248, 0.1);
    border: 1px solid rgba(138, 180, 248, 0.2);
    color: var(--on-surface-text);
}

.ide-container .warning-box {
    background-color: rgba(242, 139, 130, 0.1);
    border: 1px solid rgba(242, 139, 130, 0.2);
    color: #f28b82;
}

/* Terminal & Loading Styles */
#terminal-output {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--secondary-text);
    font-size: 14px;
}

#terminal-output .log-error {
    color: #f28b82;
}

#terminal-output .log-success {
    color: #81c995;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.8);
    z-index: 10;
    backdrop-filter: blur(4px);
}

.loading-overlay.hidden {
    display: none;
}

.loader-bar {
    width: 100%;
    height: 3px;
    background-color: rgba(138, 180, 248, 0.3);
    position: absolute;
    top: 0;
    overflow: hidden;
}

.loader-bar::before {
    content: '';
    position: absolute;
    left: -50%;
    width: 50%;
    height: 100%;
    background: var(--primary-accent);
    animation: loading-indeterminate 1s infinite;
}

@keyframes loading-indeterminate {
    0% {
        left: -50%;
        width: 50%;
    }

    100% {
        left: 100%;
        width: 50%;
    }
}

/* Floating Action Buttons */
.floating-buttons {
    position: absolute;
    bottom: 24px;
    right: 384px;
    display: flex;
    gap: 14px;
    z-index: 5;
}

.floating-buttons.hidden {
    display: none;
}

.btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--surface-color);
    color: var(--on-surface-text);
    border: 1px solid var(--outline-color);
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-icon:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--primary-accent);
    transform: translateY(-2px);
}

/* Mobile Responsiveness */
.mobile-menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .ide-container {
        grid-template-columns: 1fr;
        grid-template-rows: 60vh 1fr;
        grid-template-areas: "editor" "terminal";
        height: calc(100vh - 48px);
    }

    .sidebar-pane {
        position: fixed;
        top: 48px;
        right: -361px;
        width: 360px;
        height: calc(100vh - 48px);
        z-index: 1000;
        transition: right 0.3s ease-in-out;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    }

    .sidebar-pane.open {
        right: 0;
    }

    .floating-buttons {
        right: 24px;
        bottom: 24px;
    }

    .mobile-menu-toggle {
        display: block;
    }
}

.ide-maintenance-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(4, 7, 11, 0.62);
    backdrop-filter: blur(9px) saturate(0.82);
}

.ide-maintenance-card {
    width: min(560px, 100%);
    padding: 28px;
    border-radius: 8px;
    border: 1px solid rgba(127, 156, 255, 0.28);
    background:
        linear-gradient(180deg, rgba(15, 22, 34, 0.96), rgba(8, 12, 18, 0.96)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 48px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.44);
    color: #edf3fb;
    text-align: left;
}

.ide-maintenance-kicker {
    display: inline-flex;
    margin-bottom: 14px;
    color: #f5b84b;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.ide-maintenance-card h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 1.7rem;
    line-height: 1.15;
    letter-spacing: 0;
}

.ide-maintenance-card p {
    margin: 0;
    color: #aebbd0;
    line-height: 1.65;
}

.ide-maintenance-note {
    margin-top: 16px !important;
    padding-top: 16px;
    border-top: 1px solid rgba(225, 232, 245, 0.10);
    color: #cbd6e7 !important;
    font-weight: 700;
}

/* === Unified Firefly IDE Workbench === */
.ide-body {
    --ide-bg: #05070a;
    --ide-bg-2: #080c12;
    --ide-panel: #0b1017;
    --ide-panel-2: #101722;
    --ide-panel-3: #151d2a;
    --ide-editor-bg: #070a0f;
    --ide-editor-panel: #080c12;
    --ide-border: rgba(225, 232, 245, 0.10);
    --ide-border-strong: rgba(136, 163, 217, 0.24);
    --ide-shadow: rgba(0, 0, 0, 0.38);
    --ide-text: #edf3fb;
    --on-surface-text: #edf3fb;
    --secondary-text: #9aa7bb;
    --ide-muted: #748096;
    --primary-accent: #7f9cff;
    --primary-accent-hover: #9ab0ff;
    --ide-accent-soft: rgba(127, 156, 255, 0.14);
    --ide-success: #4bd08c;
    --ide-warning: #f5b84b;
    min-height: 100vh;
    overflow: hidden;
    color: var(--ide-text);
    background:
        linear-gradient(180deg, rgba(13, 18, 27, 0.96), rgba(5, 7, 10, 0.98)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 56px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 56px);
}

[data-theme="light"] .ide-body {
    --ide-bg: #f5f7fb;
    --ide-bg-2: #eef2f8;
    --ide-panel: #ffffff;
    --ide-panel-2: #f6f8fc;
    --ide-panel-3: #edf2fb;
    --ide-editor-bg: #f8fafc;
    --ide-editor-panel: #ffffff;
    --ide-border: rgba(15, 23, 42, 0.12);
    --ide-border-strong: rgba(44, 92, 255, 0.22);
    --ide-shadow: rgba(15, 23, 42, 0.12);
    --ide-text: #111827;
    --on-surface-text: #111827;
    --secondary-text: #4b5563;
    --ide-muted: #6b7280;
    --primary-accent: #315cff;
    --primary-accent-hover: #2448d8;
    --ide-accent-soft: rgba(49, 92, 255, 0.10);
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(231, 236, 246, 0.98)),
        repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.035) 0 1px, transparent 1px 56px),
        repeating-linear-gradient(0deg, rgba(15, 23, 42, 0.025) 0 1px, transparent 1px 56px);
}

.ide-shell-backdrop {
    background:
        linear-gradient(135deg, rgba(127, 156, 255, 0.10), transparent 34%),
        linear-gradient(315deg, rgba(75, 208, 140, 0.08), transparent 32%);
}

.ide-shell-backdrop__glow {
    display: none;
}

.ide-header {
    height: 58px;
    padding: 0 20px;
    border-bottom: 1px solid var(--ide-border);
    background: rgba(6, 9, 13, 0.94);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(14px);
}

[data-theme="light"] .ide-header {
    background: rgba(255, 255, 255, 0.88);
}

.ide-logo {
    gap: 10px;
    color: var(--ide-text);
    font-weight: 750;
}

.ide-logo img {
    filter: drop-shadow(0 0 12px rgba(255, 82, 58, 0.30));
}

.status-indicator,
.user-profile-link,
.theme-toggle,
.mobile-menu-toggle {
    min-height: 38px;
    border-radius: 8px;
    border: 1px solid var(--ide-border);
    background: rgba(255, 255, 255, 0.035);
    color: var(--ide-text);
    box-shadow: none;
}

.status-indicator {
    padding: 0 12px;
    color: var(--secondary-text);
    font-size: 0.82rem;
    letter-spacing: 0;
}

.status-dot {
    background: var(--ide-success);
    box-shadow: 0 0 0 4px rgba(75, 208, 140, 0.12);
}

.ide-main {
    height: calc(100vh - 58px);
    padding: 18px;
}

.ide-container {
    grid-template-columns: minmax(0, 1fr) 400px;
    grid-template-rows: minmax(0, 1fr) 190px;
    border-radius: 8px;
    border: 1px solid var(--ide-border);
    background: var(--ide-panel);
    box-shadow: 0 24px 70px var(--ide-shadow);
    overflow: hidden;
}

.editor-pane {
    background: var(--ide-editor-bg);
    border-right: 1px solid var(--ide-border);
}

.editor-pane::before,
.terminal-pane::before {
    height: 38px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--ide-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
    color: #a9bad2;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.editor-pane::after {
    content: '';
    position: absolute;
    top: 38px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--primary-accent), transparent 32%, rgba(75, 208, 140, 0.42), transparent 72%);
    pointer-events: none;
}

.editor-pane #editor-container {
    height: calc(100% - 38px);
    margin-top: 38px;
}

.monaco-editor,
.monaco-editor-background,
.monaco-editor .margin,
.monaco-editor .minimap,
.monaco-editor .minimap-decorations-layer,
.monaco-editor .minimap-slider {
    background-color: var(--ide-editor-bg) !important;
}

.sidebar-pane {
    background: linear-gradient(180deg, var(--ide-panel) 0%, #080c12 100%);
    border-left: 1px solid var(--ide-border);
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.025);
}

[data-theme="light"] .sidebar-pane {
    background: linear-gradient(180deg, var(--ide-panel) 0%, var(--ide-panel-2) 100%);
}

.sidebar-header {
    min-height: 100px;
    padding: 24px 24px 18px;
    border-bottom: 1px solid var(--ide-border);
    background:
        linear-gradient(90deg, rgba(127, 156, 255, 0.10), transparent 68%),
        var(--ide-panel);
}

.sidebar-header::before,
.sidebar-header::after {
    display: none;
}

.sidebar-header .eyebrow,
.terminal-pane::before {
    color: #9fb2cf;
    letter-spacing: 0;
}

.sidebar-header h1 {
    margin-top: 10px;
    color: var(--ide-text);
    font-size: 1.56rem;
    line-height: 1.05;
    letter-spacing: 0;
}

.version-badge,
.badge {
    border-radius: 8px;
    border: 1px solid var(--ide-border);
    background: rgba(127, 156, 255, 0.10);
    color: #b8c8ff;
    letter-spacing: 0;
}

.sidebar-tabs {
    gap: 6px;
    margin: 16px 20px 8px;
    padding: 4px;
    border: 1px solid var(--ide-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.tab-link {
    min-height: 36px;
    border-radius: 6px;
    border: 0;
    color: var(--secondary-text);
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: none;
}

.tab-link.active {
    background: linear-gradient(180deg, rgba(127, 156, 255, 0.22), rgba(127, 156, 255, 0.12));
    color: #dfe7ff;
    box-shadow: inset 0 0 0 1px rgba(127, 156, 255, 0.34);
}

[data-theme="light"] .tab-link.active {
    color: #1d3aa8;
}

.sidebar-content {
    padding: 18px 20px 20px;
}

.tab-pane {
    gap: 14px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label,
.form-group-label {
    margin-bottom: 10px;
    color: var(--ide-text);
    font-size: 0.86rem;
    font-weight: 820;
    letter-spacing: 0;
}

.checkbox-wrapper label,
.radio-wrapper label,
.option-card-label,
.settings-card,
.ide-container .info-box,
.ide-container .warning-box,
.cf-turnstile,
.turnstile-wrapper {
    border-radius: 8px !important;
}

.checkbox-wrapper label,
.radio-wrapper label,
.option-card-label {
    min-height: 56px;
    padding: 14px 14px 14px 48px;
    border: 1px solid var(--ide-border);
    background: var(--ide-panel-2);
    color: var(--ide-text);
    box-shadow: none;
}

.checkbox-wrapper label:hover,
.radio-wrapper label:hover,
.option-card-label:hover {
    border-color: var(--ide-border-strong);
    background: var(--ide-panel-3);
}

.checkbox-wrapper input:checked + label,
.radio-wrapper input:checked + label {
    border-color: rgba(127, 156, 255, 0.48);
    background:
        linear-gradient(90deg, rgba(127, 156, 255, 0.20), rgba(127, 156, 255, 0.07)),
        var(--ide-panel-3);
    box-shadow: inset 3px 0 0 var(--primary-accent);
}

.checkbox-wrapper label::before,
.radio-wrapper label::before {
    left: 16px;
    width: 18px;
    height: 18px;
    border-color: rgba(154, 167, 187, 0.34);
    background: rgba(255, 255, 255, 0.04);
}

.checkbox-wrapper input:checked + label::before,
.radio-wrapper input:checked + label::before {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 4px rgba(127, 156, 255, 0.16);
}

.option-title,
.checkbox-wrapper label strong,
.radio-wrapper label strong {
    color: var(--ide-text);
    font-weight: 850;
}

.option-description,
.checkbox-wrapper label span,
.radio-wrapper label span,
.description-text {
    color: var(--secondary-text);
    font-weight: 650;
}

.slider {
    height: 8px;
    background: linear-gradient(90deg, rgba(75, 208, 140, 0.35), rgba(127, 156, 255, 0.44), rgba(245, 184, 75, 0.42));
    border-radius: 8px;
}

.slider::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    border: 3px solid var(--ide-panel);
    background: var(--primary-accent);
    box-shadow: 0 8px 20px rgba(127, 156, 255, 0.28);
}

.ide-container .info-box,
.ide-container .warning-box {
    padding: 14px 16px !important;
    background: rgba(127, 156, 255, 0.09) !important;
    border: 1px solid rgba(127, 156, 255, 0.20) !important;
    color: var(--ide-text) !important;
}

.ide-container .warning-box {
    background: rgba(245, 184, 75, 0.10) !important;
    border-color: rgba(245, 184, 75, 0.25) !important;
}

.sidebar-footer {
    padding: 18px 20px 20px;
    border-top: 1px solid var(--ide-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(0, 0, 0, 0.18));
}

.sidebar-footer .btn,
.btn-primary,
.btn-secondary {
    min-height: 48px;
    border-radius: 8px;
    border: 1px solid rgba(127, 156, 255, 0.36);
    font-weight: 850;
    letter-spacing: 0;
}

.btn-primary {
    background: linear-gradient(180deg, #8fa8ff, #6f8eff);
    color: #061022;
    box-shadow: 0 16px 34px rgba(82, 115, 255, 0.24);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #a4b8ff, #7f9cff);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--ide-text);
}

.terminal-pane {
    background: #060a0f;
    border-top: 1px solid var(--ide-border);
}

[data-theme="light"] .terminal-pane {
    background: #f8fafc;
}

.terminal-pane::before {
    content: 'Processing Log';
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

#terminal-output {
    padding: 16px 18px;
    color: #b8c4d6;
    font-size: 0.88rem;
    line-height: 1.55;
}

.floating-buttons {
    right: calc(400px + 18px);
    bottom: 214px;
    gap: 8px;
}

.btn-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid var(--ide-border);
    background: rgba(9, 14, 21, 0.90);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28);
}

.btn-icon:hover {
    border-color: var(--ide-border-strong);
    background: rgba(127, 156, 255, 0.14);
}

.loading-overlay {
    background: rgba(5, 7, 10, 0.62);
    backdrop-filter: blur(8px);
}

.loader {
    border-radius: 8px;
}

@media (max-width: 1100px) {
    .ide-container {
        grid-template-columns: minmax(0, 1fr) 360px;
    }

    .floating-buttons {
        right: calc(360px + 18px);
    }
}

@media (max-width: 768px) {
    .ide-header {
        height: 58px;
        padding: 0 14px;
    }

    .ide-main {
        height: calc(100vh - 58px);
        padding: 12px;
    }

    .ide-container {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) 180px;
        grid-template-areas:
            "editor"
            "terminal";
        border-radius: 8px;
    }

    .sidebar-pane {
        top: 70px;
        right: 12px;
        width: min(390px, calc(100vw - 24px));
        height: calc(100vh - 82px);
        border-radius: 8px;
    }

    .floating-buttons {
        right: 18px;
        bottom: 196px;
    }
}

/* === Enterprise IDE Refresh === */
.ide-body {
    --ide-editor-bg: #f3f5f8;
    --ide-editor-panel: #ffffff;
    --ide-terminal-bg: #edf0f4;
    --ide-sidebar-bg: rgba(255, 255, 255, 0.82);
    --ide-border: rgba(15, 23, 42, 0.10);
    --ide-muted: #667085;
    --ide-accent-soft: rgba(41, 112, 255, 0.12);
    --primary-accent: #2c5cff;
    --primary-variant: #1f4ee0;
    --background-color: #eef2f6;
    --surface-color: #ffffff;
    --bg-tertiary: #f5f7fa;
    --on-surface-text: #111827;
    --secondary-text: #667085;
    --outline-color: rgba(15, 23, 42, 0.10);
    background:
        radial-gradient(circle at top left, rgba(148, 163, 184, 0.18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(148, 163, 184, 0.14), transparent 28%),
        linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
    color: var(--on-surface-text);
    opacity: 0;
    animation: fadeIn 0.35s ease-out forwards;
}

[data-theme="dark"] .ide-body {
    --ide-editor-bg: #0d1117;
    --ide-editor-panel: #11161d;
    --ide-terminal-bg: #0b1016;
    --ide-sidebar-bg: rgba(17, 22, 29, 0.82);
    --ide-border: rgba(255, 255, 255, 0.08);
    --ide-muted: #96a2b4;
    --ide-accent-soft: rgba(109, 146, 255, 0.16);
    --primary-accent: #8ca8ff;
    --primary-variant: #a7bbff;
    --background-color: #070b11;
    --surface-color: #11161d;
    --bg-tertiary: #161c24;
    --on-surface-text: #ecf2ff;
    --secondary-text: #96a2b4;
    --outline-color: rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top left, rgba(84, 97, 122, 0.22), transparent 34%),
        radial-gradient(circle at bottom right, rgba(70, 84, 108, 0.18), transparent 30%),
        linear-gradient(180deg, #05080d 0%, #09111a 100%);
}

.ide-shell-backdrop {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.ide-shell-backdrop__glow {
    position: absolute;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    filter: blur(44px);
    opacity: 0.75;
    background: radial-gradient(circle, rgba(126, 139, 161, 0.28), rgba(126, 139, 161, 0));
}

.ide-shell-backdrop__glow--left {
    top: -220px;
    left: -180px;
}

.ide-shell-backdrop__glow--right {
    right: -220px;
    bottom: -220px;
}

.ide-header {
    position: relative;
    z-index: 3;
    height: 64px;
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.72);
    border-bottom: 1px solid var(--ide-border);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

[data-theme="dark"] .ide-header {
    background: rgba(10, 14, 20, 0.72);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.ide-header__inner,
.header-right {
    display: flex;
    align-items: center;
}

.ide-header__inner {
    width: 100%;
    height: 100%;
    justify-content: space-between;
    gap: 18px;
}

.header-left {
    gap: 16px;
}

.ide-logo {
    gap: 10px;
    color: var(--on-surface-text);
}

.ide-logo .logo-img {
    height: 28px;
}

.ide-logo .logo-text {
    color: var(--on-surface-text);
    font-weight: 600;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--ide-border);
}

[data-theme="dark"] .status-indicator {
    background: rgba(255, 255, 255, 0.04);
}

.indicator-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
    flex-shrink: 0;
}

.status-indicator__copy {
    display: grid;
    gap: 1px;
}

.status-indicator__label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--secondary-text);
}

#status-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--on-surface-text);
}

.header-right {
    gap: 12px;
}

.ide-theme-toggle,
.ide-user-link,
.ide-login-link,
.mobile-menu-toggle {
    min-height: 40px;
    border-radius: 14px;
    border: 1px solid var(--ide-border);
    background: rgba(255, 255, 255, 0.6);
    color: var(--on-surface-text);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

[data-theme="dark"] .ide-theme-toggle,
[data-theme="dark"] .ide-user-link,
[data-theme="dark"] .ide-login-link,
[data-theme="dark"] .mobile-menu-toggle {
    background: rgba(255, 255, 255, 0.04);
}

.ide-theme-toggle:hover,
.ide-user-link:hover,
.ide-login-link:hover,
.mobile-menu-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(44, 92, 255, 0.28);
    background: rgba(44, 92, 255, 0.08);
}

.ide-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    padding: 0;
    cursor: pointer;
}

.ide-theme-toggle #theme-toggle-icon {
    font-size: 20px;
}

.ide-user-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px 0 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.ide-user-link__avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.ide-login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    font-size: 0.9rem;
    font-weight: 600;
}

.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    padding: 0;
    cursor: pointer;
}

.ide-main {
    position: relative;
    z-index: 2;
    height: calc(100vh - 64px);
    padding: 18px;
}

.ide-stage {
    height: 100%;
}

.ide-container {
    position: relative;
    display: grid;
    height: 100%;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-rows: minmax(0, 1fr) 220px;
    grid-template-areas:
        "editor sidebar"
        "terminal sidebar";
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid var(--ide-border);
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 32px 70px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(18px);
}

[data-theme="dark"] .ide-container {
    background: rgba(6, 9, 14, 0.58);
    box-shadow: 0 34px 74px rgba(0, 0, 0, 0.34);
}

.editor-pane,
.terminal-pane,
.sidebar-pane {
    position: relative;
}

.editor-pane {
    grid-area: editor;
    overflow: hidden;
    background: var(--ide-editor-panel);
}

.editor-pane::before,
.terminal-pane::before {
    position: absolute;
    top: 16px;
    left: 20px;
    z-index: 2;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--secondary-text);
}

.editor-pane::before {
    content: 'Editor';
}

.terminal-pane::before {
    content: 'Processing Log';
}

#editor-container {
    width: 100% !important;
    height: calc(100% - 46px) !important;
    margin-top: 46px;
}

.terminal-pane {
    grid-area: terminal;
    padding: 48px 20px 20px;
    background: var(--ide-terminal-bg);
    border-top: 1px solid var(--ide-border);
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 13px;
    color: var(--secondary-text);
}

.sidebar-pane {
    grid-area: sidebar;
    display: flex;
    flex-direction: column;
    background: var(--ide-sidebar-bg);
    border-left: 1px solid var(--ide-border);
    backdrop-filter: blur(20px);
}

.sidebar-header {
    padding: 24px 24px 18px;
    border-bottom: 1px solid var(--ide-border);
}

.sidebar-header::before {
    content: 'Protection Workspace';
    display: block;
    margin-bottom: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--secondary-text);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1.1;
    color: var(--on-surface-text);
}

.sidebar-header h3 span {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.72rem !important;
    font-weight: 600;
    color: var(--secondary-text);
    background: rgba(120, 126, 138, 0.12);
    border: 1px solid rgba(120, 126, 138, 0.18);
}

.sidebar-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 16px 20px 0;
    border-bottom: none;
}

.tab-link {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--ide-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.42);
    color: var(--secondary-text);
    font-size: 0.92rem;
    font-weight: 600;
    border-bottom: 1px solid var(--ide-border);
}

[data-theme="dark"] .tab-link {
    background: rgba(255, 255, 255, 0.03);
}

.tab-link:hover {
    color: var(--on-surface-text);
    border-color: rgba(44, 92, 255, 0.24);
}

.tab-link.active {
    color: var(--primary-accent);
    background: var(--ide-accent-soft);
    border-color: rgba(44, 92, 255, 0.24);
}

.sidebar-content {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
}

.sidebar-content h4 {
    margin: 0 0 10px;
    color: var(--on-surface-text);
    font-size: 1rem;
}

.sidebar-content p,
.sidebar-content li {
    color: var(--secondary-text);
    line-height: 1.6;
}

.sidebar-footer {
    padding: 18px 20px 20px;
    border-top: 1px solid var(--ide-border);
    gap: 14px;
}

.sidebar-footer .btn-group {
    gap: 10px;
}

.sidebar-footer .btn {
    min-height: 48px;
    border-radius: 16px;
    font-size: 0.98rem;
    font-weight: 600;
}

.ide-body .btn-primary {
    background: linear-gradient(180deg, var(--primary-accent), var(--primary-variant));
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(44, 92, 255, 0.18);
}

.ide-body .btn-secondary {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--ide-border);
    color: var(--on-surface-text);
}

[data-theme="dark"] .ide-body .btn-secondary {
    background: rgba(255, 255, 255, 0.04);
}

.turnstile-wrapper {
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid var(--ide-border);
}

[data-theme="dark"] .turnstile-wrapper {
    background: rgba(255, 255, 255, 0.03);
}

.turnstile-wrapper:empty {
    display: none;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label,
.form-group > label {
    margin-bottom: 10px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--on-surface-text);
}

.ide-container .form-control {
    min-height: 44px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--ide-border);
    border-radius: 14px;
    color: var(--on-surface-text);
}

[data-theme="dark"] .ide-container .form-control {
    background: rgba(255, 255, 255, 0.03);
}

.ide-container .form-control:focus {
    border-color: rgba(44, 92, 255, 0.34);
    box-shadow: 0 0 0 4px rgba(44, 92, 255, 0.12);
}

.checkbox-group,
.radio-group {
    display: grid;
    gap: 12px;
}

.checkbox-wrapper,
.radio-wrapper {
    position: relative;
    min-height: 54px;
}

.checkbox-wrapper input,
.radio-wrapper input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.checkbox-wrapper label,
.radio-wrapper label {
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 14px 16px 14px 50px;
    margin: 0;
    border-radius: 16px;
    border: 1px solid var(--ide-border);
    background: rgba(255, 255, 255, 0.42);
    color: var(--on-surface-text);
    line-height: 1.5;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

[data-theme="dark"] .checkbox-wrapper label,
[data-theme="dark"] .radio-wrapper label {
    background: rgba(255, 255, 255, 0.03);
}

.option-card-label {
    display: grid !important;
    align-content: center;
    gap: 4px;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

.option-card-label__title {
    display: block;
    font-weight: 700;
    color: var(--on-surface-text);
}

.option-card-label__title--success {
    color: #16a34a;
}

.option-card-label__title--warning {
    color: #d97706;
}

[data-theme="dark"] .option-card-label__title--success {
    color: #4ade80;
}

[data-theme="dark"] .option-card-label__title--warning {
    color: #f59e0b;
}

.option-card-label__meta {
    display: block;
    font-size: 0.84rem;
    line-height: 1.45;
    color: var(--secondary-text);
}

.checkbox-wrapper label::before,
.radio-wrapper label::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 1px solid rgba(120, 126, 138, 0.32);
    background: rgba(255, 255, 255, 0.72);
}

[data-theme="dark"] .checkbox-wrapper label::before,
[data-theme="dark"] .radio-wrapper label::before {
    background: rgba(255, 255, 255, 0.05);
}

.checkbox-wrapper label::before {
    border-radius: 6px;
}

.radio-wrapper label::before {
    border-radius: 50%;
}

.checkbox-wrapper label::after {
    content: '';
    position: absolute;
    left: 23px;
    top: 50%;
    width: 6px;
    height: 10px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: translateY(-58%) rotate(45deg);
    opacity: 0;
}

.radio-wrapper label::after {
    content: '';
    position: absolute;
    left: 21px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    transform: translateY(-50%);
    opacity: 0;
}

.checkbox-wrapper input:checked + label,
.radio-wrapper input:checked + label {
    border-color: rgba(44, 92, 255, 0.26);
    background: var(--ide-accent-soft);
}

.checkbox-wrapper input:checked + label::before,
.radio-wrapper input:checked + label::before {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
}

.checkbox-wrapper input:checked + label::after,
.radio-wrapper input:checked + label::after {
    opacity: 1;
}

.checkbox-wrapper input:focus + label,
.radio-wrapper input:focus + label,
.checkbox-wrapper:hover label,
.radio-wrapper:hover label {
    transform: translateY(-1px);
    border-color: rgba(44, 92, 255, 0.22);
}

.slider-container {
    gap: 12px;
    font-size: 0.84rem;
    color: var(--secondary-text);
}

.slider {
    height: 6px;
    background: rgba(120, 126, 138, 0.22);
    border-radius: 999px;
}

.slider::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    border: 2px solid var(--ide-editor-panel);
    box-shadow: 0 6px 14px rgba(44, 92, 255, 0.18);
}

.slider-label {
    margin-top: 10px;
    color: var(--secondary-text);
}

.ide-container .info-box,
.ide-container .warning-box {
    padding: 14px 16px !important;
    border-radius: 16px !important;
    border: 1px solid var(--ide-border) !important;
    line-height: 1.6;
}

.ide-container .info-box {
    background: rgba(44, 92, 255, 0.08) !important;
    color: var(--on-surface-text) !important;
}

.ide-container .info-box strong {
    color: var(--primary-accent);
}

.ide-container .warning-box {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #d14343 !important;
}

[data-theme="dark"] .ide-container .warning-box {
    color: #ff8e8e !important;
}

.loading-overlay {
    background: rgba(10, 14, 20, 0.18);
    backdrop-filter: blur(6px);
}

[data-theme="dark"] .loading-overlay {
    background: rgba(4, 7, 11, 0.44);
}

.loader-bar {
    height: 4px;
    background-color: rgba(44, 92, 255, 0.12);
}

.loader-bar::before {
    background: linear-gradient(90deg, transparent, var(--primary-accent), transparent);
}

#terminal-output {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--secondary-text);
}

#terminal-output .log-error {
    color: #d14343;
}

#terminal-output .log-success {
    color: #0f9f63;
}

[data-theme="dark"] #terminal-output .log-error {
    color: #ff8e8e;
}

[data-theme="dark"] #terminal-output .log-success {
    color: #78e7b0;
}

.floating-buttons {
    right: calc(380px + 22px);
    bottom: clamp(22px, 24%, 250px);
    gap: 12px;
}

.btn-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.76);
    border-radius: 14px;
    border: 1px solid var(--ide-border);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.10);
}

[data-theme="dark"] .btn-icon {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
}

.btn-icon:hover {
    background: var(--ide-accent-soft);
}

.monaco-editor,
.monaco-editor-background,
.monaco-editor .margin {
    background-color: var(--ide-editor-bg) !important;
}

@media (max-width: 768px) {
    .ide-header {
        height: 58px;
        padding: 0 14px;
    }

    .status-indicator {
        display: none;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    .ide-main {
        height: calc(100vh - 58px);
        padding: 12px;
    }

    .ide-container {
        grid-template-columns: 1fr;
        grid-template-rows: 52vh minmax(0, 1fr);
        grid-template-areas:
            "editor"
            "terminal";
        border-radius: 22px;
    }

    .sidebar-pane {
        position: fixed;
        top: 70px;
        right: 12px;
        width: min(380px, calc(100vw - 24px));
        height: calc(100vh - 82px);
        border-radius: 24px;
        border: 1px solid var(--ide-border);
        box-shadow: 0 24px 54px rgba(0, 0, 0, 0.24);
        transform: translateX(calc(100% + 24px));
        transition: transform 0.28s ease;
        z-index: 20;
    }

    .sidebar-pane.open {
        right: 12px;
        transform: translateX(0);
    }

    .floating-buttons {
        right: 20px;
        bottom: 20px;
    }

    .sidebar-footer .btn-group {
        flex-direction: column;
    }
}

/* === Final Unified Firefly IDE Workbench Override === */
.ide-body {
    --ide-editor-bg: #070a0f;
    --ide-editor-panel: #080c12;
    --ide-terminal-bg: #060a0f;
    --ide-sidebar-bg: #0b1017;
    --ide-border: rgba(225, 232, 245, 0.10);
    --ide-border-strong: rgba(136, 163, 217, 0.24);
    --ide-accent-soft: rgba(127, 156, 255, 0.14);
    --primary-accent: #7f9cff;
    --primary-accent-hover: #9ab0ff;
    --surface-color: #0b1017;
    --background-color: #05070a;
    --bg-tertiary: #101722;
    --on-surface-text: #edf3fb;
    --secondary-text: #9aa7bb;
    --outline-color: rgba(225, 232, 245, 0.10);
    background:
        linear-gradient(180deg, rgba(13, 18, 27, 0.96), rgba(5, 7, 10, 0.98)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 56px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 56px);
    color: var(--on-surface-text);
}

[data-theme="light"] .ide-body {
    --ide-editor-bg: #f8fafc;
    --ide-editor-panel: #ffffff;
    --ide-terminal-bg: #f8fafc;
    --ide-sidebar-bg: #ffffff;
    --ide-border: rgba(15, 23, 42, 0.12);
    --ide-border-strong: rgba(44, 92, 255, 0.22);
    --ide-accent-soft: rgba(49, 92, 255, 0.10);
    --primary-accent: #315cff;
    --primary-accent-hover: #2448d8;
    --surface-color: #ffffff;
    --background-color: #f5f7fb;
    --bg-tertiary: #f6f8fc;
    --on-surface-text: #111827;
    --secondary-text: #4b5563;
    --outline-color: rgba(15, 23, 42, 0.12);
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(231, 236, 246, 0.98)),
        repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.035) 0 1px, transparent 1px 56px),
        repeating-linear-gradient(0deg, rgba(15, 23, 42, 0.025) 0 1px, transparent 1px 56px);
}

.ide-shell-backdrop {
    background:
        linear-gradient(135deg, rgba(127, 156, 255, 0.10), transparent 34%),
        linear-gradient(315deg, rgba(75, 208, 140, 0.08), transparent 32%);
}

.ide-shell-backdrop__glow {
    display: none;
}

.ide-header {
    height: 58px;
    padding: 0 20px;
    border-bottom: 1px solid var(--ide-border);
    background: rgba(6, 9, 13, 0.94);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(14px);
}

[data-theme="light"] .ide-header {
    background: rgba(255, 255, 255, 0.88);
}

.ide-logo,
.sidebar-header h1,
.form-group label,
.form-group-label,
.option-title,
.checkbox-wrapper label strong,
.radio-wrapper label strong {
    color: var(--on-surface-text);
    letter-spacing: 0;
}

.status-indicator,
.user-profile-link,
.theme-toggle,
.mobile-menu-toggle {
    min-height: 38px;
    border-radius: 8px;
    border: 1px solid var(--ide-border);
    background: rgba(255, 255, 255, 0.035);
    color: var(--on-surface-text);
    box-shadow: none;
}

.ide-main {
    height: calc(100vh - 58px);
    padding: 18px;
}

.ide-container {
    grid-template-columns: minmax(0, 1fr) 400px;
    grid-template-rows: minmax(0, 1fr) 190px;
    border-radius: 8px;
    border: 1px solid var(--ide-border);
    background: var(--surface-color);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    overflow: hidden;
}

.editor-pane,
.monaco-editor,
.monaco-editor-background,
.monaco-editor .margin,
.monaco-editor .minimap,
.monaco-editor .minimap-decorations-layer,
.monaco-editor .minimap-slider {
    background-color: var(--ide-editor-bg) !important;
}

.editor-pane {
    border-right: 1px solid var(--ide-border);
}

.editor-pane::before,
.terminal-pane::before {
    height: 38px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--ide-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
    color: #a9bad2;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.editor-pane::after {
    content: '';
    position: absolute;
    top: 38px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--primary-accent), transparent 32%, rgba(75, 208, 140, 0.42), transparent 72%);
    pointer-events: none;
}

.editor-pane #editor-container {
    height: calc(100% - 38px);
    margin-top: 38px;
}

.sidebar-pane {
    background: linear-gradient(180deg, var(--ide-sidebar-bg) 0%, #080c12 100%);
    border-left: 1px solid var(--ide-border);
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.025);
}

[data-theme="light"] .sidebar-pane {
    background: linear-gradient(180deg, #ffffff 0%, #f6f8fc 100%);
}

.sidebar-header {
    min-height: 100px;
    padding: 24px 24px 18px;
    border-bottom: 1px solid var(--ide-border);
    background:
        linear-gradient(90deg, rgba(127, 156, 255, 0.10), transparent 68%),
        var(--ide-sidebar-bg);
}

.sidebar-header::before,
.sidebar-header::after {
    display: none;
}

.sidebar-header h1 {
    margin-top: 10px;
    font-size: 1.56rem;
    line-height: 1.05;
}

.sidebar-header .eyebrow,
.status-indicator,
.version-badge,
.badge,
.tab-link,
.form-group label,
.form-group-label,
.sidebar-footer .btn,
.btn-primary,
.btn-secondary {
    letter-spacing: 0;
}

.version-badge,
.badge {
    border-radius: 8px;
    border: 1px solid var(--ide-border);
    background: rgba(127, 156, 255, 0.10);
    color: #b8c8ff;
}

.sidebar-tabs {
    gap: 6px;
    margin: 16px 20px 8px;
    padding: 4px;
    border: 1px solid var(--ide-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.tab-link {
    min-height: 36px;
    border-radius: 6px;
    border: 0;
    color: var(--secondary-text);
    font-weight: 800;
    box-shadow: none;
}

.tab-link.active {
    background: linear-gradient(180deg, rgba(127, 156, 255, 0.22), rgba(127, 156, 255, 0.12));
    color: #dfe7ff;
    box-shadow: inset 0 0 0 1px rgba(127, 156, 255, 0.34);
}

[data-theme="light"] .tab-link.active {
    color: #1d3aa8;
}

.sidebar-content {
    padding: 18px 20px 20px;
}

.tab-pane {
    gap: 14px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label,
.form-group-label {
    margin-bottom: 10px;
    font-size: 0.86rem;
    font-weight: 820;
}

.checkbox-wrapper label,
.radio-wrapper label,
.option-card-label,
.settings-card,
.ide-container .info-box,
.ide-container .warning-box,
.cf-turnstile,
.turnstile-wrapper {
    border-radius: 8px !important;
}

.checkbox-wrapper label,
.radio-wrapper label,
.option-card-label {
    min-height: 56px;
    padding: 14px 14px 14px 48px;
    border: 1px solid var(--ide-border);
    background: var(--bg-tertiary);
    color: var(--on-surface-text);
    box-shadow: none;
}

.checkbox-wrapper label:hover,
.radio-wrapper label:hover,
.option-card-label:hover {
    border-color: var(--ide-border-strong);
    background: #151d2a;
}

[data-theme="light"] .checkbox-wrapper label:hover,
[data-theme="light"] .radio-wrapper label:hover,
[data-theme="light"] .option-card-label:hover {
    background: #edf2fb;
}

.checkbox-wrapper input:checked + label,
.radio-wrapper input:checked + label {
    border-color: rgba(127, 156, 255, 0.48);
    background:
        linear-gradient(90deg, rgba(127, 156, 255, 0.20), rgba(127, 156, 255, 0.07)),
        #151d2a;
    box-shadow: inset 3px 0 0 var(--primary-accent);
}

.checkbox-wrapper label::before,
.radio-wrapper label::before {
    left: 16px;
    width: 18px;
    height: 18px;
    border-color: rgba(154, 167, 187, 0.34);
    background: rgba(255, 255, 255, 0.04);
}

.checkbox-wrapper input:checked + label::before,
.radio-wrapper input:checked + label::before {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 4px rgba(127, 156, 255, 0.16);
}

.option-description,
.checkbox-wrapper label span,
.radio-wrapper label span,
.description-text {
    color: var(--secondary-text);
    font-weight: 650;
}

.slider {
    height: 8px;
    background: linear-gradient(90deg, rgba(75, 208, 140, 0.35), rgba(127, 156, 255, 0.44), rgba(245, 184, 75, 0.42));
    border-radius: 8px;
}

.slider::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    border: 3px solid var(--surface-color);
    background: var(--primary-accent);
    box-shadow: 0 8px 20px rgba(127, 156, 255, 0.28);
}

.ide-container .info-box,
.ide-container .warning-box {
    padding: 14px 16px !important;
    background: rgba(127, 156, 255, 0.09) !important;
    border: 1px solid rgba(127, 156, 255, 0.20) !important;
    color: var(--on-surface-text) !important;
}

.ide-container .warning-box {
    background: rgba(245, 184, 75, 0.10) !important;
    border-color: rgba(245, 184, 75, 0.25) !important;
}

.sidebar-footer {
    padding: 18px 20px 20px;
    border-top: 1px solid var(--ide-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(0, 0, 0, 0.18));
}

.sidebar-footer .btn,
.btn-primary,
.btn-secondary {
    min-height: 48px;
    border-radius: 8px;
    border: 1px solid rgba(127, 156, 255, 0.36);
    font-weight: 850;
}

.btn-primary {
    background: linear-gradient(180deg, #8fa8ff, #6f8eff);
    color: #061022;
    box-shadow: 0 16px 34px rgba(82, 115, 255, 0.24);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #a4b8ff, #7f9cff);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--on-surface-text);
}

.terminal-pane {
    background: var(--ide-terminal-bg);
    border-top: 1px solid var(--ide-border);
}

.terminal-pane::before {
    content: 'Processing Log';
}

#terminal-output {
    padding: 16px 18px;
    color: #b8c4d6;
    font-size: 0.88rem;
    line-height: 1.55;
}

[data-theme="light"] #terminal-output {
    color: #334155;
}

.floating-buttons {
    right: calc(400px + 18px);
    bottom: 214px;
    gap: 8px;
}

.btn-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid var(--ide-border);
    background: rgba(9, 14, 21, 0.90);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28);
}

.btn-icon:hover {
    border-color: var(--ide-border-strong);
    background: rgba(127, 156, 255, 0.14);
}

.loading-overlay {
    background: rgba(5, 7, 10, 0.62);
    backdrop-filter: blur(8px);
}

.loader {
    border-radius: 8px;
}

@media (max-width: 1100px) {
    .ide-container {
        grid-template-columns: minmax(0, 1fr) 360px;
    }

    .floating-buttons {
        right: calc(360px + 18px);
    }
}

@media (max-width: 768px) {
    .ide-main {
        height: calc(100vh - 58px);
        padding: 12px;
    }

    .ide-container {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) 180px;
        grid-template-areas:
            "editor"
            "terminal";
        border-radius: 8px;
    }

    .sidebar-pane {
        top: 70px;
        right: 12px;
        width: min(390px, calc(100vw - 24px));
        height: calc(100vh - 82px);
        border-radius: 8px;
    }

    .floating-buttons {
        right: 18px;
        bottom: 196px;
    }
}
