:root {
    --vscode-bg: #1e1e1e;
    --vscode-header: #252526;
    --vscode-sidebar: #333333;
    --vscode-active-tab: #1e1e1e;
    --vscode-inactive-tab: #2d2d2d;
    --vscode-accent: #007acc;
    --font-mono: 'Fira Code', 'Consolas', monospace;
}

.tool-wrapper {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.header-section {
    text-align: center;
    margin-bottom: 30px;
}

.header-section h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 10px;
}

/* VS Code Window Frame */
.editor-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.vscode-window {
    background: var(--vscode-bg);
    border-radius: 8px;
    border: 1px solid #3c3c3c;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

/* VS Code Title Bar with Dots */
.vscode-titlebar {
    background: var(--vscode-header);
    padding: 8px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.window-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red {
    background: #ff5f56;
}

.dot-yellow {
    background: #ffbd2e;
}

.dot-green {
    background: #27c93f;
}

.file-tab {
    background: var(--vscode-active-tab);
    padding: 8px 20px;
    color: #cccccc;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--vscode-accent);
}

/* Precise Alignment for Editor */
.editor-container {
    display: flex;
    height: 500px;
    background: var(--vscode-bg);
}

.line-numbers {
    width: 48px;
    background: var(--vscode-bg);
    color: #858585;
    /* Important: Vertical padding must match textarea exactly */
    padding: 15px 0;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 14px;
    /* Fix font size */
    line-height: 1.5;
    /* Exact line height for sync */
    border-right: 1px solid #333;
    user-select: none;
    overflow: hidden;
}

textarea {
    flex: 1;
    background: transparent;
    color: #d4d4d4;
    /* Important: Padding must match line-numbers box */
    padding: 15px;
    border: none;
    font-family: var(--font-mono);
    font-size: 14px;
    /* Same as line-numbers */
    line-height: 1.5;
    /* Same as line-numbers */
    resize: none;
    outline: none;
    white-space: pre;
    /* Essential for alignment */
    overflow: auto;
}

/* Action Buttons */
.controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
}

.btn-vscode {
    background: var(--vscode-accent);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-vscode:hover {
    background: #0062a3;
}

.btn-reset {
    background: #444;
    color: #eee;
}

@media (max-width: 900px) {
    .editor-grid {
        grid-template-columns: 1fr;
    }
}