/**
 * Geniro Gram — дизайн-токены и компоненты (макет «Geniro Gram Профиль»)
 * Всё скоупировано под .gg-scope: остальной сайт не затрагивается.
 * Тёмная сцена — основная; .gg-light — светлая (переключатель, localStorage).
 */

/* ---------- Токены ---------- */
.gg-scope {
    --gg-bg: #0B0E17;
    --gg-sf: #131829;
    --gg-sf2: #1A2138;
    --gg-tx: #F2F4FB;
    --gg-tx2: #9AA3BF;
    --gg-ln: rgba(255, 255, 255, .08);
    --gg-vi: #8B5CF6;
    --gg-cy: #22D3EE;
    --gg-mg: #F472B6;
    --gg-ok: #34D399;
    --gg-wn: #FBBF24;
    --gg-er: #F87171;
    --gg-glow: rgba(139, 92, 246, .35);
    --gg-grad: linear-gradient(135deg, #22D3EE, #8B5CF6, #F472B6);
    --gg-ease: cubic-bezier(.22, 1, .36, 1);
}
.gg-scope.gg-light,
body.gg-light .gg-scope {
    --gg-bg: #F7F8FC;
    --gg-sf: #FFFFFF;
    --gg-sf2: #EEF1F9;
    --gg-tx: #171B2C;
    --gg-tx2: #5A6382;
    --gg-ln: rgba(15, 23, 42, .12);
    --gg-vi: #7C3AED;
    --gg-cy: #0891B2;
    --gg-mg: #DB2777;
    --gg-glow: rgba(124, 58, 237, .25);
}

/* ---------- Сцена ---------- */
.gg-scope {
    position: relative;
    overflow: hidden;
    background: var(--gg-bg);
    color: var(--gg-tx);
    font-family: Manrope, system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 20px;
    padding: clamp(16px, 3vw, 32px);
    margin: 12px 0 24px;
    transition: background .3s, color .3s;
}
/* скринтон (halftone) — манга-декор в правом верхнем углу, не на контенте */
.gg-scope::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 340px; height: 260px;
    background-image: radial-gradient(rgba(139, 92, 246, .35) 1.2px, transparent 1.3px);
    background-size: 13px 13px;
    -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
    mask-image: radial-gradient(closest-side, #000, transparent);
    opacity: .5;
    pointer-events: none;
}
.gg-scope a { color: var(--gg-cy); text-decoration: none; }
.gg-scope a:hover { color: var(--gg-mg); }
.gg-scope :focus-visible { outline: 2px solid var(--gg-cy); outline-offset: 2px; border-radius: 4px; }
.gg-scope b, .gg-scope strong { color: inherit; }

@keyframes gg-fadeup {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Шапка профиля ---------- */
.gg-head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    animation: gg-fadeup .35s var(--gg-ease) both;
}
.gg-ava {
    width: 120px; height: 120px;
    flex-shrink: 0;
    border-radius: 50%;
    padding: 3.5px;
    background: var(--gg-grad);
}
.gg-ava img {
    display: block;
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 3px solid var(--gg-bg);
    background: var(--gg-sf2);
    object-fit: cover;
    box-sizing: border-box;
}
.gg-head__info {
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.gg-head__row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.gg-name {
    margin: 0;
    font-family: Unbounded, Manrope, sans-serif;
    font-weight: 700;
    font-size: clamp(19px, 2.6vw, 24px);
    line-height: 1.25;
    color: var(--gg-tx);
}
/* онлайн-бейдж плагина user_online — приводим к чипу */
.gg-head__row .online-status, .gg-head__row .u-online { color: var(--gg-ok); font-size: 12.5px; font-weight: 700; }

/* ---------- Кнопки ---------- */
.gg-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--gg-grad);
    color: #fff !important;
    border: none;
    border-radius: 11px;
    padding: 9px 20px;
    font-family: Manrope, sans-serif;
    font-weight: 800;
    font-size: 13.5px;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 14px var(--gg-glow);
    transition: box-shadow .2s, transform .2s;
}
.gg-btn:hover { color: #fff; box-shadow: 0 4px 24px rgba(139, 92, 246, .55); transform: translateY(-1px); }
.gg-btn:active { transform: translateY(0); }
.gg-btn--ghost {
    background: var(--gg-sf);
    color: var(--gg-tx) !important;
    border: 1px solid var(--gg-ln);
    box-shadow: none;
    font-weight: 700;
    font-size: 13px;
    padding: 9px 16px;
}
.gg-btn--ghost:hover { border-color: var(--gg-vi); box-shadow: 0 0 14px var(--gg-glow); color: var(--gg-tx); }
.gg-iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--gg-tx2);
    cursor: pointer;
    transition: color .2s, background .2s;
}
.gg-iconbtn:hover { color: var(--gg-wn); background: var(--gg-sf2); }
.gg-theme-toggle { position: absolute; top: 0; right: 0; }
.gg-scope .gg-theme-toggle__sun { display: none; }
.gg-scope .gg-theme-toggle__moon { display: block; }
.gg-scope.gg-light .gg-theme-toggle__sun { display: block; }
.gg-scope.gg-light .gg-theme-toggle__moon { display: none; }

/* ---------- Статистика ---------- */
.gg-stats {
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 14px;
}
.gg-stats b {
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-weight: 700;
}
.gg-stats span { color: var(--gg-tx2); }
.gg-stats b + span { margin-left: 4px; }

/* ---------- Био ---------- */
.gg-bio { font-size: 13.5px; line-height: 1.6; }
.gg-bio__title { font-weight: 800; }
.gg-bio__note { color: var(--gg-tx2); }

/* ---------- Контакты-чипы ---------- */
.gg-contacts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.gg-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--gg-sf);
    border: 1px solid var(--gg-ln);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--gg-tx);
}
.gg-chip__label { color: var(--gg-tx2); font-weight: 600; }
.gg-chip span { color: inherit; }
.gg-chip a { color: var(--gg-cy); }

/* ---------- Табы ---------- */
.gg-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--gg-ln);
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
}
.gg-tabs::-webkit-scrollbar { display: none; }
.gg-tab {
    display: inline-block;
    background: transparent;
    border: none;
    border-bottom: 2.5px solid transparent;
    color: var(--gg-tx2) !important;
    font-family: Manrope, sans-serif;
    font-weight: 800;
    font-size: 14px;
    padding: 12px 18px;
    cursor: pointer;
    white-space: nowrap;
    transition: color .2s;
}
.gg-tab:hover { color: var(--gg-tx) !important; }
.gg-tab.active {
    color: var(--gg-tx) !important;
    border-bottom-color: var(--gg-vi);
}

/* ---------- Тулбар секции (h1 + фильтр категорий) ---------- */
.gg-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 22px 0 16px;
}
.gg-section-title {
    margin: 0;
    font-family: Manrope, sans-serif;
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--gg-tx2);
}
.gg-cats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}
.gg-cats .gg-chip { padding: 5px 13px; color: var(--gg-tx2); transition: border-color .2s, color .2s; }
.gg-cats a.gg-chip:hover { border-color: var(--gg-vi); color: var(--gg-tx); }
.gg-cats .gg-chip.active {
    background: var(--gg-grad);
    border-color: transparent;
    color: #fff;
    font-weight: 700;
}

/* ---------- Сетка публикаций ---------- */
.gg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}
@media (max-width: 640px) {
    .gg-grid { grid-template-columns: repeat(2, 1fr); }
}
.gg-tile {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    background: var(--gg-sf2); /* нейтральная подложка под «плохие» фото */
    animation: gg-fadeup .35s var(--gg-ease) var(--gg-d, 0ms) both;
    transition: box-shadow .2s;
}
.gg-tile:hover { box-shadow: 0 0 18px var(--gg-glow); }
.gg-tile__link {
    display: block;
    position: absolute;
    inset: 0;
    color: #F2F4FB;
}
.gg-tile__link img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s var(--gg-ease);
}
.gg-tile:hover .gg-tile__link img { transform: scale(1.03); }

/* нижний оверлей: цена + заголовок */
.gg-tile__ovr {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 26px 10px 8px;
    background: linear-gradient(transparent, rgba(11, 14, 23, .85));
    color: #F2F4FB;
}
.gg-tile__price {
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.3;
}
.gg-tile__price small { font-size: 11px; font-weight: 500; opacity: .85; margin-left: 4px; }
.gg-tile__title {
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gg-tile__meta {
    font-size: 10.5px;
    font-weight: 500;
    opacity: .75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* плашки услуг: VIP (выделено), срочно, топ */
.gg-tile__badges {
    position: absolute;
    left: 8px; top: 8px;
    display: flex;
    gap: 5px;
    z-index: 2;
    pointer-events: none;
}
.gg-bdg {
    display: inline-block;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .03em;
    line-height: 1.4;
    text-transform: uppercase;
}
.gg-bdg--vip {
    background: var(--gg-grad);
    color: #fff;
    box-shadow: 0 1px 8px var(--gg-glow);
}
.gg-bdg--quick { background: #FBBF24; color: #171B2C; }
.gg-bdg--top { background: #22D3EE; color: #171B2C; }

/* счётчик фото */
.gg-tile__multi {
    position: absolute;
    right: 8px; top: 8px;
    z-index: 2;
    color: #F2F4FB;
    font-size: 11.5px;
    font-weight: 700;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
    background: rgba(11, 14, 23, .55);
    border-radius: 999px;
    padding: 3px 8px;
    pointer-events: none;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

/* избранное (глобальный обработчик app.js: .j-i-fav) */
.gg-scope .gg-tile__fav {
    position: absolute;
    right: 6px; bottom: 6px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(11, 14, 23, .55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #F2F4FB !important;
    font-size: 14px;
    transition: color .2s, background .2s, transform .2s;
}
.gg-scope .gg-tile__fav:hover { color: #FBBF24 !important; transform: scale(1.1); }
.gg-scope .gg-tile__fav.active { color: #FBBF24 !important; }

/* ---------- Пустое состояние ---------- */
.gg-empty {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 56px 24px;
    border: 1px dashed var(--gg-ln);
    border-radius: 16px;
    background-image: radial-gradient(rgba(154, 163, 191, .18) 1.2px, transparent 1.3px);
    background-size: 12px 12px;
}
.gg-empty__star {
    display: block;
    font-size: 30px;
    line-height: 1;
    margin-bottom: 14px;
    background: var(--gg-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.gg-empty__text { color: var(--gg-tx2); font-size: 14px; margin: 0; }

/* ---------- Пагинация (разметка pagination.standart) ---------- */
.gg-scope .pager,
.gg-scope .pagination { margin: 18px 0 0; }
.gg-scope .pager li a,
.gg-scope .pagination ul li a {
    background: var(--gg-sf);
    border: 1px solid var(--gg-ln);
    border-radius: 10px;
    color: var(--gg-tx2);
    padding: 7px 13px;
    font-weight: 700;
    font-size: 13px;
    float: none;
    display: inline-block;
    line-height: 1.4;
    transition: border-color .2s, color .2s;
}
.gg-scope .pagination ul { box-shadow: none; display: flex; gap: 6px; flex-wrap: wrap; }
.gg-scope .pagination ul li a:hover,
.gg-scope .pager li a:hover { border-color: var(--gg-vi); color: var(--gg-tx); background: var(--gg-sf); }
.gg-scope .pagination ul li.active a {
    background: var(--gg-grad);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 1px 10px var(--gg-glow);
}
.gg-scope .pageto, .gg-scope .pageto .grey { color: var(--gg-tx2); }
.gg-scope .pageto input.j-pgn-goto {
    background: var(--gg-sf);
    border: 1px solid var(--gg-ln);
    color: var(--gg-tx);
    border-radius: 8px;
    box-shadow: none;
}

/* ---------- Баннер (users_profile_right) ---------- */
.gg-banner { margin-top: 22px; text-align: center; }
.gg-banner img { max-width: 100%; height: auto; border-radius: 12px; }

/* ---------- Разделитель ---------- */
.gg-gap { height: 22px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .gg-scope *, .gg-scope { animation: none !important; transition: none !important; }
}
