/* WinxTools — dark theme */
:root {
    --bg-dark: #1a1a1a;
    --bg-card: #141414;
    --bg-input: #1a1a1a;
    --border: #2a2a2a;
    --text: #e0e0e0;
    --text-muted: #888;
    --accent: #ffffff;
    --accent-hover: #e8e8e8;
    --hover-text: #a0a0a0;
    --danger: #ff5252;
    --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-dark);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Максимально тёмно-чёрный переливающийся фон (только чёрные цвета) */
.site-bg-animated {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, #000 0%, #050505 20%, #030303 40%, #080808 60%, #020202 80%, #000 100%);
    background-size: 400% 400%;
    animation: bgIridescentShift 22s ease infinite;
    overflow: hidden;
}

.site-bg-animated::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: radial-gradient(ellipse 70% 50% at 30% 20%, rgba(10, 10, 10, 0.6), transparent 50%),
                radial-gradient(ellipse 60% 60% at 80% 80%, rgba(8, 8, 8, 0.5), transparent 50%),
                radial-gradient(ellipse 50% 70% at 50% 50%, rgba(5, 5, 5, 0.4), transparent 60%);
    animation: bgIridescentGlow 18s ease-in-out infinite;
    pointer-events: none;
}

.site-bg-animated::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 0%, rgba(20, 20, 20, 0.15) 25%, transparent 50%, rgba(15, 15, 15, 0.12) 75%, transparent 100%);
    background-size: 200% 100%;
    animation: bgShimmer 14s linear infinite;
    pointer-events: none;
}

@keyframes bgIridescentShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes bgIridescentGlow {
    0%, 100% { opacity: 0.9; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.03); }
}

@keyframes bgShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.site-header,
.main-content,
.site-footer {
    position: relative;
    z-index: 0;
}

.main-content {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 16px 48px;
    animation: mainContentFadeIn 0.35s ease;
}

@keyframes mainContentFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.main-content--home {
    max-width: none;
    padding: 0;
    animation: none;
}

/* Header */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.header-right-widgets {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 8px;
}

.header-balance-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
}

.header-balance-link:hover {
    background: rgba(255, 255, 255, 0.12);
}

.header-balance-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.header-balance-value {
    font-weight: 600;
}

.header-notifications {
    position: relative;
}

.header-notifications-trigger {
    position: relative;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text);
    padding: 4px;
}

.header-notifications-count {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--danger);
    color: #000;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-notifications-menu {
    position: absolute;
    right: 0;
    top: 28px;
    min-width: 260px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 0;
    display: none;
    z-index: 20;
}

.header-notifications.open .header-notifications-menu {
    display: block;
}

.header-notifications-empty {
    padding: 8px 14px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.header-notifications-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-notifications-item a {
    display: block;
    padding: 6px 14px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
}

.header-notifications-item a:hover {
    background: rgba(255, 255, 255, 0.05);
}

.header-notif-author {
    font-weight: 600;
}

.header-notif-text {
    margin: 0 4px;
}

.header-notif-thread {
    display: block;
}

.header-notif-time {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.05em;
}

.logo:hover {
    color: rgba(255, 255, 255, 0.85);
}

.logo-img {
    height: 42px;
    width: auto;
    display: block;
    object-fit: contain;
}

.logo-text {
    white-space: nowrap;
}

.logo-part--blue {
    color: #fff;
}

.header-home-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.header-search {
    padding: 8px 14px;
    min-width: 200px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9rem;
}

.header-search::placeholder {
    color: var(--text-muted);
}

.header-search:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-header-cabinet {
    padding: 8px 16px;
    background: transparent;
    color: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn-header-cabinet:hover {
    background: var(--bg-input);
    border-color: var(--hover-text);
    color: var(--hover-text);
}

.main-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.main-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

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

/* Иконки в навигации (Font Awesome) */
.nav-icon {
    width: 1.15em;
    display: inline-block;
    text-align: center;
    font-size: 1.1rem;
}
.nav-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    padding: 6px;
    border-radius: 4px;
}
.nav-link-icon:hover {
    color: var(--hover-text);
}
.nav-dropdown .nav-link-icon.nav-dropdown-trigger {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.nav-dropdown .nav-dropdown-trigger::after {
    display: none;
}
.main-nav--icons {
    gap: 8px;
}

/* Поиск в шапке */
.header-search-form {
    display: flex;
    align-items: center;
    gap: 4px;
}
.header-search-form .header-search {
    min-width: 140px;
    padding: 6px 10px;
    font-size: 0.9rem;
}
.header-search-btn {
    padding: 6px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    cursor: pointer;
    font-size: 1rem;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.header-search-btn:hover {
    border-color: var(--accent);
}
.header-search-btn i {
    display: inline-block;
}
.header-home-right .header-search-form {
    flex: 0 1 auto;
}

@media (max-width: 768px) {
    .header-search-form {
        position: relative;
        max-width: 36px;
        overflow: hidden;
        flex-shrink: 0;
    }
    .header-search-form .header-search {
        width: 0;
        min-width: 0;
        padding: 0;
        margin-right: 0;
        border: none;
        opacity: 0;
        transition: width 0.2s ease, opacity 0.2s ease, padding 0.2s ease, margin 0.2s ease;
    }
    .header-search-form--open {
        max-width: 220px;
    }
    .header-search-form--open .header-search {
        width: 160px;
        min-width: 0;
        padding: 6px 10px;
        margin-right: 4px;
        border: 1px solid var(--border);
        opacity: 1;
    }
}

/* Выпадающее меню в навигации */
.nav-dropdown {
    position: relative;
}
.nav-dropdown-trigger {
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.nav-dropdown-trigger:hover {
    color: var(--hover-text);
}
.nav-dropdown-trigger::after {
    content: '';
    border: 4px solid transparent;
    border-top-color: currentColor;
    margin-left: 2px;
}
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0;
    padding-top: 6px;
    min-width: 160px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
    padding: 6px 0 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 200;
}
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    height: 10px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-trigger[aria-expanded="true"] + .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
}
.nav-dropdown-menu a:hover {
    background: var(--bg-input);
    color: var(--hover-text);
}

/* Выпадающее меню личного кабинета в хедере */
.cabinet-dropdown {
    position: relative;
}
.cabinet-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.2s, background 0.2s;
}
.cabinet-dropdown-trigger:hover {
    background: var(--bg-card);
    border-color: var(--hover-text);
}
.cabinet-dropdown-avatar-wrap {
    flex-shrink: 0;
    padding: 2px;
    border-radius: 50%;
    background: var(--bg-card);
}
.cabinet-dropdown-avatar {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.cabinet-dropdown-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cabinet-dropdown-chevron {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-left: 2px;
}
.cabinet-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0;
    padding-top: 6px;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 250;
}
.cabinet-dropdown-menu::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    height: 10px;
}
.cabinet-dropdown:hover .cabinet-dropdown-menu,
.cabinet-dropdown-trigger[aria-expanded="true"] + .cabinet-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.cabinet-dropdown-status {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.cabinet-dropdown-avatar-wrap {
    position: relative;
}
.cabinet-status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}
.status-dot-online { background: #4caf50; }
.status-dot-dnd { background: #f44336; }
.status-dot-invisible { background: var(--text-muted); }
.cabinet-dropdown-status-block {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}
.cabinet-dropdown-status-title {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}
.cabinet-status-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
}
.cabinet-status-option:hover {
    background: transparent;
    color: var(--hover-text);
}
.cabinet-status-option.is-active {
    color: var(--accent);
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.profile-info-status.status-online { color: #4caf50; }
.profile-info-status.status-dnd { color: #f44336; }
.profile-info-status.status-invisible { color: var(--text-muted); }
.cabinet-dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}
.cabinet-dropdown-menu a:last-child {
    border-bottom: none;
}
.cabinet-dropdown-menu a:hover {
    background: var(--bg-input);
    color: var(--hover-text);
}

/* Выпадающее меню как на картинке */
.cabinet-dropdown-menu--image {
    padding: 0;
    min-width: 240px;
    background: #0a0a0a;
    border-color: #1a1a1a;
}
.cabinet-dropdown-menu--image .cabinet-dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid #1a1a1a;
}
.cabinet-dropdown-menu--image .cabinet-dropdown-name {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.cabinet-dropdown-menu--image .cabinet-dropdown-email {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.cabinet-dropdown-menu--image .cabinet-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid #1a1a1a;
}
.cabinet-dropdown-menu--image .cabinet-dropdown-item:last-child {
    border-bottom: none;
}
.cabinet-dropdown-menu--image .cabinet-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}
.nav-menu-icon {
    width: 18px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Баланс и уведомления внутри дропдауна (мобильная версия) */
.cabinet-dropdown-mobile-only {
    display: none;
}

.cabinet-dropdown-balance-mobile {
    padding: 10px 16px;
    border-bottom: 1px solid #1a1a1a;
    font-size: 0.9rem;
}

.cabinet-dropdown-balance-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.cabinet-dropdown-balance-value {
    font-weight: 600;
}

.cabinet-dropdown-balance-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
}

.cabinet-dropdown-balance-link:hover {
    text-decoration: underline;
}

.cabinet-dropdown-notifs-mobile {
    padding: 10px 16px;
    border-bottom: 1px solid #1a1a1a;
}

.cabinet-dropdown-notifs-title {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.cabinet-dropdown-notifs-empty {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cabinet-dropdown-notifs-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
}

.cabinet-dropdown-notifs-list li a {
    display: block;
    padding: 4px 0;
    color: var(--text);
    text-decoration: none;
}

.cabinet-dropdown-notifs-list li a:hover {
    color: var(--accent);
}

.cabinet-dropdown-notifs-list .notif-author {
    font-weight: 600;
}

.cabinet-dropdown-notifs-list .notif-text {
    margin: 0 4px;
}

.cabinet-dropdown-notifs-list .notif-thread {
    display: block;
}

.header-home-right .cabinet-dropdown {
    margin-left: auto;
}

/* Footer */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Главная страница — стиль в духе gravebirth home.css */
.main-content--home {
    min-height: calc(100vh - 140px);
    position: relative;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

.home-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    min-height: calc(100vh - 140px);
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 24px 24px;
    align-items: center;
}

.home-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.home-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 0;
}

.home-card-title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.home-card-text {
    margin: 0;
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.6;
}

.home-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-nav-list li {
    margin-bottom: 0.75rem;
}

.home-nav-list a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.home-nav-list a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.home-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.home-hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin: 0 0 1rem;
    background: linear-gradient(135deg, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    letter-spacing: 0.2em;
}

.home-main .subtitle {
    font-size: 1.25rem;
    color: #888;
    margin-bottom: 2rem;
    font-weight: 300;
    letter-spacing: 2px;
}

.btn-home-community {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #ffffff, #e0e0e0);
    color: #0a0a0a;
    border: none;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-home-community:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
    color: #0a0a0a;
}

.home-section {
    max-width: 1100px;
    margin: 0 auto 32px;
    padding: 0 24px;
}

.home-section-inner {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px 24px 28px;
}

.home-section-header h2 {
    margin: 0 0 8px;
    font-size: 1.4rem;
}

.home-section-header p {
    margin: 0 0 18px;
    color: #b0b0b0;
    font-size: 0.95rem;
}

.home-social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.home-social-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 12px;
    border-radius: 12px;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-social-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
    border-color: var(--accent);
}

.home-social-icon {
    font-size: 1.6rem;
}

.home-social-name {
    font-size: 0.9rem;
}

.home-contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.home-contact-item h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.home-contact-item p {
    margin: 0 0 4px;
}

.home-contact-item a {
    color: var(--accent);
    text-decoration: none;
}

.home-contact-item a:hover {
    color: var(--hover-text);
    text-decoration: underline;
}

.home-contact-hint {
    font-size: 0.85rem;
    color: #9e9e9e;
}

.home-hero-title.fade-in,
.home-main .btn.fade-in,
.home-card.fade-in {
    opacity: 0;
    animation: homeFadeIn 1s ease forwards;
}

.home-card.fade-in:nth-child(1) { animation-delay: 0.1s; }
.home-card.fade-in:nth-child(2) { animation-delay: 0.2s; }
.home-main .btn-home-community.fade-in { animation-delay: 0.2s; }

@keyframes homeFadeIn {
    to {
        opacity: 1;
    }
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.footer-social {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 4px;
}

.footer-social:hover {
    color: var(--hover-text);
}

@media (max-width: 768px) {
    .home-layout {
        grid-template-columns: 1fr;
        padding: 1.5rem 16px;
    }
    .home-sidebar {
        order: 2;
    }
    .home-main {
        order: 1;
        padding: 1.5rem;
    }
    .home-hero-title {
        font-size: 2.5rem;
        letter-spacing: 0.1em;
    }
}

/* Hero */
.hero {
    text-align: center;
    padding: 60px 20px 80px;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin: 0 0 8px;
    color: #fff;
}

.hero-subtitle {
    font-size: 0.95rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    margin: 0 0 32px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: #000;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    color: #fff;
}

.btn-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Stats */
.stats-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin-top: 24px;
}

.stats-inner {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Auth */
.auth-page {
    max-width: 400px;
    margin: 40px auto;
}

.auth-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 32px;
}

.auth-box h1 {
    margin: 0 0 20px;
    font-size: 1.5rem;
}

.auth-error {
    color: var(--danger);
    margin: 0 0 12px;
    font-size: 0.9rem;
}

.auth-success {
    color: var(--accent);
    margin: 0 0 12px;
}

.auth-form label {
    display: block;
    margin: 12px 0 4px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-form input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 1rem;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.auth-form button {
    margin-top: 20px;
    width: 100%;
}

.auth-link {
    margin: 16px 0 0;
    text-align: center;
}

.auth-link a {
    color: var(--accent);
    text-decoration: none;
}

.auth-link a:hover {
    color: var(--hover-text);
    text-decoration: underline;
}

.auth-consent-block {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.auth-consent-checkbox {
    flex-shrink: 0;
    cursor: pointer;
}

.auth-consent-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.auth-consent-text {
    flex: 1;
    line-height: 1.4;
}

.auth-consent-link {
    display: inline;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-consent-link:hover {
    color: rgba(255, 255, 255, 1);
}

.auth-consent-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.auth-consent-modal[hidden] {
    display: none;
}

.auth-consent-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.auth-consent-modal-content {
    position: relative;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.auth-consent-modal-title {
    margin: 0 0 16px;
    font-size: 1.2rem;
}

.auth-consent-modal-body {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text);
}

.auth-consent-modal-body p {
    margin: 0 0 12px;
}

.auth-consent-modal-body p:last-of-type {
    margin-bottom: 8px;
}

.auth-consent-modal-body ul {
    margin: 0 0 16px;
    padding-left: 20px;
}

.auth-consent-modal-body a {
    color: var(--accent);
    text-decoration: none;
}

.auth-consent-modal-body a:hover {
    text-decoration: underline;
}

.auth-consent-modal-close {
    margin-top: 16px;
}

.forum-page {
    margin: 0;
}

.page-title {
    font-size: 1.6rem;
    margin: 0 0 20px;
    font-weight: 600;
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.forum-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.forum-category {
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    transition: background 0.25s ease, border-color 0.25s ease;
}
.forum-category:hover {
    background: rgba(255, 255, 255, 0.04);
}

.forum-category:last-child {
    border-bottom: none;
}

.forum-section-title {
    margin: 24px 0 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.forum-section-title:first-child {
    margin-top: 0;
}

.forum-section-title--admin {
    color: var(--accent);
}

.forum-category--admin {
    border-left: 3px solid var(--accent);
}

.forum-cat-main {
    display: grid;
    grid-template-columns: 40px 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 16px 20px;
}

.forum-cat-icon {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.forum-cat-icon-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.forum-cat-info h2 {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 600;
}

.forum-cat-info h2 a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forum-cat-info h2 a:hover {
    color: var(--hover-text);
}

.forum-cat-desc {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.forum-cat-stats {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: right;
}

.forum-cat-stats span {
    color: var(--accent);
    font-weight: 600;
}

.forum-cat-last {
    max-width: 280px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    font-size: 0.85rem;
}

.forum-cat-last-avatar-wrap {
    flex-shrink: 0;
    display: block;
}

.forum-cat-last-avatar,
.forum-cat-last-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: rgba(0, 0, 0, 0.5);
}

.forum-cat-last-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.forum-cat-last-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.forum-cat-last-title {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.forum-cat-last-title:hover {
    color: var(--hover-text);
}

.forum-cat-last-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.forum-actions {
    margin-top: 20px;
}

/* Thread list (старый вид — используется как база для нового) */
.thread-list {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-card);
}

.thread-list-head {
    display: none;
}

.thread-row {
    display: none;
}

.thread-row .col-topic a {
    color: var(--text);
    text-decoration: none;
}

.thread-row .col-topic a:hover {
    color: var(--hover-text);
}

.col-author, .col-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.badge {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

.pinned-badge {
    background: var(--accent);
    color: #000;
}

/* Posts */
.post-list {
    margin: 24px 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-card);
}

/* Старый .post используется в других местах, для темы вводим новый вид */

.thread-title {
    margin-bottom: 20px;
}

.thread-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.thread-delete-form .btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.staff-thread-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    margin-right: 6px;
    border-radius: 999px;
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid #ffc107;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.thread-closed-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    margin-right: 6px;
    border-radius: 999px;
    background: rgba(255, 100, 100, 0.15);
    border: 1px solid #ff6464;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.thread-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.thread-author-card {
    margin: 20px 0 24px;
    padding: 16px 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(15, 15, 15, 0.85);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.thread-author-main {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text);
}

.thread-author-avatar,
.thread-author-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.thread-author-avatar-placeholder {
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.6rem;
}

.thread-author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.thread-author-name {
    font-weight: 600;
    font-size: 1rem;
}

.thread-author-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.thread-author-stats--icons {
    flex-direction: column;
    gap: 6px;
}

.thread-author-stat-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.thread-author-stat-icon {
    font-size: 0.9rem;
    color: var(--text-muted);
    width: 16px;
    text-align: center;
}

.thread-author-stat-value {
    font-weight: 600;
    margin-right: 4px;
    color: var(--text);
}

.thread-author-reactions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-like-thread,
.btn-like-post,
.btn-like-main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-like-thread:hover,
.btn-like-post:hover,
.btn-like-main:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-like-thread--active,
.btn-like-post--active,
.btn-like-main--active {
    background: rgba(76, 175, 80, 0.15);
    border-color: #4caf50;
    color: #c8e6c9;
}

.btn-like-icon {
    font-size: 0.9rem;
}

.thread-like-count,
.thread-post-like-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.thread-post-reactions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 6px;
}

.thread-post-reactions-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.reaction-form {
    position: relative;
}

.reaction-toggle {
    position: relative;
    z-index: 2;
}

.reaction-menu {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 999px;
    background: rgba(20, 20, 20, 0.98);
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    display: flex;
    gap: 4px;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.reaction-menu--open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.reaction-option {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.15s ease;
}

.reaction-option:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-1px);
}

.reaction-option--clear {
    font-size: 0.9rem;
}

.thread-posts {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.thread-post-card {
    background: rgba(15, 15, 15, 0.9);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.thread-post-card--first {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

.thread-post-inner {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    padding: 20px 24px;
}

.thread-post-sidebar {
    border-right: 1px solid var(--border);
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.thread-post-user {
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.thread-post-avatar,
.thread-post-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.thread-post-avatar-placeholder {
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
}

.thread-post-username {
    font-weight: 600;
}

.thread-post-user-stats {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.thread-post-user-stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.thread-post-user-stat-icon {
    font-size: 0.9rem;
    color: var(--text-muted);
    width: 16px;
    text-align: center;
}

.thread-post-user-stat-value {
    font-weight: 600;
    color: var(--text-muted);
}

.thread-post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.thread-post-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.thread-post-header {
    display: flex;
    justify-content: flex-end;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.thread-post-index {
    opacity: 0.7;
}

.thread-post-content {
    font-size: 0.98rem;
    line-height: 1.6;
}

.thread-post-actions {
    text-align: right;
}

.post-author {
    display: block;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    margin-bottom: 4px;
}

.post-author:hover {
    color: var(--hover-text);
    text-decoration: underline;
}

.post-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.post-content {
    white-space: pre-wrap;
    word-break: break-word;
}

.post-delete-form {
    margin-top: 8px;
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
    color: var(--text-muted);
}

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

.btn-delete:hover {
    color: var(--danger) !important;
}

.btn-edit:hover {
    color: var(--accent);
}

.admin-edit-category-input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
}

.reply-form-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-top: 24px;
}

.reply-form-wrap h2 {
    margin: 0 0 16px;
    font-size: 1.1rem;
}

.reply-form textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 12px;
}

.reply-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.forum-login-hint {
    color: var(--text-muted);
    margin-top: 20px;
}

.forum-login-hint a {
    color: var(--accent);
}

/* New topic form */
.new-topic-form label,
.cabinet-form label {
    display: block;
    margin: 12px 0 4px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.new-topic-form input,
.new-topic-form select,
.cabinet-form input {
    width: 100%;
    max-width: 500px;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 8px;
}

.new-topic-form textarea {
    width: 100%;
    max-width: 600px;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 12px;
}

.new-topic-form button,
.cabinet-form button {
    margin-top: 16px;
}

/* Кнопка "Создать тему" в разделах форума */
.forum-cat-create-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forum-cat-create-btn:hover {
    color: var(--hover-text);
}

.forum-cat-create-btn i {
    font-size: 0.85em;
}

.forum-create-topic-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Дизайн создания темы (как на картинке) */
.forum-new-topic-page .new-topic-form--styled {
    max-width: 100%;
}

.forum-new-topic-page .new-topic-title-input {
    max-width: 100%;
    padding: 14px 16px;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 16px;
}

.new-topic-editor-wrap {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(15, 15, 15, 0.95);
    margin-bottom: 20px;
}

.forum-new-topic-page .new-topic-editor-wrap {
    max-width: 100%;
}

.new-topic-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(25, 25, 25, 0.9);
    border-bottom: 1px solid var(--border);
}

.new-topic-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.new-topic-toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.new-topic-toolbar-btn b, .new-topic-toolbar-btn i, .new-topic-toolbar-btn code {
    font-weight: 600;
    font-style: normal;
    font-family: inherit;
}

.new-topic-toolbar-spacer {
    flex: 1;
    min-width: 20px;
}

.new-topic-content-input {
    width: 100%;
    min-height: 280px;
    padding: 16px;
    background: rgba(12, 12, 12, 0.98);
    border: none;
    border-radius: 0;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 0;
}

.forum-new-topic-page .new-topic-content-input {
    max-width: none;
}

.new-topic-content-input:focus {
    outline: none;
}

.new-topic-settings {
    margin: 20px 0;
    padding: 16px;
    background: rgba(20, 20, 20, 0.5);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.new-topic-settings-title {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 600;
}

.forum-new-topic-page .forum-create-topic-btn {
    margin-top: 24px;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: #fff;
    color: #111;
}

.forum-new-topic-page .forum-create-topic-btn:hover {
    background: #f0f0f0;
    color: #111;
}

/* Cabinet */
.cabinet-page {
    max-width: 640px;
}

.cabinet-settings-page {
    max-width: 960px;
}

.cabinet-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}

.cabinet-profile {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.cabinet-avatar {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.cabinet-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
}

.cabinet-info h2 {
    margin: 0 0 8px;
    font-size: 1.4rem;
}

.cabinet-info p {
    margin: 4px 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.profile-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.profile-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.profile-social-link:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.profile-social-link--text {
    padding: 0 10px;
    width: auto;
}

.profile-social-verified {
    display: inline-block;
    margin-left: 6px;
    color: #4caf50;
    font-weight: 700;
}

.settings-social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.settings-social-card {
    background: rgba(20, 20, 20, 0.9);
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-social-card .info h4 {
    margin: 0 0 4px;
}

.settings-social-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cabinet-actions {
    margin-top: 16px;
}

/* Cabinet layout — как на главной */
.cabinet-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
}

.cabinet-sidebar .cabinet-card {
    margin-bottom: 20px;
}

.cabinet-profile-card {
    text-align: center;
}

.cabinet-profile-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.cabinet-profile-card .cabinet-avatar,
.cabinet-profile-card .cabinet-avatar-placeholder {
    margin: 0 auto 12px;
    display: block;
}

.cabinet-avatar-large {
    width: 100px;
    height: 100px;
}

.cabinet-username {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.cabinet-stats, .cabinet-date {
    margin: 8px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.cabinet-balance, .cabinet-discount {
    margin: 10px 0 0;
    font-size: 0.95rem;
    color: var(--text);
}

/* Баланс */
.balance-card {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
}

.balance-amount-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.balance-amount-value {
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 6px;
}

.balance-topup-form label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.balance-topup-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.balance-topup-row input[type="number"] {
    max-width: 160px;
    padding: 8px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
}

.balance-topup-row input[type="number"]:focus {
    outline: none;
    border-color: var(--accent);
}

.balance-promo-form { margin-bottom: 12px; }
.balance-promo-form label { display: block; font-size: 0.9rem; margin-bottom: 6px; color: var(--text-muted); }
.balance-promo-row { display: flex; gap: 10px; align-items: center; }
.balance-promo-row input[type="text"] { flex: 1; max-width: 200px; padding: 8px 10px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 6px; color: var(--text); }
.balance-promo-row input[type="text"]:focus { outline: none; border-color: var(--accent); }

.balance-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.balance-history {
    margin-top: 24px;
}

.balance-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.balance-history-table th,
.balance-history-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}

.balance-history-table th {
    text-align: left;
    color: var(--text-muted);
}
.cabinet-profile-card--image-layout .cabinet-balance,
.cabinet-profile-card--image-layout .cabinet-discount {
    text-align: center;
}
.cabinet-friends-card .cabinet-card-title {
    margin-bottom: 12px;
}
.cabinet-friends-all {
    color: var(--text);
    text-decoration: none;
}
.cabinet-friends-all:hover {
    color: var(--accent);
    text-decoration: underline;
}
.cabinet-friends-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.cabinet-friend-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Магазин */
.shop-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px 24px 48px;
}

.shop-balance-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(15, 15, 15, 0.9);
    margin-bottom: 20px;
}

.shop-balance-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.shop-balance-value {
    font-weight: 600;
}

.shop-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.shop-case-card {
    background: rgba(15, 15, 15, 0.95);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 18px 18px 20px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.5);
}

.shop-case-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.shop-case-title {
    margin: 0;
    font-size: 1.1rem;
}

.shop-case-price {
    font-weight: 600;
}

.shop-case-description {
    margin: 6px 0 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.shop-case-rewards {
    margin: 0 0 12px;
    padding-left: 18px;
    font-size: 0.9rem;
}

/* Прокрут кейсов — в стиле тематики сайта (тёмная тема) */
.shop-case-roller-wrapper {
    position: relative;
    margin-bottom: 16px;
}
.shop-case-roller-frame {
    position: relative;
    padding: 3px;
    background: linear-gradient(145deg, #1a1a1a 0%, #0f0f0f 50%, #141414 100%);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.03);
    border: 1px solid var(--border);
}
.shop-case-roller {
    position: relative;
    overflow: hidden;
    border-radius: 9px;
    background: #0a0a0a;
    min-height: 140px;
}
.shop-case-roller::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent, var(--accent), transparent);
    box-shadow: 0 0 12px rgba(255,255,255,0.3);
    transform: translateX(-50%);
    z-index: 2;
    pointer-events: none;
}
.shop-case-roller-inner {
    display: flex;
    will-change: transform;
}
.shop-case-item {
    min-width: 280px;
    width: 280px;
    flex-shrink: 0;
    padding: 24px 28px;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text);
    background: linear-gradient(180deg, #1e1e1e 0%, #161616 50%, #141414 100%);
    border: 1px solid var(--border);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    margin: 6px 4px;
    border-radius: 10px;
}
.shop-case-item:first-child {
    margin-left: 6px;
}
/* Chevron markers — точка выбора */
.shop-case-roller-marker {
    position: absolute;
    left: 50%;
    margin-left: -14px;
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    z-index: 3;
}
.shop-case-roller-marker--top {
    top: -6px;
    border-bottom: 12px solid var(--accent);
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.2));
}
.shop-case-roller-marker--bottom {
    bottom: -6px;
    border-top: 12px solid var(--accent);
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.2));
}

.shop-case-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.shop-case-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.shop-drop-history {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.shop-drop-history-title {
    margin: 0 0 16px;
    font-size: 1.1rem;
    font-weight: 600;
}
.shop-drop-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.shop-drop-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.02);
}
.shop-drop-history-item--deportation {
    background: rgba(200,60,60,0.15);
    color: #e07070;
}
.shop-drop-history-user {
    font-weight: 500;
    min-width: 100px;
}
.shop-drop-history-reward {
    flex: 1;
}
.shop-drop-history-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.cabinet-profile-card--image-layout .cabinet-balance,
.cabinet-profile-card--image-layout .cabinet-discount {
    text-align: center;
}
.cabinet-friends-card .cabinet-card-title {
    margin-bottom: 12px;
}
.cabinet-friends-all {
    color: var(--text);
    text-decoration: none;
}
.cabinet-friends-all:hover {
    color: var(--accent);
    text-decoration: underline;
}
.cabinet-friends-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.cabinet-friend-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.8rem;
}
.cabinet-friend-tile:hover {
    color: var(--accent);
}
.cabinet-friend-tile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}
.cabinet-friend-tile-placeholder {
    background: var(--accent);
    color: #000;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.cabinet-friend-tile-name {
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cabinet-friends-empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cabinet-card-title {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 600;
}

.cabinet-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cabinet-nav-list li { margin-bottom: 8px; }
.cabinet-nav-list a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s ease;
}
.cabinet-nav-list a:hover { color: var(--hover-text); }

.cabinet-friends-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cabinet-friends-list li { margin-bottom: 8px; }
.cabinet-friends-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    text-decoration: none;
}
.cabinet-friends-list a:hover { color: var(--hover-text); }
.cabinet-friends-block {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.cabinet-friends-title {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 600;
}

.cabinet-friends-list-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.cabinet-friend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    text-decoration: none;
    color: var(--text);
}

.cabinet-friend-item:hover {
    color: var(--accent);
}

.cabinet-friend-avatar,
.cabinet-friend-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cabinet-friend-avatar {
    object-fit: cover;
}

.cabinet-friend-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: 1rem;
}

.cabinet-friend-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.friend-avatar, .friend-avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.friend-avatar-placeholder {
    background: var(--accent);
    color: #000;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-actions a.btn-primary {
    color: #000 !important;
}

/* Блок профиля как на картинке */
.profile-info-block {
    margin-top: 20px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    text-align: left;
}
.profile-info-block--above-wall {
    margin-top: 0;
    margin-bottom: 24px;
}
.cabinet-main .profile-info-block--above-wall {
    max-width: 420px;
}
.profile-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}
.profile-info-title {
    font-weight: 600;
    color: var(--text);
}
.profile-info-status {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.profile-info-section {
    border-bottom: 1px solid var(--border);
}
.profile-info-section:last-child {
    border-bottom: none;
}
.profile-info-section-title {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}
.profile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
}
.profile-info-row:last-child {
    border-bottom: none;
}
.profile-info-label {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.profile-info-value {
    color: var(--text);
    text-align: right;
}
.profile-info-role.role-user {
    color: #4caf50;
    display: inline-block;
}
.profile-info-role.role-moderator {
    color: #64b5f6;
    display: inline-block;
}
.profile-info-role.role-admin {
    color: #ff5252;
    display: inline-block;
}
.profile-info-link {
    color: #2196f3;
    text-decoration: none;
}
.profile-info-link:hover {
    text-decoration: underline;
}

/* Стена */
.cabinet-wall {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
}

.cabinet-section-title {
    margin: 0 0 20px;
    font-size: 1.2rem;
}

.wall-post-form textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: inherit;
    margin-bottom: 12px;
}

.wall-posts { margin-top: 20px; }
.wall-post {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.wall-post:last-child { border-bottom: none; }
.wall-post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.wall-post-author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
}
.wall-post-author:hover { color: var(--hover-text); }
.wall-author-avatar, .wall-author-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.wall-author-placeholder {
    background: var(--accent);
    color: #000;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wall-post-date { color: var(--text-muted); font-size: 0.85rem; }
.wall-empty, .wall-hint { color: var(--text-muted); margin: 16px 0; }

/* Сообщения */
.messages-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.messages-sidebar h2 { margin: 0 0 16px; font-size: 1.1rem; }
.dialog-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
}
.dialog-item:hover, .dialog-item.active {
    border-color: var(--accent);
}
.dialog-avatar, .dialog-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.dialog-avatar-placeholder {
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.dialog-info { flex: 1; min-width: 0; }
.dialog-preview {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.messages-empty { color: var(--text-muted); }

.messages-main h2 { margin: 0 0 16px; }

/* Формат диалога как на картинке */
.dialog-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.dialog-view-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
}
.dialog-back-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}
.messages-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}
.messages-list--dialog {
    max-height: 480px;
    padding: 8px 0;
}
.dialog-msg-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.dialog-msg-row:last-child {
    border-bottom: none;
}
.dialog-msg-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--border);
}
.dialog-msg-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dialog-msg-avatar-placeholder {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #000;
    font-weight: 700;
    font-size: 1rem;
}
.dialog-msg-body {
    flex: 1;
    min-width: 0;
}
.dialog-msg-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}
.dialog-msg-nick {
    font-weight: 600;
    color: #64b5f6;
    text-decoration: none;
    font-size: 0.95rem;
}
.dialog-msg-nick:hover {
    color: #90caf9;
    text-decoration: underline;
}
.dialog-msg-time {
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-shrink: 0;
}
.dialog-msg-text {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
}
.dialog-msg-text .msg-gif {
    display: block;
    max-width: 280px;
    max-height: 200px;
    border-radius: 8px;
    margin: 6px 0;
    object-fit: contain;
}
.messages-form--dialog {
    margin-top: 0;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.messages-form-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}
.dialog-send-btn {
    flex-shrink: 0;
    padding: 10px 20px;
    height: 44px;
}
.messages-form-row textarea {
    flex: 1;
    min-height: 44px;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    resize: none;
    margin-bottom: 0;
}
.messages-form-row textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.dialog-emoji-wrap {
    flex-shrink: 0;
}
.dialog-emoji-wrap .btn-emoji-toggle {
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 1.2rem;
}
.dialog-emoji-wrap .chat-emoji-panel {
    right: 0;
    left: auto;
    bottom: 100%;
    margin-bottom: 8px;
    max-height: 220px;
    overflow-y: auto;
}

.msg-row {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.msg-out { text-align: right; }
.msg-out .msg-content { background: rgba(255,255,255,0.1); display: inline-block; padding: 8px 12px; border-radius: 8px; }
.msg-in .msg-content { background: var(--bg-input); display: inline-block; padding: 8px 12px; border-radius: 8px; }
.msg-date { font-size: 0.8rem; color: var(--text-muted); }
.messages-form textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    margin-bottom: 12px;
}
.messages-select { color: var(--text-muted); }

/* Уведомление о новом сообщении */
.msg-notify-toast {
    position: fixed;
    bottom: 24px;
    left: 24px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}
.msg-notify-toast.msg-notify-toast--show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.msg-notify-toast:hover {
    border-color: var(--accent);
    color: var(--hover-text);
}

/* Друзья */
.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 20px;
}
.friend-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
}
.friend-card:hover { border-color: var(--accent); }
.friend-card-avatar, .friend-card-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 8px;
    object-fit: cover;
}
.friend-card-placeholder {
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}
.friend-card-name {
    font-weight: 500;
    text-align: center;
    word-break: break-word;
}
.friends-empty { color: var(--text-muted); margin-top: 20px; }
.friends-back-link { color: #fff; }
.friends-back-link:hover { color: rgba(255,255,255,0.85); }

.friends-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.friends-tab {
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--bg-muted);
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}
.friends-tab:hover { background: var(--border); color: var(--text); }
.friends-tab.friends-tab--active {
    background: var(--accent);
    color: #000;
}
.friends-requests-list { margin-top: 16px; }
.friend-request-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.friend-request-row:last-child { border-bottom: none; }
.friend-request-user {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    flex: 1;
    min-width: 120px;
}
.friend-request-user:hover { color: var(--hover-text); }

.user-role {
    margin: 4px 0;
}

.role-badge {
    display: inline-block;
    padding: 0;
    font-size: 0.8rem;
    font-weight: 600;
    background: none;
    border: none;
}

.role-user {
    color: var(--text-muted);
}

.role-moderator {
    color: #64b5f6;
}

.role-admin {
    color: #ff5252;
}

.profile-info-role.role-moderator,
.profile-info-role.role-admin {
    background: none;
    border: none;
}

.cabinet-avatar-edit {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.cabinet-avatar-edit .cabinet-avatar,
.cabinet-avatar-edit .cabinet-avatar-placeholder {
    width: 80px;
    height: 80px;
}

.cabinet-avatar-edit input[type="file"] {
    margin: 8px 0;
    color: var(--text);
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
    max-width: none;
}

/* Chat */
.chat-page {
    max-width: 900px;
}

.chat-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 300px);
    min-height: 500px;
    max-height: 800px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

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

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

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.chat-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    font-style: italic;
}

.chat-message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: 6px;
    border-left: 3px solid var(--accent);
}

.chat-msg-user {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}
.chat-msg-user:hover {
    color: var(--accent);
}

.chat-emoji-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 0;
    font-size: 1.2rem;
}
.chat-emoji-bar span[data-emoji] {
    cursor: pointer;
    padding: 2px;
    user-select: none;
}
.chat-emoji-bar span[data-emoji]:hover {
    opacity: 0.8;
}

/* Интерактивная панель эмодзи */
.chat-emoji-toggle-wrap {
    position: relative;
    display: inline-block;
}
.btn-emoji-toggle {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text);
    transition: border-color 0.2s;
}
.btn-emoji-toggle:hover {
    border-color: var(--accent);
}
.chat-emoji-panel {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 100;
    max-width: 420px;
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", var(--font-sans);
}
/* Панель эмодзи как прокручиваемый список (форум и чат) */
.chat-emoji-panel--list {
    padding: 0;
    max-height: 280px;
    display: block;
}
.chat-emoji-panel--list .chat-emoji-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px;
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
}
.chat-emoji-panel--list .chat-emoji-list span[data-emoji] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 4px;
    font-size: 1.35rem;
    cursor: pointer;
    border-radius: 6px;
    user-select: none;
}
.chat-emoji-panel--list .chat-emoji-list span[data-emoji]:hover {
    background: var(--bg-input);
}
.chat-emoji-panel--list .chat-emoji-list::-webkit-scrollbar {
    width: 6px;
}
.chat-emoji-panel--list .chat-emoji-list::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 3px;
}
.chat-emoji-panel--list .chat-emoji-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.chat-emoji-panel::-webkit-scrollbar {
    width: 6px;
}
.chat-emoji-panel::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 3px;
}
.chat-emoji-panel::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.chat-emoji-panel span[data-emoji] {
    cursor: pointer;
    padding: 5px;
    user-select: none;
    font-size: 1.25rem;
}
.chat-emoji-panel span[data-emoji]:hover {
    background: var(--bg-input);
    border-radius: 4px;
}

/* Страница техподдержки */
.support-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

.support-header-card {
    margin-bottom: 24px;
    padding: 24px 28px;
    border-radius: 16px;
    background: linear-gradient(135deg, #111111 0%, #171717 40%, #1f1f1f 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.support-title {
    margin: 0 0 6px;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.support-subtitle {
    margin: 0;
    color: var(--text-muted);
}

.support-layout {
    display: grid;
    grid-template-columns: 2.1fr 1fr;
    gap: 24px;
}

.support-form-card {
    background: #020202;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 22px 24px 24px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.65);
}

.support-form-title {
    margin: 0 0 12px;
    font-size: 1.2rem;
}

.support-field {
    margin-bottom: 14px;
}

.support-field label {
    display: block;
    margin-bottom: 4px;
}

.support-field input[type="text"],
.support-field select,
.support-field textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 10, 10, 0.96);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
}

.support-field textarea {
    resize: vertical;
    min-height: 120px;
}

.support-hint {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.support-quick-templates {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.support-quick-title {
    margin: 0 0 10px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--text-muted);
}

.support-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.support-template-btn {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(20, 20, 20, 0.96);
    color: #fff;
    font-size: 0.9rem;
    padding: 8px 10px;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.support-template-btn:hover {
    background: rgba(35, 35, 35, 0.96);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.support-actions {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.support-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.support-info-card {
    background: rgba(12, 12, 12, 0.98);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 18px 18px;
}

.support-info-card h3 {
    margin: 0 0 10px;
    font-size: 1rem;
}

.support-ticket-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.support-ticket-link:hover {
    color: var(--accent);
}

.support-empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Страница тикетов (cabinet/tickets.php) */
.tickets-list-card,
.tickets-detail-card {
    background: rgba(12, 12, 12, 0.98);
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.tickets-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.tickets-detail-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.tickets-detail-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tickets-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.tickets-status--open {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.tickets-status--in_progress {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.tickets-status--closed {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
}

.tickets-priority--high { color: #ff5252; }
.tickets-priority--medium { color: #ffc107; }
.tickets-priority--low { color: var(--text-muted); }

.tickets-detail-body {
    margin-bottom: 24px;
}

.tickets-message {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.tickets-message--user {
    background: rgba(255, 255, 255, 0.03);
}

.tickets-message--staff {
    background: rgba(33, 150, 243, 0.08);
    border-color: rgba(33, 150, 243, 0.3);
}

.tickets-message-author {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.tickets-message-content {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.tickets-message-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.tickets-reply-form textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    margin-bottom: 12px;
}

.tickets-empty {
    margin: 16px 0;
    color: var(--text-muted);
}

.tickets-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tickets-list-item {
    border-bottom: 1px solid var(--border);
}

.tickets-list-item:last-child {
    border-bottom: none;
}

.tickets-list-link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s;
}

.tickets-list-link:hover {
    color: var(--hover-text);
}

.tickets-list-title {
    flex: 1;
    min-width: 0;
    font-weight: 500;
}

.tickets-list-user {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.tickets-list-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.chat-role-badge {
    display: inline-block;
    padding: 0;
    font-size: 0.75rem;
    font-weight: 600;
    background: none;
    border: none;
}
.chat-role-badge.role-user {
    color: var(--text-muted);
}
.chat-role-badge.role-moderator {
    color: #64b5f6;
}
.chat-role-badge.role-admin {
    color: #ff5252;
}

.chat-message-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--border);
}

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

.chat-avatar-placeholder {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    background: var(--accent);
    color: #000;
}

.chat-message-body {
    flex: 1;
    min-width: 0;
}

.chat-message-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.chat-author {
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
}
.chat-author.chat-author--user {
    color: var(--text);
}
.chat-author.chat-author--moderator {
    color: #64b5f6;
    animation: chat-nick-shimmer-mod 2.5s ease-in-out infinite;
}
.chat-author.chat-author--admin {
    color: #ff5252;
    animation: chat-nick-shimmer-admin 2.5s ease-in-out infinite;
}
.chat-author:hover {
    text-decoration: underline;
}
.chat-author.chat-author--user:hover {
    color: var(--hover-text);
}
.chat-author.chat-author--moderator:hover {
    color: #90caf9;
}
.chat-author.chat-author--admin:hover {
    color: #ff7676;
}
@keyframes chat-nick-shimmer-mod {
    0%, 100% { text-shadow: 0 0 8px rgba(100, 181, 246, 0.4); filter: brightness(1); }
    50% { text-shadow: 0 0 14px rgba(100, 181, 246, 0.7); filter: brightness(1.12); }
}
@keyframes chat-nick-shimmer-admin {
    0%, 100% { text-shadow: 0 0 8px rgba(255, 82, 82, 0.4); filter: brightness(1); }
    50% { text-shadow: 0 0 14px rgba(255, 82, 82, 0.7); filter: brightness(1.12); }
}

.chat-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.chat-admin-menu-btn {
    margin-left: 4px;
    padding: 0 6px;
    height: 20px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
}

.chat-admin-menu-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
}

.chat-admin-menu {
    display: none;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
}

.chat-admin-menu--open {
    display: block;
}

/* Чекбокс-хак для меню админа в чате на форуме */
.chat-admin-toggle {
    display: none;
}

.chat-admin-toggle:checked + .chat-admin-menu-btn + .chat-admin-menu {
    display: block;
}

.chat-admin-edit-text {
    width: 100%;
    padding: 6px 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
}

/* Список тем в разделе (новый вид) */
.thread-sections {
    margin-top: 24px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.thread-sections-toolbar {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
}

.thread-section {
    background: rgba(0, 0, 0, 0.65);
}

.thread-section + .thread-section {
    border-top: 1px solid var(--border);
}

.thread-section-header {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.thread-section-body {
    padding: 4px 0 8px;
}

.thread-card {
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.thread-card:last-child {
    border-bottom: none;
}

.thread-card-main {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 220px;
    gap: 16px;
    align-items: center;
}

.thread-card--pinned {
    background: rgba(255, 255, 255, 0.02);
}

.thread-card-avatar-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.thread-card-avatar,
.thread-card-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.thread-card-avatar-placeholder {
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.thread-card-title {
    display: block;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 3px;
}

.thread-card-title:hover {
    color: var(--accent);
}

.thread-card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.thread-card-author {
    font-weight: 500;
}

.thread-card-dot {
    opacity: 0.6;
}

.thread-card-right {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.thread-card-stats {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-bottom: 4px;
}

.thread-card-stat-label {
    display: block;
}

.thread-card-stat-value {
    color: var(--accent);
    font-weight: 600;
}

.thread-card-last-date {
    display: block;
}

.thread-card-last-user {
    display: block;
}

.forum-empty {
    margin-top: 16px;
    color: var(--text-muted);
}

.chat-admin-menu-btn {
    margin-left: 4px;
    padding: 0 6px;
    height: 20px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
}

.chat-admin-menu-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
}

.chat-admin-menu {
    display: none;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
}

.chat-admin-menu--open {
    display: block;
}

.chat-admin-edit-text {
    width: 100%;
    padding: 6px 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
}

.chat-message-text {
    color: var(--text);
    word-break: break-word;
    line-height: 1.5;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", var(--font-sans);
}

.chat-form-container {
    border-top: 1px solid var(--border);
    padding: 16px;
    background: var(--bg-card);
}

.chat-input-wrap {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-input-wrap textarea {
    flex: 1;
    padding: 10px 12px;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", var(--font-sans);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    resize: none;
    min-height: 44px;
    max-height: 120px;
}

.chat-input-wrap textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.chat-input-wrap input[type="text"] {
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", var(--font-sans);
    flex: 1;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.95rem;
    min-height: 44px;
}

.chat-input-wrap input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
}

/* Чат на странице форума */
.forum-chat-block {
    margin-top: 0;
    margin-bottom: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: visible;
    padding: 0 0 16px;
}

.forum-chat-title {
    margin: 0;
    padding: 16px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

.forum-chat-messages {
    max-height: 320px;
    overflow-y: auto;
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.forum-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.forum-chat-messages::-webkit-scrollbar-track {
    background: var(--bg-input);
}

.forum-chat-messages::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.forum-chat-block .chat-empty {
    padding: 24px;
}

.forum-chat-block .auth-error {
    padding: 0 20px 8px;
    margin: 0;
}

.forum-chat-block .chat-form-container,
.forum-chat-block .forum-chat-form {
    padding: 0 20px 12px;
}
.forum-chat-form,
.chat-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
}
.forum-chat-form .chat-input-wrap,
.chat-form .chat-input-wrap {
    flex: 1;
    min-width: 200px;
}

.forum-chat-block .chat-login-hint {
    padding: 0 20px 12px;
    margin: 0;
    border: none;
}

/* Ежедневный розыгрыш */
.forum-giveaway-block {
    background: linear-gradient(145deg, #1a1a1a 0%, #141414 100%);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 12px;
    margin-bottom: 32px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    position: relative;
}
.forum-giveaway-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffc107 0%, #ff9800 50%, #ffc107 100%);
    background-size: 200% 100%;
    animation: giveawayShine 4s ease-in-out infinite;
}
@keyframes giveawayShine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.forum-giveaway-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.08) 0%, rgba(255, 152, 0, 0.05) 100%);
    border-bottom: 1px solid rgba(255, 193, 7, 0.15);
}
.forum-giveaway-icon {
    font-size: 2.5rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(255, 193, 7, 0.4));
}
.forum-giveaway-header-text {
    flex: 1;
}
.forum-giveaway-title {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}
.forum-giveaway-desc {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.forum-giveaway-prize {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffc107;
    text-shadow: 0 0 20px rgba(255, 193, 7, 0.4);
}
.forum-giveaway-prizes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border);
}
.forum-giveaway-prize-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 500;
}
.forum-giveaway-prize-item i {
    font-size: 0.9rem;
}
.forum-giveaway-prize-1 { background: rgba(255, 193, 7, 0.15); color: #ffc107; border: 1px solid rgba(255, 193, 7, 0.3); }
.forum-giveaway-prize-2 { background: rgba(158, 158, 158, 0.15); color: #bdbdbd; border: 1px solid rgba(158, 158, 158, 0.3); }
.forum-giveaway-prize-3 { background: rgba(205, 127, 50, 0.2); color: #cd7f32; border: 1px solid rgba(205, 127, 50, 0.4); }
.forum-giveaway-msg { margin: 12px 24px 0 !important; }
.forum-giveaway-timer {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
    border-bottom: 1px solid var(--border);
}
.forum-giveaway-timer i { margin-right: 8px; }
.forum-giveaway-wait {
    padding: 16px 24px;
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
}
.forum-giveaway-wait i { margin-right: 8px; }
.forum-giveaway-stats {
    padding: 16px 24px;
}
.forum-giveaway-participants {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.forum-giveaway-participants i {
    margin-right: 6px;
    color: var(--accent);
}
.forum-giveaway-participants strong {
    color: var(--text);
}
.forum-giveaway-form {
    padding: 0 24px 20px;
}
.forum-giveaway-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%) !important;
    color: #1a1a1a !important;
    border: none !important;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}
.forum-giveaway-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 193, 7, 0.45);
}
.forum-giveaway-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px 20px;
    margin: 0;
    color: #4caf50;
    font-weight: 500;
}
.forum-giveaway-status i {
    font-size: 1.1rem;
}
.forum-giveaway-hint {
    padding: 0 24px 20px;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.forum-giveaway-hint a {
    color: #ffc107;
    text-decoration: none;
}
.forum-giveaway-hint a:hover {
    text-decoration: underline;
}
.forum-giveaway-winners {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.15);
}
.forum-giveaway-winners-title {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
}
.forum-giveaway-winners-title i {
    margin-right: 6px;
    color: #ffc107;
}
.forum-giveaway-winners-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.forum-giveaway-winner-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}
.forum-giveaway-winner-item:last-child { margin-bottom: 0; }
.forum-giveaway-winner-1 { border-left-color: #ffc107; }
.forum-giveaway-winner-2 { border-left-color: #bdbdbd; }
.forum-giveaway-winner-3 { border-left-color: #cd7f32; }
.forum-giveaway-place {
    min-width: 70px;
    font-weight: 600;
    font-size: 0.8rem;
}
.forum-giveaway-winner-1 .forum-giveaway-place { color: #ffc107; }
.forum-giveaway-winner-2 .forum-giveaway-place { color: #bdbdbd; }
.forum-giveaway-winner-3 .forum-giveaway-place { color: #cd7f32; }
.forum-giveaway-winner-login {
    flex: 1;
    font-weight: 500;
}
.forum-giveaway-winner-amount {
    color: #4caf50;
    font-weight: 600;
}

.forum-chat-more {
    margin: 0;
    padding: 0 20px;
    font-size: 0.9rem;
}

.forum-chat-more a {
    color: var(--accent);
    text-decoration: none;
}

.forum-chat-more a:hover {
    color: var(--hover-text);
    text-decoration: underline;
}

.chat-send-btn {
    padding: 10px 20px;
    white-space: nowrap;
    height: 44px;
}

.chat-login-hint {
    border-top: 1px solid var(--border);
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-card);
}

.chat-login-hint a {
    color: var(--accent);
    text-decoration: none;
}

.chat-login-hint a:hover {
    color: var(--hover-text);
    text-decoration: underline;
}

.forum-layout-with-sidebar {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
}
.forum-sidebar-left {
    position: sticky;
    top: 80px;
}
.forum-main-content {
    min-width: 0;
}
.forum-online-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 24px;
}
.forum-online-block--sidebar {
    margin-bottom: 0;
}

/* Последние сообщения */
.forum-latest-posts-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 20px;
    margin-top: 24px;
}

.forum-latest-posts-title {
    margin: 0 0 14px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.forum-latest-posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.forum-latest-post-item {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.forum-latest-post-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.forum-latest-post-link {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.forum-latest-post-link:hover .forum-latest-post-text {
    color: var(--hover-text);
}

.forum-latest-post-avatar,
.forum-latest-post-avatar-placeholder {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: rgba(0, 0, 0, 0.5);
}

.forum-latest-post-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.forum-latest-post-body {
    min-width: 0;
    flex: 1;
}

.forum-latest-post-text {
    font-size: 0.9rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.forum-latest-post-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.forum-latest-post-section {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--text);
    text-decoration: underline;
    margin-top: 6px;
}

.forum-latest-post-section:hover {
    color: var(--hover-text);
}

.forum-latest-posts-empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.forum-online-empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.forum-online-title {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
}
.forum-online-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.forum-online-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
}
.forum-online-user:hover {
    border-color: var(--accent);
}
.forum-online-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.forum-online-avatar-placeholder {
    background: var(--accent);
    color: #000;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.forum-online-text {
    display: flex;
    flex-direction: column;
    max-width: 130px;
}
.forum-online-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.forum-online-role {
    font-size: 0.8rem;
}

.forum-search-form {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
}
.forum-search-form .forum-search-input {
    flex: 1;
    max-width: 400px;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 1rem;
}
.forum-search-form .forum-search-input:focus {
    outline: none;
    border-color: var(--accent);
}
.forum-search-empty, .forum-search-count {
    margin: 0 0 16px;
    color: var(--text-muted);
}
.thread-cat-name {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: 4px;
}

/* Результаты поиска тем — показываем список (иначе .thread-row скрыт глобально) */
.forum-page .thread-list .thread-list-head {
    display: grid;
    grid-template-columns: 1fr 120px 80px 140px;
    gap: 12px;
    padding: 10px 16px;
    background: var(--bg-muted);
    font-weight: 600;
    font-size: 0.9rem;
}
.forum-page .thread-list .thread-row {
    display: grid;
    grid-template-columns: 1fr 120px 80px 140px;
    gap: 12px;
    padding: 12px 16px;
    align-items: center;
    border-bottom: 1px solid var(--border);
}
.forum-page .thread-list .thread-row:last-child {
    border-bottom: none;
}
.forum-page .thread-list .thread-row:hover {
    background: var(--bg-muted);
}

.forum-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Admin panel */
.admin-page {
    max-width: 1000px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.admin-card {
    display: block;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, background 0.2s;
}

.admin-card:hover {
    border-color: var(--hover-text);
    background: rgba(255, 255, 255, 0.05);
}

.admin-card h2 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: var(--accent);
}

.admin-card:hover h2 {
    color: var(--hover-text);
}

.admin-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.admin-section {
    margin-top: 32px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.admin-section h2 {
    margin: 0 0 16px;
    font-size: 1.1rem;
}

.admin-form label {
    display: block;
    margin: 10px 0 4px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.admin-form input,
.admin-form select {
    max-width: 400px;
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    margin-bottom: 8px;
}

.admin-form button {
    margin-top: 12px;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--bg-input);
    color: var(--text-muted);
    font-weight: 600;
}

.admin-table tr.row-banned {
    opacity: 0.7;
    background: rgba(255, 82, 82, 0.08);
}

.admin-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.admin-modal-inner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    max-width: 420px;
    width: 100%;
}

.admin-modal-inner h2 {
    margin: 0 0 16px;
    font-size: 1.2rem;
}

.admin-modal-inner label {
    display: block;
    margin: 10px 0 4px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.admin-modal-inner input,
.admin-modal-inner select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    margin-bottom: 8px;
}

.modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

/* Личный кабинет — дизайн в стиле gravebirth profile */
.cabinet-profile-page {
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.cabinet-banner-block {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(20, 20, 20, 0.5);
}

.cabinet-banner-block--inside-profile {
    margin: -30px -30px 20px -30px;
    border-radius: 8px 8px 0 0;
    border: none;
    border-bottom: 1px solid var(--border);
}

.cabinet-banner-block--inside-profile .cabinet-banner-img {
    max-height: 140px;
}

.cabinet-banner-block--inside-profile-info {
    width: 100%;
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.cabinet-banner-block--inside-profile-info .cabinet-banner-img {
    max-height: 100px;
}

/* Баннер на заднем слое (фон) */
.cabinet-profile-info-with-banner {
    position: relative;
    overflow: hidden;
}

.cabinet-banner-block--bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    margin: 0;
    border: none;
    border-radius: 0;
}

.cabinet-banner-block--bg .cabinet-banner-img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    opacity: 0.25;
}

.cabinet-profile-info-with-banner > .profile-avatar-link,
.cabinet-profile-info-with-banner > .profile-details {
    position: relative;
    z-index: 1;
}

.cabinet-banner-img {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
}

.cabinet-profile-header {
    background: rgba(20, 20, 20, 0.7);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.cabinet-profile-header .profile-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-avatar-link {
    text-decoration: none;
    color: inherit;
}

.profile-avatar-wrap {
    position: relative;
    display: inline-block;
}

.profile-avatar-online {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    background: #4caf50;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

.profile-online-check {
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6a6a6a, #3a3a3a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 700;
    transition: transform 0.2s ease;
}

.profile-avatar:hover {
    transform: scale(1.05);
}

.profile-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background: none;
}

.profile-details h2 {
    font-size: 2rem;
    margin: 0 0 5px;
    color: var(--text);
}

.profile-details p {
    color: var(--text-muted);
    margin: 0 0 5px;
    font-size: 0.95rem;
}

.profile-clan-block {
    margin: 10px 0;
}

.profile-clan-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
}

.profile-clan-link:hover {
    color: var(--accent);
}

.profile-clan-avatar,
.profile-clan-avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.profile-clan-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    font-weight: 600;
}

.profile-clan-tag {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.profile-clan-name {
    font-size: 0.9rem;
}

.profile-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.profile-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}

.profile-status.status-online .profile-status-dot {
    background: #4caf50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}
.profile-status.status-offline .profile-status-dot {
    background: var(--text-muted);
}
.profile-status.status-dnd .profile-status-dot {
    background: #ff9800;
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.5);
}
.profile-status.status-invisible .profile-status-dot {
    background: var(--text-muted);
}
.profile-username-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.profile-role.role-admin { color: #ff5252; }
.profile-role.role-moderator { color: #64b5f6; }
.profile-role.role-user { color: var(--text-muted); }

.cabinet-profile-header .profile-stats {
    display: flex;
    gap: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.cabinet-profile-header .stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cabinet-profile-header .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
    color: var(--text);
}

.cabinet-profile-header .stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: block;
    margin-top: 4px;
}

.cabinet-profile-page .profile-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.cabinet-profile-page .profile-posts {
    background: rgba(20, 20, 20, 0.7);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.cabinet-profile-page .profile-posts h3 {
    margin: 0 0 20px;
    font-size: 1.3rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.cabinet-profile-page .post-form {
    margin-bottom: 30px;
}

.cabinet-profile-page .post-form textarea {
    width: 100%;
    min-height: 100px;
    resize: vertical;
    margin-bottom: 15px;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: inherit;
}

.cabinet-profile-page .wall-post.post {
    background: rgba(30, 30, 30, 0.5);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.cabinet-profile-page .post-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.cabinet-profile-page .post-content {
    color: var(--text);
    line-height: 1.6;
}

.cabinet-info-block {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.cabinet-info-block h2 {
    margin: 0 0 16px;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.cabinet-info-block p {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 0.95rem;
}

.cabinet-info-block .activity-stats.cabinet-activity-stats,
.cabinet-info-block .activity-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.cabinet-info-block .activity-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.cabinet-info-block .activity-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 5px;
    display: block;
}

.cabinet-info-block .activity-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-actions-wrap { margin: 20px 0 12px; }
.profile-actions-wrap > a.btn-primary { color: #000 !important; }
.cabinet-info-block a { color: var(--accent); text-decoration: none; }
.cabinet-info-block a:hover { text-decoration: underline; }

/* Настройки (edit) — вкладки в стиле gravebirth settings */
.settings-container {
    background: rgba(20, 20, 20, 0.7);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 30px;
    margin-top: 24px;
    backdrop-filter: blur(10px);
}

.settings-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 0;
}

.settings-tab {
    padding: 12px 25px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
    white-space: nowrap;
    font-family: inherit;
    font-size: 0.95rem;
}

.settings-tab.active {
    color: var(--text);
}

.settings-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
}

.settings-tab:hover {
    color: var(--text);
}

.settings-content {
    display: none;
}

.settings-content.active {
    display: block;
    animation: settingsFadeIn 0.3s ease;
}

@keyframes settingsFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    gap: 12px;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item .info {
    flex: 1;
    min-width: 200px;
}

.settings-item .info h4 {
    margin: 0 0 5px;
    font-size: 1rem;
}

.settings-item .info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.privacy-select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 6px;
}

.settings-security-card {
    background: rgba(30, 30, 30, 0.7);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.settings-security-card label {
    display: block;
    font-size: 0.9rem;
    margin-top: 6px;
}

.settings-security-card input[type="text"],
.settings-security-card input[type="password"],
.settings-security-card input[type="email"],
.settings-security-card select {
    width: 100%;
    max-width: 320px;
    padding: 10px 12px;
    margin: 4px 0 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
}

.settings-security-card input:focus,
.settings-security-card select:focus {
    outline: none;
    border-color: var(--accent);
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.settings-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: rgba(41, 98, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #64b5f6;
}

.settings-card-title h4 {
    margin: 0;
    font-size: 1.2rem;
}

.settings-card-title p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.settings-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 0 12px;
}

.settings-hint a {
    color: #ffffff;
    text-decoration: underline;
}

.settings-hint a:hover {
    color: var(--hover-text);
}

.login-stats-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.login-stat-item {
    flex: 1;
    min-width: 140px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    text-align: center;
}

.login-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.login-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.login-last-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    color: #ffc107;
    font-size: 0.9rem;
}

.login-last-banner i {
    flex-shrink: 0;
}

/* 2FA настройка */
.two-factor-setup p,
.two-factor-status p {
    margin: 0 0 12px;
    color: var(--text);
}
.two-factor-qr {
    margin: 16px 0;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    display: inline-block;
}
.two-factor-qr canvas,
.two-factor-qr img,
.two-factor-qr table {
    display: block;
}
.two-factor-qr-fallback {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.two-factor-setup .settings-hint {
    margin: 12px 0;
}
.two-factor-setup code,
.two-factor-confirm-form input,
.two-factor-disable-form input {
    font-family: monospace;
}
.two-factor-enabled p {
    color: #4caf50;
}
.two-factor-disable-form,
.two-factor-confirm-form {
    margin-top: 16px;
}
.auth-hint {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 0 16px;
}

.settings-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.settings-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    transition: 0.25s;
    border-radius: 24px;
}

.settings-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background: var(--text);
    transition: 0.25s;
    border-radius: 50%;
}

.settings-switch input:checked + .settings-slider {
    background: #4caf50;
}

.settings-switch input:checked + .settings-slider:before {
    transform: translateX(26px);
}

.page-header-settings {
    margin-bottom: 20px;
}

.page-header-settings p {
    color: var(--text-muted);
    margin: 5px 0 0;
}

/* Users list page */
.users-list-block {
    margin-top: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.users-list-block h2 {
    margin: 0;
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.users-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.users-list-item {
    border-bottom: 1px solid var(--border);
}

.users-list-item:last-child {
    border-bottom: none;
}

.users-list-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s;
}

.users-list-link:hover {
    background: rgba(255, 255, 255, 0.05);
}

.users-list-avatar {
    flex-shrink: 0;
}

.users-list-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.users-list-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: 1rem;
}

.users-list-id {
    flex-shrink: 0;
    min-width: 60px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.users-list-role {
    flex-shrink: 0;
    min-width: 100px;
    font-size: 0.9rem;
}

.users-list-login {
    font-weight: 500;
}

/* Clans page */
.clans-create-block {
    margin-top: 24px;
    margin-bottom: 32px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.clans-create-block h2,
.clans-list-block h2 {
    margin: 0 0 16px;
    font-size: 1.1rem;
    font-weight: 600;
}

.clans-create-form .form-row {
    margin-bottom: 12px;
}

.clans-create-form .form-row label {
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.clans-create-form .form-row input[type="text"],
.clans-create-form .form-row input[type="file"] {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

.clans-create-form .form-hint {
    margin: 12px 0 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.clans-list-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.clans-list-block h2 {
    margin: 0;
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

.clans-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.clans-list-item {
    border-bottom: 1px solid var(--border);
}

.clans-list-item:last-child {
    border-bottom: none;
}

.clans-list-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s;
    flex: 1;
}

.clans-list-link:hover {
    background: rgba(255, 255, 255, 0.05);
}

.clans-list-id {
    flex-shrink: 0;
    min-width: 55px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.clans-list-avatar {
    flex-shrink: 0;
}

.clans-list-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.clans-list-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: 1rem;
}

.clans-list-tag {
    flex-shrink: 0;
    min-width: 70px;
    color: var(--accent);
    font-weight: 600;
}

.clans-list-name {
    flex: 1;
    font-weight: 500;
}

.clans-list-members {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.clans-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.clan-delete-form .btn-link {
    font-size: 0.85rem;
}

/* Clan single page */
.clan-tag {
    color: var(--text-muted);
    font-weight: 400;
}

.clan-header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-top: 24px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.clan-avatar-wrap .clan-avatar-img,
.clan-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.clan-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    font-size: 2rem;
    font-weight: 600;
}

.clan-info p {
    margin: 8px 0;
}

.clan-leave-form {
    margin-top: 12px;
}

.clan-invite-block {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.clan-invite-block h3 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.clan-invite-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.clan-invite-form input[type="number"] {
    width: 120px;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

.clan-members-block {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.clan-members-block h3 {
    margin: 0 0 16px;
    font-size: 1rem;
}

.clan-members-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.clan-member-item {
    margin-bottom: 8px;
}

.clan-member-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    text-decoration: none;
    color: var(--text);
}

.clan-member-link:hover {
    color: var(--accent);
}

.clan-member-avatar,
.clan-member-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.clan-member-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    font-weight: 600;
}

.clan-member-role {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #e04545;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .forum-layout-with-sidebar {
        grid-template-columns: 1fr;
    }
    .forum-sidebar-left {
        order: 2;
    }
    .forum-main-content {
        order: 1;
    }
    .forum-cat-main {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    .forum-cat-last {
        max-width: none;
        text-align: left;
    }
    .thread-list-head,
    .thread-row {
        grid-template-columns: 1fr 80px;
        grid-template-rows: auto auto;
    }
    .forum-page .thread-list .thread-list-head,
    .forum-page .thread-list .thread-row {
        grid-template-columns: 1fr 80px;
        grid-template-rows: auto auto;
    }
    .thread-row .col-topic { grid-column: 1 / -1; }
    .thread-row .col-author { grid-column: 1; }
    .thread-row .col-posts { grid-column: 2; }
    .thread-row .col-date { grid-column: 1 / -1; font-size: 0.85rem; }
    .post {
        grid-template-columns: 1fr;
    }
    .chat-container {
        height: calc(100vh - 250px);
        min-height: 400px;
    }
    .chat-input-wrap {
        flex-direction: column;
        align-items: stretch;
    }
    .chat-send-btn {
        width: 100%;
    }
    .cabinet-layout,
    .messages-layout {
        grid-template-columns: 1fr;
    }
    .cabinet-profile-page .profile-content {
        grid-template-columns: 1fr;
    }
    .cabinet-profile-header .profile-info {
        flex-direction: column;
        text-align: center;
    }
    .cabinet-profile-header .profile-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    .settings-tabs {
        flex-direction: column;
    }
    .settings-item {
        flex-direction: column;
        align-items: flex-start;
    }
    /* Новый адаптив для тем и постов */
    .thread-card-main {
        grid-template-columns: 40px minmax(0, 1fr);
        grid-template-rows: auto auto;
        row-gap: 8px;
    }
    .thread-card-right {
        grid-column: 1 / -1;
        text-align: left;
        margin-top: 4px;
    }
    .thread-post-inner {
        grid-template-columns: 1fr;
    }
    .thread-post-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-right: 0;
        padding-bottom: 12px;
        align-items: center;
        text-align: center;
    }
    .thread-post-body {
        padding-top: 8px;
    }
    .header-right-widgets {
        display: none;
    }
    .cabinet-dropdown-mobile-only {
        display: block;
    }
    .forum-online-user {
        width: 100%;
    }
}
/* 1. РАСТЯГИВАЕМ ШАПКУ НА ВЕСЬ ЭКРАН */
.header-inner {
    max-width: 100% !important; /* Отменяем ограничение в 1100px */
    padding-left: 24px;
    padding-right: 24px;
}

/* 2. ВЫЕЗЖАЮЩЕЕ МЕНЮ СЛЕВА */
.slide-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.slide-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.slide-menu-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
    padding: 20px;
    overflow-y: auto;
}
.slide-menu-drawer.active {
    transform: translateX(0);
}

.slide-menu-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}
.slide-menu-close:hover {
    color: #fff;
}

.slide-menu-list {
    list-style: none;
    padding: 0;
    margin: 40px 0 0 0;
}
.slide-menu-list li {
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
}
.slide-menu-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
}
.slide-menu-list a:hover {
    color: var(--accent);
}