
.editor-page {
    position: relative;
    z-index: var(--z-base);
    min-height: calc(100vh - 72px);
    padding-top: 72px;
    display: flex;
    flex-direction: column;
}


.editor-toolbar {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-6);
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    backdrop-filter: blur(20px);
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.toolbar-filename {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
}

.toolbar-status {
    font-size: var(--text-xs);
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.toolbar-status.saving {
    color: var(--accent-yellow);
}

.toolbar-status.saved {
    color: var(--accent-green);
}

.toolbar-actions {
    display: flex;
    gap: var(--space-3);
}


.editor-workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 1;
    min-height: calc(100vh - 72px - 60px);
    margin-top: 60px;
}


.editor-pane {
    position: relative;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-subtle);
    overflow: hidden;
}

.editor-wrapper {
    display: flex;
    height: 100%;
    overflow: hidden;
}

.line-numbers {
    width: 52px;
    padding: var(--space-4) 0;
    background: var(--bg-tertiary);
    border-right: 1px solid var(--border-subtle);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-muted);
    text-align: right;
    user-select: none;
    overflow: hidden;
}

.line-numbers span {
    display: block;
    padding-right: var(--space-4);
    height: calc(14px * 1.7);
}

.editor-textarea {
    flex: 1;
    padding: var(--space-4) var(--space-5);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.7;
    border: none;
    resize: none;
    outline: none;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
    overflow-y: auto;
    tab-size: 4;
}

.editor-textarea::placeholder {
    color: var(--text-muted);
}


.output-pane {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.25);
}

.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-5);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-subtle);
}

.output-title {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.output-actions {
    display: flex;
    gap: var(--space-2);
}

.output-action {
    padding: var(--space-1);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.output-action:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.output-body {
    flex: 1;
    padding: var(--space-4) var(--space-5);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.output-placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.output-line {
    display: block;
    padding: 1px 0;
}

.output-line.error {
    color: var(--accent-red);
}

.output-line.success {
    color: var(--accent-green);
}

.output-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-5);
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-subtle);
    min-height: 36px;
}

.output-loader {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.output-loader.hidden {
    display: none;
}

.output-meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-family: var(--font-mono);
}


.editor-shortcuts {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    padding: var(--space-4) var(--space-5);
    z-index: 30;
    max-width: 320px;
}

.shortcuts-title {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}

.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.shortcut-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    padding: 2px 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-primary);
    box-shadow: 0 1px 0 var(--border-subtle);
}

.shortcut-plus {
    color: var(--text-muted);
}

.shortcut-desc {
    margin-left: auto;
    color: var(--text-tertiary);
}


@media (max-width: 1024px) {
    .editor-workspace {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
    }

    .editor-pane {
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }

    .editor-shortcuts {
        display: none;
    }
}

@media (max-width: 768px) {
    .editor-toolbar {
        padding: var(--space-3) var(--space-4);
    }

    .toolbar-filename {
        font-size: var(--text-xs);
    }

    .toolbar-actions .btn span {
        display: none;
    }

    .line-numbers {
        width: 40px;
        font-size: 12px;
    }

    .editor-textarea {
        font-size: 13px;
        padding: var(--space-3);
    }

    .output-body {
        font-size: 12px;
        padding: var(--space-3);
    }
}