* {
    box-sizing: border-box;
}

:root {
    --page-bg: #1e1e1e;
    --sidebar-bg: #151515;
    --deep-bg: #1b1b1b;
    --panel-bg: #252525;
    --surface-bg: #2b2b2b;
    --surface-hover: #353535;
    --border: #444444;
    --border-strong: #555555;
    --text-primary: #eeeeee;
    --text-secondary: #dddddd;
    --text-muted: #aaaaaa;
    --text-placeholder: #666666;
    --font-heading: "EB Garamond", Georgia, "Times New Roman", serif;
    --font-body: "PT Sans", "Segoe UI", Arial, sans-serif;
    --accent: #c8a76b;
    --accent-strong: #e6c988;
    --accent-soft: rgba(200, 167, 107, 0.12);
    --accent-border: rgba(200, 167, 107, 0.45);
    --sidebar-width: 200px;
    --topbar-height: 35px;
    --content-gutter: 50px;
    --mobile-gutter: 18px;
    --panel-junction-radius: 18px;
    --content-top-gutter: 42px;
    --texture-image: url("images/textures/black-paper.png");
    --texture-size: 560px;
}

body {
    margin: 0;
    background-color: var(--page-bg);
    background-image:
        linear-gradient(rgba(30, 30, 30, 0.78), rgba(30, 30, 30, 0.78)),
        var(--texture-image);
    background-size: var(--texture-size);
    color: var(--text-primary);
    font-family: var(--font-body);
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

.app {
    display: flex;
    min-height: 100vh;
}


/* =========================
   ЛЕВОЕ МЕНЮ
   ========================= */

.sidebar {
    width: 240px;
    background-color: var(--sidebar-bg);
    background-image:
        linear-gradient(rgba(21, 21, 21, 0.78), rgba(21, 21, 21, 0.78)),
        var(--texture-image);
    background-size: var(--texture-size);
    border-right: 1px solid var(--border);
    padding: 25px 15px;
}

.sidebar h1 {
    text-align: center;
    margin-bottom: 40px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar button {
    width: 100%;
    padding: 14px;
    background-color: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: 6px;
    text-align: left;
    font-size: 16px;
    cursor: pointer;
}

.sidebar button:hover {
    background-color: var(--surface-bg);
}

.sidebar nav > button,
.menu-dropdown > button {
    align-items: center;
    gap: 10px;
}

.nav-icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
}


/* =========================
   ОСНОВНОЙ КОНТЕНТ
   ========================= */

.content {
    flex: 1;
    padding: 50px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 20px;
    margin: -18px 0 18px;
    color: var(--text-muted);
    font-size: 14px;
}

.breadcrumbs:empty {
    display: none;
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

.breadcrumb-separator {
    color: var(--text-placeholder);
}

.breadcrumb-current {
    color: var(--text-secondary);
}

.content > section > h2,
.content > section > .home-content > h2 {
    font-size: 36px;
    margin-top: 0;
}

/* =========================
   ВЫПАДАЮЩЕЕ МЕНЮ
   ========================= */

.menu-dropdown {
    position: relative;
}

.menu-dropdown > button {
    width: 100%;
}


/* Обычное меню Фракций */

.dropdown-content {
    display: none;

    position: absolute;

    left: 0;
    top: 100%;

    width: 100%;

    background-color: var(--deep-bg);

    border: 1px solid var(--border);
    border-radius: 8px;

    padding: 8px;

    z-index: 100;
}

.dropdown-content button {
    width: 100%;

    padding: 12px;

    background-color: transparent;
    color: var(--text-secondary);

    border: none;
    border-radius: 6px;

    text-align: left;

    font-size: 15px;

    cursor: pointer;
}

.dropdown-content button:hover {
    background-color: var(--surface-bg);
}

/* =========================
   РАСЫ
   ========================= */

/* =========================
   ТИПОГРАФИКА

   Заголовки — EB Garamond, интерфейс — PT Sans.
   Основной текст разделов (--prose-font) — книжный EB Garamond,
   мелкие подписи и карточки остаются на PT Sans.
   ========================= */

button,
input,
select,
textarea {
    font: inherit;
}

.sidebar h1 {
    font-size: 32px;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.content > section {
    --prose-font: var(--font-heading);
    --prose-size: 18px;
}

p {
    font-family: var(--prose-font, var(--font-body));
    font-size: var(--prose-size, 16px);
    line-height: 1.65;
}

.wiki-card p {
    font-family: var(--font-body);
    font-size: 14px;
}


/* =========================
   ПОЛОСА ПРОКРУТКИ
   ========================= */

::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

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

::-webkit-scrollbar-thumb {
    background-color: var(--border-strong);
    border-radius: 6px;
    border: 3px solid var(--page-bg);
}

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