/* =========================================================
   VHXCORE CMS — тема (адаптив 320 → ∞)
   Переработано: убраны дубли, единая сетка брейкпоинтов
   ========================================================= */

:root{
    /* Цвета — приглушённая палитра */
    --bg:        #f7f8fa;
    --panel:     #ffffff;
    --border:    #eceef2;
    --border-2:  #dcdfe6;
    --text:      #1c1f26;
    --text-2:    #3a3f4a;
    --muted:     #7a8290;
    --accent:    #4a5568;
    --accent-2:  #2d3748;
    --danger:    #b04a4a;
    --success:   #4a7c59;

    /* Радиусы */
    --radius-sm: 6px;
    --radius:    10px;
    --radius-lg: 14px;

    /* Тени */
    --shadow:    0 1px 2px rgba(0,0,0,.03);
    --shadow-md: 0 2px 6px rgba(0,0,0,.04);
    --shadow-lg: 0 4px 12px rgba(0,0,0,.05);

    --transition: .15s ease;

    /* Адаптив */
    --container: 1080px;
    --gutter:    24px;
    --header-h:  60px;
}

/* ============ БАЗА ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html, body {
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
}

body{
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    font-size: 15px;
}

a { color: var(--text-2); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text); }
.muted { color: var(--muted); }
.accent { color: var(--text-2); }

/* Уважаем настройки ОС */
@media (prefers-reduced-motion: reduce){
    *{ transition: none !important; animation: none !important; }
}

/* ============ КОНТЕЙНЕР ============ */
.container{
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ============ MATERIAL ICONS ============ */
.material-symbols-rounded{
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    user-select: none;
}
.btn .material-symbols-rounded{ font-size: 18px; }
.post-actions .material-symbols-rounded{ font-size: 16px; }
.topic-head-actions .material-symbols-rounded{ font-size: 16px; }

.header{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
}
.header-inner{
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: 12px;
}
.logo{
    display: flex;
    align-items: baseline;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: .2px;
    flex-shrink: 0;
}
.logo-mark{ color: var(--text); }
.logo-text{ color: var(--text-2); }

.nav{
    display: flex;
    align-items: center;
    gap: 2px;
}
.nav-link{
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    transition: background var(--transition);
    white-space: nowrap;
}
.nav-link:hover{ background: #f2f4f7; color: var(--text); }
.nav-link--ghost{ color: var(--muted); }
.nav-link--ghost:hover{ background: #f2f4f7; color: var(--text); }
.nav-link--accent{
    background: var(--text);
    color: #fff;
    font-weight: 500;
}
.nav-link--accent:hover{ background: var(--text-2); color: #fff; }

/* ============ BURGER ============ */
.burger{
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    background: var(--panel);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-shrink: 0;
    transition: border-color var(--transition);
}
.burger:hover{ border-color: var(--muted); }
.burger span{
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--text-2);
    border-radius: 1px;
    transition: transform .2s ease, opacity .2s ease;
}
.burger.active span:nth-child(1){ transform: translateY(6.5px) rotate(45deg); }
.burger.active span:nth-child(2){ opacity: 0; }
.burger.active span:nth-child(3){ transform: translateY(-6.5px) rotate(-45deg); }

/* Затемнение под мобильным меню */
.nav-overlay{
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 90;
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}
.nav-overlay.show{ opacity: 1; pointer-events: auto; }

/* ============ MAIN ============ */
.main{
    flex: 1;
    padding: 36px 0;
    padding-top: calc(var(--header-h) + 36px);   /* ← шапка + основной отступ */
}

/* ============ HERO ============ */
.hero{
    text-align: center;
    padding: 56px 24px;
    border-radius: var(--radius-lg);
    background: var(--panel);
    border: 1px solid var(--border);
}
.hero h1{
    font-size: clamp(24px, 5vw, 38px);
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.15;
}
.hero p{
    color: var(--muted);
    margin-bottom: 24px;
    font-size: clamp(14px, 2vw, 16px);
    max-width: 640px;
    margin-inline: auto;
}
.hero-actions{
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============ КНОПКИ ============ */
.btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.btn--accent{
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}
.btn--accent:hover{
    background: var(--text-2);
    border-color: var(--text-2);
    color: #fff;
}
.btn--ghost{
    background: var(--panel);
    border-color: var(--border-2);
    color: var(--text-2);
}
.btn--ghost:hover{ background: #f2f4f7; color: var(--text); }
.btn--danger{
    background: var(--panel);
    color: var(--danger);
    border-color: var(--border-2);
}
.btn--danger:hover{
    background: #faf2f2;
    border-color: var(--danger);
}
.btn--sm{
    padding: 6px 11px;
    min-height: 32px;
    font-size: 12.5px;
    border-radius: 5px;
}

/* ============ ОБЩИЕ ПАНЕЛИ ============ */
.auth-card,
.admin-panel,
.news-full,
.profile-card,
.post-form,
.topic-head,
.post,
.forum-section,
.forum-topic-row,
.forum-stat,
.news-item,
.changes,
.upcoming,
.settings-section{
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* ============ ЗАГОЛОВКИ СЕКЦИЙ ============ */
.news-header,
.admin-header,
.forum-header,
.forum-home-head{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.news-header h2,
.admin-header h1,
.forum-header h1{
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.news-header-actions{
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* ============ ФОРМЫ ============ */
.auth-card label,
.news-form label,
.install-box label,
.post-form label{
    margin: 12px 0 6px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}
.auth-card input,
.news-form input,
.news-form textarea,
.news-form select,
.install-box input,
.post-form textarea{
    width: 100%;
    min-height: 44px;
    background: #fafbfc;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 11px 13px;
    font-size: 16px; /* важно: 16px, чтобы iOS не зумил */
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition), background var(--transition);
    resize: vertical;
}
.auth-card input:focus,
.news-form input:focus,
.news-form textarea:focus,
.news-form select:focus,
.install-box input:focus,
.post-form textarea:focus{
    background: #fff;
    border-color: var(--muted);
}
.news-form textarea{ min-height: 220px; line-height: 1.5; }
.form-actions{
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

/* File input */
.news-form input[type="file"]{
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13.5px;
}
.news-form input[type="file"]::file-selector-button{
    background: #f2f2f2;
    border: 1px solid var(--border-2);
    color: var(--text-2);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-right: 10px;
    transition: background var(--transition);
}
.news-form input[type="file"]::file-selector-button:hover{
    background: #e8e8e8;
    color: var(--text);
}

/* Select */
.news-form select{
    appearance: none;
    -webkit-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) center,
        calc(100% - 13px) center;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 36px;
    cursor: pointer;
}

/* ============ AUTH ============ */
.auth-card{
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    padding: 30px;
}
.auth-card h2{
    text-align: center;
    margin-bottom: 18px;
    font-size: clamp(20px, 4vw, 22px);
    font-weight: 700;
    color: var(--text);
}
.auth-card .btn{ width: 100%; margin-top: 16px; }
.auth-toggle{
    text-align: center;
    margin-top: 14px;
    font-size: 13.5px;
    color: var(--muted);
}

/* ============ ALERTS ============ */
.alert{
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 13.5px;
    border: 1px solid;
}
.alert.error{
    background: #faf2f2;
    border-color: #e8c8c8;
    color: #8a3a3a;
}
.alert.success{
    background: #f2f7f3;
    border-color: #c8ddcf;
    color: #3a6b4a;
}

/* ============ КАПЧА ============ */
.captcha-row{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 8px 0 12px;
}
.captcha-code{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 14px 22px;
    background: linear-gradient(135deg, #f4f6fb, #eef0f6);
    border: 1px dashed var(--border-2);
    border-radius: var(--radius-sm);
    font-family: "SF Mono", Consolas, monospace;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--text);
    user-select: all;
    cursor: text;
    min-width: 220px;
    text-align: center;
}
#reg-captcha{
    width: 100%;
    padding: 12px 14px;
    background: #fafbfe;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 16px;
    font-family: "SF Mono", Consolas, monospace;
    letter-spacing: 3px;
    text-align: center;
    outline: none;
    transition: border-color var(--transition), background var(--transition);
}
#reg-captcha:focus{
    background: #fff;
    border-color: var(--muted);
}

/* ============ НОВОСТИ ============ */
.news-section{ margin: 20px 0; width: 100%; }

.news-empty{
    text-align: center;
    padding: 56px 20px;
    background: var(--panel);
    border: 1px dashed var(--border-2);
    border-radius: var(--radius);
    color: var(--muted);
}
.news-empty-icon{ font-size: 40px; margin-bottom: 12px; opacity: .4; }
.news-empty .btn{ margin-top: 14px; }

.news-item{
    display: flex;
    overflow: hidden;
    transition: border-color var(--transition);
    position: relative;
}
.news-item:hover{ border-color: var(--border-2); }

.news-item-side{
    flex: 0 0 120px;
    background: #f2f4f7;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.news-item-emoji{ font-size: 40px; z-index: 1; }

.news-item-main{
    flex: 1;
    padding: 22px 26px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.news-meta{
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--muted);
    flex-wrap: wrap;
}
.news-meta-item{ display: inline-flex; align-items: center; gap: 5px; }
.news-meta-icon{ opacity: .6; }

.news-title{
    font-size: 19px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.2px;
}
.news-title a{ color: var(--text); }
.news-title a:hover{ color: var(--text-2); }

.news-excerpt{
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-more{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-2);
    padding-top: 4px;
    margin-top: auto;
}
.news-more:hover{ color: var(--text); }

/* Отдельная новость */
.news-full{ padding: 36px; margin: 0 auto; }
.news-full h1{
    font-size: clamp(22px, 3.5vw, 32px);
    margin: 14px 0 12px;
    line-height: 1.3;
    letter-spacing: -0.4px;
    color: var(--text);
    font-weight: 700;
}
.news-content{
    margin-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--text-2);
    word-break: break-word;
}
.news-back{
    font-size: 13.5px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.news-back:hover{ color: var(--text-2); }
.news-admin-actions{
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============ АДМИНКА ============ */
.admin-panel{ padding: 26px; }

.admin-table{
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.admin-table th,
.admin-table td{
    padding: 11px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.admin-table th{
    color: var(--muted);
    font-weight: 500;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.admin-table tr:hover{ background: #fafbfc; }
.admin-table a{ color: var(--text-2); }
.admin-table a:hover{ color: var(--text); }
.admin-actions{ display: flex; gap: 6px; align-items: center; }
.inline-form{ display: inline; }

/* Админ-меню */
.admin-menu{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 10px;
}
.admin-menu-card{
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: border-color var(--transition);
}
.admin-menu-card:hover{
    border-color: var(--border-2);
    color: var(--text);
}
.admin-menu-icon{
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f2f2f2;
    color: var(--text-2);
}
.admin-menu-icon .material-symbols-rounded{ font-size: 26px; }
.admin-menu-body{ flex: 1; min-width: 0; }
.admin-menu-title{
    font-size: 16.5px;
    font-weight: 700;
    margin-bottom: 4px;
}
.admin-menu-desc{
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.4;
}
.admin-menu-arrow{
    font-size: 22px;
    color: var(--muted);
    flex-shrink: 0;
}

/* Админ-список (файлы) */
.admin-list{
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.admin-list-row{
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition);
}
.admin-list-row:hover{ border-color: var(--border-2); }
.admin-list-icon{
    font-size: 24px;
    color: var(--muted);
    flex-shrink: 0;
}
.admin-list-main{ flex: 1; min-width: 0; }
.admin-list-title{
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    word-break: break-word;
}
.admin-list-meta{
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.4;
    margin-bottom: 8px;
    word-break: break-word;
}
.admin-list-stats{
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: var(--muted);
}
.admin-list-stat{
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.admin-list-stat .material-symbols-rounded{
    font-size: 15px;
    color: var(--muted);
    opacity: .8;
}
.admin-list-actions{
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}
.admin-empty{
    text-align: center;
    padding: 40px 20px;
    background: #fafbfc;
    border: 1px dashed var(--border-2);
    border-radius: var(--radius);
    color: var(--muted);
}
.admin-empty .material-symbols-rounded{
    display: block;
    font-size: 44px;
    opacity: .4;
    margin-bottom: 10px;
}
.admin-empty p{ margin: 6px 0 14px; font-size: 14px; }

.admin-file-thumb{
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #f2f2f2;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.admin-file-thumb img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.admin-file-thumb .material-symbols-rounded{
    font-size: 22px;
    color: var(--text-2);
}

/* ============ ПРОФИЛЬ ============ */
.profile-card{
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 26px;
    padding: 28px;
    align-items: center;
}
.profile-avatar{
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    background: var(--text-2);
    overflow: hidden;
    flex-shrink: 0;
}
.profile-avatar img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.profile-avatar--clickable{ cursor: pointer; }
.avatar-overlay{
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .15s ease;
    border-radius: 50%;
}
.profile-avatar--clickable:hover .avatar-overlay{ opacity: 1; }
.avatar-overlay .material-symbols-rounded{ font-size: 28px; }
.avatar-form{ display: inline-block; margin: 0; padding: 0; }

.profile-info{ min-width: 0; width: 100%; }
.profile-info h2{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: clamp(20px, 4vw, 24px);
    color: var(--text);
    font-weight: 700;
    flex-wrap: wrap;
}
.badge{
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 5px;
    font-weight: 600;
    letter-spacing: .3px;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}
.badge--admin{ background: var(--text); color: #fff; }
.badge--guest{ background: #eef0f4; color: var(--muted); }
.badge--ban{
    background: #e8d0d0;
    color: #8a3a3a;
}
.meta{
    list-style: none;
    margin: 12px 0;
    display: grid;
    gap: 6px;
    font-size: 14px;
    word-break: break-word;
}
.meta b{ color: var(--muted); font-weight: 500; }
.status-online{ color: var(--success); font-weight: 500; }

/* Профильная страница */
.profile-page{
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 0 36px;
}
.profile-hero{
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 22px 26px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.profile-hero-name{
    font-size: clamp(20px, 4vw, 30px);
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--text);
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    line-height: 1.15;
}
.profile-hero-status{
    font-size: 13.5px;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 22px;
}
.profile-hero-status .dot{
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    margin-right: 4px;
    vertical-align: middle;
}
.profile-hero-status .dot--off{ background: var(--muted); }
.profile-hero-avatar{
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 0 auto;
    background: var(--text-2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    font-weight: 700;
    overflow: hidden;
    border: 3px solid #fff;
}
.profile-hero-avatar img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.profile-hero-avatar-form{
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}
.profile-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 20px 0;
}
.profile-card-info{
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 17px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition);
}
.profile-card-info:hover{ border-color: var(--border-2); }
.profile-card-icon{
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: #f2f2f2;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.profile-card-icon .material-symbols-rounded{ font-size: 20px; }
.profile-card-label{
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
    margin-bottom: 3px;
}
.profile-card-value{
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
}
.profile-ban{
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 15px 18px;
    background: #faf5f5;
    border: 1px solid #e8d0d0;
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.profile-ban > .material-symbols-rounded{
    font-size: 24px;
    color: var(--danger);
    flex-shrink: 0;
}
.profile-ban-title{
    font-weight: 700;
    font-size: 14.5px;
    color: #8a3a3a;
    margin-bottom: 4px;
}
.profile-ban-meta{ font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.profile-ban-meta b{ color: var(--text-2); font-weight: 500; }
.profile-ban-reason{ margin-top: 8px; font-size: 13px; color: var(--text-2); }
.profile-actions{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}
.profile-btn{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    min-height: 42px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid var(--border-2);
    background: var(--panel);
    color: var(--text-2);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition);
    font-family: inherit;
    line-height: 1;
}
.profile-btn:hover{ background: #f2f4f7; color: var(--text); }
.profile-btn .material-symbols-rounded{ font-size: 17px; }
.profile-btn--danger{ color: var(--danger); }
.profile-btn--danger:hover{
    background: #faf5f5;
    border-color: #e8d0d0;
}
.profile-btn--success{ color: var(--success); }
.profile-btn--success:hover{
    background: #f2f7f3;
    border-color: #c8ddcf;
}
.profile-ban-form{
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-top: 14px;
}
.profile-ban-form h3{
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    margin: 0 0 12px;
    color: var(--text);
    font-weight: 600;
}
.profile-ban-form h3 .material-symbols-rounded{ color: var(--danger); }
.profile-ban-form label{
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    margin: 10px 0 5px;
    font-weight: 500;
}
.profile-ban-form input,
.profile-ban-form select{
    width: 100%;
    padding: 10px 13px;
    background: #fafbfc;
    border: 1px solid var(--border-2);
    border-radius: 6px;
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
}
.profile-ban-form input:focus,
.profile-ban-form select:focus{
    background: #fff;
    border-color: var(--muted);
}
.profile-ban-form .form-actions{
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

/* ============ ФОРУМ ============ */
.forum-breadcrumb{
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.forum-breadcrumb a{ color: var(--text-2); }
.forum-breadcrumb a:hover{ color: var(--text); }
.forum-breadcrumb span{ opacity: .5; }

.forum-block-title{
    font-size: 18px;
    font-weight: 600;
    margin: 30px 0 14px;
}

.forum-stats-line{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -10px 0 18px;
}
.forum-stats-pill{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 500;
    white-space: nowrap;
}
.forum-stats-pill b{ color: var(--text-2); font-weight: 600; }
.forum-stats-pill .material-symbols-rounded{
    font-size: 15px;
    color: var(--muted);
    opacity: .8;
}
.forum-stats-pill--new{
    background: #fafbfc;
    border-color: var(--border-2);
    color: var(--text-2);
}
.forum-stats-pill--new b{ color: var(--text); }

.forum-topics{
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.forum-topic-row{
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 18px;
    color: var(--text);
    text-decoration: none;
    transition: border-color var(--transition);
}
.forum-topic-row:hover{
    border-color: var(--border-2);
    color: var(--text);
}
.forum-topic-avatar{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eef0f4;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}
.forum-topic-main{ flex: 1; min-width: 0; }
.forum-topic-title{
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    word-break: break-word;
    line-height: 1.4;
}
.forum-topic-meta{
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
}
.forum-topic-meta b{ color: var(--text-2); font-weight: 500; }
.forum-topic-last{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
    text-align: right;
}
.forum-topic-count{
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #f2f4f7;
    color: var(--text-2);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}
.forum-topic-count .material-symbols-rounded{ font-size: 13px; }
.forum-topic-lastmeta{
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.35;
}
.forum-topic-lastmeta b{ color: var(--text-2); font-weight: 500; }

.forum-sections{
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.forum-section{
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    color: var(--text);
    transition: border-color var(--transition);
}
.forum-section:hover{
    border-color: var(--border-2);
    color: var(--text);
}
.forum-section-icon{ font-size: 24px; flex-shrink: 0; }
.forum-section-main{ flex: 1; min-width: 0; }
.forum-section-title{
    font-weight: 600;
    font-size: 15.5px;
    margin-bottom: 3px;
}
.forum-section-desc{ color: var(--muted); font-size: 13px; }
.forum-section-counts{
    display: flex;
    gap: 18px;
    font-size: 12.5px;
    color: var(--muted);
    text-align: right;
    flex-shrink: 0;
}
.forum-section-counts b{ color: var(--text-2); font-weight: 600; }

.forum-empty{
    background: var(--panel);
    border: 1px dashed var(--border-2);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13.5px;
}
.forum-empty a{ color: var(--text-2); font-weight: 500; }
.forum-empty a:hover{ color: var(--text); }

/* Тема */
.topic-head{
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.topic-head h1{
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 700;
    margin-bottom: 6px;
    word-break: break-word;
}
.topic-head-meta{ color: var(--muted); font-size: 12.5px; }
.topic-head-actions{
    display: flex;
    gap: 6px;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* Посты */
.posts{
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 22px;
}
.post{
    display: flex;
    overflow: hidden;
    transition: border-color var(--transition);
}
.post:hover{ border-color: var(--border-2); }

.post-author{
    flex: 0 0 170px;
    background: #fafbfc;
    border-right: 1px solid var(--border);
    padding: 20px 14px;
    text-align: center;
}
.post-avatar-link{ display: inline-block; text-decoration: none; }
.post-avatar{
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 10px;
    background: #eef0f4;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 600;
    overflow: hidden;
}
.post-avatar img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.post-author-name{
    font-weight: 600;
    font-size: 13.5px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}
.post-author-link{
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}
.post-author-link:hover{ color: var(--text-2); }
.post-author-meta{ font-size: 11.5px; color: var(--muted); }

.post-body{ flex: 1; padding: 16px 20px; min-width: 0; }
.post-head{
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.post-date{ font-weight: 500; color: var(--text-2); }
.post-actions{
    margin-left: auto;
    display: flex;
    gap: 4px;
    align-items: center;
}
.post-actions a,
.post-actions button{
    color: var(--muted);
    padding: 4px;
    border-radius: 5px;
    transition: background var(--transition);
    display: inline-flex;
}
.post-actions a:hover{ background: #f2f4f7; color: var(--text-2); }
.post-actions .material-symbols-rounded{ font-size: 17px; }
.post-content{
    font-size: 14px;
    line-height: 1.65;
    word-break: break-word;
}

.post-action-btn{
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 5px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
    font-family: inherit;
}
.post-action-btn:hover{ background: #f2f4f7; color: var(--text-2); }
.post-action-btn .material-symbols-rounded{ font-size: 17px; }

.post-anchor{
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
}
.post-anchor:hover{ color: var(--text-2); }
.post-anchor .material-symbols-rounded{ font-size: 15px; }

.post-form{ padding: 20px 24px; scroll-margin-top: 90px; }
.post-form h3{ font-size: 16px; margin-bottom: 12px; font-weight: 600; }
.post-form textarea{ margin-bottom: 10px; }

/* Упоминания и цитаты */
.mention{
    display: inline-block;
    padding: 1px 6px;
    background: #f2f4f7;
    color: var(--text-2);
    border-radius: 5px;
    font-weight: 500;
    font-size: 0.95em;
}
.quote-block{
    display: block;
    margin: 10px 0;
    padding: 10px 14px;
    background: #fafbfc;
    border-left: 2px solid var(--border-2);
    border-radius: 5px;
    color: var(--text-2);
    font-style: italic;
    line-height: 1.6;
    font-size: 0.95em;
    word-break: break-word;
}

/* ============ ЗАГРУЗКИ ============ */
.dl-view{
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    margin-bottom: 28px;
}
.dl-view-preview{ position: relative; }
.dl-view-screenshot{
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}
.dl-view-screenshot img{
    width: 100%;
    display: block;
    border-radius: var(--radius);
    object-fit: cover;
}
.dl-view-icon{
    aspect-ratio: 4 / 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f7f8fa;
    border: 1px dashed var(--border-2);
    border-radius: var(--radius);
    color: var(--muted);
}
.dl-view-icon .material-symbols-rounded{ font-size: 60px; }
.dl-view-ext{
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--muted);
}
.dl-view-info{
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}
.dl-view-head{
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}
.dl-view-head h1{
    font-size: clamp(18px, 2.8vw, 26px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.3px;
    word-break: break-word;
    margin: 0;
}
.dl-view-meta{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px 22px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.dl-view-meta-item{
    display: flex;
    align-items: center;
    gap: 12px;
}
.dl-view-meta-item .material-symbols-rounded{
    font-size: 20px;
    color: var(--muted);
    flex-shrink: 0;
}
.dl-view-meta-label{
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 2px;
}
.dl-view-meta-value{
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
}
.dl-view-meta-value a{ color: var(--text); }
.dl-view-meta-value a:hover{ color: var(--text-2); }
.dl-view-description h2{
    font-size: 14.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text);
    font-weight: 600;
}
.dl-view-description h2 .material-symbols-rounded{
    font-size: 19px;
    color: var(--muted);
}
.dl-view-description p{
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-2);
    word-break: break-word;
    margin: 0;
}
.dl-btn-download{
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: var(--text);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition);
}
.dl-btn-download:hover{ background: var(--text-2); color: #fff; }
.dl-btn-download .material-symbols-rounded{ font-size: 28px; flex-shrink: 0; }
.dl-btn-title{ font-size: 15px; font-weight: 700; line-height: 1.2; margin-bottom: 3px; }
.dl-btn-sub{
    font-size: 12px;
    font-weight: 400;
    opacity: .8;
    word-break: break-all;
    line-height: 1.3;
}

.dl-view-actions{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.dl-view-actions .dl-btn-download{
    flex: 1;
    min-width: 220px;
}
.dl-btn-edit,
.dl-btn-delete{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid var(--border-2);
    background: var(--panel);
    color: var(--text-2);
    transition: background var(--transition), border-color var(--transition), color var(--transition);
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
    white-space: nowrap;
}
.dl-btn-edit:hover{
    background: #f2f2f2;
    border-color: var(--muted);
    color: var(--text);
}
.dl-btn-edit .material-symbols-rounded,
.dl-btn-delete .material-symbols-rounded{ font-size: 18px; }
.dl-btn-delete-form{ display: inline-flex; margin: 0; padding: 0; }
.dl-btn-delete{ color: var(--danger); }
.dl-btn-delete:hover{
    background: #faf5f5;
    border-color: var(--danger);
}

/* Сетка файлов */
.dl-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
    margin: 20px 0;
}
.dl-card{
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition);
}
.dl-card:hover{ border-color: var(--border-2); }
.dl-card-preview{
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f2f4f7;
    position: relative;
}
.dl-card-preview img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.dl-card-preview--empty{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f7f8fa;
    color: var(--muted);
}
.dl-card-preview--empty .material-symbols-rounded{ font-size: 48px; }
.dl-card-ext{
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--muted);
}
.dl-card-body{
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.dl-card-body h3{
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    word-break: break-word;
}
.dl-card-body h3 a{ color: var(--text); }
.dl-card-body h3 a:hover{ color: var(--text-2); }
.dl-card-badges{ display: flex; gap: 6px; flex-wrap: wrap; }
.dl-card-desc{
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.5;
    flex: 1;
    margin: 0;
    word-break: break-word;
}
.dl-card-meta{
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--muted);
    padding-top: 4px;
    border-top: 1px solid var(--border);
}
.dl-card-meta span{
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.dl-card-meta .material-symbols-rounded{ font-size: 14px; }
.dl-download{
    margin-top: 6px;
    width: 100%;
    justify-content: center;
}

/* ============ СТАТИСТИКА САЙТА ============ */
.site-stats{
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.site-stat{
    background: var(--panel);
    padding: 20px 10px;
    text-align: center;
    transition: background var(--transition);
}
.site-stat:hover{ background: #fafafa; }
.site-stat-value{
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
    margin-bottom: 7px;
    letter-spacing: -0.5px;
}
.site-stat-label{
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .3px;
    font-weight: 500;
    line-height: 1.3;
}
.site-stat--online .dot{
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    margin-right: 4px;
    vertical-align: middle;
}

/* ============ ПАГИНАЦИЯ ============ */
.pagination{
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    align-items: center;
    margin: 28px 0 10px;
}
.page-link{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 500;
    transition: background var(--transition);
    user-select: none;
}
.page-link:hover{ background: #f2f4f7; }
.page-active{
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}
.page-active:hover{ background: var(--text-2); color: #fff; }
.page-disabled{ opacity: .4; cursor: not-allowed; }
.page-disabled:hover{ background: var(--panel); }
.page-prev, .page-next{ padding: 0 14px; }
.page-dots{ color: var(--muted); padding: 0 4px; user-select: none; }

/* ============ ФОРМА ПРЕВЬЮ ============ */
.form-preview{
    margin: 14px 0;
    padding: 14px;
    background: #fafbfe;
    border: 1px dashed var(--border-2);
    border-radius: var(--radius);
    text-align: center;
}
.form-preview-label{
    font-size: 11.5px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
    margin-bottom: 10px;
}
.form-preview img{
    max-width: 100%;
    max-height: 220px;
    border-radius: 8px;
    display: inline-block;
}

/* ============ НАСТРОЙКИ ============ */
.settings-section{
    padding: 20px;
    margin-bottom: 16px;
}
.settings-section-head{
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.settings-section-head > .material-symbols-rounded{
    font-size: 26px;
    color: var(--muted);
    flex-shrink: 0;
    margin-top: 2px;
}
.settings-section-title{
    font-size: 15.5px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
}
.settings-section-desc{
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.4;
}
.settings-check{
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fafbfe;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    margin: 6px 0 14px !important;
    user-select: none;
    transition: border-color var(--transition);
}
.settings-check:hover{ border-color: var(--muted); }
.settings-check input{
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    cursor: pointer;
    accent-color: var(--text);
}
.settings-check span{ font-weight: 500; }

/* ============ СТРАНИЦА БАНА ============ */
.ban-page{
    max-width: 540px;
    margin: 36px auto;
    padding: 40px 32px 28px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.ban-page-icon{
    position: relative;
    width: 88px;
    height: 88px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ban-page-icon .material-symbols-rounded{
    font-size: 42px;
    color: #fff;
    z-index: 2;
}
.ban-page-title{
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: -0.4px;
    line-height: 1.2;
}
.ban-page-subtitle{
    font-size: 14.5px;
    color: var(--muted);
    margin-bottom: 24px;
    line-height: 1.5;
}
.ban-page-subtitle b{ color: var(--text); font-weight: 600; }
.ban-page-details{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    text-align: left;
    margin-bottom: 20px;
}
.ban-page-row{
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 15px;
    background: #fafbfc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition);
}
.ban-page-row:hover{ border-color: var(--border-2); }
.ban-page-row--full{ grid-column: 1 / -1; }
.ban-page-row-icon{
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 8px;
    background: #eef0f4;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ban-page-row-icon .material-symbols-rounded{ font-size: 18px; }
.ban-page-row-body{ flex: 1; min-width: 0; }
.ban-page-row-label{
    font-size: 10.5px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
    margin-bottom: 4px;
}
.ban-page-row-value{
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    word-break: break-word;
}
.ban-page-row-value small{
    font-size: 11.5px;
    font-weight: 400;
    color: var(--muted);
}
.ban-page-forever{ color: var(--text-2); font-weight: 700; }
.ban-page-note{
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 20px;
    padding: 11px 15px;
    background: #fafbfc;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
}
.ban-page-actions{
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.ban-page-actions .btn{ min-width: 130px; justify-content: center; }
.ban-page-footer{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    font-size: 11.5px;
    color: var(--muted);
}
.ban-page-footer .material-symbols-rounded{ font-size: 13px; }

/* ============ FOOTER ============ */
.footer{
    border-top: 1px solid var(--border);
    padding: 20px 0;
    margin-top: 48px;
    font-size: 13px;
    color: var(--muted);
}
.footer a{
    color: var(--muted);
    text-decoration: none;
    transition: color var(--transition);
}
.footer a:hover{ color: var(--text); }
.footer-inner{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.footer-online{
    display: flex;
    align-items: center;
    gap: 8px;
}
.dot{
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
}
.footer-link{
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-2);
    font-weight: 500;
}
.footer-link:hover{ color: var(--text); }
.footer-link .material-symbols-rounded{ color: var(--muted); }

/* ============ INSTALL ============ */
.install-body{
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: 30px 16px;
}
.install-box{
    width: 100%;
    max-width: 460px;
    padding: 30px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.install-box h1{
    font-size: clamp(18px, 4vw, 20px);
    margin-bottom: 20px;
    text-align: center;
    color: var(--text);
    font-weight: 700;
}
.install-box h1 span{
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 400;
    margin-top: 4px;
}
.install-box h3{
    margin: 18px 0 8px;
    font-size: 14.5px;
    color: var(--text-2);
    font-weight: 600;
}
.install-box button{
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    min-height: 46px;
    background: var(--text);
    color: #fff;
    font-weight: 600;
    font-size: 14.5px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
    font-family: inherit;
}
.install-box button:hover{ background: var(--text-2); }

/* =========================================================
   АДАПТИВ
   Единые точки: 1024px / 768px / 480px
   ========================================================= */

/* ============ ПЛАНШЕТ И МЕНЬШЕ (≤1024px) ============ */
@media (max-width: 1024px){
    :root{
        --container: 960px;
        --gutter: 20px;
    }

    .site-stats{ grid-template-columns: repeat(3, 1fr); }

    .dl-view{
        grid-template-columns: 1fr;
    }
    .dl-view-preview{
        max-width: 320px;
        margin: 0 auto;
        width: 100%;
    }
}

/* ============ МОБИЛЬНЫЙ И ПЛАНШЕТ (≤768px) ============ */
@media (max-width: 768px){
    :root{
        --gutter: 16px;
        --header-h: 58px;
    }

    /* Бургер-меню */
    .burger{ display: flex; }
    .nav-overlay{ display: block; }

    .nav{
        position: fixed;
        top: var(--header-h);
        right: 0;
        width: min(300px, 85vw);
        height: calc(100dvh - var(--header-h));
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        background: var(--panel);
        border-left: 1px solid var(--border);
        transform: translateX(110%);
        transition: transform .25s ease;
        gap: 2px;
        z-index: 95;
        overflow-y: auto;
    }
    .nav.open{ transform: translateX(0); }
    .nav-link{
        padding: 13px 15px;
        font-size: 14.5px;
        min-height: 46px;
        justify-content: flex-start;
    }

    .main{  padding: 28px 0;
        padding-top: calc(var(--header-h) + 28px); }

    /* Новости */
    .news-item{ flex-direction: column; }
    .news-item-side{ flex: 0 0 80px; width: 100%; }
    .news-item-emoji{ font-size: 32px; }
    .news-item-main{ padding: 18px; }
    .news-title{ font-size: 16.5px; }
    .news-full{ padding: 22px 18px; }

    /* Профиль */
    .profile-card{
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 18px;
        padding: 24px 18px;
    }
    .profile-info h2{ justify-content: center; }
    .meta{ text-align: center; }
    .profile-actions{ flex-direction: column; }
    .profile-btn{ justify-content: center; }

    /* Форум */
    .forum-topic-row{
        display: grid;
        grid-template-columns: 34px 1fr;
        grid-template-areas:
            "avatar main"
            "last   last";
        gap: 10px 12px;
        padding: 13px 14px 11px;
        align-items: flex-start;
    }
    .forum-topic-avatar{
        grid-area: avatar;
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
    .forum-topic-main{ grid-area: main; }
    .forum-topic-title{ font-size: 14px; margin-bottom: 3px; }
    .forum-topic-meta{ font-size: 12px; }
    .forum-topic-last{
        grid-area: last;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding-top: 9px;
        margin-top: 4px;
        border-top: 1px solid var(--border);
        text-align: left;
    }
    .forum-topic-count{ font-size: 11.5px; padding: 3px 8px; }
    .forum-topic-lastmeta{ text-align: right; font-size: 11px; }

    .forum-section{
        flex-wrap: wrap;
        padding: 14px 16px;
    }
    .forum-section-counts{
        width: 100%;
        justify-content: flex-start;
        text-align: left;
        padding-top: 8px;
        border-top: 1px solid var(--border);
    }

    /* Посты */
    .post{ flex-direction: column; }
    .post-author{
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 14px;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .post-avatar{
        width: 46px;
        height: 46px;
        font-size: 20px;
        margin: 0;
        flex-shrink: 0;
    }
    .post-author-name{ justify-content: flex-start; text-align: left; }
    .post-author-meta{ text-align: left; }
    .post-body{ padding: 16px; }

    /* Загрузки */
    .dl-view{ padding: 18px; }
    .dl-view-actions{ flex-direction: column; }
    .dl-view-actions .dl-btn-download,
    .dl-btn-edit,
    .dl-btn-delete-form,
    .dl-btn-edit,
    .dl-btn-delete{ width: 100%; }
    .dl-grid{ gap: 12px; }

    /* Админка */
    .admin-list-row{
        flex-wrap: wrap;
        padding: 13px;
        gap: 12px;
    }
    .admin-list-actions{
        width: 100%;
        padding-top: 9px;
        border-top: 1px solid var(--border);
        margin-top: 6px;
    }

    /* Footer */
    .footer-inner{ flex-direction: column; text-align: center; }

    /* Скрываем малозначимые колонки таблицы */
    .admin-table th:nth-child(1),
    .admin-table td:nth-child(1),
    .admin-table th:nth-child(3),
    .admin-table td:nth-child(3){ display: none; }
}

/* ============ ТЕЛЕФОН (≤480px) ============ */
@media (max-width: 480px){
    :root{
        --gutter: 14px;
        --radius: 8px;
        --radius-lg: 12px;
    }

    body{ font-size: 14.5px; }

    .hero{ padding: 32px 16px; }
    .hero-actions .btn{ width: 100%; }

    .auth-card{ padding: 22px 18px; }

    .news-full{ padding: 18px 14px; }

    /* Профиль */
    .profile-page{ padding: 12px 0 28px; }
    .profile-hero{ padding: 24px 16px 20px; }
    .profile-hero-avatar{ width: 92px; height: 92px; font-size: 38px; }
    .profile-grid{ grid-template-columns: 1fr; }
    .profile-card-info{ padding: 13px 15px; }

    /* Бан */
    .ban-page{
        padding: 30px 20px 22px;
        margin: 18px auto;
    }
    .ban-page-icon{ width: 70px; height: 70px; margin-bottom: 18px; }
    .ban-page-icon .material-symbols-rounded{ font-size: 36px; }
    .ban-page-actions{ flex-direction: column; }
    .ban-page-actions .btn{ width: 100%; }

    /* Установщик */
    .install-box{ padding: 22px 18px; }

    /* Статистика */
    .site-stat{ padding: 14px 6px; }
    .site-stat-value{ font-size: 17px; margin-bottom: 5px; }
    .site-stat-label{ font-size: 10px; letter-spacing: 0.2px; line-height: 1.25; }

    /* Загрузки */
    .dl-grid{ grid-template-columns: 1fr; gap: 12px; }
    .dl-view-icon .material-symbols-rounded{ font-size: 48px; }
    .form-preview{ padding: 10px; }
    .form-preview img{ max-height: 160px; }

    /* Пагинация */
    .pagination{ padding: 10px 0; gap: 4px; }
    .page-link{ min-width: 34px; height: 34px; padding: 0 10px; font-size: 12.5px; }
    .page-prev, .page-next{ padding: 0 12px; }
}
body.nav-open{
    overflow: hidden;
}
/* ============ ОЧЕНЬ УЗКИЙ ЭКРАН (≤400px) ============ */
@media (max-width: 400px){
    .forum-stats-pill span:not(.material-symbols-rounded){ display: none; }
    .forum-stats-pill b{ font-size: 12.5px; }

    .site-stat{ padding: 12px 4px; }
    .site-stat-value{ font-size: 15px; margin-bottom: 4px; }
    .site-stat-label{ font-size: 9px; letter-spacing: 0; }

    .captcha-code{
        font-size: 18px;
        letter-spacing: 3px;
        padding: 12px 14px;
        min-width: 180px;
    }
}
/* =========================================================
   ЦЕНТР ЗАГРУЗОК НА ГЛАВНОЙ — размер файла справа
   даже на телефоне, без переноса
   ========================================================= */

@media (max-width: 767px){

    /* Отменяем grid для строк загрузок на главной */
    .block .forum-topics .forum-topic-row:has(.forum-topic-last b){
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 12px 14px;
    }

    /* Левая часть — название + мета */
    .block .forum-topics .forum-topic-row:has(.forum-topic-last b) .forum-topic-main{
        flex: 1;
        min-width: 0;
    }

    /* Правая часть — размер, всегда справа, без переноса */
    .block .forum-topics .forum-topic-row:has(.forum-topic-last b) .forum-topic-last{
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        flex-shrink: 0;
        width: auto;
        padding-top: 0;
        margin-top: 0;
        border-top: none;
        text-align: right;
        white-space: nowrap;
        font-size: 12px;
    }

    /* Убираем псевдо-разделитель, если он был */
    .block .forum-topics .forum-topic-row:has(.forum-topic-last b) .forum-topic-last::before{
        content: none;
    }
}/* =========================================================
   СМЕНА ПАРОЛЯ В ПРОФИЛЕ
   ========================================================= */

/* ---------- Форма (скрыта по умолчанию, открывается по кнопке) ---------- */
.profile-password-form{
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin: 16px 0;
}

.profile-password-form h3{
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 15.5px;
    color: var(--text);
    font-weight: 700;
}

.profile-password-form h3 .material-symbols-rounded{
    font-size: 22px;
    color: var(--muted);
}

.profile-password-form label{
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    margin: 10px 0 5px;
    font-weight: 500;
}

.profile-password-form input{
    width: 100%;
    padding: 11px 13px;
    background: #fafbfc;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition), background var(--transition);
}

.profile-password-form input:focus{
    background: #fff;
    border-color: var(--muted);
}

.profile-password-form .form-actions{
    margin-top: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-password-form .form-actions .btn{
    min-width: 180px;
    justify-content: center;
}

/* ---------- Мобильная адаптация ---------- */
@media (max-width: 480px){
    .profile-password-form{
        padding: 16px;
    }
    .profile-password-form .form-actions{
        flex-direction: column;
    }
    .profile-password-form .form-actions .btn{
        width: 100%;
    }
}/* ============ ВЛОЖЕНИЯ В ПОСТАХ ============ */
.post-attachments{
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border-2);
}
.post-attachments-title{
    display: flex; align-items: center; gap: 6px;
    font-size: 12.5px; color: var(--muted); font-weight: 600;
    margin-bottom: 10px;
}
.post-attachments-title .material-symbols-rounded{ font-size: 16px; }

.post-attachments-grid{ display: flex; flex-wrap: wrap; gap: 8px; }

.post-att--image{
    display: block; width: 120px; height: 120px;
    border-radius: var(--radius-sm); overflow: hidden;
    border: 1px solid var(--border);
    transition: border-color var(--transition);
}
.post-att--image:hover{ border-color: var(--muted); }
.post-att--image img{ width: 100%; height: 100%; object-fit: cover; display: block; }

.post-att--file{
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    background: #fafbfc; border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none; color: var(--text-2);
    font-size: 13px; max-width: 100%;
    transition: border-color var(--transition);
}
.post-att--file:hover{ border-color: var(--muted); color: var(--text); }
.post-att--file .material-symbols-rounded{
    font-size: 20px; color: var(--muted); flex-shrink: 0;
}
.post-att-name{
    flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.post-att-size{ color: var(--muted); font-size: 11.5px; flex-shrink: 0; }

/* ============ ПРЕВЬЮ ============ */
.attach-preview{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.attach-preview:empty{ display: none; }

.attach-item{
    position: relative; display: flex; align-items: center; gap: 8px;
    padding: 6px 28px 6px 8px;
    background: #fafbfc; border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    font-size: 12.5px; color: var(--text-2); max-width: 260px;
}
.attach-item img{
    width: 36px; height: 36px;
    object-fit: cover; border-radius: 4px; flex-shrink: 0;
}
.attach-item .material-symbols-rounded{
    font-size: 20px; color: var(--muted); flex-shrink: 0;
}
.attach-item-name{
    flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.attach-item-remove{
    position: absolute; top: 4px; right: 4px;
    width: 20px; height: 20px; padding: 0;
    border: none; background: transparent;
    color: var(--muted); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
}
.attach-item-remove:hover{ background: #f2f4f7; color: var(--danger); }
.attach-item-remove .material-symbols-rounded{ font-size: 14px; }
/* =========================================================
   ФОРМА ОТВЕТА — действия (Отправить + Прикрепить)
   ========================================================= */

.post-form-actions{
    display: flex;
    justify-content: center;      /* обе кнопки по центру формы */
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: nowrap;            /* не переносятся на новую строку */
}

/* Отправить — компактная, по содержимому */
.post-form-actions > button[type="submit"]{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 10px 22px;
    font-size: 14px;
    flex: 0 0 auto;               /* не растягивается */
}

/* Прикрепить — квадратная иконка справа */
.attach-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    margin: 0;
    cursor: pointer;
    flex: 0 0 42px;
    line-height: 1;
    border-radius: var(--radius-sm);
    position: relative;
}

.attach-btn .material-symbols-rounded{
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

/* Поле файла скрыто, но клик по label работает */
.attach-btn input[type="file"]{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Мобильная — то же самое, чуть плотнее */
@media (max-width: 480px){
    .post-form-actions{
        gap: 8px;
        flex-wrap: nowrap;
    }
    .post-form-actions > button[type="submit"]{
        min-height: 42px;
        padding: 10px 18px;
        font-size: 14px;
    }
    .attach-btn{
        flex: 0 0 42px;
        width: 42px;
        min-width: 42px;
        height: 42px;
    }
}/* Ссылки в постах */
.post-content a{
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--border-2);
    text-underline-offset: 3px;
    transition: color var(--transition), text-decoration-color var(--transition);
    word-break: break-word;
}
.post-content a:hover{
    color: var(--text-2);
    text-decoration-color: var(--muted);
}

.quote-block a{
    color: var(--text-2);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.quote-block a:hover{
    color: var(--text);
}