/* CSS Variables for VS Code Dark Theme Colors */
:root {
    --bg-main: #1e1e1e;
    --bg-activity-bar: #333333;
    --bg-sidebar: #252526;
    --bg-topbar: #323233;
    --bg-statusbar: #007acc;
    --bg-tab: #2d2d2d;
    --bg-tab-active: #1e1e1e;
    --text-main: #cccccc;
    --text-muted: #858585;
    --border-color: #444444;
    --accent: #007acc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    /* Prevents whole-page scrolling */
}

/* App Container */
.vscode-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* Top Bar */
.top-bar {
    height: 30px;
    background-color: var(--bg-topbar);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    font-size: 13px;
    flex-shrink: 0;
}

.top-bar-menu span {
    margin-right: 15px;
    cursor: pointer;
}

.top-bar-title {
    color: #fff;
    font-size: 12px;
}

.top-bar-controls span {
    margin-left: 15px;
    cursor: pointer;
}

/* Main Workspace Flexbox */
.workspace {
    display: flex;
    flex: 1;
    /* Takes up remaining height */
    overflow: hidden;
}

/* Activity Bar (Leftmost thin bar) */
.activity-bar {
    width: 50px;
    background-color: var(--bg-activity-bar);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    flex-shrink: 0;
}

.activity-icons {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.icon {
    font-size: 24px;
    padding: 10px 0;
    text-align: center;
    cursor: pointer;
    color: var(--text-muted);
    opacity: 0.6;
}

.icon:hover {
    opacity: 1;
    color: #cd66e7;
}

.icon.active {
    opacity: 1;
    border-left: 2px solid #cd66e7;
    color: #cd66e7;
}

/* Sidebar (File Explorer) */
.sidebar {
    width: 250px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    font-size: 11px;
    padding: 10px 20px;
    letter-spacing: 1px;
}

.file-list {
    padding-left: 15px;
}

.file {
    padding: 4px 20px;
    font-size: 13px;
    cursor: pointer;
}

.file.active {
    background-color: #37373d;
    color: #fff;
}

.folder {
    padding: 4px 10px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}

/* Editor Area */
.editor-area {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    background-color: var(--bg-main);
}

/* Tabs */
.editor-tabs {
    display: flex;
    background-color: var(--bg-sidebar);
    height: 35px;
    flex-shrink: 0;
    overflow-x: auto;
}

.editor-tabs::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for tabs */

.tab {
    padding: 8px 15px;
    font-size: 13px;
    background-color: var(--bg-tab);
    color: var(--text-muted);
    border-right: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tab.active {
    background-color: var(--bg-tab-active);
    color: #fff;
    border-top: 1px solid var(--accent);
}

.tab .close {
    font-size: 16px;
    margin-left: 5px;
    opacity: 0;
}

.tab:hover .close {
    opacity: 1;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 5px 15px;
    font-size: 12px;
    color: var(--text-muted);
    border-bottom: 1px solid #333;
}

/* Code Container & Minimap Area */
.editor-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.code-view {
    display: flex;
    flex: 1;
    overflow: auto;
    font-family: 'Consolas', 'Courier New', monospace;
}

.line-numbers {
    padding: 15px;
    display: flex;
    flex-direction: column;
    color: var(--text-muted);
    text-align: right;
    user-select: none;
}

.code-content {
    padding: 15px 0;
    flex: 1;
    color: #d4d4d4;
    font-size: 14px;
    line-height: 1.5;
}

/* Right Minimap */
.minimap {
    width: 100px;
    background-color: var(--bg-main);
    border-left: 1px solid #333;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.minimap-slider {
    position: absolute;
    top: 0;
    width: 100%;
    height: 50px;
    background: rgba(121, 121, 121, 0.1);
    cursor: grab;
}

/* Bottom Status Bar */
.status-bar {
    height: 22px;
    background-color: var(--bg-statusbar);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    color: #fff;
    font-size: 12px;
    flex-shrink: 0;
}

.status-left span,
.status-right span {
    margin: 0 8px;
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .minimap {
        display: none;
        /* Hide minimap on smaller tablets/screens */
    }
}

@media (max-width: 600px) {
    .sidebar {
        display: none;
        /* Hide explorer sidebar on mobile */
    }

    .top-bar-menu,
    .top-bar-title {
        display: none;
        /* Clean up top bar on small screens */
    }

    .top-bar {
        justify-content: flex-end;
        /* Keep only window controls */
    }

    .status-right {
        display: none;
        /* Simplify status bar */
    }
}