:root {
    /* VS Code Dark Theme Colors */
    --bg-primary: #1e1e1e;
    --bg-secondary: #252526;
    --bg-tertiary: #2d2d30;
    --bg-hover: #2a2d2e;
    --bg-active: #37373d;
    
    --text-primary: #cccccc;
    --text-secondary: #858585;
    --text-muted: #6a6a6a;
    
    --accent-blue: #007acc;
    --accent-blue-hover: #005a9e;
    --accent-green: #4ec9b0;
    --accent-yellow: #dcdcaa;
    --accent-orange: #ce9178;
    --accent-purple: #c586c0;
    
    --border-color: #3e3e42;
    --border-active: #007acc;
    
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

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

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

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

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

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

.activity-icon.active::before {
    content: '';
    position: absolute;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-blue);
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 20px;
    height: 20px;
}

.file-tree {
    padding: 8px;
    flex: 1;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 400;
    font-family: var(--font-sans);
    line-height: 1.4;
    color: var(--text-primary);
    transition: background 0.15s ease;
    user-select: none;
}

.file-item span:not(.file-icon) {
    font-size: 13px;
    font-weight: 400;
    font-family: var(--font-sans);
    line-height: 1.4;
}

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

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

.file-icon {
    margin-right: 6px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.file-icon svg {
    width: 16px;
    height: 16px;
}

/* File type specific icon colors */
.file-item[data-file*="project"] .file-icon svg {
    color: #3178c6; /* TypeScript blue */
}

.file-item[data-file="skills"] .file-icon svg {
    color: #f1e05a; /* JSON yellow */
}

.folder-item {
    margin: 0;
    padding: 0;
}

.folder-row {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.15s ease;
    font-size: 13px;
    font-weight: 400;
    font-family: var(--font-sans);
    line-height: 1.4;
    color: var(--text-primary);
    user-select: none;
}

.folder-row span:not(.folder-toggle) {
    font-size: 13px !important;
    font-weight: 400;
    font-family: var(--font-sans);
    line-height: 1.4;
}

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

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

.folder-toggle {
    margin-right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.folder-toggle svg {
    width: 12px;
    height: 12px;
}

.folder-item.expanded .folder-toggle {
    transform: rotate(90deg);
}

.folder-icon {
    margin-right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.folder-icon svg {
    width: 16px;
    height: 16px;
}

.file-children {
    display: block;
    overflow: hidden;
    transition: max-height 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s ease;
    padding-left: 20px;
}

.folder-item:not(.expanded) .file-children {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.folder-item.expanded .file-children {
    max-height: 500px;
    opacity: 1;
    padding-top: 2px;
    padding-bottom: 2px;
}

/* Editor Container */
.editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

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

.tab-bar::-webkit-scrollbar {
    display: none;
}

.tab {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-right: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    user-select: none;
    min-width: 120px;
}

.tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tab.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-blue);
}

.tab-close {
    margin-left: 8px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    opacity: 0;
    transition: all 0.2s ease;
}

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

.tab-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Editor Content */
.editor-content {
    flex: 1;
    display: flex;
    overflow-y: auto;
    position: relative;
    align-items: stretch;
}

.editor-line-numbers {
    width: 50px;
    padding: 16px 8px;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    user-select: none;
    line-height: 1.6;
    overflow: visible;
    flex-shrink: 0;
    align-self: stretch;
}

.editor-line-numbers span {
    display: block;
    min-height: 1.6em;
    height: auto;
}

.editor-text {
    flex: 1;
    padding: 16px 24px;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.editor-text h1 {
    font-family: var(--font-sans);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.editor-text h2 {
    font-family: var(--font-sans);
    font-size: 24px;
    font-weight: 600;
    margin: 24px 0 12px 0;
    color: var(--accent-blue);
}

.editor-text h3 {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 600;
    margin: 16px 0 8px 0;
    color: var(--accent-green);
}

.editor-text p {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.editor-text a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.editor-text a:hover {
    color: var(--accent-blue-hover);
    text-decoration: underline;
}

.editor-text code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    color: var(--accent-orange);
}

.editor-text pre {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 16px 0;
    border: 1px solid var(--border-color);
}

.editor-text pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}

.editor-text ul, .editor-text ol {
    margin-left: 24px;
    margin-bottom: 12px;
}

.editor-text li {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.editor-text .keyword {
    color: var(--accent-purple);
}

.editor-text .string {
    color: var(--accent-green);
}

.editor-text .comment {
    color: var(--text-muted);
    font-style: italic;
}

.editor-text .project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.editor-text .project-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.2);
}

.editor-text .project-card h3 {
    margin-top: 0;
    color: var(--accent-blue);
}

.editor-text .project-card .tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.editor-text .project-card .tech-tag {
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--accent-green);
    border: 1px solid var(--border-color);
}

/* Terminal */
.terminal-container {
    height: 200px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: height 0.3s ease;
}

.terminal-container.collapsed {
    height: 32px;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.terminal-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 20px;
    height: 20px;
}

.terminal-content {
    flex: 1;
    padding: 12px 16px;
    font-family: var(--font-mono);
    font-size: 13px;
    overflow-y: auto;
    color: var(--text-primary);
}

.terminal-line {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.terminal-prompt {
    color: var(--accent-green);
    margin-right: 8px;
}

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

.terminal-output {
    margin-top: 8px;
}

.terminal-output .terminal-line {
    color: var(--text-secondary);
}

/* Status Bar */
.status-bar {
    height: 22px;
    background: var(--accent-blue);
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 12px;
    font-family: var(--font-mono);
    color: white;
    gap: 16px;
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.editor-text {
    animation: fadeIn 0.5s ease;
}

@keyframes typing {
    from {
        width: 0;
    }
}

.typing {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--accent-green);
    animation: typing 2s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--accent-green);
    }
}

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

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        position: absolute;
        left: 48px;
        top: 0;
        bottom: 0;
        z-index: 100;
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .editor-line-numbers {
        display: none;
    }
}

/* Smooth transitions */
* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
