:root {
    --bg: #1e1e1e;
    --text: #d4d4d4;
    --accent: #007acc;
    --sidebar: #252526;
}

body {
    margin: 0;
    height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

/* Launcher Overlay */
.launcher-overlay {
    position: fixed;
    inset: 0;
    background: #121212;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.launcher-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    color: #000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.btn-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.btn-p { background: #000; color: #fff; border: none; padding: 12px 24px; border-radius: 6px; cursor: pointer; font-weight: bold; }
.btn-s { background: #eee; color: #000; border: none; padding: 12px 24px; border-radius: 6px; cursor: pointer; }

/* Main App Container */
#app-container {
    display: grid;
    grid-template-columns: 250px 1fr 1fr; /* The 3-Pane Layout */
    width: 100%;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    background: var(--sidebar);
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
}

.sidebar-top {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

#file-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.file-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 14px;
}

.file-item:hover { background: #37373d; }
.file-item.active { background: var(--accent); color: white; }

/* Editor & Preview */
.editor-wrapper {
    display: flex;
    background: #1e1e1e;
    border-right: 1px solid #333;
}

#line-numbers {
    width: 45px;
    padding: 10px 0;
    text-align: right;
    color: #858585;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    line-height: 24px;
    user-select: none;
}

.textarea-container {
    position: relative;
    flex: 1;
}

#editor, #highlighter {
    position: absolute;
    inset: 0;
    padding: 10px;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    line-height: 24px;
    white-space: pre-wrap;
    word-wrap: break-word;
    border: none;
    outline: none;
}

#editor {
    background: transparent;
    color: transparent;
    caret-color: white;
    z-index: 2;
    resize: none;
}

#highlighter {
    z-index: 1;
    pointer-events: none;
    color: #d4d4d4;
}

.preview-section { background: white; }
iframe { width: 100%; height: 100%; border: none; }

/* Syntax */
.hl-symbol { color: #ff79c6; font-weight: bold; }
.hl-action { color: #8be9fd; }
.hl-css { color: #bd93f9; }