/* TOKYO NIGHT / LAZYVIM THEME */
:root {
    /* Tokyo Night Palette */
    --bg-primary: #1a1b26;
    --bg-secondary: #16161e;
    --bg-highlight: #292e42;

    --fg-primary: #c0caf5;
    --fg-secondary: #a9b1d6;
    --fg-muted: #565f89;

    --accent-blue: #7aa2f7;
    --accent-cyan: #7dcfff;
    --accent-purple: #bb9af7;
    --accent-magenta: #ff007c;
    --accent-orange: #ff9e64;
    --accent-yellow: #e0af68;
    --accent-green: #9ece6a;
    --accent-red: #f7768e;

    --border-color: #292e42;
    --shadow-color: rgba(0, 0, 0, 0.3);

    --font-code: 'JetBrains Mono', 'Fira Code', monospace;
    --font-ui: 'Inter', system-ui, sans-serif;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--fg-primary);
    font-family: var(--font-ui);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Editor Layout Simulation */
.vim-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: 100vh;
}

/* Sidebar / File Explorer */
.vim-sidebar {
    width: 250px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--fg-secondary);
}

.sidebar-header {
    padding: 0 15px 10px;
    font-weight: bold;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
}

.file-tree {
    list-style: none;
}

.file-item {
    padding: 4px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.file-item:hover {
    background-color: var(--bg-highlight);
    color: var(--fg-primary);
}

.file-item.active {
    background-color: var(--bg-highlight);
    /* Highlight active */
    color: var(--accent-cyan);
    border-left: 2px solid var(--accent-cyan);
    padding-left: 13px;
}

.folder-icon {
    color: var(--accent-blue);
}

.html-icon {
    color: var(--accent-orange);
}

.css-icon {
    color: var(--accent-blue);
}

.md-icon {
    color: var(--accent-purple);
}

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

/* Tab Bar / Bufferline */
.buffer-line {
    background-color: var(--bg-secondary);
    display: flex;
    height: 36px;
    overflow-x: auto;
}

.buffer {
    display: flex;
    align-items: center;
    padding: 0 15px;
    background-color: var(--bg-secondary);
    color: var(--fg-muted);
    font-size: 0.85rem;
    cursor: pointer;
    border-right: 1px solid var(--bg-primary);
    min-width: 120px;
}

.buffer.active {
    background-color: var(--bg-primary);
    color: var(--fg-primary);
    border-top: 2px solid var(--accent-blue);
}

.buffer-icon {
    margin-right: 8px;
    font-size: 1rem;
}

.buffer-close {
    margin-left: auto;
    font-size: 0.8rem;
    opacity: 0;
}

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

/* Breadcrumbs */
.breadcrumbs {
    padding: 5px 15px;
    font-size: 0.8rem;
    color: var(--fg-muted);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

.sep {
    color: var(--fg-muted);
}

/* Editor Content (Scrollable) */
.editor-window {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    display: flex;
    font-family: var(--font-code);
    /* Code font for content */
}

/* Line Numbers */
.line-numbers {
    padding: 20px 10px 20px 20px;
    text-align: right;
    color: var(--fg-muted);
    user-select: none;
    font-size: 0.9rem;
    line-height: 1.6;
    border-right: 1px solid var(--bg-highlight);
    background-color: var(--bg-primary);
    min-width: 50px;
}

.content-area {
    padding: 20px 40px;
    max-width: 1000px;
    color: var(--fg-secondary);
}

/* Markdown/Content Styling imitating Syntax Highlighting */
h1 {
    color: var(--accent-blue);
    font-size: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--bg-highlight);
}

h2 {
    color: var(--accent-purple);
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

h3 {
    color: var(--accent-green);
    font-size: 1.25rem;
    margin: 1.5rem 0 0.8rem;
}

h4 {
    color: var(--accent-cyan);
    font-size: 1.1rem;
    margin: 1.2rem 0 0.5rem;
    font-weight: bold;
}

p {
    margin-bottom: 1rem;
}

strong {
    color: var(--accent-orange);
    font-weight: bold;
}

em {
    color: var(--accent-magenta);
    font-style: italic;
}

code {
    background: var(--bg-highlight);
    color: var(--accent-green);
    padding: 2px 5px;
    border-radius: 4px;
    font-family: var(--font-code);
}

.highlight-box {
    background: rgba(41, 46, 66, 0.5);
    /* bg-highlight with opacity */
    border-left: 3px solid var(--accent-yellow);
    padding: 1rem;
    margin: 1rem 0;
    color: var(--fg-secondary);
}

ul,
ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

li::marker {
    color: var(--accent-muted);
}

/* Status Line */
.status-line {
    background-color: var(--bg-secondary);
    color: var(--fg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    font-size: 0.8rem;
    font-family: var(--font-ui);
    border-top: 1px solid var(--border-color);
}

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

.status-segment {
    padding: 2px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mode-normal {
    background-color: var(--accent-blue);
    color: #000;
    font-weight: bold;
    text-transform: uppercase;
}

.git-branch {
    color: var(--accent-purple);
}

.file-type {
    color: var(--accent-cyan);
}

.cursor-pos {
    color: var(--fg-primary);
}

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

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

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

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

/* Animations & Soft Transitions */
a {
    color: var(--accent-cyan);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.3s;
}

a:hover {
    border-bottom-color: var(--accent-cyan);
}

@media (max-width: 768px) {
    .vim-sidebar {
        display: none;
    }

    .line-numbers {
        display: none;
    }
}