/* =============================================================
   Gl1tchWorld — оболочка сайта: шапка и подвал.
   Вынесено отдельно от style.min.css, чтобы страницы со своей
   вёрсткой (главная) могли использовать шапку/подвал форума
   без глобальных правил вроде * { font-family: "Mazzard M" }.
   ============================================================= */

:root {
    --accent: #fc9404;
    --accent-dark: #d27a00;
    --accent-hover: #f44206;
    --accent-rgb: 252, 148, 4;
}

[data-theme="dark"] {
    --bg: #14110e;
    --section-bg: #1f1b18;
    --surface: #2a2420;
    --border: #3a322c;
    --text: #f2eee8;
    --strong: #f7f3ed;
    --muted: #8a8f9c;
    color-scheme: dark;
}

/* ---------- Сброс только внутри шапки и подвала ---------- */
header, header *, footer, footer * {
    margin: 0;
    padding: 0;
    font-family: "Mazzard M", Arial, sans-serif;
}

.wrapper {
    max-width: 1736px;
    min-width: 830px;
    padding: 0 20px;
    margin: 0 auto;
}

/* ---------- Логотип ---------- */
.logotype {
    text-decoration: none;
    display: block;
    cursor: pointer;
}
.logotype .pic {
    width: 42px;
    height: 42px;
    background-image: url(../images/server-icon.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    float: left;
}
.logotype .logo_text {
    line-height: 21px;
    padding-left: 10px;
    text-transform: uppercase;
    text-decoration: none;
    float: left;
    color: #1b1712;
    letter-spacing: 0.01em;
}
.logotype .logo_text span {
    font-weight: bold;
    display: block;
    font-size: 16px;
}
header .logotype .logo_text {
    overflow: hidden;
}

/* ---------- Шапка: сетка логотип | навигация | кнопки ---------- */
header {
    height: 120px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    padding-top: 12px;
}
header .button {
    justify-self: end;
}
header .menu-button {
    display: none;
}
header nav {
    margin-left: 40px;
}
header nav ul {
    list-style: none;
    font-size: 0px;
}
header nav ul li {
    display: inline-block;
    margin: 0 6px;
}
header nav ul li a {
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    display: block;
    padding: 16.5px 19px;
}
header nav ul li a span {
    font-size: 14px;
}
header nav ul li a * {
    color: #9095b4;
    transition: 0.1s;
}
header nav ul li a:hover * {
    color: #1b1712;
}
header nav ul li i {
    margin-right: 10px;
}
header nav ul .active {
    transition: 0s;
    background-color: #fff;
    border-radius: 12px;
    border-bottom: #e0e0e0 4px solid;
    position: relative;
}
header nav ul .active a {
    padding: 9px;
}
header nav ul .active a * {
    color: #1b1712;
}
header nav ul .active a::after {
    content: "";
    display: block;
    position: absolute;
    background-image: url(../images/header-nav.svg);
    width: 55px;
    height: 34px;
    left: calc(100% / 2 - 55px / 2);
    top: -34px;
}
header nav ul .active i {
    background-color: var(--accent);
    color: #fff;
    box-shadow: 0px 15px 25px rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    text-align: center;
    font-size: 15px;
    padding: 10px;
}

/* ---------- Кнопки в шапке ---------- */
.gg-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    grid-column: 3;
}
.gg-hdr-guest,
.gg-hdr-user {
    display: flex;
    align-items: center;
    gap: 10px;
}
.gg-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px 9px 9px;
    border-radius: 12px;
    border-bottom: 4px solid #e0e0e0;
    background: #fff;
    box-shadow: 0px 25px 45px rgba(0, 0, 0, 0.15);
    color: #1b1712;
    font-weight: bold;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    user-select: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: filter 0.2s ease, transform 0.2s ease;
}
.gg-auth-btn i {
    color: #fff;
    background-color: var(--accent);
    box-shadow: 0px 15px 25px rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    text-align: center;
    font-size: 15px;
    padding: 10px;
    width: 15px;
    height: 15px;
    line-height: 15px;
    flex: none;
}
.gg-auth-btn span {
    padding-right: 6px;
}
.gg-hdr-reg {
    background: var(--accent);
    color: #fff;
    border-bottom-color: var(--accent-hover);
}
.gg-hdr-reg i {
    background-color: rgba(255, 255, 255, 0.22);
}
.gg-hdr-reg:hover {
    color: #fff;
}
.gg-hdr-reg:hover i {
    background-color: rgba(255, 255, 255, 0.32);
}
.gg-auth-btn:hover {
    filter: brightness(0.97);
    transform: translateY(-1px);
    color: #1b1712;
}
.gg-auth-btn:hover i {
    background-color: var(--accent-hover);
}
.gg-auth-btn.gg-in {
    max-width: 240px;
}
.gg-auth-btn.gg-in span {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    text-transform: none;
}

/* ---------- Навигация: пункты и выпадающие меню ---------- */
a.gg-admin-link {
    display: none;
}
header nav ul li a b.gg-soon,
header nav ul li a .gg-soon {
    display: inline-block;
    margin-left: 8px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.05em;
    vertical-align: middle;
    color: var(--accent);
    background: rgba(0, 0, 0, 0.04);
    border-radius: 6px;
    padding: 2px 6px;
}
header nav ul.gg-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    font-size: 0;
}
header nav ul.gg-nav li.gg-li {
    display: inline-block;
    margin: 0;
    position: relative;
}
header nav ul.gg-nav li.gg-li > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 16px;
    border-radius: 12px;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    color: #9095b4;
    transition: color 0.15s ease, background 0.15s ease;
}
header nav ul.gg-nav li.gg-li > a:hover {
    color: #1b1712;
    background: rgba(144, 149, 180, 0.1);
}
header nav ul.gg-nav li.gg-li > a.active {
    color: #1b1712;
    background: #fff;
    border-radius: 12px;
    border-bottom: 4px solid #e0e0e0;
}
header nav ul.gg-nav li.gg-li > a.active i {
    background-color: var(--accent);
    color: #fff;
    border-radius: 6px;
    padding: 10px;
}
header nav ul.gg-nav li.gg-li i {
    margin-right: 0;
    font-size: 15px;
    text-align: center;
    width: 18px;
}
.gg-dd {
    position: relative;
}
.gg-dd-btn .gg-caret {
    font-size: 12px;
    margin-left: 2px;
    transition: transform 0.2s ease;
    transform: rotate(0deg);
}
.gg-dd:hover .gg-dd-btn .gg-caret {
    transform: rotate(90deg);
}
.gg-dd-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    background: #fff;
    border-radius: 14px;
    border-bottom: 4px solid #e0e0e0;
    box-shadow: 0px 25px 45px rgba(0, 0, 0, 0.18);
    padding: 8px;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}
.gg-dd:hover .gg-dd-menu,
.gg-dd.gg-open .gg-dd-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.gg-dd.gg-open .gg-dd-btn .gg-caret {
    transform: rotate(90deg);
}
.gg-dd-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    color: #1b1712;
    text-decoration: none;
    text-transform: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}
.gg-dd-menu a i {
    width: 18px;
    text-align: center;
    color: var(--accent);
    margin: 0;
}
.gg-dd-menu a:hover,
.gg-dd-menu a.active {
    background: #fff5e6;
    color: var(--accent);
}
.gg-dd-menu a.active i {
    background-color: var(--accent);
    color: #fff;
    border-radius: 6px;
    padding: 6px;
}

/* ---------- Бургер ---------- */
.button {
    width: max-content;
    background-color: #fff;
    border-radius: 12px;
    border-bottom: #e0e0e0 4px solid;
    display: block;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    padding: 9px;
    box-shadow: 0px 25px 45px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}
.button i {
    color: #fff;
    background-color: var(--accent);
    box-shadow: 0px 15px 25px rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    text-align: center;
    font-size: 15px;
    padding: 10px;
    width: 15px;
    height: 15px;
    line-height: 15px;
}

/* ---------- Подвал ---------- */
footer {
    background: #fff;
    font-size: 14px;
    width: 100%;
    position: relative;
    flex: 0 0 auto;
}
footer p {
    color: #575d79;
}
footer .wrapper {
    display: grid;
    background-color: #fff;
    grid-auto-columns: 1fr;
    grid-template-columns: auto 1fr 1fr 1fr auto;
    gap: 40px 40px;
    padding: 40px 20px;
}
footer .copyright {
    line-height: 19px;
}
footer .copyright .copy {
    font-weight: bold;
    color: #1b1712;
    margin-bottom: 16px;
}
footer .nav a {
    font-size: 14px;
    line-height: 25px;
    color: #575d79;
    text-decoration: none;
    display: block;
    width: max-content;
}
footer .nav .active {
    transition: 0s;
    font-weight: bold;
    color: #1b1712;
}
footer .nav :hover {
    color: #1b1712;
}
footer .social {
    z-index: 1;
    position: relative;
    text-align: right;
}
footer .social .social-icon {
    border-radius: 6px;
    display: inline-block;
    margin-left: 10px;
}
footer .social .social-icon a {
    display: inline-block;
    text-align: center;
}
footer .social .social-icon a i {
    margin: 9px;
    color: #fff;
    font-size: 16px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
}
.social-vk {
    background: linear-gradient(90deg, #647ae8 0%, #54a3f5 104.25%);
    box-shadow: 0px 15px 45px rgba(96, 130, 234, 0.25);
}
.social-discord {
    background: linear-gradient(180deg, #8b30ff 0%, #7a97ff 100%);
    box-shadow: 0px 15px 45px rgba(132, 88, 255, 0.25);
}

/* ---------- Тёмная тема ---------- */
html:not([data-theme="dark"]):not([data-theme="midnight"]):not([data-theme="dim"]) footer {
    background: transparent;
}
html:not([data-theme="dark"]):not([data-theme="midnight"]):not([data-theme="dim"]) footer .wrapper {
    border-radius: 28px 28px 0 0;
    margin-top: 40px;
    box-shadow: 0 -12px 34px rgba(20, 15, 10, 0.06);
}
[data-theme="dark"] footer,
[data-theme="dark"] footer .wrapper {
    background-color: #1f1b18;
}
[data-theme="dark"] footer {
    background: transparent;
}
[data-theme="dark"] footer .wrapper {
    border-radius: 28px 28px 0 0;
    margin-top: 40px;
    color: #b8b2a9;
}
[data-theme="dark"] footer a {
    color: #f2eee8;
}
[data-theme="dark"] footer a:hover {
    color: var(--accent);
}
[data-theme="dark"] .copyright .copy {
    color: #f2eee8;
}
[data-theme="dark"] header nav ul li a * {
    color: #9aa0b8;
}
[data-theme="dark"] header nav ul li a:hover * {
    color: #fff;
}
[data-theme="dark"] header nav ul .active {
    background-color: #2a2420;
    border-bottom-color: #3a322c;
}
[data-theme="dark"] header nav ul .active a * {
    color: #fff;
}
[data-theme="dark"] header .logotype .logo_text {
    color: #f2eee8;
}
[data-theme="dark"] .button {
    background-color: #2a2420;
    border-bottom-color: #3a322c;
}
[data-theme="dark"] .gg-auth-btn {
    border-bottom-color: #3a332b;
}
[data-theme="dark"] .gg-hdr-profile {
    background: #1f1b16;
    color: #f3ede4;
}
[data-theme="dark"] header nav ul.gg-nav li.gg-li > a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] header nav ul.gg-nav li.gg-li > a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .gg-dd-menu {
    background: #1e1c28;
    border-bottom-color: #3a3748;
}
[data-theme="dark"] .gg-dd-menu a {
    color: #cfcfe0;
}
[data-theme="dark"] .gg-dd-menu a:hover,
[data-theme="dark"] .gg-dd-menu a.active {
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
}
[data-theme="dark"] header nav ul li a .gg-soon {
    background: var(--accent);
    color: #fff;
}

/* ---------- Адаптив ---------- */
@media only screen and (max-width: 1024px) {
    header {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
    }
    header nav,
    header .lc-button {
        display: none;
    }
    header .menu-button {
        display: block;
        z-index: 101;
    }
    header #header_menu {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
        z-index: 100;
        background: #f6f6f6;
        margin: 0;
        padding: 40px;
        overflow-y: auto;
    }
    header #header_menu ul li {
        display: block;
        width: fit-content;
    }
    header #header_menu ul li a {
        font-size: 24px;
        padding: 20px 30px;
    }
    header #header_menu ul li i {
        margin-right: 20px;
        font-size: 16px;
    }
    header #header_menu .active a::after {
        display: none;
    }
    .gg-header-actions {
        display: none;
    }
    header nav ul.gg-nav {
        display: block;
        font-size: 24px;
    }
    header nav ul.gg-nav li.gg-li {
        display: block;
        width: fit-content;
        position: static;
    }
    header nav ul.gg-nav li.gg-li > a {
        font-size: 24px;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        border: none;
        color: #1b1712;
    }
    header nav ul.gg-nav li.gg-li > a:hover,
    header nav ul.gg-nav li.gg-li > a.active {
        color: #1b1712;
        background: transparent;
    }
    header nav ul.gg-nav li.gg-li > a.active i {
        box-shadow: none;
    }
    .gg-dd-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 0 0 0 20px;
        display: none;
    }
    .gg-dd.gg-open .gg-dd-menu,
    .gg-dd:hover .gg-dd-menu {
        display: block;
    }
    .gg-dd-menu a {
        font-size: 19px;
        padding: 12px 16px;
        color: #1b1712;
    }
    .gg-dd-menu a:hover {
        background: transparent;
        color: var(--accent);
    }
    [data-theme="dark"] header nav ul.gg-nav li.gg-li > a,
    [data-theme="dark"] .gg-dd-menu a {
        color: #cfcfe0;
    }
    [data-theme="dark"] header #header_menu {
        background: #14110e;
    }
}
@media only screen and (min-width: 1025px) and (max-width: 1280px) {
    header nav {
        margin-left: 14px;
        width: fit-content;
    }
    header nav ul {
        white-space: nowrap;
    }
    header nav ul li {
        margin: 0 3px;
    }
    header nav ul li a {
        padding: 10px 10px;
        font-size: 13px;
    }
    header nav ul li a i {
        margin-right: 6px;
        font-size: 14px;
    }
}
@media only screen and (max-width: 640px) {
    .gg-auth-btn {
        padding: 7px 10px 7px 7px;
    }
    .gg-auth-btn i {
        font-size: 13px;
        padding: 8px;
    }
    .gg-auth-btn.gg-in span {
        max-width: 90px;
    }
}
@media only screen and (max-width: 1394px) {
    footer .wrapper {
        display: grid;
        grid-auto-columns: 1fr;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas:
            ". ."
            ". ."
            "social social";
    }
    footer .wrapper .social {
        grid-row: 3;
        grid-column: 1;
        grid-column-span: 2;
        grid-area: social;
        text-align: left;
    }
    footer .wrapper .nav,
    footer .wrapper .copyright {
        text-align: right;
    }
    footer .wrapper .nav nav {
        display: grid;
        grid-auto-columns: 1fr;
        grid-template-columns: 1fr;
        gap: 0 0;
        justify-items: right;
    }
}
