/* ============================================
   CS-ORION — Глобальный стиль (чёрно-зелёный)
   Все страницы: index, forum, topic, new_topic
   ============================================ */
   
/* ============================================
   CANVAS PARTICLES BACKGROUND
   ============================================ */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: transparent;
}

body {
    position: relative;
    z-index: 1;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #151515;
    --bg-header: #1a1a1a;
    --border: #2a2a2a;
    --border-hover: #00ff88;
    --accent: #00ff88;
    --accent-hover: #00cc6a;
    --accent-glow: rgba(0, 255, 136, 0.3);
    --accent-soft: rgba(0, 255, 136, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #666666;
    --danger: #ff4757;
    --warning: #f39c12;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    min-height: 100vh;
    background-image: radial-gradient(ellipse at top, rgba(0,255,136,0.03) 0%, transparent 50%);
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); text-shadow: 0 0 8px var(--accent-glow); }

img { max-width: 100%; height: auto; display: block; }

/* === СКРОЛЛБАР === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }

/* === КНОПКИ === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-outline {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-solid {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: var(--bg-primary);
    border: none;
    font-weight: 600;
}

.btn-solid:hover {
    box-shadow: 0 0 25px var(--accent-glow);
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-sm { padding: 6px 12px; font-size: 11px; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #ff6b7a; }
.btn-cancel { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-cancel:hover { background: var(--bg-header); color: var(--text-primary); border-color: var(--accent); }

/* === HEADER (общий для всех страниц) === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.logo span {
    color: var(--accent);
    text-shadow: 0 0 15px var(--accent-glow);
}

.main-nav {
    display: flex;
    list-style: none;
    gap: 5px;
}

.main-nav a {
    padding: 10px 18px;
    border-radius: 6px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 13px;
    transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent);
    background: var(--accent-soft);
}

.main-nav a.active {
    box-shadow: inset 0 0 0 1px var(--accent);
}

.header-actions { display: flex; gap: 10px; }

/* === FOOTER (общий для всех страниц) === */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 40px 20px 20px;
    margin-top: 40px;
}

.footer-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}

.footer-col h4 {
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-links a:hover { color: var(--accent); transform: translateX(4px); }
.footer-links i { font-size: 14px; width: 16px; }

.copyright {
    text-align: center;
    padding-top: 20px;
    font-size: 12px;
    color: var(--text-muted);
}

/* === БЛОКИ (карточки) === */
.block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    transition: var(--transition);
}

.block:hover {
    border-color: var(--accent);
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.08);
}

.block-header {
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--bg-header), var(--bg-secondary));
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
}

/* ============================================
   INDEX.PHP — Главная страница
   ============================================ */

.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 20px;
    align-items: start;
}

/* Серверы */
#serversList { padding: 10px; }

.server-item {
    padding: 12px 15px;
    border-radius: 8px;
    background: var(--bg-secondary);
    margin-bottom: 10px;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}

.server-item:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
    transform: translateX(4px);
}

.server-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-count {
    font-size: 11px;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 3px 8px;
    border-radius: 10px;
}

.server-ip {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.server-ip:hover { color: var(--accent); }

/* Онлайн пользователи */
.user-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border);
}

.user-list-item:last-child { border-bottom: none; }
.user-list-item:hover { background: var(--accent-soft); }

.user-avatar-xs {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    object-fit: cover;
}

.user-name-link {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
}

.user-name-link:hover { color: var(--accent); }

.badge-admin {
    background: linear-gradient(135deg, #ff4757, #ff6b7a);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Hero баннер */
.hero-banner {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-tertiary));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 60%);
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.hero-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    position: relative;
    background: linear-gradient(135deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 25px;
    font-size: 15px;
    position: relative;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
    position: relative;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
    position: relative;
}

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

.hero-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.hero-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
}

/* Табы */
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    background: var(--bg-card);
    padding: 5px;
    border-radius: 10px;
    border: 1px solid var(--border);
    width: fit-content;
}

.tab {
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab:hover { color: var(--text-primary); background: var(--bg-hover); }

.tab.active {
    background: var(--accent);
    color: var(--bg-primary);
    font-weight: 600;
}

.content-section { display: none; }
.content-section.active { display: block; animation: fadeIn 0.3s ease; }

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

/* Новости / Обновления */
.news-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: var(--transition);
}

.news-item:hover {
    border-color: var(--accent);
    box-shadow: 0 5px 25px rgba(0, 255, 136, 0.1);
}

.news-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.news-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.news-meta i { color: var(--accent); }

.news-content {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

/* Чат */
.chat-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 500px;
}

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

.chat-msg {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 12px 15px;
    border-left: 3px solid var(--accent);
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.chat-msg-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    object-fit: cover;
}

.chat-user {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.chat-user:hover { color: var(--accent); }

.chat-time {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-muted);
}

.chat-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-input-area {
    padding: 12px 15px;
    border-top: 1px solid var(--border);
    background: var(--bg-tertiary);
}

.chat-form { display: flex; gap: 10px; }

.chat-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
    transition: var(--transition);
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.chat-input::placeholder { color: var(--text-muted); }

.chat-btn {
    padding: 10px 18px;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.chat-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

/* Форум в сайдбаре (Обсуждают) */
.forum-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.forum-row:last-child { border-bottom: none; }
.forum-row:hover { background: var(--accent-soft); }

.forum-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 14px;
}

.forum-info { flex: 1; min-width: 0; }

.forum-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.forum-info h4 a { color: var(--text-primary); }
.forum-info h4 a:hover { color: var(--accent); }

.forum-info span { font-size: 11px; color: var(--text-muted); }

.forum-stats {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.forum-stats i { color: var(--accent); }

/* ============================================
   FORUM.PHP — Страница форума
   ============================================ */

.page-wrapper.forum-layout {
    grid-template-columns: 280px 1fr;
}

/* Сайдбар форума */
.topic-list-item {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.topic-list-item:last-child { border-bottom: none; }
.topic-list-item:hover { background: var(--accent-soft); }

.topic-list-title {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 13px;
    display: block;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topic-list-title:hover { color: var(--accent); }

.topic-list-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.topic-list-meta a { color: var(--accent); }

/* Заголовок форума */
.forum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.forum-header h1 {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.forum-header h1 i { color: var(--accent); font-size: 20px; }

/* Таблица тем */
.forum-table {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.forum-row-table {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    transition: var(--transition);
}

.forum-row-table:last-child { border-bottom: none; }
.forum-row-table:hover { background: var(--accent-soft); }

.forum-header-row {
    background: linear-gradient(135deg, var(--bg-header), #111);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.forum-row-table a { color: var(--text-primary); font-weight: 500; }
.forum-row-table a:hover { color: var(--accent); }
.forum-row-table .author-link { color: var(--accent); font-size: 13px; }
.forum-row-table .date { color: var(--text-muted); font-size: 12px; text-align: right; }

.topic-status-icons { margin-right: 8px; display: inline-flex; gap: 4px; }
.topic-status-icons i { font-size: 11px; }
.topic-status-icons .pinned { color: var(--warning); }
.topic-status-icons .closed { color: var(--text-muted); }

.no-topics {
    padding: 50px 20px;
    text-align: center;
    color: var(--text-muted);
}

.no-topics i { font-size: 40px; margin-bottom: 15px; opacity: 0.5; }

/* ============================================
   TOPIC.PHP — Просмотр темы
   ============================================ */

.topic-header {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent);
}

.topic-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topic-title i { color: var(--accent); }

.topic-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.topic-meta span { display: flex; align-items: center; gap: 5px; }

/* Админ-панель */
.admin-bar {
    background: var(--bg-header);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.admin-bar span { font-size: 12px; color: var(--text-muted); margin-right: auto; }

/* Пагинация */
.pagination {
    display: flex;
    gap: 5px;
    margin: 20px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 13px;
    min-width: 36px;
    text-align: center;
    border-radius: 6px;
}

.pagination a:hover { background: var(--bg-header); border-color: var(--accent); }
.pagination .active { background: var(--accent); border-color: var(--accent); color: var(--bg-primary); font-weight: 600; }
.pagination .disabled { color: var(--text-muted); cursor: not-allowed; }

/* Посты */
.post {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: 180px 1fr;
    overflow: hidden;
}

.post:first-child {
    border-left: 4px solid var(--accent);
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.1);
}

.post-author {
    background: var(--bg-header);
    padding: 20px 15px;
    text-align: center;
    border-right: 1px solid var(--border);
}

.post-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    object-fit: cover;
    margin: 0 auto 12px;
}

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

.post-user:hover { color: var(--accent); }

.badge {
    background: linear-gradient(135deg, #ff4757, #ff6b7a);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
}

.post-stats {
    font-size: 11px;
    color: var(--text-muted);
    text-align: left;
    margin-top: 15px;
}

.post-stats div { margin-bottom: 5px; display: flex; align-items: center; gap: 6px; }

.post-body { padding: 20px; }

.post-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 15px;
}

.post-content {
    color: var(--text-secondary);
    line-height: 1.7;
    word-wrap: break-word;
    font-size: 14px;
}

.post-content b, .post-content strong { color: var(--text-primary); font-weight: 600; }
.post-content i { color: var(--accent); font-style: italic; }
.post-content u { text-decoration: underline; }

.post-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Форма ответа */
.reply-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
}

.reply-box-header {
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
}

.reply-actions { display: flex; gap: 10px; margin-top: 15px; }

/* ============================================
   NEW_TOPIC.PHP — Создание темы
   ============================================ */

.page-wrapper.form-page {
    grid-template-columns: 1fr;
    max-width: 900px;
}

.form-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
}

.form-block h2 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
}

.form-block h2 i { color: var(--accent); }

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 5px;
}

.form-actions { display: flex; gap: 10px; margin-top: 25px; }

/* ============================================
   РЕДАКТОР (жирный, цвет, и т.д.)
   ============================================ */

.editor-toolbar {
    display: flex;
    gap: 5px;
    padding: 10px;
    background: var(--bg-header);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    flex-wrap: wrap;
}

.editor-toolbar button {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.editor-toolbar button:hover,
.editor-toolbar button.active {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.editor-toolbar input[type="color"] {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-secondary);
    cursor: pointer;
}

.editor-content {
    min-height: 150px;
    padding: 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    outline: none;
}

.editor-content:focus { border-color: var(--accent); }

.editor-content b, .editor-content strong { font-weight: 600; }
.editor-content i { font-style: italic; color: var(--accent); }
.editor-content u { text-decoration: underline; }

/* ============================================
   АДАПТИВ
   ============================================ */


/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.block, .forum-table, .post, .form-block, .news-item {
    animation: fadeIn 0.3s ease;
}

/* ============================================
   FORUM CATEGORIES — Vertical List
   ============================================ */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 30px;
}

.category-list-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.category-list-item:first-child { border-radius: 12px 12px 0 0; }
.category-list-item:last-child { border-radius: 0 0 12px 12px; }
.category-list-item:only-child { border-radius: 12px; }

.category-list-item:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
    transform: translateX(5px);
}

.category-list-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-soft);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--accent);
    flex-shrink: 0;
}

.category-list-info { flex: 1; min-width: 0; }

.category-list-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-list-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.category-list-stats {
    font-size: 12px;
    color: var(--accent);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-list-stats i { font-size: 11px; }

.category-list-arrow {
    color: var(--text-muted);
    font-size: 16px;
    transition: var(--transition);
}

.category-list-item:hover .category-list-arrow {
    color: var(--accent);
    transform: translateX(4px);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
    transition: var(--transition);
}

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

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 10px;
}

.category-badge i { font-size: 12px; }

.form-select {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2300ff88' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.page-wrapper.forum-layout {
    grid-template-columns: 1fr;
}

/* Вся строка теперь ссылка */
a.topic-click-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

a.topic-click-row:last-child { border-bottom: none; }

a.topic-click-row:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
}
/* Кликабельная строка (сохраняет grid-сетку) */
.topic-click-row {
    transition: var(--transition);
    cursor: pointer;
}

.topic-click-row:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
}

/* Ссылка на автора должна перекрывать клик по строке */
.topic-click-row .author-link {
    position: relative;
    z-index: 2;
    color: var(--accent);
    font-weight: 500;
}

.topic-click-row .topic-title-text {
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================
   PROFILE.PHP — Стили профиля
   ============================================ */

/* Контейнер профиля */
.profile-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Алерты */
.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.alert-error {
    background: rgba(255, 71, 87, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

/* Карточка профиля */
.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 25px;
    align-items: center;
}

.avatar-wrapper {
    position: relative;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
}

.avatar-edit {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--accent);
    color: var(--bg-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.avatar-edit:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.profile-main h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.profile-main .steam-id {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-main .joined {
    color: var(--text-muted);
    font-size: 12px;
}

.profile-status {
    text-align: right;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 10px;
}

.status-badge.offline {
    background: var(--bg-header);
    color: var(--text-muted);
}

.last-seen {
    font-size: 11px;
    color: var(--text-muted);
}

/* Сетка статистики */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.balance-info .label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.balance-info .value {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
}

.balance-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Секции */
.profile-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
}

.section-header {
    background: var(--bg-header);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
}

.section-body {
    padding: 20px;
}

.section-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.section-toggle.active {
    transform: rotate(180deg);
}

.section-content {
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.section-content.collapsed {
    max-height: 0;
    padding: 0 20px;
}

.section-content.expanded {
    max-height: 2000px;
    padding: 0 20px 20px;
}

/* Соцсети */
.social-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-item {
    background: var(--bg-header);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.social-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.social-item i {
    color: var(--accent);
    font-size: 16px;
}

/* Привилегии */
.priv-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.priv-item {
    background: var(--bg-header);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 15px;
}

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

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

.priv-server {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.priv-details {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.priv-details i {
    color: var(--accent);
}

.priv-status {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* История покупок */
.purchase-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.purchase-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--bg-header);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: var(--transition);
}

.purchase-item:hover {
    border-color: var(--accent);
}

.purchase-info .name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.purchase-info .meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.purchase-price {
    font-weight: 700;
    color: var(--accent);
    font-size: 16px;
}

.purchase-price.discounted {
    color: var(--text-muted);
    text-decoration: line-through;
    margin-right: 8px;
    font-size: 14px;
}

/* Формы */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-row {
    margin-bottom: 15px;
}

.form-row.full {
    grid-column: 1 / -1;
}

.form-row label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-row input[type="number"] {
    -moz-appearance: textfield;
}

.form-row input[type="number"]::-webkit-outer-spin-button,
.form-row input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    background: var(--bg-header);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

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

.modal-body {
    padding: 20px;
}


/* ============================================
   SHOP.PHP — Стили магазина
   ============================================ */

/* Форма выбора */
.form-select,
.form-input {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2300ff88' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

/* Блок баланса */
.balance-block {
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.balance-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.balance-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
}

/* Помощь (сайдбар) */
.help-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.help-block h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-block p,
.help-block li {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.help-block code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 11px;
    color: var(--accent);
}

/* Последние покупки */
.purchase-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.purchase-card {
    background: var(--bg-header);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: var(--transition);
}

.purchase-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.purchase-server {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.purchase-user {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.purchase-product {
    font-size: 11px;
    color: var(--accent);
    margin-top: 3px;
}

/* Отзывы */
.review-rating {
    color: #f39c12;
    font-size: 12px;
    margin-left: 5px;
}

/* ============================================
   RULES.PHP — Стили правил
   ============================================ */

/* Таблица наказаний */
.rules-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    overflow-x: auto;
}

.rules-table thead th {
    background: var(--bg-header);
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid var(--border);
    color: var(--text-primary);
    font-weight: 600;
}

.rules-table tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.rules-table tbody tr:hover {
    background: var(--accent-soft);
}

/* Бейджи наказаний */
.punishment-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
}

.punishment-badge.ban {
    background: rgba(255, 71, 87, 0.15);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.punishment-badge.mute {
    background: rgba(243, 156, 18, 0.15);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.punishment-badge.kick {
    background: var(--bg-header);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

/* Примечания */
.notes-list {
    list-style: none;
    color: var(--text-secondary);
    font-size: 13px;
}

.notes-list li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.notes-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

.notes-list code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    color: var(--accent);
}

/* Номер правила */
.rule-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: var(--accent);
    color: var(--bg-primary);
    font-weight: 700;
    font-size: 12px;
    border-radius: 4px;
    margin-right: 10px;
}
/* ============================================
   📱 АДАПТИВ — Медиа-запросы
   ============================================ */

/* === Планшеты (до 1200px) === */
@media (max-width: 1200px) {
    .page-wrapper {
        grid-template-columns: 240px 1fr;
        gap: 15px;
    }
    
    .page-wrapper .sidebar-right {
        display: none; /* Скрываем правый сайдбар на планшетах */
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profile-card {
        grid-template-columns: auto 1fr;
        text-align: left;
    }
    
    .profile-status {
        text-align: left;
    }
    
    .purchase-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === Планшеты малые / большие телефоны (до 992px) === */
@media (max-width: 992px) {
    .page-wrapper {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    
    /* Сайдбары становятся блоками сверху/снизу */
    #serversList,
    .sidebar-right {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 10px;
    }
    
    .server-item {
        margin-bottom: 0;
    }
    
    /* Хедер */
    .header-inner {
        padding: 10px 15px;
        flex-wrap: wrap;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--border);
    }
    
    .main-nav a {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .header-actions {
        order: 2;
    }
    
    /* Hero баннер */
    .hero-banner {
        padding: 25px 20px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .hero-desc {
        font-size: 14px;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .hero-stat-value {
        font-size: 20px;
    }
    
    /* Форум таблица */
    .forum-row-table,
    a.topic-click-row {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: left;
    }
    
    .forum-row-table .date,
    a.topic-click-row .date {
        text-align: left;
    }
    
    .forum-header-row {
        display: none; /* Скрываем заголовки таблицы на мобильных */
    }
    
    /* Посты в теме */
    .post {
        grid-template-columns: 1fr;
    }
    
    .post-author {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 15px;
        display: flex;
        align-items: center;
        gap: 15px;
        text-align: left;
    }
    
    .post-avatar {
        margin: 0;
        width: 50px;
        height: 50px;
    }
    
    .post-user {
        margin-bottom: 0;
    }
    
    .post-stats {
        margin-top: 0;
        margin-left: auto;
        text-align: right;
        font-size: 10px;
    }
    
    .post-stats div {
        margin-bottom: 0;
        margin-left: 10px;
    }
    
    .post-body {
        padding: 15px;
    }
    
    /* Профиль */
    .profile-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }
    
    .profile-status {
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .balance-card {
        flex-direction: column;
        text-align: center;
    }
    
    .balance-actions {
        justify-content: center;
    }
    
    /* Формы */
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    /* Чат */
    .chat-box {
        height: 400px;
    }
    
    /* Футер */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links {
        align-items: center;
    }
}

/* === Телефоны (до 768px) === */
@media (max-width: 768px) {
    :root {
        font-size: 13px;
    }
    
    body {
        font-size: 13px;
    }
    
    /* Хедер */
    .header-inner {
        padding: 8px 12px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .main-nav {
        gap: 2px;
    }
    
    .main-nav a {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .btn-sm {
        padding: 5px 10px;
        font-size: 10px;
    }
    
    /* Блоки */
    .block,
    .forum-table,
    .post,
    .form-block,
    .news-item,
    .profile-card,
    .profile-section {
        border-radius: 10px;
    }
    
    .block-header,
    .section-header {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    /* Hero */
    .hero-banner {
        padding: 20px 15px;
        border-radius: 12px;
    }
    
    .hero-title {
        font-size: 20px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    /* Табы */
    .tabs {
        width: 100%;
        overflow-x: auto;
        padding: 5px;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab {
        padding: 8px 15px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    /* Новости */
    .news-title {
        font-size: 16px;
    }
    
    .news-meta {
        font-size: 11px;
        flex-wrap: wrap;
    }
    
    /* Форум категории */
    .category-list-item {
        padding: 15px;
        gap: 15px;
    }
    
    .category-list-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .category-list-name {
        font-size: 14px;
    }
    
    .category-list-desc {
        font-size: 12px;
    }
    
    /* Список тем */
    .topic-list-item {
        padding: 10px 15px;
    }
    
    /* Таблицы правил */
    .rules-table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .rules-table thead th,
    .rules-table tbody td {
        padding: 10px 12px;
    }
    
    /* Профиль */
    .avatar {
        width: 100px;
        height: 100px;
    }
    
    .profile-main h1 {
        font-size: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .balance-value {
        font-size: 24px;
    }
    
    /* Магазин */
    .purchase-grid {
        grid-template-columns: 1fr;
    }
    
    /* Чат */
    .chat-box {
        height: 350px;
    }
    
    .chat-msg {
        padding: 10px 12px;
    }
    
    .chat-avatar {
        width: 28px;
        height: 28px;
    }
    
    .chat-form {
        flex-direction: column;
    }
    
    .chat-btn {
        width: 100%;
    }
    
    /* Формы */
    .form-block {
        padding: 20px 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea,
    .form-select,
    .form-input {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Пагинация */
    .pagination {
        gap: 3px;
    }
    
    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 32px;
    }
    
    /* Модальные окна */
    .modal-content {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    /* Футер */
    .site-footer {
        padding: 30px 15px 15px;
    }
    
    .copyright {
        font-size: 11px;
    }
}

/* === Очень маленькие экраны (до 480px) === */
@media (max-width: 480px) {
    :root {
        font-size: 12px;
    }
    
    /* Хедер */
    .logo {
        font-size: 16px;
    }
    
    .logo span {
        display: none; /* Скрываем декоративный спан на очень маленьких */
    }
    
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-nav a {
        padding: 5px 8px;
        font-size: 10px;
    }
    
    .header-actions {
        gap: 5px;
    }
    
    .header-actions .btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    /* Hero */
    .hero-title {
        font-size: 18px;
    }
    
    .hero-desc {
        font-size: 13px;
    }
    
    .hero-stat-value {
        font-size: 18px;
    }
    
    .hero-stat-label {
        font-size: 10px;
    }
    
    /* Серверы и пользователи */
    .server-name {
        font-size: 13px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .player-count {
        align-self: flex-start;
    }
    
    .user-list-item {
        padding: 8px 12px;
        gap: 8px;
    }
    
    .user-avatar-xs {
        width: 24px;
        height: 24px;
    }
    
    .user-name-link {
        font-size: 12px;
    }
    
    /* Форум */
    .forum-row-table,
    a.topic-click-row {
        padding: 12px 15px;
    }
    
    .topic-status-icons {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    /* Посты */
    .post-author {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .post-avatar {
        width: 45px;
        height: 45px;
    }
    
    .post-user {
        font-size: 13px;
    }
    
    .badge {
        font-size: 9px;
        padding: 2px 6px;
    }
    
    .post-stats {
        display: none; /* Скрываем статистику поста на очень маленьких */
    }
    
    .post-content {
        font-size: 13px;
    }
    
    .post-actions {
        gap: 5px;
    }
    
    .post-actions .btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    /* Профиль */
    .avatar {
        width: 80px;
        height: 80px;
    }
    
    .avatar-edit {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .profile-main h1 {
        font-size: 18px;
    }
    
    .profile-main .steam-id,
    .profile-main .joined {
        font-size: 12px;
    }
    
    .status-badge {
        padding: 5px 12px;
        font-size: 11px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .balance-value {
        font-size: 20px;
    }
    
    .priv-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .purchase-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .purchase-price {
        align-self: flex-end;
    }
    
    /* Чат */
    .chat-box {
        height: 300px;
    }
    
    .chat-msg-head {
        flex-wrap: wrap;
    }
    
    .chat-time {
        margin-left: 0;
        margin-top: 5px;
        width: 100%;
        text-align: right;
    }
    
    /* Редактор */
    .editor-toolbar {
        padding: 8px;
        gap: 3px;
    }
    
    .editor-toolbar button {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .editor-content {
        min-height: 120px;
        font-size: 13px;
    }
    
    /* Кнопки */
    .btn {
        padding: 7px 14px;
        font-size: 11px;
    }
    
    /* Скроллбар */
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    
    ::-webkit-scrollbar-thumb {
        border-radius: 3px;
    }
}

/* === Ориентация ландшафт на мобильных === */
@media (max-height: 500px) and (orientation: landscape) {
    .chat-box {
        height: 200px;
    }
    
    .page-wrapper {
        padding: 10px;
    }
    
    .site-header {
        position: relative; /* Отключаем sticky на очень низких экранах */
    }
}

/* === Поддержка тёмной темы в системных настройках === */
@media (prefers-color-scheme: dark) {
    /* Ваш дизайн уже тёмный, но можно добавить плавные переходы */
    * {
        transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    }
}

/* === Уменьшение анимаций для пользователей с prefers-reduced-motion === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .block,
    .forum-table,
    .post,
    .form-block,
    .news-item {
        animation: none !important;
    }
    
    .hero-banner::before {
        animation: none !important;
    }
}

/* === Улучшения для сенсорных экранов === */
@media (hover: none) and (pointer: coarse) {
    /* Увеличиваем области нажатия для тач-устройств */
    .btn,
    .tab,
    .main-nav a,
    .footer-links a,
    .server-item,
    .topic-list-item,
    .category-list-item,
    a.topic-click-row {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Убираем hover-эффекты, которые не работают на таче */
    .server-item:hover,
    .topic-list-item:hover,
    .category-list-item:hover,
    a.topic-click-row:hover {
        transform: none;
    }
    
    /* Увеличиваем чекбоксы и инпуты */
    input[type="checkbox"],
    input[type="radio"] {
        min-width: 20px;
        min-height: 20px;
    }
}

.logo img {
    height: 75px !important;
}

/* ============================================
   FAQ & CONTACTS — Дополнительные стили
   ============================================ */

/* FAQ: поиск */
#faqSearch {
    width: 100%;
}

/* FAQ: контент категорий */
.faq-content {
    transition: max-height 0.3s ease, padding 0.3s ease;
}

/* Контакты: карточки */
.contact-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: var(--transition);
}

.contact-card:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.contact-card i {
    color: var(--accent);
    font-size: 20px;
    width: 24px;
}

.contact-card .label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.contact-card .value {
    font-size: 13px;
    color: var(--accent);
}

/* Контакты: реквизиты */
.requisites-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.requisites-row:last-child {
    border-bottom: none;
}

.requisites-row .label {
    color: var(--text-muted);
    font-size: 13px;
}

.requisites-row .value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Форма контактов */
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 10px 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Адаптив */
@media (max-width: 768px) {
    .requisites-row {
        flex-direction: column;
        gap: 4px;
    }
}

/* ============================================
   FORM FIELDS — Поля форм (магазин, профиль)
   ============================================ */

.form-select,
.form-input {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Select с кастомной стрелкой */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2300ff88' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 35px;
    cursor: pointer;
}

/* Checkbox и radio */
input[type="checkbox"],
input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Label для чекбоксов */
label[for],
.checkbox-row label {
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Placeholder */
::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

:-ms-input-placeholder {
    color: var(--text-muted);
}

::-ms-input-placeholder {
    color: var(--text-muted);
}

/* Валидация полей */
.form-input:invalid:not(:placeholder-shown) {
    border-color: var(--danger);
}

.form-input:valid:not(:placeholder-shown) {
    border-color: var(--success);
}

/* Code в формах */
.form-input code,
.form-select code {
    background: var(--bg-header);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    color: var(--accent);
}

/* Адаптив для форм */
@media (max-width: 768px) {
    .form-select,
    .form-input {
        font-size: 16px; /* Предотвращает зум на iOS */
        padding: 14px 15px;
    }
}