.avatar-editor-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.avatar-editor-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.avatar-editor-modal .modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 7, 20, 0.7);
}

.avatar-editor-dialog {
    position: relative;
    width: min(560px, calc(100% - 32px));
    background: var(--surface-elevated, #0f1024);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 1;
}

.avatar-editor-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    position: relative;
    padding-right: 56px;
}

.avatar-editor-header h3 {
    margin: 4px 0;
    font-size: 1.25rem;
}

.avatar-editor-kicker {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted, #7b7f9e);
}

.avatar-editor-subtitle {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted, #7b7f9e);
}

.avatar-editor-close {
    width: 36px;
    height: 36px;
    border-radius: 18px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.avatar-editor-close:hover {
    background: rgba(255, 255, 255, 0.14);
}

.avatar-editor-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.avatar-editor-frame {
    width: min(320px, 100%);
    aspect-ratio: 1 / 1;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #05060f;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    cursor: grab;
}

.avatar-editor-frame.dragging {
    cursor: grabbing;
}

.avatar-editor-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    user-select: none;
    pointer-events: none;
}

.avatar-editor-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 0 0),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 0);
    background-size: 33.33% 100%, 100% 33.33%;
}

.avatar-editor-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.avatar-editor-controls label {
    font-size: 0.85rem;
    color: var(--text-muted, #7b7f9e);
}

.avatar-editor-controls input[type="range"] {
    width: 100%;
    accent-color: var(--primary-color, #5c6ef8);
}

.avatar-editor-hint {
    font-size: 0.8rem;
    color: var(--text-muted, #7b7f9e);
}

.avatar-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

@media (max-width: 520px) {
    .avatar-editor-dialog {
        padding: 24px;
    }

    .avatar-editor-frame {
        width: 100%;
        border-radius: 20px;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #5c6ef8;
    --primary-hover: #4854e5;
    --secondary-color: #8b5cf6;
    --text-primary: #1f2335;
    --text-secondary: #5a6072;
    /* фон в светлой теме чуть темнее, не чисто белый */
    --bg-primary: #f4f5fb;
    --bg-secondary: #eef1fb;
    --bg-tertiary: #e1e5f5;
    --border-color: #d3d8ec;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 8px 18px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 16px 28px rgba(15, 23, 42, 0.15);
    --shadow-xl: 0 24px 40px rgba(15, 23, 42, 0.18);
    --section-wide-width: calc(100% - 20px);
}

[data-theme="dark"] {
    --primary-color: #6b7ef8;
    --primary-hover: #5a6ae8;
    --secondary-color: #9b6cf6;
    --text-primary: #e4e6eb;
    --text-secondary: #b0b3b8;
    --bg-primary: #1a1a1a;
    --bg-secondary: #121212;
    --bg-tertiary: #1e1e1e;
    --border-color: #2d2d2d;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 18px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 28px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 24px 40px rgba(0, 0, 0, 0.6);
}

html {
    height: 100%;
    overflow-x: hidden;
    width: 100%;
    overflow-y: auto;
}

html body {
    overflow-x: hidden;
}

/* Темный scrollbar для всего сайта */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary, #121212);
    border-left: 1px solid var(--border-color, #2d2d2d);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary, #1e1e1e);
    border: 2px solid var(--bg-secondary, #121212);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-color, #2d2d2d);
}

/* Для Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--bg-tertiary, #1e1e1e) var(--bg-secondary, #121212);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    font-size: 15px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    line-height: 1.7;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

html.admin-guard-locked body {
    opacity: 0;
    pointer-events: none;
}

.admin-guard-denied {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.65)),
        var(--bg-primary);
    padding: 40px 16px;
}

.admin-guard-card {
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.45);
    padding: 48px 40px;
    max-width: 420px;
    text-align: center;
}

.admin-guard-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.admin-guard-card h1 {
    margin-bottom: 12px;
}

.admin-guard-card p {
    margin-bottom: 24px;
    color: var(--text-secondary);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.rules-section .container {
    max-width: 1600px;
}

.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 999998; /* Высокий z-index для header, чтобы меню помощи было поверх */
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: 100%;
    overflow: visible; /* Разрешаем overflow для выпадающих меню */
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 24px;
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}


.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 20px; /* сдвигаем логотип правее */
}

.logo {
    flex-shrink: 0;
}

.logo a {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav {
    display: flex;
    gap: 24px;
    justify-content: flex-start;
    transform: translateY(4px);
}

/* ========== МЕНЮ ПОМОЩИ ========== */
.help-menu-container {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 2147483647;
    isolation: isolate;
}

.help-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}

.help-menu-btn:hover {
    color: var(--primary-color);
}

.help-menu-btn.active {
    color: var(--primary-color);
}


.help-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 170px !important;
    width: 170px !important;
    max-width: 170px !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease-out, visibility 0.25s ease-out, transform 0.25s ease-out;
    z-index: 2147483647;
    padding: 8px 0;
    isolation: isolate;
}

.help-menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    left: auto !important; /* Отключаем left при открытии, чтобы работал left из JS */
    transition: opacity 0.25s ease-in, visibility 0.25s ease-in, transform 0.25s ease-in;
}

.help-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.help-menu-item:hover {
    background: var(--bg-tertiary);
}

.help-menu-item svg {
    flex-shrink: 0;
    color: var(--text-secondary);
}

.help-menu-item:hover svg {
    color: var(--primary-color);
}
/* ========== КОНЕЦ МЕНЮ ПОМОЩИ ========== */

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

.link-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.link-button:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.nav-item {
    position: relative;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    flex-direction: row;
    flex-wrap: nowrap;
    margin-right: 20px; /* отступ от правого края */
}

#loginBtn,
#registerBtn {
    display: none;
}

.settings-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    position: relative;
    flex-shrink: 0;
}

/* Индикатор уведомлений о сообщениях в header */
.header-message-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    position: relative;
    text-decoration: none;
    flex-shrink: 0;
}

.header-message-indicator:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.header-message-indicator.has-notifications {
    border-color: var(--primary-color);
    color: var(--primary-color);
    animation: pulse-notification 2s infinite;
}

.header-message-indicator svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.header-message-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: #ef4444;
    color: #fff;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1;
}

@keyframes pulse-notification {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(92, 110, 248, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(92, 110, 248, 0);
    }
}

/* Для страницы чата - кнопка настроек в панели */
.chat-page .settings-icon-btn {
    position: relative;
}

/* Футер в самом низу страницы (не фиксированный) */
.footer {
    margin-top: auto;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

/* Делаем body flex-контейнером для прижатия футера к низу */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Основной контент растягивается */
.rules-section {
    flex: 1;
}

/* Для страницы чата */
body.chat-page {
    overflow-x: hidden !important;
    min-height: 100vh !important;
    padding-bottom: 0 !important;
}

/* Для страницы чата - футер остается фиксированным */
body.chat-page .footer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0;
    right: 0;
    z-index: 10;
}

body.chat-page .rules-section {
    min-height: calc(100vh - 80px - 100px) !important; /* минимальная высота экрана минус шапка, уменьшаем высоту */
    padding: 0 !important;
    margin: 0 !important;
    background: var(--bg-primary) !important;
}

body.chat-page .container {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

body.chat-page .rules-content {
    max-width: none !important;
    padding: 24px !important;
    padding-bottom: 120px !important; /* продлеваем белый фон чата вниз до формы ввода сообщения */
    margin: 0 !important;
    background: var(--bg-secondary) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    min-height: calc(100vh - 80px - 100px) !important; /* уменьшаем высоту, поднимаем чат вверх */
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

body.chat-page .rules-title {
    display: none !important;
}

body.chat-page .chat-layout {
    min-height: calc(100vh - 80px - 48px - 100px) !important; /* уменьшаем высоту, поднимаем чат вверх */
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Левая панель с диалогами */
body.chat-page .chat-sidebar {
    min-height: 100% !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    background: var(--bg-primary) !important;
    padding: 16px !important;
    border-radius: 8px !important;
    width: 400px !important;
    flex-shrink: 0 !important;
}

.chat-admin-search {
    display: none;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
}

.chat-admin-search[hidden] {
    display: none !important;
}

.chat-admin-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.chat-admin-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.chat-admin-input {
    flex: 1;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 8px 10px;
    font-size: 14px;
}

.chat-admin-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(92, 110, 248, 0.15);
}

.chat-admin-btn {
    width: 100%;
    justify-content: center;
}

/* Правая панель - сообщения и форма ввода */
body.chat-page .chat-main {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    min-height: 100% !important;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

body.chat-page .chat-input-form {
    margin-top: auto !important;
    margin-bottom: 0 !important;
    padding: 16px 0 !important;
    position: relative !important;
    display: flex !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
    z-index: 1; /* Ниже header, чтобы не наслаиваться */
}

/* Скрываем форму, если чат не выбран */
body.chat-page .chat-input-form[style*="display: none"],
body.chat-page .chat-input-form[data-hidden="true"] {
    display: none !important;
}

body.chat-page .chat-messages {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    min-height: 0 !important;
    background: var(--bg-primary) !important;
    padding: 16px !important;
    border-radius: 8px !important;
    margin: 8px 0 !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.settings-icon-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.settings-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Индикатор новых сообщений в header */
.header-message-indicator {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.header-message-indicator:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.header-message-indicator.has-notifications {
    color: var(--primary-color);
    animation: messagePulse 2s infinite;
}

.header-message-indicator svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s;
}

.header-message-indicator:hover svg {
    transform: scale(1.1);
}

.header-message-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: #ef4444;
    color: #fff;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
    box-sizing: border-box;
    line-height: 1;
}

.header-message-badge:empty {
    display: none;
}

.header-message-indicator:not(.has-notifications) .header-message-badge {
    display: none;
}

@keyframes messagePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.settings-form {
    padding: 20px 0;
}

.settings-form .form-group {
    margin-bottom: 20px;
}

.settings-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.theme-toggle-control {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.theme-toggle-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
}

.theme-toggle-buttons {
    display: flex;
    gap: 10px;
}

.theme-toggle-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-toggle-btn svg {
    width: 22px;
    height: 22px;
}

.theme-toggle-btn[data-theme="light"] {
    background: linear-gradient(135deg, #ede9fe, #dbeafe);
    border: none;
    color: #4c1d95;
}

.theme-toggle-btn[data-theme="light"].active {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border: none;
    color: #fff;
    box-shadow: 0 10px 22px rgba(99, 102, 241, 0.45);
}

.theme-toggle-btn[data-theme="dark"] {
    background: linear-gradient(135deg, #020617, #0b1120, #1d2448);
    border: none;
    color: #e5e7eb;
}

.theme-toggle-btn[data-theme="dark"].active {
    background: linear-gradient(135deg, #1d2448, #312e81, #4338ca);
    border: none;
    color: #fff;
    box-shadow: 0 12px 24px rgba(67, 56, 202, 0.5);
}

html[data-theme="dark"] .theme-toggle-btn[data-theme="light"] {
    background: linear-gradient(135deg, #ede9fe, #dbeafe);
    border: none;
    color: #4c1d95;
}

html[data-theme="dark"] .theme-toggle-btn[data-theme="light"].active {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border: none;
    color: #fff;
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.5);
}

.select-custom {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.select-custom:hover {
    border-color: var(--primary-color);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

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

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

.hero {
    /* Светлая тема: как было изначально */
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

/* Тёмная тема: ночной градиент для главного меню */
html[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #020617 0%, #0b1120 35%, #1d2448 70%, #312e81 100%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #f3f4f6; /* чуть темнее чисто белого */
    text-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 32px;
    color: rgba(249, 250, 251, 0.9);
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .hero-title {
    text-shadow: none;
}

html[data-theme="dark"] .hero-subtitle {
    text-shadow:
        0 0 10px rgba(99, 102, 241, 0.6),
        0 0 22px rgba(79, 70, 229, 0.45);
}

html[data-theme="dark"] .btn-primary {
    box-shadow: none;
}

html[data-theme="dark"] .btn-primary:hover {
    box-shadow: none;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.search-input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    font-size: 16px;
    color: var(--text-primary);
}

.search-input:focus {
    outline: none;
}

.search-btn {
    padding: 16px 24px;
    background: var(--primary-color);
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

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

.category-search-wrapper {
    max-width: 1100px;
    margin: 20px auto 0;
    display: flex;
    gap: 24px;
    align-items: stretch;
    flex-wrap: wrap;
}

.category-search-box {
    flex: 1 1 520px;
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--primary-color);
    transition: all 0.3s;
}
.quick-categories {
    flex: 1 1 320px;
    padding: 4px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

html[data-theme="dark"] .quick-categories {
    padding: 4px 0 0 0;
}

.quick-category-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
}

.quick-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-category-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-color);
    font-weight: 500;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.quick-category-tag:hover {
    background: var(--primary-color);
    color: #fff;
}

@media (max-width: 900px) {
    .category-search-wrapper {
        flex-direction: column;
    }

    .quick-categories {
        flex: 1 1 auto;
    }
}

.categories-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 20px;
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.categories-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-hover);
}

.categories-btn svg {
    flex-shrink: 0;
}

.category-search-inner {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    padding-right: 12px;
}

.search-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 8px;
    flex-shrink: 0;
}

.category-search-box:focus-within {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    border-color: var(--primary-hover);
}

.search-icon-wrapper {
    padding: 0 20px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.category-search-input {
    flex: 1;
    padding: 18px 0;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #000;
    outline: none;
}

.category-search-input::placeholder {
    color: #7B7B7B;
}

.category-search-results {
    position: absolute;
    top: calc(100% + 2px);
    left: 12px;
    right: 12px;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-top: 0;
}

/* Тёмная тема для выпадающего списка поиска */
html[data-theme="dark"] .category-search-inner {
    background: transparent;
}

html[data-theme="dark"] .category-search-results {
    background: #020617;
    border-color: #1f2937;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.9);
}

html[data-theme="dark"] .category-result-item {
    color: #e5e7eb;
    border-bottom-color: #1f2937;
}

html[data-theme="dark"] .category-result-item:hover {
    background: rgba(31, 41, 55, 0.95);
}

html[data-theme="dark"] .category-result-subtitle {
    color: #9ca3af;
}

.category-search-results.active {
    display: block;
}

.category-result-item {
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    color: #000;
    justify-content: flex-start;
}

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

.category-result-item:hover {
    background: rgba(229, 231, 235, 0.9);
}

.category-result-item.game-result {
    font-weight: 600;
}

.category-result-item.category-result {
    padding-left: 48px;
    color: #000;
    font-size: 14px;
}

.category-result-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.category-result-title {
    font-weight: 600;
}

.category-result-subtitle {
    font-size: 12px;
    color: #6B7280;
    margin-top: 4px;
}

.category-result-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.quick-categories {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.quick-category-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
}

.quick-categories-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-category-tag {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    text-decoration: none;
    color: white;
    font-size: 14px;
    transition: all 0.2s;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.quick-category-tag:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.stats {
    background: var(--bg-primary);
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    text-align: center;
}

.stat-item {
    padding: 24px;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    transition: text-shadow 0.3s;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    transition: text-shadow 0.3s;
}

html[data-theme="dark"] .stat-number {
    color: var(--primary-color);
    text-shadow:
        0 0 8px rgba(92, 110, 248, 0.55),
        0 0 20px rgba(92, 110, 248, 0.35);
}

html[data-theme="dark"] .stat-label {
    color: var(--text-primary);
    text-shadow:
        0 0 8px rgba(129, 140, 248, 0.4),
        0 0 16px rgba(79, 70, 229, 0.3);
}

.games-section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-title-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.alphabet-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.alphabet-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: var(--text-secondary);
}

.alphabet-btn:hover,
.alphabet-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.game-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 16px;
    cursor: pointer;
    text-align: left;
    outline: none;
    position: relative;
}

.game-card:hover,
.game-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.game-card:focus-visible {
    box-shadow: 0 0 0 3px rgba(57, 108, 255, 0.25), var(--shadow-lg);
}

.game-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.game-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tag {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
    font: inherit;
}

.category-tag:hover {
    background: var(--primary-color);
    color: white;
}

.game-category-hero {
    padding: 60px 0 30px;
    /* В светлой теме фон совпадает с главным меню */
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-bottom: 1px solid var(--border-color);
}

html[data-theme="dark"] .game-category-hero {
    background: linear-gradient(135deg, #020617 0%, #0b1120 35%, #1d2448 70%, #312e81 100%);
}

.game-category-label {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1.5px;
    color: white;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.game-category-title {
    font-size: 36px;
    margin: 0 0 12px;
    color: white;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.game-category-description {
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.game-category-strip-wrapper {
    border-radius: 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-strip-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 1024px) {
    .category-strip-row {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }
}

.category-strip-btn {
    padding: 14px 24px;
    border-radius: 48px;
    border: none;
    background: linear-gradient(135deg, #f7f5ff, #ecebff);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.18);
}

.category-strip-btn:hover,
.category-strip-btn:focus-visible {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #f3f0ff, #e0ddff);
    box-shadow: 0 16px 28px rgba(99, 102, 241, 0.28);
}

html:not([data-theme="dark"]) .category-strip-btn.active {
    background: linear-gradient(135deg, #793bec, #925bec, #9280df);
    color: #fff;
    box-shadow: 0 22px 44px rgba(79, 70, 229, 0.55);
    transform: translateY(-1px) scale(1.015);
}

html[data-theme="dark"] .category-strip-btn {
    border: none;
    background: linear-gradient(135deg, #5c6ef8, #c084fc);
    color: #fff;
    box-shadow: 0 18px 32px rgba(92, 110, 248, 0.4);
}

html[data-theme="dark"] .category-strip-btn:hover,
html[data-theme="dark"] .category-strip-btn:focus-visible {
    background: linear-gradient(135deg, #7c3aed, #c084fc);
    box-shadow: 0 22px 40px rgba(127, 90, 240, 0.55);
}

html[data-theme="dark"] .category-strip-btn.active {
    background: linear-gradient(135deg, #af81eb, #a360da, #8a1cf1);
    color: #ffffff;
    box-shadow: 0 32px 56px rgba(199, 210, 254, 0.6);
    transform: translateY(-1px) scale(1.02);
}


.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-fullscreen {
    align-items: stretch;
    justify-content: stretch;
}

.modal-fullscreen .modal-content {
    max-width: none;
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    padding: 48px 64px;
    overflow-y: auto;
}

.modal-fullscreen .modal-close {
    top: 32px;
    right: 48px;
}

@media (max-width: 768px) {
    .modal-fullscreen .modal-content {
        padding: 24px 16px;
    }

    .lot-modal-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .lot-modal-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .lot-modal-close-btn {
        width: 100%;
    }
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 32px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: 300;
    color: #fefefe;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    margin-bottom: 24px;
    font-size: 24px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label,
.form-label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

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

.form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.form-group select {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.btn-block {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
}

.link:hover {
    text-decoration: underline;
}

.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 30px 0 20px; /* Увеличено padding сверху, чтобы текст не обрезался */
    margin-top: auto;
    overflow: visible; /* Убеждаемся, что контент не обрезается */
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 10px;
}

.footer-section h3 {
    font-size: 24px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
    padding-top: 0; /* Убираем padding сверху, чтобы текст не обрезался */
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-section p {
    color: var(--text-secondary);
}

/* Скрываем логотип и описание в первом блоке футера */
.footer-content > .footer-section:first-child {
    display: none;
}

.footer-section.footer-links ul {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    justify-content: center;
}

.footer-section.footer-links ul li {
    margin-bottom: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .header-actions {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-btn {
        border-radius: 0 0 12px 12px;
    }
}

.rules-section {
    padding: 60px 0;
    background: var(--bg-secondary);
    min-height: calc(100vh - 210px);
}

.rules-content {
    max-width: 1600px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.rules-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.rules-toc {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 40px;
}

.rules-toc h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.rules-toc ul {
    list-style: none;
    padding-left: 0;
}

.rules-toc ul li {
    margin-bottom: 8px;
}

.rules-toc ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.rules-toc ul li a:hover {
    color: var(--primary-color);
}

.rules-toc ul ul {
    margin-top: 8px;
    margin-left: 20px;
}

.rules-section-content {
    margin-bottom: 48px;
}

.rules-section-content p,
.rules-section-content li {
    font-size: 16px;
    line-height: 1.5;
}

.rules-section-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.rules-subsection {
    margin-bottom: 32px;
}

.rules-subsection h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.rules-table {
    margin-bottom: 24px;
}

.rules-table table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
}

.rules-table thead {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.rules-table th {
    padding: 20px;
    text-align: left;
    font-weight: 600;
    font-size: 16px;
}

.rules-table td {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
}

.rules-table th:first-child,
.rules-table td:first-child {
    white-space: nowrap;
}

.rules-table th:last-child,
.rules-table td:last-child {
    white-space: normal;
    word-wrap: break-word;
}

.rules-table tbody tr:last-child td {
    border-bottom: none;
}

.rules-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.rules-note {
    background: var(--bg-tertiary);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 6px;
    margin-top: 24px;
}

.rules-note p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.rules-note p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .rules-content {
        padding: 24px;
    }
    
    .rules-title {
        font-size: 28px;
    }
    
    .rules-section-content h2 {
        font-size: 24px;
    }
    
    .rules-table {
        font-size: 12px;
    }
    
    .rules-table th,
    .rules-table td {
        padding: 12px 8px;
    }
}

.profile-section {
    padding: 40px 0;
    background: var(--bg-secondary);
}

.profile-header {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    display: flex;
    gap: 24px;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: relative;
}

.profile-avatar {
    flex-shrink: 0;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: 700;
}

.profile-info {
    flex: 1;
}

.profile-actions {
    position: absolute;
    top: 16px;
    right: 16px;
}

.profile-description {
    margin-top: 8px;
    padding: 6px 14px;
    border-radius: 12px;
    background: rgba(8, 10, 24, 0.72);
    color: #f5f6ff;
    font-size: 14px;
    max-width: 480px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-description[hidden] {
    display: none !important;
}

.profile-settings-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    white-space: nowrap;
}

.profile-settings-modal-content {
    max-width: 720px;
    width: 94vw;
}

.profile-settings-kicker {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--primary-color);
    margin-bottom: 4px;
    font-weight: 600;
}

.profile-settings-subtitle {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.profile-settings-form {
    margin-top: 16px;
}

.profile-settings-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-settings-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    align-items: flex-start;
}

.section-kicker {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--primary-color);
    font-weight: 600;
}

.section-heading h3 {
    margin: 6px 0 0;
    font-size: 20px;
    color: var(--text-primary);
}

.section-note {
    color: var(--text-secondary);
    font-size: 13px;
    max-width: 220px;
}

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

.profile-settings-section.full-width-section {
    grid-column: 1 / -1;
}

.description-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-textarea {
    width: 100%;
    min-height: 96px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 12px 14px;
    resize: none;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(92, 110, 248, 0.15);
}

.description-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
}

#profileDescriptionCounter {
    font-weight: 600;
    color: var(--text-primary);
}

.nickname-allowed-note {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.nickname-allowed-note.has-error {
    color: var(--danger-color);
}

.form-input.input-error {
    border-color: var(--danger-color);
}

.profile-settings-modal-content .modal-header {
    position: relative;
    top: auto;
    z-index: 1;
    background: transparent;
    border-bottom: none;
    margin-bottom: 16px;
}

.profile-settings-modal-content .modal-close {
    position: sticky;
    top: 12px;
    margin-left: auto;
    margin-right: -12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 16, 32, 0.85);
    border-radius: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 6;
}

.profile-settings-modal-content .modal-close:hover {
    background: rgba(92, 110, 248, 0.85);
}

.nickname-current-banner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-tertiary);
}

.nickname-current-value {
    margin: 6px 0 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.nickname-note {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 280px;
}

.nickname-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.nickname-card.hidden {
    display: none;
}

.nickname-card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.nickname-banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nickname-input-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.nickname-input-row .form-input {
    flex: 1;
    min-width: 220px;
}

.btn-soft {
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-soft:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.avatar-grid,
.background-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.avatar-option,
.background-option {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--bg-secondary);
}

.avatar-option.active,
.background-option.active {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.18);
}

.avatar-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
    overflow: hidden;
}

.avatar-preview.has-image,
.background-preview.has-image,
.upload-thumb.has-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.avatar-preview span,
.background-preview span,
.upload-thumb span {
    font-size: 24px;
    font-weight: 600;
}

.avatar-preview.has-image span,
.background-preview.has-image span,
.upload-thumb.has-image {
    color: transparent;
}

.background-preview {
    width: 100%;
    height: 72px;
    border-radius: 14px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-weight: 600;
}

.custom-upload-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.upload-card {
    flex: 1;
    min-width: 260px;
    border: 1px dashed var(--border-color);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    background: var(--bg-tertiary);
}

.upload-card:hover {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.04);
}

.upload-card input {
    display: none;
}

.upload-card-body {
    display: flex;
    align-items: center;
    gap: 16px;
}

.upload-card-body p {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
}

.upload-card-body span {
    font-size: 13px;
    color: var(--text-secondary);
}

.upload-thumb {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-secondary);
    font-weight: 600;
}

.upload-thumb.large {
    width: 72px;
    height: 56px;
    border-radius: 16px;
}

.text-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

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

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

.text-link.danger-text:hover {
    color: #c53030;
}

.profile-header.default-background {
    background: var(--bg-primary);
}

.profile-header.gradient1-background {
    background: linear-gradient(135deg, #0f172a, #312e81);
}

.profile-header.gradient2-background {
    background: linear-gradient(135deg, #312e81, #db2777);
}

.profile-header.gradient3-background {
    background: linear-gradient(135deg, #065f46, #0ea5e9);
}

.profile-header.custom-background {
    color: #fff;
}

.profile-header.gradient1-background,
.profile-header.gradient2-background,
.profile-header.gradient3-background {
    color: #fff;
}

.profile-header.gradient1-background .profile-username,
.profile-header.gradient2-background .profile-username,
.profile-header.gradient3-background .profile-username,
.profile-header.custom-background .profile-username {
    color: #fff;
}

.profile-header.gradient1-background .profile-stats .stat-label,
.profile-header.gradient2-background .profile-stats .stat-label,
.profile-header.gradient3-background .profile-stats .stat-label,
.profile-header.custom-background .profile-stats .stat-label,
.profile-header.gradient1-background .profile-meta,
.profile-header.gradient2-background .profile-meta,
.profile-header.gradient3-background .profile-meta,
.profile-header.custom-background .profile-meta {
    color: rgba(255, 255, 255, 0.85);
}

.profile-header.gradient1-background .profile-stats .stat-value,
.profile-header.gradient2-background .profile-stats .stat-value,
.profile-header.gradient3-background .profile-stats .stat-value,
.profile-header.custom-background .profile-stats .stat-value {
    color: #fff;
}

.profile-avatar.default-avatar .avatar-placeholder,
.avatar-preview.default-preview {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.profile-avatar.gradient1-avatar .avatar-placeholder,
.avatar-preview.gradient1 {
    background: linear-gradient(135deg, #1e1b4b, #4c1d95);
}

.profile-avatar.gradient2-avatar .avatar-placeholder,
.avatar-preview.gradient2 {
    background: linear-gradient(135deg, #ec4899, #f97316);
}

.profile-avatar.gradient3-avatar .avatar-placeholder,
.avatar-preview.gradient3 {
    background: linear-gradient(135deg, #10b981, #3b82f6);
}

.background-preview.default-bg {
    background: var(--bg-tertiary);
}

.background-preview.gradient1-bg {
    background: linear-gradient(135deg, #0f172a, #312e81);
}

.background-preview.gradient2-bg {
    background: linear-gradient(135deg, #312e81, #db2777);
}

.background-preview.gradient3-bg {
    background: linear-gradient(135deg, #065f46, #0ea5e9);
}

.background-preview.custom-bg {
    font-size: 32px;
}

.profile-avatar.custom-avatar .avatar-placeholder,
.avatar-preview.custom {
    background: var(--bg-secondary);
    border: none;
    color: var(--text-secondary);
}

.avatar-placeholder.has-image {
    background-size: cover;
    background-position: center;
    color: transparent;
}

.profile-username {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.profile-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.profile-stats .stat-item {
    display: flex;
    gap: 8px;
    align-items: center;
}

.profile-stats .stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.profile-stats .stat-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

.profile-stats .stat-value.positive {
    color: var(--success-color);
}

.profile-stats .stat-value.online {
    color: var(--success-color);
    font-size: 16px;
}

.profile-stats .stat-value.offline {
    color: var(--text-secondary);
    font-size: 16px;
}

.profile-meta {
    display: flex;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 12px;
    align-items: center;
}

.profile-meta-separator {
    color: var(--text-secondary);
}

.sales-section {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
}

.sales-table-wrapper {
    overflow-x: auto;
    margin-top: 24px;
}

.sales-table {
    width: 100%;
    border-collapse: collapse;
}

.sales-table thead {
    background: var(--bg-tertiary);
}

.sales-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.sales-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 14px;
}

.sales-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.sales-table tbody tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background: var(--success-color);
    color: white;
}

.categories-section {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.category-search {
    display: flex;
    max-width: 400px;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.category-search .search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
}

.category-search .search-input:focus {
    outline: none;
}

.category-search .search-btn {
    padding: 12px 16px;
    background: var(--primary-color);
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

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

.categories-table-wrapper {
    overflow-x: auto;
    margin-bottom: 24px;
}

.categories-table {
    width: 100%;
    border-collapse: collapse;
}

.categories-table thead {
    background: var(--bg-tertiary);
}

.categories-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.categories-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 14px;
}

.categories-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.categories-table tbody tr:last-child td {
    border-bottom: none;
}

.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 16px;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 14px;
}

.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .help-hero {
        padding: 40px 0;
    }

    .help-hero-actions {
        flex-direction: column;
    }

    .pill-btn {
        width: 100%;
        justify-content: center;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-stats {
        justify-content: center;
    }

    .categories-header {
        flex-direction: column;
        align-items: stretch;
    }

    .category-search {
        max-width: 100%;
    }

    .pagination-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination {
        justify-content: center;
    }

    .sales-table,
    .categories-table {
        font-size: 12px;
    }

    .sales-table th,
    .sales-table td,
    .categories-table th,
    .categories-table td {
        padding: 12px 8px;
    }
}

.sales-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.no-lots-message {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.no-lots-message p {
    font-size: 16px;
}

.selected-game-note {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    padding-top: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    margin: 0 4px;
    transition: all 0.2s;
}

.btn-edit {
    background: var(--primary-color);
    color: white;
}

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

.btn-delete {
    background: var(--danger-color);
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

.lot-modal-content {
    max-width: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.lot-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.lot-modal-summary {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 4px;
}

.lot-modal-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lot-modal-close-btn {
    min-width: 140px;
}

.lot-modal-body {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.language-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.lang-tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.lang-tab:hover {
    color: var(--primary-color);
}

.lang-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.lot-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lot-form .form-group {
    position: relative;
}

.search-results {
    position: absolute;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    z-index: 10;
    box-shadow: var(--shadow-lg);
    margin-top: 4px;
    top: calc(100% + 2px);
    border-top: none;
}

/* Убираем рыжую полоску в поиске игры */
#gameSearch {
    border: 1px solid var(--border-color);
}

#gameSearch:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(92, 110, 248, 0.1);
}

/* Убираем любые border-top в результатах поиска */
.search-results::before {
    display: none;
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--bg-tertiary);
}

.price-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 14px;
}

.price-info span {
    display: flex;
    justify-content: space-between;
}

.price-info strong {
    color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.category-section {
    padding: 60px 0;
    background: var(--bg-secondary);
}

.category-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.lots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.lot-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.lot-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

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

.lot-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.lot-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.lot-info {
    margin-bottom: 20px;
}

.lot-description {
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.lot-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.no-lots {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%;
    min-height: 200px;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 18px;
}

@media (max-width: 768px) {
    .sales-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .lots-grid {
        grid-template-columns: 1fr;
    }
    
    .lot-modal-content {
        max-width: 95%;
        padding: 24px;
    }
}

.help-section {
    padding: 60px 0;
    background: var(--bg-secondary);
}

.help-content {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.help-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: center;
    color: var(--text-primary);
}

.help-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    font-size: 16px;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.help-login-options {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.help-hero {
    background: var(--bg-secondary);
    padding: 60px 0;
    border-bottom: 1px solid var(--border-color);
}

.help-hero-content {
    max-width: 760px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: var(--text-primary);
    margin-left: 0;
    margin-right: auto;
}

.help-hero-content h1 {
    color: var(--text-primary);
}

.help-hero-content p {
    color: var(--text-secondary);
}

.help-kicker {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 13px;
    color: #4f5ddb;
    font-weight: 600;
}

.help-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.pill-btn {
    border-radius: 999px;
    padding: 12px 24px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

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

.pill-outline {
    border-color: var(--border-color);
    color: var(--text-primary);
    background: transparent;
}

.pill-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pill-ghost {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--bg-secondary);
}

.pill-ghost:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.faq-section {
    padding: 10px 0 0;
    background: var(--bg-secondary);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    background: var(--bg-primary);
    cursor: pointer;
}

.faq-item summary {
    font-weight: 600;
    color: var(--text-primary);
    list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item[open] {
    box-shadow: var(--shadow-sm);
}

.faq-item p {
    margin: 10px 0 0;
    color: var(--text-secondary);
}

.rules-accordion-section {
    padding: 30px 0 0px;
    background: var(--bg-secondary);
}

.rules-header h2 {
    margin-bottom: 8px;
}

.section-accordion {
    margin-bottom: 12px;
}

.section-accordion + .collapsible {
    margin-bottom: 38px;
}

.section-accordion-btn {
    width: var(--section-wide-width);
    margin-left: 0;
    margin-right: auto;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-primary);
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    cursor: pointer;
    text-align: left;
    transition: border 0.2s, box-shadow 0.2s, color 0.2s;
}

.section-accordion-btn::after {
    content: '\203A';
    font-size: 20px;
    line-height: 1;
    color: var(--text-secondary);
    transition: transform 0.2s, color 0.2s;
}

.section-accordion-btn.active {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.section-accordion-btn.active::after {
    color: var(--primary-color);
    transform: rotate(90deg);
}

@media (max-width: 640px) {
    .section-accordion-btn {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .section-accordion + .collapsible > .rules-table,
    .section-accordion + .collapsible > .faq-table {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

.section-accordion-title {
    display: block;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.section-accordion-desc {
    display: block;
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.collapsible {
    display: none;
}

.collapsible.open {
    display: block;
    margin-top: 16px;
}

.section-accordion + .collapsible > .rules-table,
.section-accordion + .collapsible > .faq-table {
    width: var(--section-wide-width);
    margin-left: 0;
    margin-right: auto;
}

.faq-table {
    margin-bottom: 24px;
}

.faq-table table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
}

.faq-table thead {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.faq-table th,
.faq-table td {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    font-size: 16px;
    line-height: 1.6;
}

.faq-table th:first-child,
.faq-table td:first-child {
    white-space: nowrap;
}

.faq-table th:last-child,
.faq-table td:last-child {
    white-space: normal;
    word-wrap: break-word;
}

.faq-table tbody tr:last-child td {
    border-bottom: none;
}

.rules-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rule-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-primary);
    overflow: hidden;
    box-shadow: var(--shadow-xs, 0 2px 6px rgba(15, 23, 42, 0.05));
}

.rule-item summary {
    list-style: none;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
}

.rule-item summary::after {
    content: '\203A';
    font-size: 18px;
    line-height: 1;
    color: var(--text-secondary);
    transition: transform 0.2s, color 0.2s;
}

.rule-item summary::-webkit-details-marker {
    display: none;
}

.rule-title {
    flex: 1;
    color: var(--text-primary);
}

.rule-item[open] summary::after {
    transform: rotate(90deg);
    color: var(--primary-color);
}

.rule-body {
    border-top: 1px solid var(--border-color);
    padding: 18px 20px 22px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    background: var(--bg-secondary);
}

.rules-tabs-section {
    padding: 60px 0;
    background: var(--bg-secondary);
}

.rules-tabs {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.rules-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.rules-tab-btn {
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 8px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.rules-tab-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.rules-tab-content {
    display: none;
}

.rules-tab-content.active {
    display: block;
}

.seller-help-section,
.seller-responsibility-section {
    padding: 40px 0;
    background: var(--bg-primary);
}

.seller-help-header h2 {
    margin: 0 0 10px 0;
}

.seller-help-header p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.rules-table-wrapper {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.rules-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    box-sizing: border-box;
}

.rules-table th,
.rules-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
    text-align: left;
}

.rules-table th:first-child,
.rules-table td:first-child {
    white-space: nowrap;
}

.rules-table th:last-child,
.rules-table td:last-child {
    white-space: normal;
    word-wrap: break-word;
}

.rules-table th {
    background: var(--bg-secondary);
    font-weight: 600;
}

.rules-note {
    color: var(--text-secondary);
    margin-top: -8px;
}

.requests-hero {
    background: var(--bg-primary);
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--border-color);
}

.requests-hero-content {
    max-width: 760px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.requests-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.requests-board {
    background: var(--bg-secondary);
    padding: 40px 0;
}

.request-panel {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-md, 0 10px 30px rgba(15, 23, 42, 0.08));
}

.request-panel-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.text-muted {
    color: var(--text-secondary);
    margin: 4px 0 0;
}

.request-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.request-filter-btn {
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 8px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.request-filter-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.12);
}

.request-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.request-card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    cursor: pointer;
}

.request-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.request-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.request-id {
    font-weight: 600;
    color: var(--text-secondary);
}

.request-status {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
}

.status-open {
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-color);
}

.status-answered {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.status-closed {
    background: rgba(248, 113, 113, 0.18);
    color: #dc2626;
}

.request-card h3 {
    margin: 0 0 8px 0;
}

.request-card p {
    margin: 0;
    color: var(--text-secondary);
}

.request-meta {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.request-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.request-form-section {
    background: var(--bg-primary);
    padding: 40px 0 60px;
}

/* Модальное окно для создания запроса */
.request-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.request-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.request-modal {
    background: var(--bg-primary);
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.request-modal-overlay.active .request-modal {
    transform: scale(1);
}

.request-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 32px 32px 24px;
    border-bottom: 1px solid var(--border-color);
    gap: 20px;
}

.request-modal-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.request-modal-header p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 14px;
}

.request-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.request-modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.request-form {
    border: none;
    border-radius: 0;
    padding: 32px;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.request-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.request-form label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

.request-form input,
.request-form select,
.request-form textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font: inherit;
    font-size: 14px;
    resize: vertical;
    transition: all 0.2s;
}

.request-form input:focus,
.request-form select:focus,
.request-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(92, 110, 248, 0.1);
}

.request-form textarea {
    min-height: 140px;
    font-family: inherit;
}

.request-form small {
    color: var(--text-secondary);
}

.request-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Пагинация */
.request-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px 0;
    margin-top: 24px;
    border-top: 1px solid var(--border-color);
}

.pagination-btn {
    padding: 10px 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.support-modal-content {
    max-width: 560px;
    width: 90%;
}

.support-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.support-form .form-group {
    margin-bottom: 16px;
}

.support-form select,
.support-form textarea,
.support-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.support-form .radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.support-form .radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.support-type-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.support-type-btn {
    flex: 1;
    min-width: 160px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.2s;
}

.support-type-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.support-section {
    display: none;
}

.support-section.active {
    display: block;
}

.form-hint {
    display: block;
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 12px;
}

.support-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.form-note {
    margin-top: 12px;
    color: var(--success-color);
    font-weight: 600;
}

.help-quick-section {
    padding: 40px 0 60px;
    background: var(--bg-primary);
}

.help-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.help-quick-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.help-quick-card h3 {
    margin: 0;
    font-size: 20px;
    color: var(--text-primary);
}

.help-quick-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 15px;
}

.help-quick-card .btn {
    align-self: flex-start;
}

.social-login h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.social-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.g-signin2 {
    flex: 1;
    min-width: 240px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
}

.g-signin2 > div {
    width: 100% !important;
    margin: 0 auto;
    min-height: 50px !important;
}

.g-signin2 iframe {
    min-width: 240px !important;
    min-height: 50px !important;
}

#googleSignInContainer,
#googleSignInContainerRegister {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    flex: 1;
}

.social-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
}

.social-btn svg {
    width: 20px;
    height: 20px;
}

.divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    right: 0;
    height: 1px;
    background: var(--border-color);
    z-index: 1;
}

.divider span {
    position: relative;
    background: var(--bg-primary);
    padding: 0 16px;
    z-index: 2;
}

.help-auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 768px) {
    .help-content {
        padding: 24px;
    }

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

    .social-buttons {
        flex-direction: column;
    }

    .social-btn {
        width: 100%;
    }
}

.new-games-section {
    padding: 60px 0;
    background: var(--bg-primary);
}

.featured-categories-section {
    padding: 60px 0;
    background: var(--bg-secondary);
}

.popular-games-section {
    padding: 60px 0;
    background: var(--bg-primary);
}

.platform-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--border-color);
}

.platform-tab {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    font-size: 16px;
}

.platform-tab:hover {
    color: var(--primary-color);
}

.platform-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.show-all-games-wrapper {
    text-align: center;
    margin-top: 20px;
}

.category-more {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    display: inline-block;
    margin-left: 4px;
}

.btn-small {
    padding: 10px 20px;
    font-size: 14px;
}

.featured-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.featured-category-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.featured-category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.category-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.category-subname {
    font-size: 14px;
    color: var(--text-secondary);
}

.category-count {
    font-size: 12px;
    color: var(--primary-color);
    margin-top: auto;
    padding-top: 8px;
}

.new-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.new-game-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    position: relative;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    outline: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.new-game-card:hover,
.new-game-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.new-game-card:focus-visible {
    box-shadow: 0 0 0 3px rgba(57, 108, 255, 0.25), var(--shadow-lg);
}

.new-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.new-game-card .game-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-right: 55px;
    word-break: break-word;
}

.new-game-card .game-categories {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .featured-categories-grid,
    .new-games-grid {
        grid-template-columns: 1fr;
    }
    
    .category-search-wrapper {
        margin: 32px 16px 0;
    }
    
    .category-search-box {
        border-radius: 8px;
    }
    
    .quick-categories {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 16px;
    }
    
    .quick-categories-list {
        width: 100%;
    }
    
    .quick-category-tag {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .category-search-results {
        max-height: 300px;
    }
    
    .categories-btn span {
        display: none;
    }
    
    .categories-btn {
        padding: 18px 16px;
    }
    
    .search-divider {
        margin: 0 4px;
    }
}

.categories-page {
    min-height: calc(100vh - 200px);
    background: var(--bg-secondary);
    padding: 0;
}

.categories-container {
    display: flex;
    min-height: calc(100vh - 200px);
}

.categories-sidebar {
    width: 280px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.close-sidebar {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-sidebar:hover {
    color: var(--text-primary);
}

.sidebar-nav {
    padding: 8px 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-item:hover {
    background: var(--bg-tertiary);
}

.sidebar-item.active {
    background: var(--bg-tertiary);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.sidebar-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.sidebar-text {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}

.sidebar-arrow {
    color: var(--text-secondary);
    font-size: 18px;
}

.categories-main {
    flex: 1;
    padding: 32px 40px;
    max-width: calc(100% - 280px);
}

.categories-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.categories-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.category-count {
    font-size: 16px;
    color: var(--text-secondary);
}

.popular-categories-section {
    margin-bottom: 40px;
}

.popular-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.popular-label svg {
    color: #ff6b35;
    width: 18px;
    height: 18px;
}

.popular-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.popular-category-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.popular-category-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.popular-category-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.popular-category-name {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.categories-content {
    margin-bottom: 40px;
}

.categories-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.category-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.category-group {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.category-group-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.category-group-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-group-list li {
    margin: 0;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 14px;
}

.category-item:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.category-item-count {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.categories-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

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

.categories-modal-content {
    background: var(--bg-primary);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.categories-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 10;
}

.categories-modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.categories-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.categories-modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.categories-modal-body {
    padding: 24px 28px;
}

.games-platform-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.games-platform-content {
    background: var(--bg-primary);
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.games-platform-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
}

.games-platform-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.games-platform-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.games-platform-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.games-platform-buttons {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.platform-btn {
    padding: 16px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.platform-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.categories-search-wrapper {
    margin-bottom: 24px;
}

.categories-search-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
}

.categories-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
}

.categories-popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.category-btn-large {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.category-btn-large:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-btn-large .category-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.category-btn-large .category-count {
    font-size: 12px;
    color: var(--text-secondary);
}

.categories-games-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 24px;
}

.category-game-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.category-game-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.category-game-item .game-name {
    font-weight: 500;
}

.category-game-item .game-count {
    color: var(--text-secondary);
    font-size: 13px;
}

.categories-section {
    margin-bottom: 32px;
}

.categories-section:last-child {
    margin-bottom: 0;
}

.categories-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.categories-section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.popular-icon {
    color: #ff6b35;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.categories-popular-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.category-btn-large {
    padding: 20px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.category-btn-large:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-btn {
    padding: 14px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap;
}

.category-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .categories-modal-content {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
    }
    
    .categories-modal-header {
        padding: 20px;
    }
    
    .categories-modal-body {
        padding: 20px;
    }
    
    .categories-popular-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-btn {
        font-size: 13px;
        padding: 12px 16px;
    }
}

@media (max-width: 1200px) {
    .categories-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .categories-sidebar {
        position: fixed;
        left: -280px;
        top: 70px;
        z-index: 1000;
        transition: left 0.3s;
    }
    
    .categories-sidebar.active {
        left: 0;
    }
    
    .categories-main {
        max-width: 100%;
        padding: 24px 16px;
    }
    
    .categories-columns {
        grid-template-columns: 1fr;
    }
    
    .popular-categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

.no-categories {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 16px;
}

.popular-category-count {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.category-item-more {
    color: var(--primary-color) !important;
    font-weight: 500;
}

.category-item-more:hover {
    text-decoration: underline;
}

.category-section {
    padding: 40px 0;
    background: var(--bg-secondary);
    min-height: calc(100vh - 200px);
}

.category-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.lots-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 32px;
}

.lot-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
    display: flex;
    flex-direction: row;
    min-height: 140px;
}

.lot-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.lot-image {
    width: 200px;
    min-width: 200px;
    height: 140px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.lot-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    font-weight: 700;
}

.lot-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

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

.lot-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

.lot-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

.lot-info {
    flex: 1;
    margin-bottom: 16px;
}

.lot-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 12px 0;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lot-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.lot-seller {
    font-size: 13px;
    color: var(--text-secondary);
}

.lot-quantity {
    font-size: 13px;
    color: var(--text-secondary);
}

.lot-game-info {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.lot-game,
.lot-category {
    font-size: 12px;
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    color: var(--text-secondary);
}

.btn-block {
    width: 100%;
    margin-top: auto;
}

.no-lots {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 200px;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 16px;
}

@media (max-width: 768px) {
    .lots-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .category-title {
        font-size: 24px;
    }
}

.user-menu-container {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    z-index: 10001; /* Выше header, чтобы dropdown был поверх всего */
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-menu-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.user-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.dropdown-arrow {
    transition: transform 0.2s;
    color: #000000;
}

.user-menu-btn:hover .dropdown-arrow {
    color: #000000;
}

.user-menu-btn.active .dropdown-arrow {
    transform: rotate(180deg);
    color: #000000;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 170px !important;
    width: 170px !important;
    max-width: 170px !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease-out, visibility 0.25s ease-out, transform 0.25s ease-out;
    z-index: 10001; /* Выше всего, чтобы было поверх всего сайта */
    padding: 8px 0;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    right: auto !important; /* Отключаем right при открытии, чтобы работал left из JS */
    transition: opacity 0.25s ease-in, visibility 0.25s ease-in, transform 0.25s ease-in;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
}

.dropdown-item svg {
    flex-shrink: 0;
    color: var(--text-secondary);
}

.dropdown-item:hover svg {
    color: var(--primary-color);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

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

.logout-btn:hover {
    background: rgba(231, 76, 60, 0.1) !important;
}

.logout-btn svg {
    color: var(--danger-color) !important;
}

.user-actions-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-direction: row;
    flex-wrap: nowrap;
}

.user-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    cursor: pointer;
    line-height: 1.5;
}

.user-balance:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.user-balance .balance-label {
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1;
    display: flex;
    align-items: center;
    margin: 5px;
    padding: 0;
}

.user-balance .balance-amount {
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.chat-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    white-space: nowrap;
    position: relative;
}

.chat-btn svg {
    flex-shrink: 0;
}

.chat-btn-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 1;
    display: block;
}

.chat-btn.has-notifications {
    animation: pulse-notification 2s infinite;
}

@media (max-width: 768px) {
    .user-name {
        display: none;
    }
    
    .user-menu-btn {
        padding: 8px 12px;
    }
    
    .user-dropdown {
        right: 0;
        left: auto;
    }
    
    .user-actions-row {
        margin-right: 8px;
        gap: 8px;
    }
    
    .user-balance {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .balance-label {
        display: none;
    }
    
    .chat-btn span {
        display: none;
    }
    
    .chat-btn {
        padding: 8px 12px;
    }
}

/* ===== Чат ===== */

.chat-modal-content {
    max-width: 900px;
    width: 100%;
}

.chat-layout {
    display: flex;
    gap: 16px;
    height: 480px;
    max-height: 70vh;
}

.chat-sidebar {
    width: 400px;
    border-right: 1px solid var(--border-color);
    padding-right: 12px;
    display: flex;
    flex-direction: column;
}

.chat-sidebar-header h2 {
    font-size: 18px;
    margin-bottom: 12px;
}

.chat-start {
    margin-bottom: 16px;
}

.chat-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}

.chat-input {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    min-width: 0;
}

.chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px rgba(92, 110, 248, 0.15);
}

.chat-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.chat-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.chat-dialogs {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-dialogs-header {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.chat-dialogs-list {
    flex: 1;
    border-radius: 10px;
    background: var(--bg-secondary);
    padding: 6px;
    overflow-y: auto;
}

.chat-dialog-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    gap: 8px;
}

.chat-dialog-item:hover {
    background: var(--bg-tertiary);
}

.chat-dialog-item.active {
    background: var(--primary-color);
    color: #fff;
}

.chat-dialog-item.has-unread {
    background: rgba(92, 110, 248, 0.15);
    border-left: 3px solid var(--primary-color);
    font-weight: 500;
}

.chat-dialog-item.has-unread .chat-dialog-name {
    font-weight: 600;
    color: var(--primary-color);
}

.chat-dialog-item.has-unread .chat-dialog-last {
    font-weight: 500;
    opacity: 1;
}

.chat-dialog-item.active.has-unread {
    background: var(--primary-color);
    border-left: none;
    color: #fff;
}

.chat-dialog-item.active.has-unread .chat-dialog-name {
    color: #fff;
}

.chat-dialog-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--primary-color);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.chat-dialog-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-dialog-name {
    font-size: 14px;
    font-weight: 500;
}

.chat-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
}

.chat-profile-link:hover,
.chat-profile-link:focus-visible {
    color: inherit;
}

.chat-dialog-last {
    font-size: 12px;
    color: inherit;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.chat-main-header {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.chat-main-header h3 {
    font-size: 16px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 2px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.chat-message {
    max-width: 80%;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 16px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    display: flex;
    flex-direction: column;
}

.chat-message img {
    max-width: 300px;
    max-height: 300px;
    object-fit: contain;
    cursor: pointer;
    background: transparent;
}

/* Модальное окно для просмотра изображений в полный экран */
.chat-image-fullscreen-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.chat-image-fullscreen-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.chat-image-fullscreen-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
}

.chat-image-fullscreen-container {
    position: relative;
    z-index: 1;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-image-fullscreen-img {
    max-width: 100%;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 8px;
}

.chat-image-fullscreen-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 2;
}

.chat-image-fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .chat-image-fullscreen-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 24px;
    }
}

.chat-message-self {
    align-self: flex-end;
    background: var(--primary-color);
    color: #fff;
    border-bottom-right-radius: 2px;
}

.chat-message-other {
    align-self: flex-start;
    background: var(--bg-secondary);
    border-bottom-left-radius: 2px;
}

.chat-message-support-label {
    font-size: 11px;
    color: #fff;
    background: #8b5cf6;
    font-weight: 600;
    margin-bottom: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.chat-dialog-support-prefix,
.chat-header-support-prefix {
    font-size: 11px;
    color: #fff;
    background: #8b5cf6;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-right: 4px;
}

.chat-message-meta {
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.8;
    text-align: right;
}

.chat-date-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0;
    position: relative;
    text-align: center;
}

.chat-date-divider::before,
.chat-date-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.chat-date-divider::before {
    margin-right: 12px;
}

.chat-date-divider::after {
    margin-left: 12px;
}

.chat-date-divider {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    padding: 0 12px;
}

.chat-date-notification {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    animation: dateNotificationFade 3s ease-in-out;
    pointer-events: none;
}

@keyframes dateNotificationFade {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    10% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    90% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
}

.chat-file-preview {
    margin-bottom: 8px;
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.chat-file-preview-container {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.chat-file-preview-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    object-fit: contain;
}

.chat-file-preview-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.chat-file-preview-name {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    word-break: break-word;
}

.chat-file-preview-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chat-file-preview-remove:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.chat-input-form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    align-items: flex-end;
}

.chat-input-form .chat-input {
    flex: 1;
}

.chat-input-textarea {
    min-height: 48px;
    max-height: 190px;
    resize: none;
    padding-top: 12px;
    padding-bottom: 12px;
    line-height: 1.5;
}

/* Request file preview styles */
.request-file-section {
    margin-top: 12px;
    margin-bottom: 12px;
}

.request-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
}

.request-file-preview {
    margin-top: 12px;
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.request-file-preview-container {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.request-file-preview-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    object-fit: contain;
}

.request-file-preview-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.request-file-preview-name {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    word-break: break-word;
}

.request-file-preview-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s;
    flex-shrink: 0;
}

.request-file-preview-remove:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.chat-file-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    flex-shrink: 0;
}

.chat-file-btn svg {
    width: 20px;
    height: 20px;
}

.chat-char-count {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 0 4px;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-end;
    margin-bottom: 4px;
    display: none;
}

.chat-char-count.warning {
    color: #f59e0b;
    display: block;
}

.chat-char-count.error {
    color: #ef4444;
    display: block;
}

/* Явно устанавливаем черный цвет текста для поля ввода сообщения */
#chatMessageInput {
    color: #1f2335 !important; /* Черный цвет для светлой темы */
    background: var(--bg-primary) !important;
}

[data-theme="dark"] #chatMessageInput {
    color: #e4e6eb !important; /* Светлый цвет для темной темы */
}

#chatMessageInput::placeholder {
    color: var(--text-secondary) !important;
    opacity: 0.7;
}

#chatMessageInput:focus {
    color: #1f2335 !important; /* Черный цвет для светлой темы */
    background: var(--bg-primary) !important;
    border-color: var(--primary-color) !important;
}

[data-theme="dark"] #chatMessageInput:focus {
    color: #e4e6eb !important; /* Светлый цвет для темной темы */
}

.chat-input-form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 8px; /* небольшой отступ от фиолетовой полосы */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

@media (max-width: 768px) {
    .chat-layout {
        flex-direction: column;
        height: 100%;
        max-height: none;
    }

    .chat-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-right: 0;
        padding-bottom: 10px;
    }
}

/* Старые правила удалены - используются новые выше */

/* ===== Вывод средств ===== */

.withdrawals-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 20px;
}

.withdrawals-header .section-title {
    margin-top: -60px;
    margin-bottom: 0;
}

.balance-cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.balance-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    flex: 1;
    min-width: 250px;
}

.balance-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.balance-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.balance-hint {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
    opacity: 0.8;
    line-height: 1.4;
}

.withdrawals-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
}

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

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.withdraw-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.withdraw-form-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    flex: 2 1 auto;
    min-width: 400px;
    max-width: none;
    width: auto;
}

.withdraw-form {
    width: 100%;
    max-width: 100%;
}

.stats-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    flex: 0 0 550px;
    min-width: 550px;
    max-width: 550px;
}

.stats-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.stats-period-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.period-btn {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.period-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.period-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.stats-calendar-wrapper {
    position: relative;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.calendar-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.calendar-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.calendar-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.calendar-btn-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-right: 8px;
    font-size: 13px;
}

.calendar-btn-date {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 13px;
}

.calendar-picker {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 320px;
    width: 320px;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.calendar-nav-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 18px;
    transition: all 0.2s;
}

.calendar-nav-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.calendar-month-year-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
}

.calendar-month-year {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    user-select: none;
}

.calendar-month-year:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.calendar-month-selector {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    padding: 12px;
    min-width: 200px;
}

.calendar-month-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-bottom: 12px;
}

.calendar-month-item {
    padding: 8px 4px;
    text-align: center;
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.calendar-month-item:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.calendar-month-item.active {
    background: var(--primary-color);
    color: white;
}

.calendar-year-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.calendar-year-nav {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
}

.calendar-year-nav:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.calendar-year-display {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    min-width: 60px;
    text-align: center;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.calendar-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 6px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
    min-height: 36px;
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day:not(.empty):hover {
    background: var(--primary-color);
    color: white;
}

.calendar-day.today {
    background: var(--bg-tertiary);
    font-weight: 600;
    border: 1px solid var(--primary-color);
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
}

.withdraw-form .form-group {
    margin-bottom: 20px;
}

.withdraw-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.withdraw-form .form-group input,
.withdraw-form .form-group select {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.withdraw-form .form-group input:focus,
.withdraw-form .form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(92, 110, 248, 0.1);
}

.withdraw-form .form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.withdraw-form .form-group select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.history-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.history-filter-btn {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.history-filter-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.history-filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.withdrawals-history {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.withdrawals-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.withdrawal-item {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.2s;
}

.withdrawal-item:hover {
    box-shadow: var(--shadow-sm);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.history-type {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

.history-status {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-amount {
    font-size: 24px;
    font-weight: 700;
}

.history-amount.positive {
    color: var(--success-color);
}

.history-amount.negative {
    color: var(--danger-color);
}

.history-game {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

.history-method {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

.history-details {
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    padding: 10px 12px;
    border-radius: 6px;
    word-break: break-all;
}

.history-date {
    font-size: 13px;
    color: var(--text-secondary);
}

.withdrawal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.withdrawal-id {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

.withdrawal-status {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.status-processing {
    background: rgba(92, 110, 248, 0.1);
    color: var(--primary-color);
}

.status-completed {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.status-rejected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

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

.withdrawal-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.withdrawal-method {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

.withdrawal-details {
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    padding: 10px 12px;
    border-radius: 6px;
    word-break: break-all;
}

.withdrawal-date {
    font-size: 13px;
    color: var(--text-secondary);
}

.withdrawal-processed {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.withdrawal-rejection {
    font-size: 13px;
    color: var(--danger-color);
    margin-top: 8px;
    padding: 10px 12px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 6px;
}

.no-withdrawals-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-withdrawals-message p {
    font-size: 16px;
}

/* Стили для страницы "Мои покупки" */
.purchases-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.purchase-item {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.purchase-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.purchase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.purchase-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 18px;
}

.purchase-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.purchase-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.purchase-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.purchase-date {
    font-size: 13px;
    color: var(--text-secondary);
}

.purchase-game {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.purchase-status {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.status-confirmed {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.status-reviewed {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.status-not-reviewed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.status-icon {
    font-weight: 700;
}

.purchase-actions {
    margin-top: 8px;
}

.no-purchases-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-purchases-message p {
    font-size: 16px;
}

/* Стили для страницы "Мои продажи" */
.sales-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.sales-filter-btn {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.sales-filter-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.sales-filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.sales-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sale-item {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.sale-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.sale-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.sale-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 18px;
}

.sale-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--success-color);
}

.sale-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sale-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sale-date {
    font-size: 13px;
    color: var(--text-secondary);
}

.sale-game {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.sale-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    width: fit-content;
}

.status-active {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.status-closed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.sale-complaints {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.complaints-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--warning-color);
}

.complaints-icon {
    font-size: 18px;
}

.complaints-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.complaint-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-primary);
    border-radius: 6px;
    gap: 12px;
}

.complaint-reason {
    font-size: 13px;
    color: var(--text-primary);
    flex: 1;
}

.complaint-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-resolved {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.no-sales-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-sales-message p {
    font-size: 16px;
}

@media (max-width: 768px) {
    .withdrawals-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .balance-card {
        width: 100%;
        padding: 16px;
    }

    .balance-value {
        font-size: 22px;
    }

    .withdraw-layout {
        flex-direction: column;
    }

    .withdraw-form-card {
        padding: 24px;
        min-width: 100%;
    }

    .stats-card {
        flex: 1;
        min-width: 100%;
    }

    .withdrawal-header {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ---------- Аватар: редактор поверх настроек ---------- */
.avatar-editor-modal {
    position: fixed;
    inset: 0;
    z-index: 3200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.avatar-editor-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.avatar-editor-modal .modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 8, 20, 0.65);
    backdrop-filter: blur(2px);
}

.avatar-editor-dialog {
    position: relative;
    width: min(560px, calc(100% - 32px));
    background: var(--surface-elevated, #0f1024);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 1;
}

.avatar-editor-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.avatar-editor-header h3 {
    color: #f4f6ff;
}

.avatar-editor-kicker {
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.avatar-editor-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

.avatar-editor-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(20, 23, 44, 0.85);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
}

.avatar-editor-close:hover {
    background: rgba(92, 110, 248, 0.85);
    transform: translateY(-1px);
}

.avatar-editor-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.avatar-editor-frame {
    width: min(360px, 100%);
    aspect-ratio: 1 / 1;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #05060f;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    cursor: grab;
}

.avatar-editor-frame.dragging {
    cursor: grabbing;
}

.avatar-editor-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    user-select: none;
    pointer-events: none;
    will-change: transform;
}

.avatar-editor-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 0 0),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 0);
    background-size: 33.33% 100%, 100% 33.33%;
}

.avatar-editor-crop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 22px;
    box-shadow: 0 0 0 999px rgba(5, 6, 15, 0.55);
    transition: box-shadow 0.2s ease;
    cursor: move;
    z-index: 1;
}

.avatar-editor-crop::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

.avatar-editor-handle {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 6px;
    background: #f5f6ff;
    border: 2px solid rgba(11, 13, 32, 0.9);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
    cursor: nwse-resize;
    z-index: 5;
    pointer-events: auto;
    transform: translate(-50%, -50%);
}

.avatar-editor-handle.corner-top-left {
    top: 0;
    left: 0;
    cursor: nwse-resize;
}

.avatar-editor-handle.corner-top-right {
    top: 0;
    left: 100%;
    cursor: nesw-resize;
}

.avatar-editor-handle.corner-bottom-left {
    top: 100%;
    left: 0;
    cursor: nesw-resize;
}

.avatar-editor-handle.corner-bottom-right {
    top: 100%;
    left: 100%;
    cursor: nwse-resize;
}
.avatar-editor-settings {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 16, 32, 0.6);
}

.avatar-editor-settings label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.avatar-editor-settings input[type="range"] {
    width: 100%;
    accent-color: var(--primary-color, #5c6ef8);
}

.avatar-editor-blur-value {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.avatar-editor-hint {
    font-size: 0.85rem;
    color: var(--text-muted, #7b7f9e);
    text-align: center;
}

.avatar-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

@media (max-width: 520px) {
    .avatar-editor-dialog {
        padding: 24px;
    }

    .avatar-editor-frame {
        width: 100%;
        border-radius: 20px;
    }
}

#profileSettingsModal.avatar-editor-active .modal-content {
    filter: blur(3px);
    transform: scale(0.99);
    transition: filter 0.2s ease, transform 0.2s ease;
}

#profileSettingsModal.avatar-editor-active .modal-overlay {
    opacity: 0.6;
}

.nickname-cooldown-notice {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.9rem;
    color: var(--text-muted, #7b7f9e);
    margin: 10px 0 4px;
}

.nickname-cooldown-notice strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-header.custom-background {
    position: relative;
    overflow: hidden;
    background: #0b0d1a;
}

.profile-header.custom-background::before,
.profile-header.custom-background::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.profile-header.custom-background::before {
    background-image: var(--profile-bg-image);
    background-size: cover;
    background-position: center;
    filter: blur(var(--profile-bg-blur, 6px));
    transform: scale(1.05);
    z-index: 0;
}

.profile-header.custom-background::after {
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.85), rgba(17, 24, 39, 0.45));
    z-index: 0;
}

.profile-header.custom-background > * {
    position: relative;
    z-index: 1;
}

/* Create Lot Page Styles */
.create-lot-page {
    min-height: calc(100vh - 80px - 100px);
    padding: 40px 0;
    background: var(--bg-secondary);
}

.create-lot-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.create-lot-header {
    margin-bottom: 32px;
    text-align: center;
}

.create-lot-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.create-lot-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
}

.create-lot-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.form-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.form-section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.form-section-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(92, 110, 248, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 180px;
}

/* Улучшенный дизайн поля описания */
.create-lot-form .form-textarea {
    min-height: 200px;
    border-radius: 12px;
    padding: 16px;
    font-size: 15px;
    line-height: 1.6;
    resize: none; /* Убираем стрелочку resize */
}

html[data-theme="dark"] .create-lot-form .form-textarea {
    background: #000000;
    border-color: var(--border-color, #2d2d2d);
    color: #ffffff;
}

html[data-theme="dark"] .create-lot-form .form-textarea:focus {
    background: #000000;
    border-color: var(--primary-color, #5c6ef8);
    color: #ffffff;
}

html[data-theme="dark"] .create-lot-form .form-textarea::placeholder {
    color: #666666;
}

html[data-theme="dark"] .create-lot-form .form-input {
    background: var(--bg-primary);
    color: var(--text-primary);
}

html[data-theme="dark"] .create-lot-form .form-input:focus {
    background: var(--bg-primary);
    color: var(--text-primary);
}

html[data-theme="dark"] .create-lot-form .form-input::placeholder {
    color: var(--text-secondary);
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.price-info {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.price-info p {
    margin: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.price-info strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Images Upload Styles */
.images-upload-container {
    margin-top: 16px;
}

.images-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.image-upload-item {
    position: relative;
    aspect-ratio: 1;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    background: var(--bg-primary);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    overflow: hidden;
}

.image-upload-item:hover {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
}

.image-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.image-upload-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary);
}

.image-upload-placeholder svg {
    width: 32px;
    height: 32px;
}

.image-upload-placeholder span {
    font-size: 14px;
    font-weight: 500;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.image-preview-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.image-preview-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.image-remove-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.form-actions .btn {
    min-width: 120px;
}

@media (max-width: 768px) {
    .create-lot-container {
        padding: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .images-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* Blocking Notification Modal */
.blocking-notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.blocking-notification-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.blocking-notification-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.blocking-notification-content {
    position: relative;
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    text-align: center;
}

.blocking-notification-modal.active .blocking-notification-content {
    transform: scale(1);
}

.blocking-notification-content h3 {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.blocking-notification-content p {
    margin: 0 0 24px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.blocking-notification-content .btn {
    min-width: 120px;
}

/* Lot View Page Styles */
.lot-view-page {
    min-height: calc(100vh - 80px - 100px);
    padding: 40px 0;
    background: var(--bg-secondary);
}

.lot-loading,
.lot-error {
    text-align: center;
    padding: 60px 20px;
}

.lot-content {
    max-width: 1200px;
    margin: 0 auto;
}

.lot-view-header {
    margin-bottom: 32px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 16px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary-color);
}

.lot-view-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.lot-meta-info {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.lot-game-badge,
.lot-category-badge {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.lot-view-body {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
}

.lot-view-main {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.lot-images-section {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.lot-main-image {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lot-main-image-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lot-image-placeholder {
    color: var(--text-secondary);
    font-size: 16px;
}

.lot-thumbnails {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.lot-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    opacity: 0.7;
}

.lot-thumbnail:hover {
    opacity: 1;
}

.lot-thumbnail.active {
    border-color: var(--primary-color);
    opacity: 1;
}

.lot-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lot-description-section {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.lot-description-section h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.lot-description-content {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 15px;
}

.lot-view-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.lot-price-card,
.lot-seller-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.lot-price-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.lot-price-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.lot-price-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.lot-price-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.price-detail {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-secondary);
}

.price-detail.total {
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
}

.lot-quantity-info {
    margin-bottom: 20px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
}

.lot-seller-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.seller-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.seller-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 20px;
    flex-shrink: 0;
}

.seller-details {
    flex: 1;
}

.seller-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.seller-username {
    font-size: 14px;
    color: var(--text-secondary);
}

@media (max-width: 968px) {
    .lot-view-body {
        grid-template-columns: 1fr;
    }
}

/* Lot Card Link */
.lot-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s, box-shadow 0.2s;
}

.lot-card-link:hover {
    transform: translateY(-4px);
}

.lot-card-link:hover .lot-card {
    box-shadow: var(--shadow-lg);
}

.lot-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Game Separator in Sales Table */
.game-separator-row {
    height: 1px;
}

.game-separator {
    padding: 0 !important;
    height: 1px;
    background: var(--border-color);
    border: none;
}

.game-header-row {
    background: var(--bg-tertiary);
}

.game-header {
    padding: 20px 24px !important;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 100%;
}

.clickable-game-header {
    transition: background 0.2s;
    user-select: none;
}

.clickable-game-header:hover {
    background: var(--bg-secondary) !important;
}

.game-header-icon {
    font-size: 20px;
}

.game-header-name {
    flex: 1;
    min-width: 200px; /* Увеличиваем минимальную ширину */
}

.game-header-count {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 4px 12px;
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.game-header-arrow {
    font-size: 12px;
    color: var(--text-secondary);
    transition: transform 0.2s;
    margin-left: auto;
}

.clickable-game-header:hover .game-header-arrow {
    color: var(--primary-color);
}

/* Game Lots Modal */
.game-lots-modal-content {
    max-width: 900px;
    width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.game-lots-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.filter-btn {
    padding: 8px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.game-lots-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.game-lot-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.game-lot-item:hover {
    background: var(--bg-secondary);
}

.game-lot-link {
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.game-lot-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.game-lot-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.game-lot-category {
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.game-lot-price {
    color: var(--primary-color);
    font-weight: 600;
}

.lot-actions {
    display: flex;
    gap: 8px;
}

/* Category Filters */
.category-filters {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

.category-filters-header {
    margin-bottom: 16px;
}

.category-filters-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.category-filters-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.category-filter-btn {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.category-filter-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.category-filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* My Game Lots Page */
.my-game-lots-page {
    min-height: calc(100vh - 80px - 100px);
    padding: 40px 0;
    background: var(--bg-secondary);
}

.my-game-lots-page .lots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.my-game-lots-page .lot-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    min-height: auto;
    padding: 0;
}

.my-game-lots-page .lot-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.my-game-lots-page .lot-image {
    width: 100%;
    height: 120px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.my-game-lots-page .lot-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: 700;
}

.my-game-lots-page .lot-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.my-game-lots-page .lot-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0;
    gap: 8px;
}

.my-game-lots-page .lot-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.my-game-lots-page .lot-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

.my-game-lots-page .lot-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.my-game-lots-page .lot-description {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.my-game-lots-page .lot-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    color: var(--text-secondary);
}

.my-game-lots-page .lot-category {
    display: inline-block;
    padding: 2px 6px;
    background: var(--bg-primary);
    border-radius: 4px;
    font-size: 10px;
}

.my-game-lots-page .lot-quantity {
    font-size: 11px;
}

.my-game-lots-page .lot-actions-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.my-game-lots-page .lot-actions-row .btn {
    flex: 1;
    padding: 6px 12px;
    font-size: 12px;
}

.my-game-lots-header {
    margin-bottom: 32px;
    text-align: center;
}

.my-game-lots-header .back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 16px;
    transition: color 0.2s;
}

.my-game-lots-header .back-link:hover {
    color: var(--primary-color);
}

.my-game-lots-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.game-lots-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
}

.category-filters-section {
    margin-bottom: 32px;
}

.category-filters-section .category-filters {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.my-game-lots-content {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 32px;
    border: 1px solid var(--border-color);
}

.loading-message,
.error-message,
.no-lots {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 16px;
}

.no-lots-message {
    text-align: center;
    padding: 60px 20px;
}

.no-lots-message p {
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-size: 16px;
}

.lot-actions-row {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-danger {
    background: var(--danger-color, #ef4444);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: var(--danger-color, #dc2626);
}

/* Category Filters */
.category-filters {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

.category-filters-header {
    margin-bottom: 16px;
}

.category-filters-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.category-filters-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.category-filter-btn {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.category-filter-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.category-filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}
