@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    height: 100vh;
    overflow: hidden;
}

body {
    font-family: "Inter", sans-serif;
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    background: #09090b;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.06) 0px, transparent 50%);
}

/* === Шапка (Header) === */

header {
    width: 1280px;
    max-width: 95%;
    height: 64px;
    background-color: rgba(18, 18, 22, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    margin: 16px 0 12px 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}

header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

header img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.logo-title {
    font-weight: 600;
    font-size: 16px;
    color: #ffffff;
    line-height: 1.1;
}

.logo-sub {
    font-style: italic;
    font-weight: 500;
    font-size: 11px;
    color: #6366f1;
}

.nav-list-header {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
}

.separator {
    color: rgba(255, 255, 255, 0.15);
    user-select: none;
}

.nav-header-link {
    color: #9ca3af;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s ease;
}

.nav-header-link:hover,
.nav-header-link.active {
    color: #ffffff;
}

/* Поиск */

.search {
    width: 160px;
    height: 36px;
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0 10px;
}

.search-icon {
    width: 14px;
    height: 14px;
    stroke: #6b7280;
    flex-shrink: 0;
}

.search input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: inherit;
    font-size: 12px;
    width: 100%;
}

.search input::placeholder {
    color: #6b7280;
}

.search-shortcut {
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: #9ca3af;
    font-family: inherit;
    font-size: 10px;
    font-weight: 500;
    padding: 1px 5px;
}

/* === Основной макет === */

.main-container {
    width: 1280px;
    max-width: 95%;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
    align-items: stretch;
    flex: 1;
    padding-bottom: 16px;
    min-height: 0;
}

/* === Сайдбар (Sidebar) === */

.sidebar {
    background-color: rgba(18, 18, 22, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    overflow-y: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.nav-group {
    margin-bottom: 20px;
}

.nav-title {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0.5px;
    padding: 0 10px;
    margin-bottom: 8px;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    color: #9ca3af;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 8px;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    background-color: rgba(99, 102, 241, 0.15);
    color: #ffffff;
    font-weight: 600;
    border-color: rgba(99, 102, 241, 0.25);
}

.nav-link.dropdown,
.dropdown-toggle {
    justify-content: space-between;
    cursor: pointer;
}

.link-left {
    display: flex;
    align-items: center;
}

.nav-icon {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    object-fit: contain;
}

.arrow-icon {
    width: 12px;
    height: 12px;
    stroke: #6b7280;
    transition: transform 0.2s ease;
    transform-origin: center;
}

.dropdown-toggle:not(.open) .arrow-icon {
    transform: rotate(-90deg);
}

.dropdown-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-wrapper.open {
    grid-template-rows: 1fr;
    opacity: 1;
}

.dropdown-wrapper > .sub-menu {
    overflow: hidden;
}

.sub-menu {
    list-style: none;
    margin-left: 17px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
}

.sub-link {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    color: #9ca3af;
    text-decoration: none;
    font-size: 13.3px;
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    border: 1px solid transparent;
}

.sub-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.03);
}

.sub-link.active {
    background-color: rgba(99, 102, 241, 0.15);
    color: #ffffff;
    font-weight: 600;
    border-color: rgba(99, 102, 241, 0.25);
}

/* Подвал сайдбара */

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
}

.discord-card {
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.discord-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.discord-icon {
    width: 28px;
    height: 28px;
    background-color: #5865F2;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.discord-icon svg {
    width: 16px;
    height: 16px;
}

.discord-text {
    color: #9ca3af;
    font-size: 13px;
}

.settings-btn {
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 2px;
}

.settings-btn svg {
    width: 15px;
    height: 15px;
}

/* === Контент статьи (Content Area) === */

.content {
    background-color: rgba(18, 18, 22, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 40px 52px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Хлебные крошки */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 24px;
}

.breadcrumb-icon {
    width: 15px;
    height: 15px;
    object-fit: contain;
    opacity: 0.5;
}

.breadcrumb-separator {
    color: #4b5563;
    margin: 0 2px;
}

/* Главный заголовок статьи */

.page-title {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f9fafb;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.title-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

/* Лид-текст / Вводное описание */

.description {
    font-size: 16px;
    line-height: 1.7;
    color: #d1d5db;
    margin-bottom: 36px;
    font-weight: 400;
}

/* Секции контента */

.content-section {
    margin-bottom: 32px;
}

.content-section h2 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #ffffff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    scroll-margin-top: 20px;
}

.content-section h3 {
    font-size: 17px;
    font-weight: 600;
    color: #f3f4f6;
    margin-top: 12px;
    margin-bottom: 4px;
}

.content-section p {
    font-size: 15px;
    line-height: 1.7;
    color: #9ca3af;
}

/* Маркированные списки */

.content-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.content-section ul li {
    position: relative;
    padding-left: 20px;
    font-size: 15px;
    line-height: 1.6;
    color: #d1d5db;
}

.content-section ul li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 10px;
    width: 5px;
    height: 5px;
    background-color: #6366f1;
    border-radius: 50%;
}

/* Нумерованные списки шагов */

.ordered-steps {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
    color: #d1d5db;
    font-size: 15px;
}

.ordered-steps li {
    line-height: 1.6;
}

/* Ссылки внутри текста */

.content-section ul li a,
.inline-link {
    color: #818cf8;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dotted rgba(129, 140, 248, 0.4);
    transition: all 0.15s ease;
}

.content-section ul li a:hover,
.inline-link:hover {
    color: #a5b4fc;
    border-bottom-style: solid;
    border-bottom-color: #a5b4fc;
}

/* Скриншоты и изображения */

.content-image-wrapper {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.article-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.motd-img {
    max-width: 520px;
}

/* === Стили для страницы Правил (rules.html) === */

.rules-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.rule-item {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.rule-item:hover {
    background-color: rgba(255, 255, 255, 0.035);
    border-color: rgba(99, 102, 241, 0.22);
}

.rule-text {
    font-size: 14.5px;
    line-height: 1.65;
    color: #e5e7eb;
}

.rule-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-weight: 700;
    color: #818cf8;
    background-color: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 6px;
    padding: 2px 7px;
    margin-right: 8px;
    vertical-align: middle;
}

.rule-punishment {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #9ca3af;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.07);
    flex-wrap: wrap;
}

.punishment-tag {
    background-color: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 5px;
    flex-shrink: 0;
}

/* Одиночная карточка перехода "Следующая" */

.next-page-card {
    margin-top: auto;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: flex-end;
}

.next-page-link {
    text-decoration: none;
    text-align: right;
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 20px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.next-page-link:hover {
    background-color: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.next-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.next-title {
    font-size: 15px;
    font-weight: 600;
    color: #f3f4f6;
    transition: color 0.15s ease;
}

.next-page-link:hover .next-title {
    color: #818cf8;
}

/* Двусторонняя навигация внизу статьи (Предыдущая / Следующая) */

.page-navigation {
    margin-top: auto;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.nav-page-btn {
    text-decoration: none;
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 20px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    transition: all 0.2s ease;
    min-width: 160px;
}

.prev-page {
    text-align: left;
}

.next-page {
    text-align: right;
}

.nav-page-btn:hover {
    background-color: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.nav-page-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.nav-page-title {
    font-size: 15px;
    font-weight: 600;
    color: #f3f4f6;
    transition: color 0.15s ease;
}

.nav-page-btn:hover .nav-page-title {
    color: #818cf8;
}

/* === Кастомный скроллбар (тонкий, без лагов) === */

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.content:hover::-webkit-scrollbar-thumb,
.sidebar:hover::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(129, 140, 248, 0.85) !important;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

.related-cards {
            display: flex;
            gap: 16px;
            margin-top: 16px;
            flex-wrap: wrap;
        }

        .related-card {
            display: flex;
            align-items: center;
            gap: 14px;
            background-color: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            padding: 18px 24px;
            text-decoration: none;
            color: #ffffff;
            width: 220px;
            transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
        }

        .related-card:hover {
            background-color: rgba(255, 255, 255, 0.06);
            border-color: rgba(99, 102, 241, 0.3);
            transform: translateY(-2px);
        }

        .related-card-icon {
            width: 24px;
            height: 24px;
            object-fit: contain;
            opacity: 0.8;
            flex-shrink: 0;
        }

        .related-card-title {
            font-size: 15px;
            font-weight: 600;
            color: #f3f4f6;
        }

        .demo-container {
            display: flex;
            justify-content: center;
            margin-top: 20px;
        }

        .demo-card {
            position: relative;
            background-color: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 16px;
            padding: 16px;
            display: inline-block;
            max-width: 540px;
            width: 100%;
        }

        .demo-card img {
            width: 100%;
            height: auto;
            border-radius: 10px;
            display: block;
            object-fit: cover;
        }

        .demo-badge {
            position: absolute;
            bottom: 28px;
            right: 28px;
            background-color: rgba(0, 0, 0, 0.65);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 6px;
            padding: 4px 10px;
            font-size: 12px;
            color: #d1d5db;
            display: flex;
            align-items: center;
            gap: 6px;
            user-select: none;
        }