﻿/* =================================================================
   HUNTING GROUND — общие стили сайта
   ================================================================= */

:root {
    /* Фоны */
    --bg-page: #0b0c0d;
    --bg-header: #0a0a0a;
    --bg-card: #151617;
    --bg-input: #1c1d1f;
    --bg-footer: #0d0e0f;

    /* Рамки */
    --border-main: #2d2f31;
    --border-accent: #414447;
    --border-gold: #5c4a3e;

    /* Текст */
    --text-main: #f5f5f5;
    --text-muted: #8c7662;
    --text-dim: #665c54;
    --text-gold: #d1b894;
    --text-red: #cc241d;
    --text-darkred: #990000;
    --text-green: #009244;

    /* Шрифты: один для заголовков, один для текста */
    --font-heading: "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
    --font-main: Arial, Helvetica, sans-serif;
    --font-mono: "Consolas", "Courier New", monospace;

    --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --transition: 0.2s ease;
}

/* ---------- База ---------- */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    padding-top: 70px;
    /* Фон «туман над болотом»: тёмная основа, холодные клочья тумана, красное свечение под шапкой,
       глубокая виньетка и еле заметное зерно. Слои закреплены (fixed). */
    background:
        radial-gradient(ellipse 80% 45% at 50% -10%, rgba(150, 25, 20, 0.2), transparent 70%),
        radial-gradient(ellipse 65% 45% at 10% 22%, rgba(80, 100, 82, 0.26), transparent 70%),
        radial-gradient(ellipse 55% 45% at 90% 60%, rgba(92, 82, 60, 0.22), transparent 70%),
        radial-gradient(ellipse 85% 40% at 40% 108%, rgba(70, 88, 74, 0.28), transparent 70%),
        radial-gradient(ellipse at 50% 45%, transparent 42%, rgba(0, 0, 0, 0.75) 100%),
        url("../images/brand/grain.svg"), #08090a;
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-main);
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    cursor: pointer;
}

/* ---------- Шапка ---------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px;
    /* Полупрозрачная шапка: под ней видно фон и прокручиваемую страницу, размытие сохраняет читаемость */
    background: rgba(10, 10, 10, 0.75);
    border-bottom: 2px solid rgba(45, 47, 49, 0.8);
    backdrop-filter: blur(10px) saturate(1.2);
    -webkit-backdrop-filter: blur(10px) saturate(1.2);
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
}

/* Знак сайта — ворон (images/brand/raven.svg) */
.site-logo__mark {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    transition: filter var(--transition);
}

.site-logo:hover .site-logo__mark {
    filter: drop-shadow(0 0 8px rgba(227, 36, 27, 0.65));
}

.site-logo__text {
    white-space: nowrap;
}

.site-logo__white {
    color: var(--text-main);
}

.site-logo__red {
    color: var(--text-darkred);
}

.main-nav {
    position: absolute;
    left: 50%;
    display: flex;
    gap: 30px;
    transform: translateX(-50%);
}

.nav-link {
    display: inline-block;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: color var(--transition);
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-link.is-active {
    color: var(--text-gold);
    transform: scale(1.08);
    text-shadow: 0 0 10px rgba(232, 227, 219, 0.2);
}

/* ---------- Кнопка профиля и выпадающее меню ---------- */

.profile {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 38px;
    padding: 6px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-accent);
    transition:
        background var(--transition),
        border-color var(--transition);
}

.profile-btn:hover {
    background: var(--border-main);
    border-color: var(--text-dim);
}

.profile-btn__avatar {
    width: 24px;
    height: 24px;
    background: var(--border-main);
    border: 1px solid var(--border-gold);
}

.profile-btn__name {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 700;
}

.profile-btn__arrow {
    margin-left: 2px;
    color: var(--text-muted);
    font-size: 11px;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 100;
    display: none;
    width: 180px;
    margin-top: 2px;
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.profile-dropdown a {
    display: block;
    padding: 12px 15px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid var(--border-main);
    transition:
        background var(--transition),
        color var(--transition);
}

.profile-dropdown a:hover {
    color: var(--text-main);
    background: var(--bg-input);
}

.profile-dropdown .profile-dropdown__exit {
    color: var(--text-darkred);
    border-bottom: none;
}

.profile-dropdown .profile-dropdown__exit:hover {
    color: #ff3333;
    background: rgba(153, 0, 0, 0.1);
}

/* ---------- Заголовки страниц и блоков ---------- */

.page-head {
    margin-bottom: 30px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-main);
}

.page-head--center {
    text-align: center;
}

.page-head--split {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.page-head--messages {
    max-width: 1140px;
    margin: 0 auto;
    padding: 28px 0 16px 10px;
}

.page-title {
    margin: 0 0 8px;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.page-title--hero {
    font-size: 40px;
}

.page-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.5;
}

.page-title--hero + .page-subtitle {
    margin-bottom: 30px;
    font-size: 16px;
}

.block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px;
    padding-bottom: 10px;
    color: var(--text-gold);
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-main);
}

.block-title--plain {
    margin-bottom: 10px;
    padding-bottom: 0;
    border-bottom: none;
}

.block-title--danger {
    color: var(--text-darkred);
}

.block-title--accent {
    padding: 0 0 0 10px;
    border-bottom: none;
    border-left: 2px solid var(--text-red);
}

.item-title {
    margin: 0 0 8px;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.panel-label {
    margin: 0;
    padding-bottom: 8px;
    color: var(--text-dim);
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-main);
}

.dossier-name {
    margin: 0 0 5px;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* ---------- Аватарки ---------- */

.avatar {
    --av-h: 20;
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: hsl(var(--av-h) 45% 80%);
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, hsl(var(--av-h) 30% 22%), hsl(var(--av-h) 25% 14%));
    border: 1px solid hsl(var(--av-h) 30% 32%);
    user-select: none;
}

.avatar--sm {
    width: 24px;
    height: 24px;
    font-size: 10px;
}

.avatar--md {
    width: 36px;
    height: 36px;
    font-size: 13px;
}

.avatar--lg {
    width: 80px;
    height: 80px;
    font-size: 28px;
}

.avatar--xl {
    width: 96px;
    height: 96px;
    font-size: 34px;
}

.profile-btn__avatar.avatar {
    width: 24px;
    height: 24px;
    font-size: 10px;
}

/* ---------- Футер ---------- */

.site-footer {
    width: 100%;
    margin-top: 60px;
    padding: 40px 20px;
    background: var(--bg-footer);
    border-top: 1px solid var(--border-main);
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.site-footer__brand {
    flex: 1;
    min-width: 250px;
}

.site-footer__mark {
    width: 22px;
    height: 22px;
    margin-right: 6px;
    vertical-align: -4px;
}

.site-footer__title {
    margin-bottom: 10px;
    color: var(--text-gold);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
}

.site-footer__desc {
    color: var(--text-dim);
    font-size: 11px;
    line-height: 1.5;
}

.site-footer__nav {
    min-width: 180px;
}

.site-footer__label {
    margin-bottom: 15px;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.site-footer__nav ul {
    font-size: 11px;
    line-height: 2;
    list-style: none;
}

.site-footer__nav a {
    color: var(--text-dim);
    transition: color var(--transition);
}

.site-footer__nav a:hover {
    color: var(--text-gold);
}

.site-footer__status {
    flex-shrink: 0;
    min-width: 200px;
    text-align: right;
}

.site-footer__online {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-bottom: 10px;
    color: var(--text-green);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.site-footer__dot {
    width: 5px;
    height: 5px;
    background: var(--text-green);
    border-radius: 50%;
}

.site-footer__copy {
    color: var(--border-accent);
    font-size: 10px;
}

/* ---------- Общее ---------- */

@keyframes blink {
    0%,
    100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ---------- Мобильные экраны ---------- */

@media (max-width: 900px) {
    /* На телефоне шапка не прилипает к экрану: она в две строки и закрывала бы контент */
    body {
        padding-top: 0;
    }

    /* Две строки: логотип, язык и профиль сверху, меню снизу */
    .site-header {
        position: static;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto auto;
        align-items: center;
        gap: 10px 8px;
        padding: 12px 16px 8px;
    }

    /* На телефоне: ворон и название в две строки — помещается рядом с языком и профилем */
    .site-logo {
        gap: 8px;
        font-size: 15px;
        letter-spacing: 1.5px;
    }

    .site-logo__mark {
        width: 32px;
        height: 32px;
    }

    .site-logo__text {
        display: flex;
        flex-direction: column;
        line-height: 1;
    }

    .main-nav {
        grid-column: 1 / -1;
    }

    .main-nav {
        position: static;
        order: 3;
        width: 100%;
        gap: 18px;
        padding-bottom: 4px;
        overflow-x: auto;
        transform: none;
        scrollbar-width: none;
    }

    .nav-link {
        flex-shrink: 0;
        font-size: 14px;
        white-space: nowrap;
    }

    .nav-link.is-active {
        transform: none;
    }

    .profile-btn__name,
    .profile-btn__arrow {
        display: none;
    }

    .lang-switch {
        margin: 0;
    }

    .lang-switch button {
        height: 32px;
        padding: 0 8px;
        font-size: 11px;
    }

    .profile-btn {
        height: 34px;
        padding: 4px 8px;
        gap: 6px;
    }

    .page-title {
        font-size: 24px;
    }

    .page-title--hero {
        font-size: 28px;
    }

    .container {
        padding: 0 16px;
    }
}

.unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    margin-left: 6px;
    padding: 0 5px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    background: var(--text-red);
    border-radius: 9px;
}

/* Переключатель языка */
.lang-switch {
    display: flex;
    margin-left: auto;
    margin-right: 15px;
    border: 1px solid var(--border-accent);
}

.lang-switch button {
    padding: 0 10px;
    height: 36px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    background: var(--bg-input);
    border: none;
}

.lang-switch button + button {
    border-left: 1px solid var(--border-accent);
}

.lang-switch button:hover {
    color: var(--text-main);
}

.lang-switch button.is-active {
    color: var(--text-gold);
    background: rgba(209, 184, 148, 0.08);
}

/* Заглушки, пока данные загружаются */
.skeleton {
    display: block;
    min-height: 12px;
    background: linear-gradient(90deg, var(--bg-input) 25%, var(--border-main) 50%, var(--bg-input) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.2s ease-in-out infinite;
}

@keyframes skeleton {
    to {
        background-position: -200% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton {
        animation: none;
    }
}

/* ---------- Вход через Steam (кнопка гостя в шапке и на страницах входа) ---------- */
.btn.btn--steam {
    gap: 8px;
    color: #fff;
    background: linear-gradient(180deg, #2a475e, #1b2838);
    border: 1px solid #66c0f4;
}

.btn.btn--steam:hover {
    color: #fff;
    background: linear-gradient(180deg, #326088, #1f3347);
    border-color: #a6dcff;
}

.btn--steam__ico {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

@media (max-width: 700px) {
    .site-header .profile .btn--steam span {
        display: none;
    }
    .site-header .profile .btn--steam {
        padding: 8px 10px;
    }
}

/* ---------- Гость и вошедший ---------- */
body:not(.is-guest) .guest-only,
body.is-guest .auth-only {
    display: none !important;
}

.btn--lg {
    padding: 14px 28px;
    font-size: 14px;
}

.guest-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    padding: 12px 16px;
    color: var(--text-muted);
    font-size: 13px;
    background: rgba(102, 192, 244, 0.06);
    border: 1px solid rgba(102, 192, 244, 0.35);
}

.guest-banner span {
    flex: 1;
    min-width: 200px;
}

/* ---------- Юридическая строка в подвале ---------- */
.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 24px;
    max-width: 1200px;
    margin: 24px auto 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--border-main);
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

.site-footer__links a {
    color: var(--text-muted);
    font-size: 12px;
}

.site-footer__links a:hover {
    color: var(--text-gold);
}

.site-footer__disclaimer {
    max-width: 620px;
    margin: 0;
    color: var(--text-dim);
    font-size: 11px;
    line-height: 1.5;
}

/* ---------- Уведомление о cookies ---------- */
.cookie-note {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 520px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.cookie-note__text {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.cookie-note__text a {
    color: var(--text-gold);
}

@media (max-width: 600px) {
    .cookie-note {
        right: 10px;
        bottom: 10px;
        left: 10px;
        flex-direction: column;
        align-items: stretch;
    }
}

/* ---------- Колокольчик уведомлений ---------- */
.notif {
    position: relative;
    margin-right: 12px;
}

.notif__btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: var(--text-muted);
    background: var(--bg-input);
    border: 1px solid var(--border-accent);
    transition:
        color var(--transition),
        border-color var(--transition);
}

.notif__btn:hover,
.notif.is-open .notif__btn {
    color: var(--text-gold);
    border-color: var(--border-gold);
}

.notif__btn svg {
    width: 18px;
    height: 18px;
}

.notif__n {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    background: var(--text-red);
    border-radius: 9px;
}

.notif__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    width: 380px;
    max-height: 70vh;
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-top: 3px solid var(--text-red);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.notif__panel[hidden] {
    display: none;
}

.notif__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-main);
}

.notif__title {
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.notif__all {
    padding: 0;
    color: var(--text-gold);
    font-size: 12px;
    background: none;
    border: none;
}

.notif__all:disabled {
    color: var(--text-dim);
    cursor: default;
}

.notif__list {
    flex: 1;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.notif__item {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
    text-decoration: none;
    border-bottom: 1px solid var(--border-main);
}

.notif__item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.notif__item.is-unread {
    background: rgba(204, 36, 29, 0.06);
}

.notif__item.is-unread::after {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    background: var(--text-red);
    border-radius: 50%;
    content: "";
}

.notif__ico {
    flex-shrink: 0;
    width: 22px;
    font-size: 16px;
    text-align: center;
}

.notif__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding-right: 16px;
}

.notif__text b {
    color: var(--text-main);
}

.notif__time {
    color: var(--text-dim);
    font-size: 11px;
}

.notif__empty {
    padding: 30px 16px;
    color: var(--text-dim);
    font-size: 13px;
    text-align: center;
}

.notif__foot {
    padding: 10px 16px;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    text-decoration: none;
    border-top: 1px solid var(--border-main);
}

.notif__foot:hover {
    color: var(--text-gold);
}

@media (max-width: 900px) {
    .notif {
        margin: 0;
    }
    .notif__btn {
        width: 34px;
        height: 34px;
    }
    .notif__panel {
        position: fixed;
        top: 60px;
        right: 10px;
        left: 10px;
        width: auto;
    }
}

/* Узкие телефоны: логотип, язык, колокольчик и профиль в одну строку */
@media (max-width: 420px) {
    .site-header {
        gap: 10px 6px;
    }
    .site-logo {
        font-size: 14px;
        letter-spacing: 1px;
    }
    .site-logo__mark {
        width: 28px;
        height: 28px;
    }
    .lang-switch button {
        padding: 0 6px;
    }
}

/* ---------- Discord ---------- */
.btn.btn--discord {
    gap: 8px;
    color: #fff;
    background: #5865f2;
    border-color: #5865f2;
}

.btn.btn--discord:hover {
    color: #fff;
    background: #4752c4;
    border-color: #4752c4;
}

.btn--discord__ico {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.site-footer__status .btn--discord {
    margin-top: 14px;
}

/* ---------- Плашка демо-версии ---------- */
.demo-bar {
    padding: 8px 16px;
    color: #e0a35a;
    font-size: 12px;
    text-align: center;
    background: rgba(224, 163, 90, 0.08);
    border-bottom: 1px solid rgba(224, 163, 90, 0.3);
}

.demo-bar a {
    margin-left: 6px;
    color: #a5adff;
    font-weight: 700;
}

.avatar--img {
    overflow: hidden;
    padding: 0;
}

.avatar--img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
