/* ============================================================
   ZergWiki 2.0 — стили (десктоп)
   ============================================================ */

/* ===== ОБЩИЕ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-image: url('/horde.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    color: #fff;
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.5;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(20, 10, 35, 0.5);
    z-index: 0;
}

/* Всё поверх затемнения */
.wiki-container {
    position: relative;
    z-index: 1;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== КОНТЕЙНЕР ===== */
.wiki-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
}

/* ===== САЙДБАР ===== */
.wiki-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: rgba(25, 10, 45, 0.95);
    border-right: 1px solid #ff9f4b;
    padding: 20px;
    overflow-y: auto;
    max-height: 100vh;
    position: sticky;
    top: 0;
}

.wiki-sidebar-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 140, 61, 0.3);
    padding-bottom: 15px;
}

.wiki-logo-link {
    display: block;
    margin-bottom: 12px;
}

.wiki-logo {
    width: 200px;
    height: 200px;
    border-radius: 16px;
    display: block;
}

.wiki-title {
    color: #ff9f4b;
    font-size: 1.3rem;
    margin-bottom: 12px;
    text-align: center;
}

.wiki-home-link {
    background: rgba(35, 15, 60, 0.8);
    backdrop-filter: blur(12px);
    border: 2px solid #ff8c3d;
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: 0.3s;
    display: inline-block;
}

.wiki-home-link:hover {
    background: rgba(255, 140, 61, 0.2);
    border-color: #ffb874;
    box-shadow: 0 0 20px rgba(255, 140, 61, 0.4);
}

/* ===== МЕНЮ ===== */
.wiki-menu {
    margin-top: 15px;
}

.wiki-menu ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.wiki-menu li {
    margin-bottom: 3px;
}

/* Папки */
.menu-folder {
    color: #ff9f4b;
    font-weight: bold;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 140, 61, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    transition: 0.2s;
}

.menu-folder:hover {
    background: rgba(255, 140, 61, 0.25);
}

.menu-folder-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 0.75rem;
    opacity: 0.8;
}

.menu-folder.open .menu-folder-arrow {
    transform: rotate(90deg);
}

.menu-folder-title {
    flex: 1;
}

/* Дети папки */
.menu-children {
    padding-left: 15px;
    display: none;
    margin-top: 3px;
}

.menu-children.open {
    display: block;
}

/* Ссылки на статьи */
.menu-link {
    color: #c9a8f5;
    display: block;
    padding: 7px 12px;
    border-radius: 8px;
    transition: 0.15s;
    font-size: 0.95rem;
}

.menu-link:hover {
    background: rgba(255, 140, 61, 0.2);
    color: #ff9f4b;
}

.menu-link.active {
    background: #ff9f4b;
    color: #000;
    font-weight: bold;
}

/* ===== ПОДСВЕТКА АКТИВНОЙ ПАПКИ (в цепочке до текущей статьи) ===== */
.menu-folder.active {
    background: rgba(255, 140, 61, 0.22);
box-shadow: inset 0 0 0 2px rgba(255, 140, 61, 0.8);
}

.menu-folder.active .menu-folder-title {
    color: #ffcc80;
}

/* ===== КОНТЕНТ ===== */
.wiki-content {
    flex: 1;
    padding: 30px;
    background: rgba(20, 8, 40, 0.5);
    min-width: 0;
}

.content-box {
    background: rgba(30, 10, 50, 0.6);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(180, 130, 255, 0.3);
}

/* ===== ПОИСК ===== */
.search-form {
    margin-bottom: 25px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    background: #2a2a3e;
    border: 1px solid #ff9f4b;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #ffb874;
    box-shadow: 0 0 12px rgba(255, 140, 0, 0.3);
}

.search-input::placeholder {
    color: #777;
}

/* Результаты поиска */
.search-title {
    color: #ffcc80;
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.search-empty {
    color: #888;
    font-style: italic;
    padding: 20px;
    text-align: center;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-result-item {
    padding: 15px;
    background: rgba(25, 10, 45, 0.5);
    border-radius: 10px;
    border-left: 3px solid rgba(255, 140, 61, 0.4);
    transition: 0.2s;
}

.search-result-item:hover {
    background: rgba(255, 140, 61, 0.08);
    border-left-color: #ff9f4b;
}

.search-result-link {
    color: #ffcc80;
    font-weight: bold;
    font-size: 1.05rem;
    display: block;
    margin-bottom: 6px;
}

.search-result-link:hover {
    color: #ff9f4b;
}

.search-result-preview {
    color: #aaa;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* ===== СТАТЬЯ ===== */
.wiki-content-text {
    color: #ddd;
    font-size: 1rem;
    line-height: 1.6;
    word-wrap: break-word;
}

.wiki-content-text h1 {
    color: #ff9f4b;
    font-size: 2rem;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 140, 61, 0.4);
    text-shadow: 0 0 15px rgba(255, 140, 0, 0.3);
}

.wiki-content-text h2 {
    color: #ffcc80;
    font-size: 1.5rem;
    margin: 25px 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 140, 61, 0.3);
}

.wiki-content-text h3 {
    color: #ffcc80;
    font-size: 1.2rem;
    margin: 20px 0 10px 0;
}

.wiki-content-text p {
    margin-bottom: 12px;
}

.wiki-content-text b,
.wiki-content-text strong {
    color: #ffcc80;
}

.wiki-content-text i,
.wiki-content-text em {
    color: #c9a8f5;
}

.wiki-content-text u {
    text-decoration: underline;
    text-decoration-color: #ff9f4b;
    text-underline-offset: 3px;
}

.wiki-content-text a {
    color: #ff9f4b;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.wiki-content-text a:hover {
    color: #ffb874;
}

.wiki-content-text a:visited {
    color: #ff9f4b;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.wiki-content-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 15px 0;
}

.wiki-content-text ul,
.wiki-content-text ol {
    padding-left: 25px;
    margin: 10px 0;
}

.wiki-content-text li {
    margin-bottom: 6px;
}

.wiki-content-text blockquote {
    background: rgba(255, 140, 61, 0.08);
    border-left: 3px solid #ff9f4b;
    padding: 12px 18px;
    margin: 15px 0;
    border-radius: 0 10px 10px 0;
    color: #ffcc80;
    font-style: italic;
}

.wiki-content-text pre {
    background: #1a1a2e;
    padding: 15px 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 15px 0;
    border: 1px solid rgba(255, 140, 61, 0.2);
}

.wiki-content-text code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #ffcc80;
}

.wiki-content-text hr {
    border: none;
    border-top: 1px solid rgba(255, 140, 61, 0.3);
    margin: 25px 0;
}

/* ===== СПОЙЛЕР ===== */
.wiki-spoiler {
    margin: 15px 0;
}

.wiki-spoiler-header {
    background: linear-gradient(135deg, #ff9f4b, #ff7a2b);
    color: #1a0a05;
    font-weight: bold;
    font-size: 0.95rem;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    user-select: none;
}

.wiki-spoiler-header:hover {
    background: linear-gradient(135deg, #ffb874, #ff9f4b);
    box-shadow: 0 4px 15px rgba(255, 140, 61, 0.3);
}

.wiki-spoiler-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 0.8rem;
    opacity: 0.85;
}

.wiki-spoiler.open .wiki-spoiler-arrow {
    transform: rotate(90deg);
}

.wiki-spoiler-title {
    flex: 1;
}

.wiki-spoiler-content {
    display: none;
    margin-top: 12px;
    padding-left: 16px;
}

.wiki-spoiler.open .wiki-spoiler-content {
    display: block;
}

/* ===== ПРИВЕТСТВИЕ ===== */
.wiki-welcome {
    text-align: center;
    padding: 40px 20px;
}

.wiki-welcome h1 {
    color: #ff9f4b;
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 140, 0, 0.3);
}

.wiki-welcome p {
    color: #aaa;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* ============================================================
   ВХОД В АДМИНКУ
   ============================================================ */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: rgba(30, 10, 50, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255, 140, 61, 0.4);
    padding: 40px 35px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 0 40px rgba(255, 140, 0, 0.15);
}

.login-title {
    color: #ff9f4b;
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.login-subtitle {
    color: #aaa;
    text-align: center;
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.login-error {
    background: rgba(255, 68, 68, 0.15);
    border: 1px solid rgba(255, 68, 68, 0.5);
    color: #ffaaaa;
    padding: 10px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-label {
    color: #ddd;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-input {
    width: 100%;
    padding: 12px 14px;
    background: #2a2a3e;
    border: 1px solid #ff9f4b;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: 0.2s;
}

.login-input:focus {
    outline: none;
    border-color: #ffb874;
    box-shadow: 0 0 12px rgba(255, 140, 0, 0.3);
}

.login-btn {
    background: linear-gradient(135deg, #ff9f4b, #ff7a2b);
    color: #1a0a05;
    font-weight: bold;
    font-size: 1rem;
    padding: 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 5px;
}

.login-btn:hover {
    background: linear-gradient(135deg, #ffb874, #ff9f4b);
    box-shadow: 0 4px 15px rgba(255, 140, 61, 0.4);
    transform: translateY(-1px);
}

.login-back {
    display: block;
    text-align: center;
    color: #aaa;
    margin-top: 20px;
    font-size: 0.85rem;
    transition: 0.2s;
}

.login-back:hover {
    color: #ff9f4b;
}

/* ===== ВИДЕО В СТАТЬЯХ ===== */
.wiki-content-text video,
.m-article video {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 15px 0;
}

/* ===== КНОПКА СКАЧИВАНИЯ В СТАТЬЯХ ===== */
.wiki-content-text a.wiki-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff9f4b, #ff7a2b);
    color: #1a0a05;
    font-weight: bold;
    padding: 10px 22px;
    border-radius: 10px;
    text-decoration: none;
    transition: 0.2s ease;
    box-shadow: 0 4px 15px rgba(255, 140, 61, 0.3);
}

.wiki-content-text a.wiki-download:hover {
    background: linear-gradient(135deg, #ffb874, #ff9f4b);
    box-shadow: 0 6px 20px rgba(255, 140, 61, 0.5);
    transform: translateY(-2px);
    color: #1a0a05;
}
/* ===== ФИЛЬТР КАМНЕЙ (в статьях) ===== */
.gem-filter {
    margin: 20px 0;
    padding: 15px 20px;
    background: rgba(30, 10, 50, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(255, 140, 61, 0.3);
}

.gem-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.gem-filter-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #ffcc80;
    font-size: 0.9rem;
    font-weight: bold;
    flex: 1;
    min-width: 200px;
}

.gem-select {
    padding: 10px 14px;
    background: #2a2a3e;
    border: 1px solid rgba(255, 140, 61, 0.4);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}

.gem-select:focus {
    outline: none;
    border-color: #ffb874;
    box-shadow: 0 0 12px rgba(255, 140, 0, 0.3);
}

.gem-reset {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #aaa;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.gem-reset:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ddd;
    border-color: rgba(255, 255, 255, 0.3);
}

/* ===== ФИЛЬТР КАМНЕЙ (в стиле энчантов) ===== */
.gem-filter {
    margin: 1.5em 0 1em;
}

.gem-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    align-items: flex-end;
}

.gem-filter-label {
    display: flex;
    flex-direction: column;
    gap: 0.3em;
    font-size: 0.95em;
    color: #ddd;
}

.gem-select {
    padding: 0.5em 0.8em;
    background: rgba(20, 10, 35, 0.85);
    color: #fff;
    border: 1px solid #ff8c3d;
    border-radius: 6px;
    font-size: 0.95em;
    min-width: 200px;
    cursor: pointer;
}

.gem-select:focus {
    outline: none;
    border-color: #ffcc80;
    box-shadow: 0 0 0 2px rgba(255, 140, 61, 0.3);
}

.gem-reset {
    padding: 0.5em 1em;
    background: rgba(255, 140, 61, 0.15);
    color: #ff8c3d;
    border: 1px solid #ff8c3d;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s;
}

.gem-reset:hover {
    background: rgba(255, 140, 61, 0.3);
    color: #ffcc80;
}

/* ===== ТАБЛИЦА КАМНЕЙ ===== */
.gem-table-wrap {
    margin-top: 1em;
    overflow-x: auto;
}

.gem-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(20, 8, 40, 0.5);
    border-radius: 12px;
    overflow: hidden;
}

.gem-table thead {
    background: rgba(255, 140, 61, 0.15);
}

.gem-table th {
    padding: 12px 16px;
    text-align: left;
    color: #ffcc80;
    font-size: 0.95rem;
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 140, 61, 0.3);
}

.gem-table td {
    padding: 10px 16px;
    color: #ddd;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 140, 61, 0.1);
}

.gem-table tr:last-child td {
    border-bottom: none;
}

.gem-table tr:hover td {
    background: rgba(255, 140, 61, 0.05);
}

.gem-name {
    font-weight: bold;
}

.gem-stats {
    color: #ddd;
}

.gem-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-style: italic;
    background: rgba(20, 8, 40, 0.5);
    border-radius: 12px;
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */
@media (max-width: 700px) {
    .gem-select {
        min-width: 100%;
    }
    .gem-filter-label {
        width: 100%;
    }
    .gem-table th,
    .gem-table td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
}
/* ===== ФИЛЬТР ЗАЧАРОВАНИЙ ===== */
.ench-filter {
    margin: 1.5em 0 1em;
}

.ench-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    align-items: flex-end;
}

.ench-filter-label {
    display: flex;
    flex-direction: column;
    gap: 0.3em;
    font-size: 0.95em;
    color: #ddd;
    font-weight: bold;
}

.ench-select {
    padding: 0.5em 0.8em;
    background: rgba(20, 10, 35, 0.85);
    color: #fff;
    border: 1px solid #ff8c3d;
    border-radius: 6px;
    font-size: 0.95em;
    min-width: 200px;
    cursor: pointer;
}

.ench-select:focus {
    outline: none;
    border-color: #ffcc80;
    box-shadow: 0 0 0 2px rgba(255, 140, 61, 0.3);
}

.ench-reset {
    padding: 0.5em 1em;
    background: rgba(255, 140, 61, 0.15);
    color: #ff8c3d;
    border: 1px solid #ff8c3d;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    transition: all 0.2s;
}

.ench-reset:hover {
    background: rgba(255, 140, 61, 0.3);
    color: #ffcc80;
}

/* ===== ТАБЛИЦА ЗАЧАРОВАНИЙ ===== */
.ench-table-wrap {
    margin-top: 1em;
    overflow-x: auto;
}

.ench-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(20, 8, 40, 0.5);
    border-radius: 12px;
    overflow: hidden;
}

.ench-table thead {
    background: rgba(255, 140, 61, 0.15);
}

.ench-table th {
    padding: 12px 16px;
    text-align: left;
    color: #ffcc80;
    font-size: 0.95rem;
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 140, 61, 0.3);
    white-space: nowrap;
}

.ench-table td {
    padding: 10px 16px;
    color: #ddd;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 140, 61, 0.1);
    vertical-align: top;
}

.ench-table tr:last-child td {
    border-bottom: none;
}

.ench-table tr:hover td {
    background: rgba(255, 140, 61, 0.05);
}

.ench-name {
    font-weight: bold;
}

.ench-slot {
    white-space: nowrap;
    color: #aaa;
    font-size: 0.9em;
}

.ench-stats {
    white-space: nowrap;
    color: #ffcc80;
    font-size: 0.88em;
}

.ench-effect {
    color: #bbb;
    font-size: 0.88em;
    line-height: 1.4;
}

.ench-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-style: italic;
    background: rgba(20, 8, 40, 0.5);
    border-radius: 12px;
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */
@media (max-width: 700px) {
    .ench-select {
        min-width: 100%;
    }
    .ench-filter-label {
        width: 100%;
    }
    .ench-table th,
    .ench-table td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
}