   * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    :root {
        --bg-primary: #0d1117;
        --bg-secondary: #161b22;
        --bg-tertiary: #21262d;
        --border-color: #30363d;
        --text-primary: #f0f6fc;
        --text-secondary: #8b949e;

        /* Brand Colors */
        --color-primary: #40A944;
        --color-primary-dark: #2d7a33;
        --color-primary-light: #4db851;
        --color-secondary: #359c3b;

        /* Accent Colors */
        --accent-blue: #58a6ff;
        --accent-green: var(--color-primary);
        --accent-red: #f85149;
        --accent-orange: #d29922;
        --accent-purple: #a855f7;
        --accent-python: #3776ab;
        --accent-java: #ed8b00;

        --debug-bg: #1f2937;
        --debug-border: #374151;
        --vh: 1vh;
    }

    [data-theme="light"] {
        --bg-primary: #ffffff;
        --bg-secondary: #f6f8fa;
        --bg-tertiary: #ffffff;
        --border-color: #d0d7de;
        --text-primary: #24292f;
        --text-secondary: #656d76;

        /* Brand Colors */
        --color-primary: #40A944;
        --color-primary-dark: #2d7a33;
        --color-primary-light: #4db851;
        --color-secondary: #359c3b;

        /* Accent Colors */
        --accent-blue: #0969da;
        --accent-green: var(--color-primary);
        --accent-red: #cf222e;
        --accent-orange: #fb8500;
        --accent-purple: #7c3aed;
        --accent-python: #3776ab;
        --accent-java: #ed8b00;

        --debug-bg: #f3f4f6;
        --debug-border: #d1d5db;
    }

    /* ==================== BASE LAYOUT ==================== */

    html,
    body {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
        background: var(--bg-primary);
        color: var(--text-primary);
        height: 100vh;
        overflow: hidden;
        margin: 0;
        padding: 0;
        position: fixed;
        width: 100%;
        transition: all 0.2s ease;
    }

    .app-container {
        display: flex;
        flex-direction: column;
        height: 100vh;
        width: 100vw;
        overflow: hidden;
        position: fixed;
        top: 0;
        left: 0;
    }
.monaco-container ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
    background: transparent;
}

.monaco-container ::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.monaco-container ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    transition: all 0.2s ease;
    opacity: 0;
}

.monaco-container:hover ::-webkit-scrollbar-thumb {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.monaco-container ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

[data-theme="light"] .monaco-container ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .monaco-container:hover ::-webkit-scrollbar-thumb {
    opacity: 1;
    background: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .monaco-container ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Firefox scrollbar */
.monaco-container * {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.monaco-container:hover * {
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

[data-theme="light"] .monaco-container:hover * {
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}


    /* ==================== HEADER ==================== */

    .header {
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        padding: 8px 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 48px;
        backdrop-filter: blur(10px);
        z-index: 100;
        gap: 16px;
    }

    .logo-heading-container {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .compile-logo {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 4px 0;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        color: var(--color-primary);
        transition: all 0.3s ease;
    }

    .logo-text {
        font-size: 18px;
        font-weight: 600;
        color: var(--text-primary);
        letter-spacing: -0.02em;
    }

    .compile-logo:hover .logo-icon {
        color: var(--accent-purple);
        transform: scale(1.1);
    }

.language-heading {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline; /* Change to inline or remove display property */
}

.language-version {
    margin: 0,
    padding: 0;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.3;
    opacity: 0.8;
    display: inline; /* Make sure it's inline */
    transform: translateY(2px);
}
    .language-heading::before {
        content: '';
        width: 1px;
        height: 20px;
        background: var(--border-color);
        flex-shrink: 0;
    }

    @supports not (-webkit-background-clip: text) {
        .language-heading {
            color: var(--color-primary);
            background: none;
            -webkit-text-fill-color: initial;
        }
    }

    .header-scroll-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex: 1;
    }

    .header-controls {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-left: 40px;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }

    @media (max-width: 360px) {
        .btn {
            padding: 3px 6px;
            font-size: 10px;
            min-height: 28px;
        }

        .header {
            padding: 3px 4px;
            min-height: 36px;
        }

        .icon {
            width: 12px;
            height: 12px;
        }
    }

    /* ==================== ICONS ==================== */

    .icon {
        width: 16px;
        height: 16px;
        display: inline-block;
        vertical-align: middle;
    }

    .icon-lg {
        width: 20px;
        height: 20px;
    }

    .icon-sm {
        width: 14px;
        height: 14px;
    }

    /* ==================== BUTTONS ==================== */

    .btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        background: var(--bg-tertiary);
        color: var(--text-primary);
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.15s ease;
        text-decoration: none;
        white-space: nowrap;
    }

    .btn:hover {
        background: var(--bg-primary);
        border-color: var(--color-primary);
    }

    .btn-primary {
        background: var(--color-primary);
        border-color: var(--color-primary);
        color: white;
    }

    .btn-primary:hover {
        background: #4c8ed9;
        border-color: #4c8ed9;
    }

    .share-icon {
        width: 32px;
        height: 32px;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.2s ease;
        padding: 0;
        border: none;
        background: none;
        outline: none;
        border-radius: 0;
    }

    .share-icon:hover {
        color: var(--color-primary);
        transform: scale(1.1);
    }

    .share-icon:active {
        transform: scale(0.95);
    }

    .share-icon:focus {
        outline: none;
        border: none;
    }

    .run-btn {
        background: var(--accent-green);
        border-color: var(--accent-green);
        color: white;
    }

    .run-btn:hover:not(:disabled) {
        background: #2ea043;
        border-color: #2ea043;
    }

    .run-btn:disabled {
        opacity: 0.8;
        cursor: not-allowed;
        color: white !important;
        background: var(--accent-green) !important;
        border-color: var(--accent-green) !important;
    }

    .clear-btn {
        background: var(--accent-red);
        border-color: var(--accent-red);
        color: white;
    }

    .clear-btn:hover {
        background: #da3633;
        border-color: #da3633;
    }

    .btn-debug {
        background: var(--accent-purple);
        border-color: var(--accent-purple);
        color: white;
    }

    .btn-debug:hover {
        background: #9333ea;
        border-color: #9333ea;
    }

    .btn-debug:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        color: white !important;
    }

    .btn-debug.c-cpp {
        background: var(--accent-purple);
        border-color: var(--accent-purple);
    }

    .btn-debug.python {
        background: var(--accent-python);
        border-color: var(--accent-python);
    }

    .btn-debug.java {
        background: var(--accent-java);
        border-color: var(--accent-java);
    }

    .btn-debug.c-cpp:hover {
        background: #9333ea;
        border-color: #9333ea;
    }

    .btn-debug.python:hover {
        background: #2d5aa0;
        border-color: #2d5aa0;
    }

    .btn-debug.java:hover {
        background: #d17a00;
        border-color: #d17a00;
    }

.dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
    min-width: 36px;
}

.dropdown-btn:hover {
    background: var(--bg-primary);
    border-color: var(--color-primary);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    text-decoration: none;
}

.dropdown-item:hover {
    background: var(--bg-primary);
    color: var(--color-primary);
}

.dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

.dropdown-item:only-child {
    border-radius: 8px;
}

.dropdown-item .icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* Close dropdown when clicking outside */
.dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: none;
}

.dropdown-overlay.active {
    display: block;
}
.compilers-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.compilers-overlay.active {
    opacity: 1;
    visibility: visible;
}

.compilers-dialog {
    background: var(--bg-primary);
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.compilers-overlay.active .compilers-dialog {
    transform: scale(1);
}

.compilers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    border-bottom: 1px solid var(--border-color);
}

.compilers-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.compilers-icon {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compilers-icon .icon {
    width: 16px;
    height: 16px;
    color: white;
}

.compilers-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.compilers-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 4px 0 0 0;
}

.compilers-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 8px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compilers-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.compilers-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.compilers-search {
    padding: 20px 28px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.15s ease;
}

.search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(64, 169, 68, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.compilers-table-container {
    padding: 20px 28px;
    overflow-x: auto;
}

.compilers-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.compilers-table thead {
    background: var(--bg-secondary);
}

.compilers-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.compilers-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.compilers-table tbody tr {
    transition: all 0.15s ease;
    cursor: pointer;
}

.compilers-table tbody tr:hover {
    background: var(--bg-secondary);
}

.compilers-table tbody tr.current-compiler {
    background: rgba(64, 169, 68, 0.1);
    border-left: 4px solid var(--color-primary);
}

.compiler-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
}

.compiler-version {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 2px;
}
.compiler-title {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.compiler-description {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 2px;
    font-style: italic;
}

.compiler-id {
    color: var(--text-secondary);
    font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
    font-size: 12px;
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
}

.compiler-category {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 50px;
    text-align: center;
}
.category-web { background: rgba(255, 193, 7, 0.2); color: #f59e0b; }
.category-systems { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.category-functional { background: rgba(168, 85, 247, 0.2); color: #a855f7; }
.category-modern { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.category-classic { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.category-scripting { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.category-data { background: rgba(14, 165, 233, 0.2); color: #0ea5e9; }
.category-legacy { background: rgba(156, 163, 175, 0.2); color: #9ca3af; }
.category-special { background: rgba(139, 92, 246, 0.2); color: #8b5cf6; }
.debug-support {
    display: flex;
    align-items: center;
    gap: 6px;
}

.debug-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    min-width: 35px;
    justify-content: center;
}


.debug-supported {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.debug-not-supported {
    background: rgba(107, 114, 128, 0.2);
    color: #6b7280;
}

    .btn-loader {
        display: inline-block;
        width: 12px;
        height: 12px;
        border: 2px solid transparent;
        border-top: 2px solid var(--color-primary);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
        margin-right: 6px;
        vertical-align: middle;
    }

    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }

    /* Button feedback animations */
    .btn-debug.error-shake {
        animation: errorShake 0.5s ease-in-out;
        background: var(--accent-red) !important;
        border-color: var(--accent-red) !important;
    }

    @keyframes errorShake {

        0%,
        100% {
            transform: translateX(0);
        }

        25% {
            transform: translateX(-1px);
        }

        75% {
            transform: translateX(1px);
        }
    }

    .clear-btn.clear-flash {
        animation: clearFlash 0.4s ease-in-out;
        background: var(--accent-green) !important;
        border-color: var(--accent-green) !important;
    }

    @keyframes clearFlash {
        0% {
            transform: scale(1);
            background: var(--accent-red);
        }

        50% {
            transform: scale(1.05);
            background: var(--accent-green);
        }

        100% {
            transform: scale(1);
            background: var(--accent-red);
        }
    }

    /* ==================== MAIN CONTENT LAYOUT ==================== */

    .main-content {
        display: flex;
        flex: 1;
        overflow: hidden;
        height: calc(100vh - 48px);
        width: 100%;
    }

    .main-workspace {
        display: flex;
        flex: 1;
        overflow: hidden;
    }

    .left-panel {
        width: 50%;
        display: flex;
        flex-direction: column;
        background: var(--bg-secondary);
        border-right: 1px solid var(--border-color);
    }

    .right-panel {
        flex: 1;
        display: flex;
        flex-direction: column;
        background: var(--bg-primary);
        overflow: hidden;
    }

    .ads-panel {
        width: 300px;
        background: var(--bg-secondary);
        border-left: 1px solid var(--border-color);
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        flex-shrink: 0;
    }

    .ads-content {
        flex: 1;
        padding: 0px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: var(--border-color) transparent;
    }

    .resizer {
        width: 2px;
        background: var(--border-color);
        cursor: col-resize;
        position: relative;
        transition: background-color 0.15s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .resizer:hover,
    .resizer.resizing {
        background: var(--color-primary);
    }

    .resizer::before {
        content: '';
        position: absolute;
        width: 12px;
        height: 20px;
        border: 1px solid var(--border-color);
        border-radius: 2px;
        background: var(--bg-secondary);
        background-image:
            radial-gradient(circle at 3px 4px, var(--text-secondary) 1px, transparent 1px),
            radial-gradient(circle at 9px 4px, var(--text-secondary) 1px, transparent 1px),
            radial-gradient(circle at 3px 10px, var(--text-secondary) 1px, transparent 1px),
            radial-gradient(circle at 9px 10px, var(--text-secondary) 1px, transparent 1px),
            radial-gradient(circle at 3px 16px, var(--text-secondary) 1px, transparent 1px),
            radial-gradient(circle at 9px 16px, var(--text-secondary) 1px, transparent 1px);
        background-repeat: no-repeat;
        opacity: 0.8;
        transition: all 0.15s ease;
    }

    .resizer:hover::before,
    .resizer.resizing::before {
        opacity: 1;
        border-color: var(--color-primary);
        background: var(--bg-primary);
        background-image:
            radial-gradient(circle at 3px 4px, white 1px, transparent 1px),
            radial-gradient(circle at 9px 4px, white 1px, transparent 1px),
            radial-gradient(circle at 3px 10px, white 1px, transparent 1px),
            radial-gradient(circle at 9px 10px, white 1px, transparent 1px),
            radial-gradient(circle at 3px 16px, white 1px, transparent 1px),
            radial-gradient(circle at 9px 16px, white 1px, transparent 1px);
    }

    /* ==================== EXAMPLES BAR ==================== */

    .examples {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 21px;
        background: linear-gradient(145deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
        border-bottom: 1px solid var(--border-color);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .examples::-webkit-scrollbar {
        display: none;
    }

    .examples-label {
        color: var(--text-secondary);
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-right: 4px;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .example-btn {
        background: rgba(255, 255, 255, 0.06);
        color: var(--text-primary);
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 6px 14px;
        border-radius: 16px;
        cursor: pointer;
        font-size: 12px;
        font-weight: 500;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        backdrop-filter: blur(10px);
        position: relative;
        overflow: hidden;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .example-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        transition: left 0.5s;
    }

    .example-btn:hover::before {
        left: 100%;
    }

    .example-btn:hover {
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.2);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }


   .example-btn:active {
       transform: translateY(0);
       box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
   }

   .example-btn.active-example {
       border: 2px solid var(--accent-green);
       background: rgba(64, 169, 68, 0.1);
       color: var(--accent-green);
       font-weight: 600;
   }

   [data-theme="light"] .example-btn.active-example {
       background: rgba(64, 169, 68, 0.08);
       border-color: var(--accent-green);
   }

    [data-theme="light"] .examples {
        background: linear-gradient(145deg, #f8f9fa 0%, #ffffff 100%);
        box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.05);
    }

    [data-theme="light"] .example-btn {
        background: rgba(0, 0, 0, 0.04);
        color: var(--text-primary);
        border: 1px solid rgba(0, 0, 0, 0.08);
    }

    [data-theme="light"] .example-btn::before {
        background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
    }

    [data-theme="light"] .example-btn:hover {
        background: rgba(0, 0, 0, 0.08);
        border-color: rgba(0, 0, 0, 0.15);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    /* ==================== EDITOR SECTION ==================== */

    .editor-section {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding-top: 8px;
        padding-left: 16px;
        padding-right: 16px;
        padding-bottom: 16px;
        gap: 16px;
        overflow: hidden;
        min-height: 0;
    }

    .editor-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .editor-group.code-editor {
        flex: 1;
        min-height: 0;
    }

    .editor-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 4px;
        margin-top: 0;
        padding: 0;
        height: auto;
        min-height: 24px;
    }

    .editor-label {
        font-size: 13px;
        font-weight: 500;
        color: var(--text-primary);
        display: flex;
        align-items: center;
        gap: 6px;
    }

.monaco-container {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-primary);
    min-height: 200px;
    position: relative;
}

.monaco-container .monaco-scrollable-element > .scrollbar {
    display: none !important;
}

.monaco-container .monaco-scrollable-element > .invisible-scrollbar {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.monaco-container:hover .monaco-scrollable-element > .invisible-scrollbar {
    opacity: 1;
}

.monaco-container .monaco-editor .overflow-guard {
    border-radius: 8px;
}

.monaco-container .monaco-editor .margin,
.monaco-container .monaco-editor .monaco-editor-background {
    border-radius: 8px 0 0 8px;
}

    .input-area {
        height: 80px;
        width: 100%;
        padding: 12px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: var(--bg-primary);
        color: var(--text-primary);
        font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
        font-size: 13px;
        line-height: 1.4;
        resize: none;
        transition: all 0.15s ease;
    }

    .input-area:focus {
        outline: none;
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
    }

    .input-area::placeholder {
        color: var(--text-secondary);
    }

    .btn-ai-editor {
        background: transparent;
        border: none;
        color: var(--text-primary);
        padding: 0;
        border-radius: 0;
        font-weight: 500;
        font-size: 12px;
        transition: all 0.3s ease;
        box-shadow: none;
        line-height: 1.2;
        cursor: pointer;
    }

    .btn-ai-editor:hover {
        color: white;
        transform: none;
        box-shadow: 0 0 0 8px rgba(88, 166, 255, 0.15);
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--accent-purple) 100%);
        border-radius: 6px;
        padding: 4px 8px;
    }

    /* ==================== TERMINAL ==================== */

    .terminal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        min-height: 48px;
    }

    .terminal-title {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        font-weight: 500;
        color: var(--text-primary);
    }

    .terminal-controls {
        display: flex;
        gap: 6px;
    }

    .terminal-dot {
        width: 16px;
        height: 16px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.15s ease;
        position: relative;
    }

    .terminal-dot:hover {
        transform: scale(1.1);
    }

    .terminal-dot.close {
        background: #ff5f56;
    }

    .terminal-dot.minimize {
        background: #ffbd2e;
    }

    .terminal-dot.maximize {
        background: #27ca3f;
    }

    .terminal-dot svg {
        width: 9px;
        height: 9px;
        opacity: 1;
        transition: opacity 0.15s ease;
        fill: rgba(0, 0, 0, 0.6);
    }

    .terminal-dot:hover svg {
        opacity: 1;
        fill: rgba(0, 0, 0, 0.8);
    }

    .terminal-output {
        flex: 1;
        padding: 16px;
        background: var(--bg-primary);
        color: var(--accent-green);
        font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
        font-size: 13px;
        line-height: 1.5;
        overflow-y: auto;
        white-space: pre-wrap;
        word-wrap: break-word;
    }

    .terminal-output.error {
        color: var(--accent-red);
    }

    .terminal-output.info {
        color: var(--color-primary);
    }

    .terminal-output::-webkit-scrollbar {
        width: 0px;
        background: transparent;
    }

    .terminal-output {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    /* Terminal States */
    .terminal-minimized .terminal-controls {
        display: block;
        text-align: center;
    }

    .terminal-minimized .terminal-dot {
        margin-bottom: 8px;
    }

    .terminal-minimized .terminal-dot:last-child {
        margin-bottom: 0;
    }

    .terminal-minimized .terminal-output,
    .terminal-minimized .status-bar,
    .terminal-minimized .debug-panel {
        display: none;
    }

    .terminal-minimized .terminal-title {
        writing-mode: vertical-rl;
        text-orientation: mixed;
        font-size: 12px;
        white-space: nowrap;
    }

    .terminal-minimized .terminal-header {
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
        padding: 8px 4px;
    }

    .terminal-maximized {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        background: var(--bg-primary);
    }

    .terminal-maximized .terminal-header {
        border-bottom: 1px solid var(--border-color);
    }

    .terminal-closed .terminal-output {
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-secondary);
        font-style: italic;
    }

    .terminal-closed .status-bar,
    .terminal-closed .debug-panel {
        display: none;
    }

    /* ==================== STATUS BAR ==================== */

    .status-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 16px;
        background: var(--bg-secondary);
        border-top: 1px solid var(--border-color);
        font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
        font-size: 11px;
        color: var(--text-secondary);
        min-height: 32px;
    }

    .status-item {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    /* ==================== DEBUG PANEL ==================== */

    .debug-panel {
        display: none;
        background: var(--debug-bg);
        border-top: 1px solid var(--debug-border);
        padding: 8px 12px 12px 12px;
        min-height: 200px;
        max-height: 50vh;
        overflow-y: auto;
    }

    .debug-panel.active {
        display: block;
    }

    .debug-tabs {
        display: flex;
        gap: 8px;
        margin-bottom: 8px;
        border-bottom: 1px solid var(--debug-border);
        align-items: center;
        justify-content: space-between;
    }

    .debug-tabs-left {
        display: flex;
        gap: 8px;
    }

    .debug-tab {
        padding: 8px 16px;
        background: none;
        border: none;
        color: var(--text-secondary);
        cursor: pointer;
        border-bottom: 2px solid transparent;
        transition: all 0.15s ease;
        font-size: 13px;
    }

    .debug-tab.active {
        color: var(--accent-purple);
        border-bottom-color: var(--accent-purple);
    }

    .debug-tab:hover {
        color: var(--text-primary);
    }

    .debug-content {
        display: none;
    }

    .debug-content.active {
        display: block;
    }

    .debug-controls {
        display: flex;
        gap: 8px;
        margin-bottom: 12px;
        flex-wrap: wrap;
    }

    .debug-btn {
        padding: 6px 12px;
        border: 1px solid var(--debug-border);
        border-radius: 4px;
        background: var(--bg-tertiary);
        color: var(--text-primary);
        font-size: 12px;
        cursor: pointer;
        transition: all 0.15s ease;
    }

    .debug-btn:hover {
        background: var(--accent-purple);
        border-color: var(--accent-purple);
        color: white;
    }

    .debug-btn:disabled {
        opacity: 1 !important;
        background: var(--bg-secondary) !important;
        color: var(--text-primary) !important;
        cursor: not-allowed;
    }

    .debug-btn:disabled .btn-loader {
        border-top-color: var(--text-secondary);
    }

    .debug-help-btn {
        background: none;
        border: none;
        padding: 6px;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        width: 28px;
        height: 28px;
    }

    .debug-help-btn:hover {
        background: var(--color-primary);
        color: white;
        transform: scale(1.1);
        box-shadow: 0 2px 8px rgba(88, 166, 255, 0.3);
    }

    .breakpoints-list,
    .variables-list {
        background: var(--bg-tertiary);
        border: 1px solid var(--debug-border);
        border-radius: 4px;
        padding: 8px;
        min-height: 100px;
        font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
        font-size: 12px;
    }

    .variables-container {
        height: 400px;
        overflow-y: auto;
        overflow-x: hidden;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        background: var(--bg-secondary);
    }

    .breakpoint-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 0;
        border-bottom: 1px solid var(--debug-border);
    }

    .breakpoint-item:last-child {
        border-bottom: none;
    }

    .variable-item {
        display: flex;
        justify-content: space-between;
        padding: 2px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .stack-trace {
        background: var(--bg-tertiary);
        border: 1px solid var(--debug-border);
        border-radius: 4px;
        padding: 8px;
        min-height: 120px;
        font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
        font-size: 12px;
        white-space: pre-wrap;
        overflow-y: auto;
        max-height: 250px;
        scroll-behavior: smooth;
    }

    .debug-command-input {
        display: flex;
        gap: 8px;
        margin-top: 12px;
    }

    .debug-input {
        flex: 1;
        padding: 8px;
        border: 1px solid var(--debug-border);
        border-radius: 4px;
        background: var(--bg-tertiary);
        color: var(--text-primary);
        font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
        font-size: 12px;
    }

    .debug-input:focus {
        outline: none;
        border-color: var(--accent-purple);
    }

    .debug-info-section {
        background: var(--bg-secondary);
        padding: 10px;
        border-radius: 6px;
        margin: 8px 0;
        border-left: 3px solid var(--accent-green);
    }

    .debug-info-title {
        color: var(--color-primary);
        font-weight: 600;
        margin-bottom: 5px;
        font-size: 14px;
    }

    /* Debug Help Dialog */
    .debug-help-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .debug-help-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .debug-help-dialog {
        position: fixed;
        top: 0;
        right: -42%;
        width: 40%;
        height: 100%;
        background: var(--bg-secondary);
        border-left: 1px solid var(--border-color);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
        transition: right 0.3s ease;
        display: flex;
        flex-direction: column;
        z-index: 1001;
    }

    .debug-help-overlay.active .debug-help-dialog {
        right: 0;
    }

    .debug-help-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        background: var(--bg-tertiary);
        border-bottom: 1px solid var(--border-color);
    }

    .debug-help-title {
        font-size: 16px;
        font-weight: 600;
        color: var(--text-primary);
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .debug-help-close {
        background: none;
        border: none;
        color: var(--text-secondary);
        cursor: pointer;
        padding: 4px;
        border-radius: 4px;
        transition: all 0.15s ease;
    }

    .debug-help-close:hover {
        background: var(--accent-red);
        color: white;
    }

    .debug-help-content {
        flex: 1;
        overflow-y: auto;
        padding: 20px;
        font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
        font-size: 13px;
        line-height: 1.5;
    }

    .debug-help-section {
        margin-bottom: 24px;
    }

    .debug-help-section h3 {
        color: var(--accent-purple);
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 12px;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 4px;
    }

    .debug-command {
        display: flex;
        margin-bottom: 8px;
    }

    .debug-command-name {
        color: var(--color-primary);
        font-weight: 600;
        min-width: 120px;
        flex-shrink: 0;
    }

    .debug-command-desc {
        color: var(--text-primary);
        flex: 1;
    }

    .debug-example {
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: 4px;
        padding: 8px 12px;
        margin: 8px 0;
        color: var(--accent-green);
    }

    .debug-note {
        background: rgba(255, 193, 7, 0.1);
        border-left: 4px solid var(--accent-orange);
        padding: 8px 12px;
        margin: 8px 0;
        border-radius: 0 4px 4px 0;
        color: var(--text-primary);
        font-size: 12px;
    }

    .language-indicator {
        display: inline-block;
        padding: 2px 8px;
        border-radius: 12px;
        font-size: 11px;
        font-weight: 600;
        margin-right: 8px;
    }

    .language-indicator.c-cpp {
        background: rgba(168, 85, 247, 0.2);
        color: var(--accent-purple);
    }

    .language-indicator.python {
        background: rgba(55, 118, 171, 0.2);
        color: var(--accent-python);
    }

    .language-indicator.java {
        background: rgba(237, 139, 0, 0.2);
        color: var(--accent-java);
    }

    /* Monaco Editor Breakpoint Styles */
    .monaco-editor .margin-view-overlays .cgmr {
        background: var(--accent-red) !important;
        width: 16px !important;
        height: 16px !important;
        border-radius: 50% !important;
        margin-left: 2px !important;
        margin-top: 2px !important;
    }

    .current-debug-line {
        background-color: rgba(255, 193, 7, 0.2) !important;
    }

    [data-theme="light"] .current-debug-line {
        background-color: rgba(255, 193, 7, 0.15) !important;
    }

    .current-debug-line-glyph {
        background-color: #ffc107 !important;
        width: 16px !important;
        height: 16px !important;
        border-radius: 50% !important;
        margin-left: 2px !important;
        margin-top: 2px !important;
    }

    /* ==================== AI CHAT STYLES ==================== */

    .ai-chat-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .ai-chat-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .ai-chat-dialog {
        position: fixed;
        top: 0;
        right: -42%;
        width: 40%;
        height: 100%;
        background: var(--bg-secondary);
        border-left: 1px solid var(--border-color);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
        transition: right 0.3s ease;
        display: flex;
        flex-direction: column;
        z-index: 1001;
    }

    .ai-chat-overlay.active .ai-chat-dialog {
        right: 0;
    }

    /* AI Chat Header */
    .ai-chat-header {
        background: linear-gradient(135deg, #40A944 0%, #2d7a33 100%);
        color: white;
        padding: 16px 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .ai-chat-title-section {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .ai-chat-icon {
        width: 32px;
        height: 32px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .ai-chat-icon .icon {
        width: 16px;
        height: 16px;
        color: white;
    }

    .ai-chat-title-text h3 {
        font-weight: 600;
        font-size: 14px;
        margin: 0;
    }

    .ai-chat-status {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.8);
        margin: 0;
        margin-top: 2px;
    }

    .ai-chat-close {
        background: rgba(255, 255, 255, 0.2);
        border: none;
        padding: 6px;
        border-radius: 8px;
        color: white;
        cursor: pointer;
        transition: all 0.15s ease;
    }

    .ai-chat-close:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: scale(1.05);
    }

    /* AI Chat Content */
    .ai-chat-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        position: relative;
    }

    .ai-chat-messages {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
        background: var(--bg-primary);
    }

    .ai-chat-messages::-webkit-scrollbar {
        width: 6px;
    }

    .ai-chat-messages::-webkit-scrollbar-track {
        background: var(--bg-secondary);
        border-radius: 3px;
    }

    .ai-chat-messages::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 3px;
    }

    .ai-chat-messages::-webkit-scrollbar-thumb:hover {
        background: var(--text-secondary);
    }

    [data-theme="light"] .ai-chat-messages::-webkit-scrollbar-thumb {
        background: #d1d5db;
    }

    [data-theme="light"] .ai-chat-messages::-webkit-scrollbar-thumb:hover {
        background: #9ca3af;
    }

    /* AI Chat Welcome */
    .ai-chat-welcome {
        text-align: center;
        padding: 48px 20px 24px;
        color: var(--text-secondary);
    }

    .ai-chat-welcome-icon {
        width: 80px;
        height: 80px;
        margin: 0 auto 24px;
        background: linear-gradient(135deg, #40A944 0%, #2d7a33 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
    }

    .ai-chat-welcome-icon .icon {
        width: 40px;
        height: 40px;
    }

    .ai-chat-welcome h3 {
        color: var(--text-primary);
        margin-bottom: 12px;
        font-size: 20px;
        font-weight: 600;
    }

    .ai-chat-welcome p {
        font-size: 14px;
        line-height: 1.5;
        max-width: 320px;
        margin: 0 auto 24px;
    }

    .ai-chat-context {
        background: var(--bg-secondary);
        border-radius: 8px;
        padding: 16px;
        margin: 0 auto;
        text-align: left;
        max-width: 320px;
        border: 1px solid var(--border-color);
    }

    .context-label {
        font-size: 12px;
        font-weight: 500;
        color: var(--text-primary);
        margin-bottom: 8px;
    }

    .context-value {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        color: var(--color-primary);
        font-weight: 500;
    }

    .context-value .icon {
        width: 12px;
        height: 12px;
    }

    /* AI Chat Messages */
    .ai-chat-message {
        margin-bottom: 16px;
        display: flex;
        flex-direction: column;
        max-width: 100%;
    }

    .ai-chat-message.user {
        align-self: flex-end;
        align-items: flex-end;
    }

    .ai-chat-message.assistant {
        align-self: flex-start;
        align-items: flex-start;
    }

    .ai-chat-message-content {
        padding: 16px 20px;
        border-radius: 18px;
        font-size: 14px;
        line-height: 1.5;
        word-wrap: break-word;
        position: relative;
        white-space: normal;
    }

    .ai-chat-message.user .ai-chat-message-content {
        background: linear-gradient(135deg, #40A944 0%, #2d7a33 100%);
        color: white;
        border-bottom-right-radius: 4px;
        margin-left: auto;
        margin-right: 0;
        text-align: right;
    }

    .ai-chat-message.assistant .ai-chat-message-content {
        background: var(--bg-primary);
        color: var(--text-primary);
        border: 1px solid var(--border-color);
        border-bottom-left-radius: 4px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        max-width: 90%;
    }

.ai-chat-message-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 8px;
    opacity: 0.7;
    display: block; /* Ensure it's displayed */
    text-align: right; /* Align with message */
}

.ai-chat-message.user .ai-chat-message-time {
    color: rgba(255, 255, 255, 0.8);
    text-align: right;
}

.ai-chat-message.assistant .ai-chat-message-time {
    text-align: left;
}

    /* AI Chat Message Content Formatting */
    .ai-chat-message-content h1,
    .ai-chat-message-content h2,
    .ai-chat-message-content h3,
    .ai-chat-message-content h4,
    .ai-chat-message-content h5,
    .ai-chat-message-content h6 {
        color: var(--text-primary);
        margin: 16px 0 8px 0;
        font-weight: 600;
        line-height: 1.3;
    }

    .ai-chat-message-content h1 {
        font-size: 20px;
    }

    .ai-chat-message-content h2 {
        font-size: 18px;
        border-bottom: 2px solid var(--border-color);
        padding-bottom: 8px;
    }

    .ai-chat-message-content h3 {
        font-size: 16px;
    }

    .ai-chat-message-content h4 {
        font-size: 15px;
    }

    .ai-chat-message-content p {
        margin: 12px 0;
        line-height: 1.6;
    }

    .ai-chat-message-content p:first-child {
        margin-top: 0;
    }

    .ai-chat-message-content p:last-child {
        margin-bottom: 0;
    }

    .ai-chat-message-content ul,
    .ai-chat-message-content ol {
        margin: 12px 0;
        padding-left: 20px;
    }

    .ai-chat-message-content li {
        margin: 6px 0;
        line-height: 1.5;
    }

    .ai-chat-message-content blockquote {
        border-left: 4px solid var(--color-primary);
        margin: 12px 0;
        padding: 12px 16px;
        background: rgba(88, 166, 255, 0.1);
        border-radius: 0 8px 8px 0;
        font-style: italic;
    }

    .ai-chat-message-content table {
        border-collapse: collapse;
        width: 100%;
        margin: 12px 0;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        overflow: hidden;
    }

    .ai-chat-message-content th,
    .ai-chat-message-content td {
        border: 1px solid var(--border-color);
        padding: 8px 12px;
        text-align: left;
    }

    .ai-chat-message-content th {
        background: var(--bg-secondary);
        font-weight: 600;
    }

    .ai-chat-message-content hr {
        border: none;
        border-top: 1px solid var(--border-color);
        margin: 20px 0;
    }

    .ai-chat-message-content strong {
        font-weight: 600;
        color: var(--text-primary);
    }

    .ai-chat-message-content em {
        font-style: italic;
    }

    /* AI Chat Code Blocks */
    .ai-code-block {
        margin: 0px 0;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border: 1px solid var(--border-color);
        background: var(--bg-primary);
    }


    .ai-code-header {
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
        padding: 12px 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .ai-terminal-dots {
        display: flex;
        gap: 8px;
        align-items: center;
    }

    .ai-terminal-dots .dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
    }

    .ai-terminal-dots .dot.red {
        background: #ff5f56;
    }

    .ai-terminal-dots .dot.yellow {
        background: #ffbd2e;
    }

    .ai-terminal-dots .dot.green {
        background: #27ca3f;
    }

    .ai-terminal-dots .dot.blue {
        background: #4dd7ff;
    }

    [data-theme="light"] .ai-terminal-dots .dot.blue {
        background: #0969da;
    }

    .ai-code-language {
        color: white;
        font-weight: 600;
        font-size: 12px;
        letter-spacing: 0.5px;
    }

    .ai-code-content {
        background: #000000;
        color: #ffffff;
        padding: 20px;
        margin: 0;
        font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
        font-size: 14px;
        line-height: 1.6;
        overflow-x: auto;
        border: none;
    }

    .ai-code-content code {
        background: transparent !important;
        padding: 0 !important;
        border: none !important;
        font-family: inherit;
        font-size: inherit;
        color: inherit;
    }

    .ai-code-content .hljs-keyword {
        color: #ff6b9d;
    }

    .ai-code-content .hljs-string {
        color: #4dd7ff;
    }

    .ai-code-content .hljs-function {
        color: #ffa726;
    }

    .ai-code-content .hljs-comment {
        color: #6b7280;
    }

    .ai-code-content .hljs-number {
        color: #a855f7;
    }

    .ai-code-content .hljs-built_in {
        color: #ffa726;
    }

    [data-theme="light"] .ai-code-content {
        background: #f8f9fa;
        color: #24292f;
        border-top: 1px solid var(--border-color);
    }

    [data-theme="light"] .ai-code-header {
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    }

    /* AI Chat Inline Code */
    .ai-inline-code,
    .ai-chat-message-content code:not(pre code):not(.ai-code-content code) {
        background: rgba(88, 166, 255, 0.15);
        color: var(--color-primary);
        padding: 3px 6px;
        border-radius: 4px;
        font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
        font-size: 13px;
        border: 1px solid rgba(88, 166, 255, 0.2);
        font-weight: 500;
    }

    [data-theme="light"] .ai-inline-code,
    [data-theme="light"] .ai-chat-message-content code:not(pre code):not(.ai-code-content code) {
        background: rgba(79, 70, 229, 0.1);
        color: #4f46e5;
        border-color: rgba(79, 70, 229, 0.2);
    }

    /* AI Chat Streaming */
    .streaming-cursor {
        color: var(--color-primary);
        animation: blink 1s infinite;
        font-weight: bold;
    }

    @keyframes blink {

        0%,
        50% {
            opacity: 1;
        }

        51%,
        100% {
            opacity: 0;
        }
    }

    /* AI Chat Typing Indicator */
    .ai-chat-typing {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 18px;
        border-bottom-left-radius: 4px;
        margin-bottom: 16px;
        max-width: 85%;
    }

    .ai-chat-typing-indicator {
        display: flex;
        gap: 4px;
    }

    .ai-chat-typing-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--text-secondary);
        animation: typingDot 1.4s infinite;
    }

    .ai-chat-typing-dot:nth-child(2) {
        animation-delay: 0.2s;
    }

    .ai-chat-typing-dot:nth-child(3) {
        animation-delay: 0.4s;
    }

    @keyframes typingDot {

        0%,
        60%,
        100% {
            opacity: 0.4;
            transform: scale(1);
        }

        30% {
            opacity: 1;
            transform: scale(1.2);
        }
    }

    /* AI Chat Suggestions */
    .ai-chat-suggestions {
        border-top: 1px solid var(--border-color);
        padding: 20px;
        background: var(--bg-primary);
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        min-height: 100vh;
    }

    .suggestions-header {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 18px;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 16px;
    }

    .suggestions-header .icon {
        width: 16px;
        height: 16px;
        color: #eab308;
    }

    .suggestions-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
        min-height: 0;
    }

    .suggestion-category-items {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
    }

    .suggestion-category-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 20px 0 12px 0;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--border-color);
        position: relative;
    }

    .suggestion-category-header::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 0;
        width: 40px;
        height: 2px;
        background: linear-gradient(90deg, #7c3aed, #a855f7);
        border-radius: 1px;
    }

    .suggestion-category-header:first-child {
        margin-top: 0;
    }

    .category-icon {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #40A944, #2d7a33);
        border-radius: 8px;
        color: white;
        flex-shrink: 0;
    }

    .category-icon .icon {
        width: 14px;
        height: 14px;
    }

    .category-title {
        font-size: 14px;
        font-weight: 600;
        color: var(--text-primary);
        letter-spacing: -0.02em;
    }

    .suggestion-btn {
        width: 100%;
        text-align: left;
        padding: 16px 20px;
        font-size: 14px;
        color: var(--text-primary);
        background: var(--bg-tertiary);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        line-height: 1.5;
        position: relative;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        display: flex;
        align-items: flex-start;
        gap: 12px;
        opacity: 0;
        transform: translateY(10px);
        animation: suggestionAppear 0.4s ease forwards;
    }

    .suggestion-btn:nth-child(1) {
        animation-delay: 0.1s;
    }

    .suggestion-btn:nth-child(2) {
        animation-delay: 0.2s;
    }

    .suggestion-btn:nth-child(3) {
        animation-delay: 0.3s;
    }

    .suggestion-btn:nth-child(4) {
        animation-delay: 0.4s;
    }

    @keyframes suggestionAppear {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .suggestion-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.08), transparent);
        transition: left 0.6s ease;
    }

    .suggestion-btn::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg, #40A944, #359c3b, #2d7a33);
        transform: scaleX(0);
        transition: transform 0.3s ease;
        border-radius: 12px 12px 0 0;
    }

    .suggestion-btn:hover::before {
        left: 100%;
    }

    .suggestion-btn:hover::after {
        transform: scaleX(1);
    }

    .suggestion-btn:hover {
        background: var(--bg-secondary);
        border-color: var(--accent-purple);
        border-color: #40A944;
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(64, 169, 68, 0.15);
        color: var(--color-primary);
    }

    .suggestion-btn-icon {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        margin-top: 2px;
        opacity: 0.7;
        transition: all 0.3s ease;
    }

    .suggestion-btn:hover .suggestion-btn-icon {
        opacity: 1;
        transform: scale(1.1);
    }

    .suggestion-btn-content {
        flex: 1;
    }

    .suggestion-btn-title {
        font-weight: 600;
        margin-bottom: 4px;
        color: inherit;
    }

    .suggestion-btn-desc {
        font-size: 12px;
        color: var(--text-secondary);
        opacity: 0.8;
        line-height: 1.4;
    }
.btn-icon {
    min-width: 36px;
    padding: 6px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon .icon {
    width: 16px;
    height: 16px;
}

.btn-icon:hover {
    transform: scale(1.05);
}

    [data-theme="light"] .suggestion-btn {
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        border-color: #e2e8f0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }

    [data-theme="light"] .suggestion-btn:hover {
        background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
        border-color: #c4b5fd;
        box-shadow: 0 8px 25px rgba(124, 58, 237, 0.12);
    }

    /* AI Chat Input Container */
    .ai-chat-input-container {
        background: var(--bg-secondary);
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
        position: sticky;
        bottom: 0;
        z-index: 10;
    }

    .ai-chat-actions {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px 20px 12px 20px;
        background: var(--bg-secondary);
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        flex-shrink: 0;
        order: -1;
    }

    .action-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        font-size: 14px;
        color: var(--text-secondary);
        background: transparent;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .action-btn:hover {
        background: var(--bg-primary);
        color: var(--text-primary);
    }

    .action-btn.clear-btn:hover {
        background: rgba(248, 81, 73, 0.1);
        color: var(--accent-red);
    }

    .action-btn.suggestions-toggle-btn.active {
        background: rgba(64, 169, 68, 0.1);
        color: var(--accent-purple);
    }

    .action-btn .icon {
        width: 14px;
        height: 14px;
    }

    .ai-chat-input-wrapper {
        display: flex;
        gap: 8px;
        align-items: flex-end;
        padding: 16px 20px;
        background: var(--bg-secondary);
    }

    .ai-chat-input {
        flex: 1;
        min-height: 40px;
        max-height: 120px;
        padding: 12px 16px;
        border: 1px solid var(--border-color);
        border-radius: 20px;
        background: var(--bg-primary);
        color: var(--text-primary);
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
        font-size: 14px;
        line-height: 1.4;
        resize: none;
        outline: none;
        transition: all 0.15s ease;
    }

    .ai-chat-input:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    .ai-chat-input::placeholder {
        color: var(--text-secondary);
    }

    .ai-chat-send-btn {
        position: relative;
        width: 40px;
        height: 40px;
        border: none;
        border-radius: 50%;
        background: #9ca3af;
        color: white;
        cursor: not-allowed;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.15s ease;
        flex-shrink: 0;
    }

    .ai-chat-send-btn.active {
        background: #40A944;
        cursor: pointer;
        transform: scale(1.05);
    }

    .ai-chat-send-btn.loading {
        background: #9ca3af;
        cursor: not-allowed;
        transform: none;
    }

    .send-icon {
        width: 16px;
        height: 16px;
    }

    .loading-spinner {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .spinner {
        width: 16px;
        height: 16px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-top: 2px solid white;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

    .ai-chat-tips {
        font-size: 12px;
        color: var(--text-secondary);
        text-align: center;
        opacity: 0.8;
        padding: 0 20px 16px 20px;
        background: var(--bg-secondary);
    }

    /* ==================== RESPONSIVE DESIGN ==================== */
/* Compilers dialog responsive styles */

@media (max-width: 768px) {
   .ai-chat-send-btn {
        display: none !important;
    }

    .ai-chat-input-wrapper {
        gap: 0;
    }

    .ai-chat-input {
        flex: 1;
        width: 100%;
        border-radius: 20px;
    }
    .compilers-table thead th:nth-child(3),
    .compilers-table tbody td:nth-child(3) {
        display: none;
    }
    .compilers-dialog {
        margin: 10px;
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }

    .compilers-header {
        padding: 20px;
    }

    .compilers-title {
        font-size: 18px;
    }

    .compilers-search,
    .compilers-table-container {
        padding: 16px 20px;
    }

    .compilers-table th,
    .compilers-table td {
        padding: 12px 16px;
        font-size: 13px;
    }

    .compiler-name {
        font-size: 14px;
    }

    .compiler-version {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .ai-chat-send-btn {
        display: none !important;
    }
    .compilers-table thead th:nth-child(2),
    .compilers-table tbody td:nth-child(2),
    .compilers-table thead th:nth-child(4),
    .compilers-table tbody td:nth-child(4) {
        display: none;
    }
    .compilers-header {
        padding: 16px;
    }

    .compilers-title {
        font-size: 16px;
    }

    .compilers-subtitle {
        font-size: 13px;
    }
}

    /* Dropdown responsive styles */
    @media (max-width: 768px) {
        .dropdown-menu {
            right: -10px;
            min-width: 140px;
        }
    
        .dropdown-item {
            padding: 12px 14px;
            font-size: 14px;
        }
    
        .dropdown-btn {
            min-width: 32px;
            padding: 6px 6px;
        }
    }

    @media (max-width: 1024px) {
        .ads-panel {
            display: none;
        }

        .main-workspace {
            flex-direction: column;
        }

        .banner-content {
            flex-direction: column;
            align-items: flex-start;
            gap: 12px;
        }

        .banner-meta {
            flex-wrap: wrap;
            gap: 12px;
        }

        .banner-close {
            position: absolute;
            top: 16px;
            right: 20px;
        }

        .header {
            padding: 6px 8px;
            min-height: 44px;
            gap: 8px;
            overflow: hidden;
            width: 100%;
            box-sizing: border-box;
        }

        .header-scroll-container {
            flex: 1;
            overflow-x: auto;
            overflow-y: hidden;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            -ms-overflow-style: none;
            display: flex;
            align-items: center;
            gap: 12px;
            min-width: 0;
        }

        .header-scroll-container::-webkit-scrollbar {
            display: none;
        }

        .header-controls {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-left: 0;
            flex-shrink: 0;
            white-space: nowrap;
            min-width: max-content;
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
            white-space: nowrap;
            min-width: max-content;
        }

        .btn {
            font-size: 12px;
            flex-shrink: 0;
            white-space: nowrap;
            touch-action: manipulation;
        }

        .logo-heading-container {
            gap: 8px;
            flex-shrink: 0;
            min-width: 40px;
            align-items: center;
        }

        .btn:active {
            transform: scale(0.95);
            transition: transform 0.1s ease;
        }

        .main-content {
            flex-direction: column;
            height: calc(100vh - 44px);
            overflow: hidden;
            width: 100vw;
        }

        .left-panel {
            width: 100%;
            height: 60vh;
            min-height: 350px;
        }

        .right-panel {
            height: 40vh;
            min-height: 180px;
        }

        .resizer {
            display: none;
        }

        .examples {
            flex-wrap: nowrap;
            overflow-x: auto;
            overflow-y: hidden;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            -ms-overflow-style: none;
            gap: 6px;
            padding: 6px 12px;
        }

        .examples::-webkit-scrollbar {
            display: none;
        }

        .example-btn {
            font-size: 11px;
            padding: 5px 10px;
            flex-shrink: 0;
            white-space: nowrap;
            min-width: fit-content;
        }

        .examples-label {
            flex-shrink: 0;
            white-space: nowrap;
            margin-right: 8px;
        }

        .editor-section {
            padding: 12px;
            gap: 12px;
            height: calc(100% - 60px);
        }

        .monaco-container {
            min-height: 150px;
        }

        .input-area {
            height: 60px;
            font-size: 12px;
            position: sticky;
            bottom: 0;
            z-index: 5;
        }

        .left-panel .editor-group.code-editor {
            flex: 1;
            min-height: 150px;
        }

        .status-bar {
            flex-wrap: wrap;
            gap: 8px;
            padding: 6px 12px;
        }

        .status-item {
            font-size: 10px;
        }

        .terminal-dot {
            width: 12px;
            height: 12px;
        }

        .terminal-dot svg {
            width: 8px;
            height: 8px;
        }

        .debug-panel {
            max-height: 50vh;
        }

        .debug-help-dialog {
            width: 85%;
            right: -90%;
            height: 100vh;
            height: -webkit-fill-available;
        }

        .ai-chat-dialog {
            width: 100%;
            right: -100%;
            height: 100vh;
            height: -webkit-fill-available;
        }

        .ai-chat-welcome {
            padding: 32px 16px 20px;
        }

        .ai-chat-suggestions,
        .ai-chat-input-container {
            padding: 16px;
        }

        .ai-chat-context {
            max-width: 100%;
        }

        .suggestion-category-header {
            margin: 12px 0 6px 0;
        }

        .category-title {
            font-size: 12px;
        }

        .suggestion-btn {
            padding: 8px 12px;
            font-size: 12px;
        }

        .suggestion-btn:active {
            transform: scale(0.95);
            transition: transform 0.1s ease;
        }

        .action-btn {
            min-height: 36px;
            touch-action: manipulation;
        }

        .logo-heading-container {
            gap: 12px;
        }

        .language-heading {
            font-size: 14px;
        }

        .language-heading::before {
            height: 16px;
            margin-right: 6px;
            margin-left: 6px;
        }

        input,
        textarea,
        select {
            font-size: 16px !important;
            transform-origin: left top;
        }
    }

    @media (max-width: 1200px) and (min-width: 769px) {
        .header-scroll-container {
            overflow-x: auto;
            overflow-y: hidden;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }

        .header-scroll-container::-webkit-scrollbar {
            display: none;
        }

        .header-controls,
        .header-actions {
            flex-shrink: 0;
            min-width: max-content;
        }

        .btn {
            flex-shrink: 0;
            min-width: 80px;
        }
    }

    @media (max-width: 480px) {
        .header {
            padding: 6px 8px;
        }

        .btn {
            padding: 4px 8px;
            font-size: 11px;
        }

        .left-panel {
            min-height: 350px;
        }

        .editor-section {
            padding: 8px;
            gap: 8px;
        }

        .monaco-container {
            min-height: 120px;
        }

        .input-area {
            height: 50px;
            font-size: 11px;
        }

        .logo-text {
            display: none;
        }

        .logo-heading-container {
            gap: 8px;
        }

        .share-overlay {
            padding: 10px;
            align-items: flex-start;
            padding-top: 20px;
        }

        .share-dialog {
            width: 100%;
            max-width: none;
            margin: 0;
            max-height: calc(100vh - 40px);
            border-radius: 12px;
        }

        .share-content {
            padding: 16px;
            gap: 12px;
        }

        .share-preview {
            margin: 12px 0;
            padding: 12px;
        }

        .social-btn {
            width: 40px;
            height: 40px;
        }

        .social-btn svg {
            width: 18px;
            height: 18px;
        }

        .share-form input,
        .share-form textarea {
            font-size: 16px;
            /* Prevent zoom on iOS */
        }
    }

    /* ==================== MOBILE SPECIFIC FIXES ==================== */

    html,
    body {
        position: fixed;
        overflow: hidden;
        touch-action: pan-y;
    }

    .app-container {
        height: calc(var(--vh, 1vh) * 100);
    }

    body.chat-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    .keyboard-open {
        height: 100vh !important;
        overflow: hidden !important;
    }

    @supports (-webkit-touch-callout: none) {
        .app-container {
            height: 100vh;
            height: -webkit-fill-available;
            position: fixed;
            overflow: hidden;
        }

        html,
        body {
            position: fixed;
            overflow: hidden;
            height: 100vh;
            height: -webkit-fill-available;
        }
    }

    @media screen and (max-height: 500px) {
        .app-container {
            height: 100vh;
        }

        .main-content {
            height: calc(100vh - 48px);
            overflow: hidden;
        }

        .left-panel,
        .right-panel {
            height: 100%;
        }

        .ai-chat-dialog {
            height: 100vh;
            height: -webkit-fill-available;
        }
    }

    /* Share Dialog Styles */
    .share-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }

    .share-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .share-dialog {
        background: var(--bg-primary);
        border-radius: 12px;
        width: 100%;
        max-width: 420px;
        max-height: 90vh;
        overflow-y: auto;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        border: 1px solid var(--border-color);
        transform: scale(0.9);
        transition: transform 0.3s ease;
        display: flex;
        flex-direction: column;
    }

    .share-overlay.active .share-dialog {
        transform: scale(1);
    }

    .share-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px 24px 16px;
        border-bottom: 1px solid var(--border-color);
    }

    .share-title {
        font-size: 18px;
        font-weight: 600;
        color: var(--text-primary);
        margin: 0;
    }

    .share-close {
        background: none;
        border: none;
        color: var(--text-secondary);
        cursor: pointer;
        padding: 4px;
        border-radius: 4px;
        transition: all 0.15s ease;
    }

    .share-close:hover {
        background: var(--bg-secondary);
        color: var(--text-primary);
    }

    .share-close .icon {
        width: 16px;
        height: 16px;
    }

    .share-content {
        padding: 20px;
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .share-url-container {
        order: 3;
        margin-bottom: 16px;
    }

    .share-copy-btn {
        width: 100%;
        padding: 12px 16px;
        background: var(--color-primary);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.15s ease;
        order: 4;
        display: block;
        /* Ensure it's a block element */
        margin-bottom: 16px;
        /* Add spacing after the button */
        box-sizing: border-box;
    }

    #share-new-btn {
        width: 100%;
        padding: 12px 16px;
        background: var(--bg-tertiary);
        color: var(--text-primary);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.15s ease;
        display: block;
        margin-top: 8px;
    }

    #share-new-btn:hover {
        background: var(--bg-secondary);
        border-color: var(--color-primary);
        color: var(--color-primary);
    }

    .share-copy-btn:hover {
        background: #4c8ed9;
        transform: translateY(-1px);
    }

    .share-copy-btn:active {
        transform: translateY(0);
    }

    .share-divider {
        text-align: center;
        margin: 16px 0;
        position: relative;
        color: var(--text-secondary);
        font-size: 14px;
        order: 5;
    }

    .share-divider::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: var(--border-color);
        z-index: 1;
    }

    .share-divider span {
        background: var(--bg-primary);
        padding: 0 16px;
        position: relative;
        z-index: 2;
    }

    .share-social-buttons {
        display: flex;
        gap: 12px;
        justify-content: center;
        flex-wrap: wrap;
        order: 6;
        margin-bottom: 16px;
    }

    #share-options {
        order: 1;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    #share-result {
        order: 2;
        display: none;
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }

    #share-result.active {
        display: flex;
    }

    .share-result-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .share-form {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .share-form input,
    .share-form textarea {
        width: 100%;
        padding: 12px 16px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: var(--bg-secondary);
        color: var(--text-primary);
        font-size: 14px;
        font-family: inherit;
        outline: none;
        transition: all 0.15s ease;
        resize: vertical;
        min-height: 40px;
    }

    .share-form input:focus,
    .share-form textarea:focus {
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
    }

    .share-form textarea {
        min-height: 80px;
        max-height: 120px;
    }

    .share-url-input {
        width: 100%;
        padding: 12px 16px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        box-sizing: border-box;
        background: var(--bg-secondary);
        color: var(--text-primary);
        font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
        font-size: 14px;
        outline: none;
        transition: all 0.15s ease;
        margin-bottom: 12px;
        /* Add margin between input and button */
    }

    .share-url-input:focus {
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
    }



    .share-copy-btn:hover {
        background: #4c8ed9;
        transform: translateY(-1px);
    }

    .share-copy-btn:active {
        transform: translateY(0);
    }


    .share-divider::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: var(--border-color);
        z-index: 1;
    }

    .share-divider span {
        background: var(--bg-primary);
        padding: 0 16px;
        position: relative;
        z-index: 2;
    }


    .social-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        color: white;
    }

    .social-btn svg {
        width: 20px;
        height: 20px;
    }

    .social-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .social-btn.twitter {
        background: #1da1f2;
    }

    .social-btn.reddit {
        background: #ff4500;
    }

    .social-btn.linkedin {
        background: #0077b5;
    }

    .social-btn.telegram {
        background: #0088cc;
    }

    .social-btn.facebook {
        background: #1877f2;
    }


    /* ==================== ERROR HANDLING ==================== */

    .error-message {
        color: var(--accent-red);
        padding: 16px;
        text-align: center;
        background: rgba(248, 81, 73, 0.1);
        border: 1px solid var(--accent-red);
        border-radius: 8px;
        margin: 16px;
    }

    /* Performance optimization */
    .status-updating {
        background: var(--color-primary);
        color: white;
        animation: pulse 1s ease-in-out;
    }

    @keyframes pulse {
        0% {
            opacity: 1;
        }

        50% {
            opacity: 0.7;
        }

        100% {
            opacity: 1;
        }
    }

    /* Code Info Banner */
    .code-info-banner {
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--accent-purple) 100%);
        color: white;
        padding: 16px 20px;
        border-bottom: 1px solid var(--border-color);
        animation: slideDown 0.3s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .banner-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        max-width: 1200px;
        margin: 0 auto;
        gap: 20px;
    }

    .banner-main {
        flex: 1;
    }

    .banner-title {
        font-size: 18px;
        font-weight: 600;
        margin: 0 0 4px 0;
    }

    .banner-description {
        font-size: 14px;
        margin: 0;
        opacity: 0.9;
        line-height: 1.4;
    }

    .banner-meta {
        display: flex;
        align-items: center;
        gap: 16px;
        font-size: 12px;
        opacity: 0.8;
    }

    .banner-language,
    .banner-views,
    .banner-created {
        display: flex;
        align-items: center;
        gap: 4px;
        white-space: nowrap;
    }

    .banner-close {
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        padding: 8px;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.15s ease;
    }

    .banner-close:hover {
        background: rgba(255, 255, 255, 0.3);
    }

    .banner-close .icon {
        width: 14px;
        height: 14px;
    }

    /* Share Preview */
    .share-preview {
        margin: 16px 0;
        padding: 16px;
    }

    .share-preview h4 {
        margin: 0 0 12px 0;
        color: var(--text-primary);
        font-size: 14px;
        font-weight: 600;
    }

    .preview-card {
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: 6px;
        padding: 12px;
    }

    .preview-title {
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 6px;
        font-size: 16px;
    }

    .preview-description {
        color: var(--text-secondary);
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 8px;
    }

    .preview-meta {
        display: flex;
        gap: 12px;
        font-size: 12px;
        color: var(--text-secondary);
    }

    @media (max-width: 768px) {
        .logo-text {
            display: none !important;
        }

        .language-heading, .language-version {
            display: none !important;
        }

        .app-container {
            width: 100vw;
            overflow-x: hidden;
        }

        .run-btn,
        .clear-btn,
        .btn-debug,
        #theme-toggle,
        #download-btn,
        #copy-btn,
        #ai-chat-btn {
            min-width: 80px;
            flex-shrink: 0;
        }
    }

    .editor-loading {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        color: var(--text-secondary);
        font-family: inherit;
        flex-direction: column;
        gap: 12px;
    }

    .editor-loading-spinner {
        width: 24px;
        height: 24px;
        border: 2px solid var(--border-color);
        border-top: 2px solid var(--color-primary);
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
