/* ===== FONT ===== */
        @font-face {
            font-family: 'Cascadia';
            src: url('Cascadia.ttf') format('truetype');
        }

        /* ===== RESET ===== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* ===== ROOT COLORS - DARK THEME ===== */
        :root[data-theme="dark"] {
            --bg-main: #0f172a;
            --bg-panel: #111827;
            --bg-editor: #020617;
            --bg-output: #020617;
            --bg-menu: rgba(10, 15, 30, 0.85);

            --border-soft: #1e293b;
            --border-strong: #334155;

            --text-main: #e5e7eb;
            --text-muted: #94a3b8;
            --text-title: #f8fafc;

            --accent-primary: #3b82f6;
            --accent-success: #10b981;
            --accent-danger: #ef4444;
            --accent-warning: #f59e0b;
            --accent-error: #ef4444;

            --scrollbar-thumb: #334155;
            --scrollbar-track: #020617;
        }

        /* ===== ROOT COLORS - LIGHT THEME ===== */
        :root[data-theme="light"] {
            --bg-main: #f1f5f9;
            --bg-panel: #ffffff;
            --bg-editor: #f8fafc;
            --bg-output: #f8fafc;
            --bg-menu: rgba(255, 255, 255, 0.85);

            --border-soft: #e2e8f0;
            --border-strong: #cbd5e1;

            --text-main: #1e293b;
            --text-muted: #64748b;
            --text-title: #0f172a;

            --accent-primary: #3b82f6;
            --accent-success: #10b981;
            --accent-danger: #ef4444;
            --accent-warning: #f59e0b;
            --accent-error: #ef4444;

            --scrollbar-thumb: #cbd5e1;
            --scrollbar-track: #f8fafc;
        }

        /* Default to dark theme */
        :root {
            --bg-main: #0f172a;
            --bg-panel: #111827;
            --bg-editor: #020617;
            --bg-output: #020617;
            --bg-menu: rgba(10, 15, 30, 0.85);

            --border-soft: #1e293b;
            --border-strong: #334155;

            --text-main: #e5e7eb;
            --text-muted: #94a3b8;
            --text-title: #f8fafc;

            --accent-primary: #3b82f6;
            --accent-success: #10b981;
            --accent-danger: #ef4444;
            --accent-warning: #f59e0b;
            --accent-error: #ef4444;

            --scrollbar-thumb: #334155;
            --scrollbar-track: #020617;
        }

        /* ===== BODY ===== */
        body {
            font-family: "Inter", "Segoe UI", system-ui, sans-serif;
            background: var(--bg-main);
            color: var(--text-main);
            min-height: 100vh;
            padding: 8px;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        /* ===== CONTAINER ===== */
        .container {
            max-width: 1400px;
            margin: auto;
            background: var(--bg-panel);
            border-radius: 12px;
            border: 1px solid var(--border-soft);
            box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
            overflow: hidden;
            transition: background-color 0.3s ease, border-color 0.3s ease;
        }

        /* ===== HEADER ===== */
        .header {
            padding: 10px 12px;
            border-bottom: 1px solid var(--border-soft);
            background: var(--bg-editor);
            transition: background-color 0.3s ease, border-color 0.3s ease;
        }

        .header h1 {
            font-size: 24px;
            font-weight: 700;
            color: var(--text-title);
            letter-spacing: 0.3px;
        }

        .header p {
            margin-top: 6px;
            font-size: 13px;
            color: var(--text-muted);
        }

        .footer {
            text-align: center;
            font-size: 12px;
            opacity: 0.5;
            margin-top: 20px;
        }

        /* ===== HEADER LOGO ===== */
        .header-title {
            display: flex;
            align-items: center;
            gap: 14px;
        }

        .app-logo {
            width: 48px;
            height: 48px;
            object-fit: contain;
        }

        .title-text h1 {
            margin: 0;
            font-size: 26px;
            font-weight: 700;
        }

        .title-text p {
            margin: 0;
            font-size: 14px;
            opacity: 0.8;
        }

        /* ===== MENU BAR ===== */
        .menu-bar {
            position: sticky;
            top: 0;
            z-index: 100;
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            padding: 8px 8px;
            background: var(--bg-menu);
            border-bottom: 1px solid var(--border-soft);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            min-height: 48px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
            transition: background-color 0.3s ease, border-color 0.3s ease;
        }

        .menu-btn, .menu-select {
            padding: 6px 8px;
            background: var(--bg-editor);
            border: 1px solid var(--border-soft);
            color: var(--text-main);
            border-radius: 4px;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .menu-btn:hover, .menu-select:hover {
            border-color: var(--accent-primary);
            background: var(--bg-main);
        }

        .menu-select {
            min-width: 120px;
        }

        .menu-divider {
            width: 1px;
            height: 24px;
            background: var(--border-soft);
            margin: 0 4px;
        }

        /* ===== THEME TOGGLE ===== */
        .theme-toggle {
            margin-left: auto;
            background: var(--bg-editor);
            border: 1px solid var(--border-soft);
            padding: 6px 12px;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 16px;
        }

        .theme-toggle:hover {
            border-color: var(--accent-primary);
            transform: scale(1.05);
        }

        input[type="file"] {
            display: none;
        }

        /* ===== HAMBURGER MENU ===== */
        .hamburger-menu {
            position: relative;
            display: none;
        }

        .hamburger-btn {
            padding: 8px 12px;
            background: var(--bg-editor);
            border: 1px solid var(--border-soft);
            color: var(--text-main);
            border-radius: 4px;
            font-size: 18px;
            cursor: pointer;
            transition: all 0.2s;
            line-height: 1;
        }

        .hamburger-btn:hover {
            border-color: var(--accent-primary);
            background: var(--bg-main);
        }

        .dropdown-menu {
            position: absolute;
            top: 100%;
            right: 0;
            margin-top: 8px;
            background: var(--bg-panel);
            border: 1px solid var(--border-soft);
            border-radius: 6px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            min-width: 200px;
            display: none;
            z-index: 1000;
            max-height: 70vh;
            overflow-y: auto;
        }

        .dropdown-menu.active {
            display: block;
            animation: slideDown 0.2s ease;
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .dropdown-item {
            padding: 10px 16px;
            border-bottom: 1px solid var(--border-soft);
            cursor: pointer;
            transition: background 0.2s;
            font-size: 13px;
            color: var(--text-main);
            background: transparent;
            border: none;
            width: 100%;
            text-align: left;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .dropdown-item:last-child {
            border-bottom: none;
        }

        .dropdown-item:hover {
            background: var(--bg-editor);
        }

        .dropdown-item:active {
            background: var(--accent-primary);
            color: white;
        }

        .dropdown-divider {
            height: 1px;
            background: var(--border-soft);
            margin: 4px 0;
        }

        /* ===== LAYOUT ===== */
        .main-content {
            display: grid;
            grid-template-columns: 1fr 1fr;
            min-height: 496px;
        }

        /* ===== SECTIONS ===== */
        .editor-section,
        .output-section {
            padding: 10px;
            display: flex;
            flex-direction: column;
        }

        .editor-section {
            border-right: 1px solid var(--border-soft);
        }

        /* ===== TITLES ===== */
        .section-title {
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 14px;
            color: var(--text-title);
            letter-spacing: 0.2px;
        }

:root {
--editor-lines: 12;
--editor-line-height: 22.4px;
}
/* Desktop view - 17 lines */
@media (min-width: 721px) {
    :root {
        --editor-lines: 17;
    }
	.autosave-indicator {
		bottom: +480px;

    }
}
/* ===== EDITOR WITH LINE NUMBERS ===== */
.editor-wrapper {
    flex: 1 1 auto;
height: calc(var(--editor-lines) * var(--editor-line-height));
max-height: calc(var(--editor-lines) * var(--editor-line-height));
    min-height: 240px;
    display: flex;
    position: relative;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    background: var(--bg-editor);
    overflow: hidden !important;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Line numbers column */
#lineNumbers {
    width: 40px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border-soft);
    padding: 8px 4px 8px 4px;
    font-family: 'Cascadia', "JetBrains Mono", "Fira Code", monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    text-align: right;
    user-select: none;
    overflow-y: hidden;
    overflow-x: hidden;
    white-space: pre;
    height: 100%;
}

/* Hide scrollbar on line numbers but keep functionality */
#lineNumbers::-webkit-scrollbar {
    width: 0;
    display: none;
}

/* Code area wrapper */
.code-area {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#codeEditor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-family: 'Cascadia', "JetBrains Mono", "Fira Code", monospace;
    font-size: 14px;
    line-height: 1.6;
    padding: 8px;
    padding-left: 8px;
    border: none;
    background: transparent;
    color: transparent;
    resize: none;
    outline: none;
    z-index: 2;
    caret-color: var(--text-main);
    white-space: pre;
    overflow-x: auto;
    overflow-y: auto;
    min-height: 240px;
}

#highlightLayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 8px;
    padding-left: 8px;
    font-family: 'Cascadia', "JetBrains Mono", "Fira Code", monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main);
    pointer-events: none;
    white-space: pre;
    word-wrap: normal;
    overflow-x: auto;
    overflow-y: auto;
    z-index: 1;
    min-height: 240px;
}
#codeEditor,
#highlightLayer {
overflow-y: auto;
overflow-x: auto;
}
#lineNumbers,
#codeEditor,
#highlightLayer {
box-sizing: border-box;
}
.editor-wrapper:focus-within {
    border-color: var(--accent-primary);
}

        /* ===== SYNTAX HIGHLIGHTING - DARK THEME ===== */
        :root[data-theme="dark"] #highlightLayer .keyword {
            color: #569cd6;
        }

        :root[data-theme="dark"] #highlightLayer .control {
            color: #c586c0;
        }

        :root[data-theme="dark"] #highlightLayer .type {
            color: #4ec9b0;
        }

        :root[data-theme="dark"] #highlightLayer .string {
            color: #ce9178;
        }

        :root[data-theme="dark"] #highlightLayer .number {
            color: #b5cea8;
        }

        :root[data-theme="dark"] #highlightLayer .operator {
            color: #d4d4d4;
        }

        :root[data-theme="dark"] #highlightLayer .comment {
            color: #6a9955;
            font-style: italic;
        }

        :root[data-theme="dark"] #highlightLayer .function {
            color: #dcdcaa;
        }

        :root[data-theme="dark"] #highlightLayer .variable {
            color: #9cdcfe;
        }

        :root[data-theme="dark"] #highlightLayer .constant {
            color: #4fc1ff;
        }

        /* ===== SYNTAX HIGHLIGHTING - LIGHT THEME ===== */
        :root[data-theme="light"] #highlightLayer .keyword {
            color: #0000ff;
        }

        :root[data-theme="light"] #highlightLayer .control {
            color: #af00db;
        }

        :root[data-theme="light"] #highlightLayer .type {
            color: #267f99;
        }

        :root[data-theme="light"] #highlightLayer .string {
            color: #a31515;
        }

        :root[data-theme="light"] #highlightLayer .number {
            color: #098658;
        }

        :root[data-theme="light"] #highlightLayer .operator {
            color: #000000;
        }

        :root[data-theme="light"] #highlightLayer .comment {
            color: #008000;
            font-style: italic;
        }

        :root[data-theme="light"] #highlightLayer .function {
            color: #795e26;
        }

        :root[data-theme="light"] #highlightLayer .variable {
            color: #001080;
        }

        :root[data-theme="light"] #highlightLayer .constant {
            color: #0070c1;
        }

        /* ===== OUTPUT ===== */
        #output {
            flex: 1;
			min-height:260px;
            background: var(--bg-output);
            border: 1px solid var(--border-soft);
            border-radius: 8px;
            padding: 8px;
            font-family: 'Cascadia', "JetBrains Mono", monospace;
            font-size: 14px;
            color: var(--text-main);
            overflow-y: auto;
            white-space: pre-wrap;
            max-height: 500px;
            transition: background-color 0.3s ease, border-color 0.3s ease;
        }

        /* ===== INPUT AREA ===== */
        .input-container {
            display: none;
            margin-top: 14px;
        }

        .input-container.active {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        #inputPrompt {
            color: var(--accent-warning);
            font-weight: 600;
            font-family: 'Cascadia', "JetBrains Mono", monospace;
        }

        .input-row {
            display: flex;
            gap: 10px;
        }

        #userInput {
            flex: 1;
            padding: 10px;
            background: var(--bg-editor);
            color: var(--text-main);
            border: 1px solid var(--border-soft);
            border-radius: 6px;
            font-family: 'Cascadia', "JetBrains Mono", monospace;
            transition: background-color 0.3s ease, border-color 0.3s ease;
        }

        #userInput:focus {
            outline: none;
            border-color: var(--accent-primary);
        }

        #submitInput {
            padding: 10px 20px;
            background: var(--accent-primary);
            color: white;
            border: none;
            border-radius: 6px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        #submitInput:hover {
            background: #2563eb;
        }

        /* ===== BUTTONS ===== */
        .controls {
            display: flex;
            gap: 10px;
            margin-top: 14px;
        }

        button {
            padding: 10px 16px;
            border-radius: 6px;
            border: 1px solid var(--border-soft);
            background: var(--bg-editor);
            color: var(--text-main);
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        button:hover {
            border-color: var(--accent-primary);
        }

        .btn-run {
            background: var(--accent-success);
            border: none;
            color: white;
        }

        .btn-run:hover {
            background: #059669;
        }
        .btn-check {
            background: #959595;
            border: none;
            color: white;
        }

        .btn-check:hover {
            background: #7a7a7a;
        }
        .btn-clear {
            background: var(--accent-danger);
            border: none;
            color: white;
        }

        .btn-clear:hover {
            background: #dc2626;
        }
		

        /* ===== SCROLLBAR ===== */
        ::-webkit-scrollbar {
            width: 8px;
        }

        ::-webkit-scrollbar-thumb {
            background: var(--scrollbar-thumb);
            border-radius: 4px;
            transition: background-color 0.3s ease;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--border-strong);
        }

        ::-webkit-scrollbar-track {
            background: var(--scrollbar-track);
            transition: background-color 0.3s ease;
        }

        /* ===== RESPONSIVE ===== */
        @media (max-width: 720px) {
            .main-content {
                grid-template-columns: 1fr;
            }

            .editor-section {
                border-right: none;
                border-bottom: 1px solid var(--border-soft);
            }

            .editor-wrapper {
                min-height: 260px;
            }

            #codeEditor,
            #highlightLayer {
                min-height: 260px;
            }

            /* Show hamburger menu on mobile */
            .hamburger-menu {
                display: block;
            }
            
            /* Hide secondary buttons on mobile */
            .menu-btn.secondary,
            .menu-select.secondary,
            .menu-checkbox.secondary,
            .menu-divider.secondary {
                display: none !important;
            }

            /* Compact step buttons on mobile */
            .btn-step {
                font-size: 11px;
                padding: 6px 8px;
            }

            /* Stack menu bar items better */
            .menu-bar {
                gap: 6px;
            }
        }

        /* Very small screens */
        @media (max-width: 480px) {
            .menu-btn {
                font-size: 11px;
                padding: 5px 8px;
            }

            .btn-step {
                font-size: 10px;
                padding: 5px 6px;
            }

            .theme-toggle {
                padding: 5px 8px;
                font-size: 14px;
            }
        }

.browser-warning {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.browser-warning.active {
    display: flex;
}

.warning-box {
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 24px;
    max-width: 520px;
    color: var(--text-main);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.warning-box h3 {
    margin-bottom: 14px;
    color: var(--accent-warning);
	text-align: center;
}

.warning-box p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.warning-actions {
    display: flex;
	justify-content: center;
    gap: 10px;
    margin-top: 18px;
}
.warning-actions .menu-btn {
    min-width: 140px;
    text-align: center;
}

.btn-cancel {
    background: var(--bg-editor);
    border: 1px solid var(--border-soft);
    color: var(--text-main);
}
[data-theme="light"] .browser-warning {
    background: rgba(248, 250, 252, 0.85);
}

[data-theme="light"] .warning-box {
    background: #ffffff;
    border-color: #e5e7eb;
    color: #020617;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .warning-box h3 {
    color: #d97706;
}

[data-theme="light"] .warning-box p {
    color: #1f2937;
}

[data-theme="light"] .btn-cancel {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #020617;
}
/* ===== STEP-BY-STEP CONTROLS ===== */
.step-controls {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-step {
    background: var(--accent-primary);
    border: none;
    color: white;
    padding: 8px 14px;
    font-size: 12px;
}

.btn-step:hover:not(:disabled) {
    background: #2563eb;
}

.btn-step:disabled {
    background: var(--border-soft);
    cursor: not-allowed;
    opacity: 0.5;
}

/* ===== VARIABLE PANEL ===== */
.variable-panel {
margin-top: 12px;
margin-bottom: 12px;
margin-left: 12px;
margin-right: 12px;
    background: var(--bg-output);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 12px;
    max-height: 200px;
    overflow-y: auto;
    transition: background-color 0.3s ease, border-color 0.3s ease;
	display: none;
}

.panel-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-title);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-soft);
}

#variableList {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.variable-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: var(--bg-editor);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-family: 'Cascadia', "JetBrains Mono", monospace;
    font-size: 13px;
    transition: all 0.2s ease;
}

.variable-item.changed {
    border-color: var(--accent-warning);
    background: rgba(245, 158, 11, 0.1);
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.variable-name {
    color: var(--accent-primary);
    font-weight: 600;
}

.variable-value {
    color: var(--text-main);
}

.variable-type {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 8px;
}

/* ===== LINE HIGHLIGHTING ===== */
.highlight-current-line {
    background: rgba(59, 130, 246, 0.2);
    border-left: 3px solid var(--accent-primary);
    margin-left: -3px;
    padding-left: 5px;
}

:root[data-theme="light"] .highlight-current-line {
    background: rgba(59, 130, 246, 0.15);
}
@media (min-width: 600px) {
    #variableList {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}

#nextStepBtn,
#stopStepBtn {
    display: none;
}

        /* ===== COMPACT SYNTAX MODALS ===== */
        .syntax-modal {
            position: fixed;
            inset: 0;
            background: rgba(2, 6, 23, 0.85);
            backdrop-filter: blur(6px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            padding: 20px;
        }

        .syntax-modal.active {
            display: flex;
        }

        .modal-box {
            background: var(--bg-panel);
            border: 2px solid var(--accent-error);
            border-radius: 10px;
            max-width: 550px;
            width: 100%;
            max-height: 80vh;
            overflow-y: auto;
            color: var(--text-main);
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
            animation: slideDown 0.25s ease;
        }

        .modal-box.success {
            border-color: var(--accent-success);
        }

        .modal-header {
            background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
            padding: 16px 20px;
            border-radius: 8px 8px 0 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .modal-box.success .modal-header {
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
        }

        .modal-header-left {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .modal-icon {
            font-size: 24px;
        }

        .modal-header h3 {
            margin: 0;
            color: white;
            font-size: 17px;
            font-weight: 600;
        }

        .modal-close-btn {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .modal-close-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: rotate(90deg);
        }

        .modal-content {
            padding: 18px 20px;
        }

        .error-line-info {
            background: var(--bg-editor);
            border-left: 3px solid var(--accent-error);
            padding: 8px 12px;
            border-radius: 6px;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
        }

        .error-line-info strong {
            color: var(--accent-error);
        }

        .error-title {
            font-size: 15px;
            font-weight: 600;
            color: var(--accent-error);
            margin-bottom: 10px;
        }

        .modal-box.success .error-title {
            color: var(--accent-success);
        }

        .error-desc {
            font-size: 13px;
            line-height: 1.5;
            color: var(--text-main);
            background: var(--bg-output);
            padding: 10px 12px;
            border-radius: 6px;
            margin-bottom: 12px;
            border-left: 3px solid var(--accent-warning);
        }

        .code-block {
            margin-bottom: 12px;
        }

        .code-label {
            font-size: 11px;
            font-weight: 600;
            color: var(--text-muted);
            margin-bottom: 6px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .code-box {
            background: var(--bg-editor);
            border: 1px solid var(--border-soft);
            border-radius: 6px;
            padding: 10px 12px;
            font-family: 'Cascadia', 'JetBrains Mono', monospace;
            font-size: 12px;
            line-height: 1.5;
            overflow-x: auto;
        }

        .code-box.wrong {
            border-left: 3px solid var(--accent-error);
            color: var(--accent-error);
        }

        .code-box.correct {
            border-left: 3px solid var(--accent-success);
        }

        .code-box pre {
            margin: 0;
            white-space: pre-wrap;
            word-wrap: break-word;
        }

        .modal-footer {
            padding: 14px 20px;
            border-top: 1px solid var(--border-soft);
            display: flex;
            justify-content: center;
            gap: 10px;
        }

        .modal-btn {
            padding: 12px 30px;
            border-radius: 6px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }

		.modal-btn.error {
		background: var(--accent-error);
		border-color: var(--accent-error);
		color: #ffffff;
		}

		.modal-btn.error:hover {
		filter: brightness(1.1);
		transform: translateY(-1px);
		box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
		}
		.modal-btn.error:active {
		transform: translateY(0);
		box-shadow: none;
		}

        .modal-btn.success {
            background: var(--accent-success);
            color: white;
        }

        .modal-btn.success:hover {
            background: #16a34a;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
        }

        /* Success specific styles */
        .success-message {
            text-align: center;
            padding: 20px;
        }

        .success-message p {
            font-size: 14px;
            line-height: 1.6;
            margin: 0;
        }

        /* Light theme */
        [data-theme="light"] .syntax-modal {
            background: rgba(248, 250, 252, 0.85);
        }

        [data-theme="light"] .modal-box {
            background: #ffffff;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
        }

        [data-theme="light"] .error-line-info {
            background: #f8fafc;
        }

        [data-theme="light"] .error-desc {
            background: #fef3c7;
            border-left-color: #f59e0b;
        }

        [data-theme="light"] .code-box {
            background: #f8fafc;
            border-color: #e2e8f0;
        }
		[data-theme="light"] .modal-btn.error {
		background: #fee2e2;
		border-color: #fca5a5;
		color: #7f1d1d;
		}

		[data-theme="light"] .modal-btn.error:hover {
		background: #fecaca;
		box-shadow: 0 4px 10px rgba(220, 38, 38, 0.2);
		}
.firefox-downloads {
margin: 12px 0;
display: flex;
flex-direction: column;
gap: 8px;
}
		/* ============================================
		AlgoFX Auto-Save – Refined Theme
		============================================ */

		.autosave-banner {
		background: var(--bg-editor, #f9fafb);
		color: var(--text-primary, #1f2937);
		padding: 10px 16px;
		display: flex;
		justify-content: center;
		align-items: center;
		border-bottom: 1px solid var(--border-soft, #e5e7eb);
		font-size: 13px;
		z-index: 100;
		}

		.banner-content {
		display: flex;
		align-items: center;
		gap: 16px;
		}

		.banner-actions {
		display: flex;
		gap: 8px;
		}

		.banner-btn {
		padding: 4px 12px;
		font-size: 12px;
		border-radius: 4px;
		cursor: pointer;
		border: 1px solid transparent;
		transition: background-color 0.15s ease, border-color 0.15s ease;
		}

		.btn-restore {
		background: #2563eb;
		color: white;
		border-color: #2563eb;
		}

		.btn-restore:hover {
		background: #1d4ed8;
		}

		.btn-ignore {
		background: transparent;
		color: #6b7280;
		border-color: #d1d5db;
		}

		.btn-ignore:hover {
		background: #f3f4f6;
		}

		/* ============================================
		Auto-save status indicator (IDE-style)
		============================================ */
		.autosave-indicator {
		position: absolute;
		bottom: +335px;
		right: 10px;
		font-size: 16px;
		color: #059669;
		opacity: 0;
		transition: opacity 0.25s ease;
		pointer-events: none;
		font-family: inherit;
		}

		.controls {
		position: relative;
		padding-bottom: 24px;
		}

		/* ============================================
		Dark Theme
		============================================ */
		[data-theme="dark"] .autosave-banner {
		background: #0f172a;
		color: #e5e7eb;
		}
		
/* ===== AUTOCOMPLETE BOX (BASE) ===== */
#autocompleteBox {
    position: absolute;
    border-radius: 6px;
    font-size: 13px;
    z-index: 2000;
    display: none;
    min-width: 220px;
    max-width: 350px;
    font-family: Consolas, Monaco, "Courier New", monospace;
    pointer-events: auto;
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid;
    transition: background 0.15s ease;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item.active {
    font-weight: 500;
}

/* ===== LIGHT THEME ===== */
html[data-theme="light"] #autocompleteBox {
    background: #ffffff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

html[data-theme="light"] .autocomplete-item {
    color: #000;
    border-bottom-color: #eee;
}

html[data-theme="light"] .autocomplete-item:hover {
    background: #f0f0f0;
}

html[data-theme="light"] .autocomplete-item.active {
    background: #007acc;
    color: #ffffff;
}

/* ===== DARK THEME ===== */
html[data-theme="dark"] #autocompleteBox {
    background: #1e1e1e;
    border: 1px solid #404040;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

html[data-theme="dark"] .autocomplete-item {
    color: #d4d4d4;
    border-bottom-color: #2d2d30;
}

html[data-theme="dark"] .autocomplete-item:hover {
    background: #2d2d30;
}

html[data-theme="dark"] .autocomplete-item.active {
    background: #0e639c;
    color: #ffffff;
}

.editor-wrapper {
    position: relative;
}
@media (min-width: 721px) {
	.autosave-indicator {
		bottom: +445px;
    }
}

/* ===== MENU CHECKBOX ===== */
.menu-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: var(--bg-editor);
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-main);
}

.menu-checkbox:hover {
    border-color: var(--accent-primary);
    background: var(--bg-main);
}

.menu-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 14px;
    height: 14px;
}