/* === MAIN.CSS ===
   assets/css/main.css
   НАЗНАЧЕНИЕ: CSS переменные, dark/light тема, базовый layout, типографика
   Палитра: Bloom (теплая, мамская)
   РАЗМЕР: ~220 строк */

/* -- CSS Variables: Bloom Dark (дефолт) -- */
/* ЧИСТЫЙ темный фон (low saturation) + ЯРКИЕ чистые accent цвета */
:root {
    --bg-primary: hsl(340, 8%, 5%);
    --bg-secondary: hsl(340, 6%, 10%);
    --bg-tertiary: hsl(340, 5%, 16%);
    --text-primary: hsl(0, 0%, 95%);
    --text-secondary: hsl(0, 0%, 72%);
    --text-muted: hsl(0, 0%, 52%);
    --color-primary: hsl(340, 85%, 62%);
    --color-secondary: hsl(270, 60%, 68%);
    --color-success: hsl(155, 70%, 48%);
    --color-warning: hsl(35, 92%, 58%);
    --color-danger: hsl(0, 80%, 58%);
    --color-info: hsl(200, 75%, 58%);
    --color-primary-bg: hsla(340, 80%, 60%, 0.18);
    --card-bg: hsl(340, 6%, 12%);
    --border-color: hsl(340, 8%, 22%);
    --border-color-light: hsl(340, 5%, 15%);
    --hover-bg: hsl(340, 6%, 16%);
    --bg-input: hsl(340, 6%, 8%);
    --gradient-primary: linear-gradient(135deg, hsl(340,85%,60%), hsl(270,65%,64%));
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --font-display: 'Comfortaa', cursive;
    --font-sans: 'Nunito', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* -- Reset & Base -- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* -- Typography -- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

a {
    color: var(--color-primary);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

code, pre {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

/* -- Layout -- */
#app {
    display: flex;
    min-height: 100vh;
}

.zk-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.zk-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.zk-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.zk-content {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
}

/* -- Utility -- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-10 { gap: 10px; }
.gap-6 { gap: 6px; }
.w-full { width: 100%; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.font-mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }

/* -- Scrollbar -- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* -- Theme Toggle Button -- */
.zk-theme-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.zk-theme-btn:hover {
    background: var(--hover-bg);
}

.zk-icon-sun  { display: none; }
.zk-icon-moon { display: inline; }
html.light-theme .zk-icon-sun  { display: inline; }
html.light-theme .zk-icon-moon { display: none; }

/* -- Tabs -- */
.zk-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 10px;
}
.zk-tab {
    padding: 8px 14px;
    cursor: pointer;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    font-size: 0.85rem;
    white-space: nowrap;
}
.zk-tab:hover {
    color: var(--text-primary);
}
.zk-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* -- Reduced motion -- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* -- Focus visible -- */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
