/* VS Code Dark Theme - Tomer Peled Portfolio */

:root {
    /* VS Code Dark+ Theme Colors */
    --bg-primary: #1e1e1e;
    --bg-secondary: #252526;
    --bg-tertiary: #2d2d30;
    --bg-hover: #2a2d2e;
    --bg-active: #37373d;
    --bg-selection: #264f78;

    --border-color: #3c3c3c;
    --border-active: #007acc;

    --text-primary: #cccccc;
    --text-secondary: #858585;
    --text-muted: #6e6e6e;

    /* Syntax Colors */
    --syntax-keyword: #569cd6;
    --syntax-type: #4ec9b0;
    --syntax-string: #ce9178;
    --syntax-number: #b5cea8;
    --syntax-comment: #6a9955;
    --syntax-variable: #9cdcfe;
    --syntax-property: #9cdcfe;
    --syntax-function: #dcdcaa;

    /* File Icons */
    --icon-ts: #3178c6;
    --icon-json: #cbcb41;
    --icon-md: #519aba;
    --icon-yml: #cb171e;

    /* Accent */
    --accent: #007acc;
    --accent-hover: #1c97ea;

    /* Status Bar */
    --status-bg: #007acc;
    --status-text: #ffffff;
}

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Main Container */
.vscode-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Title Bar */
.title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 30px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 10px;
    font-size: 12px;
    user-select: none;
    -webkit-app-region: drag;
}

.title-bar-left {
    display: flex;
    gap: 15px;
}

.menu-item {
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.menu-item:hover {
    color: var(--text-primary);
}

.title-bar-center {
    color: var(--text-secondary);
    font-size: 11px;
}

.title-bar-right {
    display: flex;
    gap: 8px;
}

.window-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.window-btn.minimize { background: #ffbd2e; }
.window-btn.maximize { background: #28c940; }
.window-btn.close { background: #ff5f57; }

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Activity Bar */
.activity-bar {
    width: 48px;
    background: var(--bg-tertiary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 5px;
}

.activity-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    position: relative;
    transition: color 0.2s;
}

.activity-icon:hover {
    color: var(--text-primary);
}

.activity-icon.active {
    color: var(--text-primary);
}

.activity-icon.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 24px;
    background: var(--accent);
}

.activity-icon svg {
    width: 24px;
    height: 24px;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    transition: width 0.2s;
}

.sidebar.collapsed {
    width: 0;
    overflow: hidden;
}

.sidebar-header {
    padding: 10px 20px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.file-tree {
    padding: 0 8px;
}

.folder {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 13px;
}

.folder-icon {
    margin-right: 6px;
    font-size: 10px;
    transition: transform 0.2s;
}

.folder.open .folder-icon {
    transform: rotate(0deg);
}

.folder:not(.open) .folder-icon {
    transform: rotate(-90deg);
}

.folder-name {
    color: var(--text-primary);
}

.file {
    display: flex;
    align-items: center;
    padding: 4px 8px 4px 24px;
    cursor: pointer;
    font-size: 13px;
    border-radius: 3px;
    transition: background 0.15s;
}

.file:hover {
    background: var(--bg-hover);
}

.file.active {
    background: var(--bg-active);
}

.file-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    font-size: 9px;
    font-weight: 600;
    border-radius: 2px;
}

.file-icon.ts {
    background: var(--icon-ts);
    color: white;
}

.file-icon.json {
    background: var(--icon-json);
    color: #1e1e1e;
}

.file-icon.md {
    background: var(--icon-md);
    color: white;
}

.file-icon.yml {
    background: var(--icon-yml);
    color: white;
}

.file-name {
    color: var(--text-primary);
}

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

/* Tabs */
.tabs {
    display: flex;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    scrollbar-width: none;
}

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

.tab {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    border-right: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    min-width: fit-content;
}

.tab:hover {
    background: var(--bg-tertiary);
}

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

.tab-icon {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    font-size: 8px;
    font-weight: 600;
    border-radius: 2px;
}

.tab-icon.ts { background: var(--icon-ts); color: white; }
.tab-icon.json { background: var(--icon-json); color: #1e1e1e; }
.tab-icon.md { background: var(--icon-md); color: white; }
.tab-icon.yml { background: var(--icon-yml); color: white; }

.tab-close {
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.15s;
    font-size: 16px;
    line-height: 1;
}

.tab:hover .tab-close,
.tab.active .tab-close {
    opacity: 0.5;
}

.tab-close:hover {
    opacity: 1 !important;
}

/* Breadcrumb */
.breadcrumb {
    padding: 4px 16px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb .separator {
    margin: 0 6px;
    color: var(--text-muted);
}

/* Code Content */
.code-content {
    flex: 1;
    overflow: auto;
    padding: 0;
}

.file-content {
    display: none;
    height: 100%;
}

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

.code-wrapper {
    display: flex;
    min-height: 100%;
}

.line-numbers {
    min-width: 50px;
    padding: 16px 10px;
    text-align: right;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    user-select: none;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
}

.code {
    flex: 1;
    padding: 16px 16px 16px 20px;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    background: var(--bg-primary);
}

.code code {
    font-family: inherit;
}

/* Syntax Highlighting */
.keyword { color: var(--syntax-keyword); }
.type { color: var(--syntax-type); }
.string { color: var(--syntax-string); }
.number { color: var(--syntax-number); }
.comment { color: var(--syntax-comment); font-style: italic; }
.variable { color: var(--syntax-variable); }
.property { color: var(--syntax-property); }
.function { color: var(--syntax-function); }

/* Markdown Syntax */
.md-h1 { color: #569cd6; font-weight: bold; font-size: 1.4em; }
.md-h2 { color: #569cd6; font-weight: bold; font-size: 1.2em; margin-top: 0.5em; }
.md-h3 { color: #569cd6; font-weight: bold; font-size: 1.1em; }
.md-quote { color: #608b4e; border-left: 3px solid #608b4e; padding-left: 10px; display: inline-block; }
.md-bold { color: #dcdcaa; }
.md-list { color: #d4d4d4; }
.md-list::before { content: ''; color: #569cd6; }
.md-code { color: #ce9178; }

/* YAML Syntax */
.yml-comment { color: var(--syntax-comment); font-style: italic; }
.yml-key { color: #9cdcfe; }
.yml-value { color: #ce9178; }
.yml-link { color: #3794ff; text-decoration: underline; cursor: pointer; }
.yml-list { color: #d4d4d4; padding-left: 10px; }
.yml-list::before { content: '- '; color: #569cd6; }

/* Terminal */
.terminal {
    height: 120px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.terminal-header {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 28px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.terminal-title {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.terminal-tabs {
    margin-left: auto;
}

.terminal-tab {
    font-size: 12px;
    color: var(--text-primary);
    padding: 4px 12px;
    background: var(--bg-primary);
    border-radius: 3px 3px 0 0;
}

.terminal-content {
    flex: 1;
    padding: 12px 16px;
    font-size: 13px;
    overflow-y: auto;
}

.terminal-line {
    display: flex;
    align-items: center;
    gap: 0;
}

.prompt {
    color: #4ec9b0;
}

.prompt-separator {
    color: var(--text-primary);
}

.prompt-path {
    color: #569cd6;
}

.prompt-symbol {
    color: var(--text-primary);
    margin-right: 8px;
}

.command {
    color: #dcdcaa;
}

.cursor {
    color: var(--accent);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.terminal-output {
    margin-top: 8px;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.terminal-output .success {
    color: #4ec9b0;
}

.terminal-output .info {
    color: #569cd6;
}

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

.status-left,
.status-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.status-item svg {
    width: 14px;
    height: 14px;
}

.status-item.branch svg {
    width: 12px;
    height: 12px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
    .sidebar {
        position: absolute;
        z-index: 100;
        height: calc(100% - 52px);
        top: 30px;
        left: 48px;
    }

    .sidebar:not(.collapsed) {
        box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
    }
}

@media (max-width: 600px) {
    .activity-bar {
        width: 40px;
    }

    .activity-icon {
        width: 40px;
        height: 40px;
    }

    .activity-icon svg {
        width: 20px;
        height: 20px;
    }

    .sidebar {
        left: 40px;
        width: 200px;
    }

    .tabs {
        flex-wrap: nowrap;
    }

    .tab {
        padding: 6px 8px;
        font-size: 11px;
    }

    .tab span:not(.tab-icon):not(.tab-close) {
        max-width: 60px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .code {
        font-size: 12px;
        padding: 12px;
    }

    .line-numbers {
        min-width: 35px;
        font-size: 11px;
        padding: 12px 6px;
    }

    .terminal {
        height: 100px;
    }

    .title-bar-center {
        display: none;
    }
}

/* Link styling in contact */
.yml-link:hover {
    color: #58a6ff;
}

/* Animation for initial load */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.file-content.active {
    animation: fadeIn 0.3s ease;
}

/* Selection color */
::selection {
    background: var(--bg-selection);
}
