/* Профессиональная техническая тема JEHR Network */
:root {
    /* Абсолютно черная основа */
    --bg-pure-black: #000000;
    --text-primary: #f1f5f9;
    --text-muted: #8b7fa4;
    
    /* Базовые цвета стихий */
    --element-wind: #00e5ff;   /* 风 - Голубой неон */
    --element-ice: #74b9ff;    /* 氷 - Ледяной синий */
    --element-fire: #ff7675;   /* 炎 - Огненный красный */
    --element-earth: #42ff62;  /* 地 - Земляной золотой */

    /* Дефолтные переменные (фиолетовая классика) */
    --accent-color: #a855f7;
    --bg-sidebar: #090611;
    --bg-card: #0f0a1c;
    --border-color: #2c1a4d;
}

/* ==========================================================================
   КОНКРЕТНЫЕ СТИХИЙНЫЕ ПЕРЕОПРЕДЕЛЕНИЯ ДЛЯ ВСЕЙ СТРАНИЦЫ
   ========================================================================== */

/* --- ТЕМА ВЕТРА (風 — Ju) — Применяется на page_2.html --- */
body.theme-wind {
    --accent-color: var(--element-wind);
    --bg-sidebar: #001215;
    --bg-card: #001c20;
    --border-color: #00434b;
    --text-muted: #abd9ff;
}
body.theme-wind h1, body.theme-wind h2 {
    background: linear-gradient(135deg, #00e5ff, #a0dbf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- ТЕМА ЛЬДА (氷 — Hyo) — Применяется на page_3.html --- */
body.theme-ice {
    --accent-color: var(--element-ice);
    --bg-sidebar: #050b14;
    --bg-card: #0a1324;
    --border-color: #162e54;
    --text-muted: #90caf9;
}
body.theme-ice h1, body.theme-ice h2 {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- ТЕМА ОГНЯ (炎 — En) — Применяется на page_4.html --- */
body.theme-fire {
    --accent-color: #ff5252;
    --bg-sidebar: #140505;
    --bg-card: #240a0a;
    --border-color: #541616;
    --text-muted: #ff8a80;
}
body.theme-fire h1, body.theme-fire h2 {
    /* Огненный градиент от желтого к оранжевому */
    background: linear-gradient(135deg, #ffeaa7, #ff7675, #d63031);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- ТЕМА ЗЕМЛИ (地 — Chi) — Применяется на page_5.html --- */
body.theme-earth {
    --accent-color: var(--element-earth);
    --bg-sidebar: #140e05;
    --bg-card: #24190a;
    --border-color: #543b16;
    --text-muted: #087a04;
}
body.theme-earth h1, body.theme-earth h2 {
    background: linear-gradient(135deg, #087a04, #ffb142);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   БАЗОВЫЕ КОМПОНЕНТЫ ИНТЕРФЕЙСА (ДИНАМИЧЕСКИЕ)
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-pure-black);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    line-height: 1.6;
    font-size: 1rem;
}

.doc-container {
    display: flex;
    width: 100%;
}

/* Левое боковое меню (Полностью меняет цвет фона и рамок под тему) */
.doc-sidebar {
    width: 20rem;
    background-color: var(--bg-sidebar);
    border-right: 0.0625rem solid var(--border-color);
    padding: 2.5rem 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 10;
    transition: all 0.3s ease;
}

.doc-logo {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.logo-title {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 0.125rem;
    color: var(--text-primary);
    text-transform: uppercase;
}

.logo-status {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.0625rem;
}

.doc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.nav-link, .doc-sub-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.6rem 0.8rem;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: 0.0625rem solid transparent;
}

.doc-sub-link {
    padding-left: 1.8rem;
    font-size: 0.85rem;
}

.nav-link:hover, .doc-sub-link:hover {
    color: var(--text-primary);
    background-color: var(--bg-card);
    border-color: var(--accent-color);
}

/* Основной текстовый контент */
.doc-content {
    margin-left: 20rem;
    margin-right: auto;
    flex: 1;
    padding: 4rem 5%;
    max-width: 56rem;
}

.doc-section {
    margin-bottom: 5rem;
}

h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: inline-block;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    padding-bottom: 0.4rem;
    display: block;
    border-bottom: 0.0625rem solid var(--border-color);
    transition: border-color 0.3s ease;
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
}

p {
    color: #cbd5e1;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
    text-align: justify;
}

/* Карточки описания доноров/подсекций */
.donor-block {
    background-color: var(--bg-card);
    border: 0.0625rem solid var(--border-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 1.2rem;
    position: relative;
    transition: all 0.3s ease;
}

.donor-block::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0.1875rem;
    background-color: var(--accent-color);
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

@media (max-width: 56rem) {
    body {
        flex-direction: column;
    }
    .doc-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1.5rem 1rem;
        border-right: none;
        border-bottom: 0.0625rem solid var(--border-color);
    }
    .doc-content {
        margin-left: 0;
        padding: 2rem 1rem;
        max-width: 100%;
    }
}
