:root {
    --bg: #000;
    --surface: #0a0a0a;
    --surface-2: #141414;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #fff;
    --text-dim: #8a8a8a;
    --text-mute: #555;
    --accent: #fff;
    --accent-text: #000;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --nav-h: 60px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; padding: 0; background: var(--bg); color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px; line-height: 1.4;
    overflow: hidden; overscroll-behavior-y: none;
    -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }

/* AUTH */
.auth-body { display: flex; justify-content: center; align-items: center; min-height: 100vh; min-height: 100dvh; padding: 24px 20px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h2 { margin: 0 0 6px; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.auth-box .subtitle { color: var(--text-dim); font-size: 14px; margin: 0 0 28px; }
.auth-box input {
    width: 100%; padding: 16px 18px; margin-bottom: 12px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 12px; color: var(--text); font-size: 16px;
    transition: border-color 0.2s;
}
.auth-box input:focus { outline: none; border-color: var(--border-strong); }
.auth-box p { text-align: center; color: var(--text-dim); font-size: 14px; margin-top: 20px; }
.auth-box a { color: var(--text); text-decoration: none; font-weight: 600; }
.error { color: var(--text); background: rgba(255,255,255,0.06); border: 1px solid var(--border); padding: 10px 14px; border-radius: 10px; font-size: 13px; text-align: center; }

/* BUTTONS */
.btn-primary {
    width: 100%; padding: 16px; background: var(--accent); color: var(--accent-text);
    border: none; border-radius: 12px; font-size: 16px; font-weight: 600;
    cursor: pointer; margin-top: 12px;
    transition: transform 0.1s, opacity 0.15s;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    text-decoration: none;
}
.btn-primary:active { transform: scale(0.98); opacity: 0.85; }
.btn-secondary {
    background: var(--surface-2); color: var(--text);
    border: 1px solid var(--border); border-radius: 12px;
    padding: 12px 20px; cursor: pointer; font-size: 14px; font-weight: 500;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    text-decoration: none; transition: background 0.2s;
}
.btn-secondary:active { background: var(--surface); }

/* VIDEO FEED */
.video-feed { height: 100vh; height: 100dvh; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; }
.video-feed::-webkit-scrollbar { display: none; }
.video-container { height: 100vh; height: 100dvh; width: 100vw; scroll-snap-align: start; position: relative; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.video-container video { width: 100%; height: 100%; object-fit: contain; background: var(--bg); }
.video-container::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.5) 100%); pointer-events: none; }

/* TOP TABS */
.top-tabs { position: fixed; top: 0; left: 0; right: 0; padding: calc(var(--safe-top) + 14px) 16px 14px; z-index: 100; display: flex; justify-content: center; pointer-events: none; background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%); }
.top-tabs-inner { display: flex; gap: 4px; background: rgba(20, 20, 20, 0.75); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); border: 1px solid var(--border); border-radius: 999px; padding: 4px; pointer-events: auto; box-shadow: 0 4px 24px rgba(0,0,0,0.4); }
.top-tab { padding: 9px 20px; border-radius: 999px; color: var(--text-dim); font-size: 14px; font-weight: 500; text-decoration: none; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); white-space: nowrap; }
.top-tab.active { background: var(--accent); color: var(--accent-text); font-weight: 600; }
@media (hover: hover) { .top-tab:not(.active):hover { color: var(--text); } }

/* SIDE ACTIONS */
.side-actions {
    position: absolute;
    bottom: calc(var(--safe-bottom) + 90px);
    right: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 5;
}
.avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; }
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.9);
    object-fit: cover;
    transition: transform 0.15s;
}
.avatar-wrap:active .avatar { transform: scale(0.92); }
.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    background: none;
    border: none;
    color: #fff;
    padding: 0;
    font-family: inherit;
}
.action-btn-circle {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, background 0.2s;
}
.action-btn-circle svg {
    width: 18px;
    height: 18px;
    fill: #fff;
    transition: fill 0.2s;
}
.action-btn:active .action-btn-circle { transform: scale(0.9); }
.action-btn-label {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    min-height: 12px;
    line-height: 1;
}
.action-btn.liked .action-btn-circle svg { fill: #fff; }
.action-btn.liked .action-btn-circle { background: rgba(255,255,255,0.25); }

/* BOTTOM INFO */
.bottom-info { position: absolute; bottom: calc(var(--safe-bottom) + var(--nav-h) + 16px); left: 16px; right: 70px; z-index: 5; text-shadow: 0 1px 4px rgba(0,0,0,0.9); }
.video-caption { margin: 0 0 10px; font-size: 14px; line-height: 1.4; color: #fff; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.music-marquee { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255,255,255,0.85); }
.music-marquee svg { width: 13px; height: 13px; fill: currentColor; flex-shrink: 0; }
.music-marquee span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* BOTTOM NAV */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: calc(var(--nav-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom); background: rgba(0,0,0,0.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-top: 1px solid var(--border); display: flex; justify-content: space-around; align-items: center; z-index: 50; padding-top: 4px; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-mute); text-decoration: none; font-size: 10px; font-weight: 500; padding: 6px 0; transition: color 0.2s; min-height: 44px; }
.nav-item.active { color: var(--text); }
.nav-item svg { width: 22px; height: 22px; fill: currentColor; }

.nav-add-wrap { flex: 1; display: flex; align-items: center; justify-content: center; }
.add-btn {
    width: 44px; height: 32px;
    background: var(--accent); color: var(--accent-text);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 300; line-height: 1;
    transition: transform 0.15s, opacity 0.2s;
}
.nav-add-wrap:active .add-btn { transform: scale(0.9); }
.add-btn.locked { background: var(--surface-2); color: var(--text-mute); font-size: 16px; }

/* ============ BADGES ============ */
.badge-16 {
    position: absolute;
    top: calc(var(--safe-top) + 70px);
    right: 14px;
    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 6px;
    letter-spacing: 0.5px;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.badge-16-mini {
    position: absolute; top: 5px; right: 5px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 1px 5px; font-size: 9px;
    border-radius: 3px; font-weight: 600;
    border: 1px solid rgba(255,255,255,0.3);
}

/* ============ РОЛЕВЫЕ ГАЛОЧКИ ============ */
.badge-role {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    vertical-align: middle;
    margin-left: 5px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.badge-admin { background: #1D9BF0; }      /* синий — админ */
.badge-verified { background: #FF9500; }   /* оранжевый — верифицирован */

.verified-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 15px; height: 15px;
    background: #FF9500; color: #fff;
    border-radius: 50%;
    font-size: 9px; font-weight: 700;
    margin-left: 5px; vertical-align: middle;
}

/* ============ UPLOAD ============ */
.upload-container {
    padding: calc(var(--safe-top) + 16px) 20px 20px;
    height: 100vh; height: 100dvh;
    overflow-y: auto;
    max-width: 600px; margin: 0 auto;
}
.upload-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; min-height: 44px; }
.upload-header h3 { margin: 0; font-size: 17px; font-weight: 600; }
.close-btn { color: var(--text); text-decoration: none; font-size: 22px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background 0.2s; }
.close-btn:active { background: var(--surface-2); }

.upload-box {
    border: 2px dashed var(--border-strong);
    border-radius: 16px;
    padding: 48px 20px;
    text-align: center;
    margin-bottom: 16px;
    transition: border-color 0.2s, background 0.2s;
}
.upload-box:active { border-color: #fff; background: rgba(255,255,255,0.02); }
.upload-box svg { width: 52px; height: 52px; fill: var(--text-mute); margin-bottom: 14px; }
.upload-box p { margin: 6px 0; color: var(--text-dim); font-size: 14px; }
.upload-form input[type="file"] { display: none; }
.upload-form label {
    background: var(--surface-2); color: var(--text);
    border: 1px solid var(--border);
    padding: 12px 26px; border-radius: 12px;
    cursor: pointer; display: inline-block; margin-top: 14px;
    font-weight: 600; font-size: 14px;
    transition: background 0.2s;
}
.upload-form label:active { background: var(--surface); }
.upload-form input[type="text"],
.upload-form input[type="url"] {
    width: 100%; padding: 15px 18px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px; color: var(--text);
    font-size: 15px; font-family: inherit;
    margin-top: 16px;
    transition: border-color 0.2s;
}
.upload-form input[type="text"]:focus,
.upload-form input[type="url"]:focus {
    outline: none; border-color: var(--border-strong);
}

/* CHECKBOX 16+ */
.check-16 {
    display: flex; align-items: center; gap: 12px;
    margin: 20px 0;
    padding: 14px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}
.check-16 input[type="checkbox"] { width: 20px; height: 20px; accent-color: #fff; cursor: pointer; flex-shrink: 0; }

/* ============ AGE GATE ============ */
.age-gate-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.96);
    backdrop-filter: blur(8px);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999; padding: 20px;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.age-gate-modal {
    background: var(--surface);
    padding: 32px 26px;
    border-radius: 20px;
    max-width: 360px; width: 100%;
    text-align: center;
    border: 1px solid var(--border);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.age-gate-icon { font-size: 44px; margin-bottom: 14px; }
.age-gate-modal h2 { margin: 0 0 8px; font-size: 22px; font-weight: 700; }
.age-gate-modal p { color: var(--text-dim); font-size: 14px; margin: 0 0 24px; line-height: 1.5; }
.age-gate-buttons { display: flex; flex-direction: column; gap: 10px; }
.age-btn { padding: 15px; border: 1px solid var(--border-strong); border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; transition: opacity 0.15s, transform 0.1s; }
.age-btn:active { transform: scale(0.98); }
.age-yes { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.age-no { background: transparent; color: var(--text); }
body.age-gated { overflow: hidden; }

/* ============ IMAGE FEED ============ */
.image-feed { height: 100vh; height: 100dvh; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; }
.image-feed::-webkit-scrollbar { display: none; }
.image-container { height: 100vh; height: 100dvh; width: 100vw; scroll-snap-align: start; position: relative; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.image-container img { width: 100%; height: 100%; object-fit: contain; }
.image-container::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 25%, transparent 75%, rgba(0,0,0,0.4) 100%); pointer-events: none; }

/* EMPTY STATE */
.empty-state { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 24px; gap: 8px; }
.empty-state-icon { font-size: 48px; opacity: 0.3; margin-bottom: 8px; }
.empty-state h3 { margin: 0; font-size: 18px; font-weight: 600; }
.empty-state p { color: var(--text-dim); font-size: 14px; margin: 0; }
.empty-state a { color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; margin-top: 16px; padding: 10px 22px; border: 1px solid var(--border-strong); border-radius: 10px; }

/* ============ ADS ============ */
.ad-slot { display: flex; align-items: center; justify-content: center; background: #0a0a0a; }
.ad-frame { display: block; width: 100%; height: 100%; position: relative; }
.ad-image { width: 100%; height: 100%; object-fit: cover; }
.ad-tag {
    position: absolute;
    top: calc(var(--safe-top) + 70px);
    left: 14px;
    background: rgba(255,255,255,0.95);
    color: #000;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.5px;
    z-index: 5;
}
.ad-title {
    position: absolute;
    bottom: calc(var(--safe-bottom) + var(--nav-h) + 24px);
    left: 16px; right: 16px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    text-align: left;
    z-index: 5;
}

/* ============ REPORT MODAL ============ */
.report-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: flex-end; justify-content: center; }
.report-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); }
.report-box {
    position: relative;
    background: #0a0a0a;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 24px 20px calc(24px + var(--safe-bottom));
    width: 100%; max-width: 480px;
    animation: slideUpModal 0.25s ease;
}
@keyframes slideUpModal { from { transform: translateY(100%); } to { transform: translateY(0); } }
.report-box h3 { margin: 0 0 4px; font-size: 18px; }
.report-hint { color: var(--text-dim); font-size: 13px; margin: 0 0 16px; }
.report-options { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.report-options label {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    background: #141414;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px; cursor: pointer;
    transition: border-color 0.2s;
}
.report-options label:has(input:checked) { border-color: #fff; background: rgba(255,255,255,0.05); }
.report-options input[type="radio"] { accent-color: #fff; }
#reportCustomReason {
    width: 100%; padding: 13px 15px;
    background: #000; border: 1px solid var(--border);
    border-radius: 10px; color: #fff; font-size: 14px;
    margin-bottom: 16px; font-family: inherit;
}
.report-actions { display: flex; gap: 10px; }
.report-actions .btn-primary,
.report-actions .btn-secondary { flex: 1; margin: 0; }

/* ============ COMMENTS MODAL ============ */
.comments-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: flex-end; justify-content: center; }
.comments-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); }
.comments-sheet {
    position: relative;
    background: #0a0a0a;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    width: 100%;
    max-width: 560px;
    height: 75vh;
    height: 75dvh;
    display: flex;
    flex-direction: column;
    animation: slideUpModal 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: var(--safe-bottom);
}
.comments-handle { width: 40px; height: 4px; background: rgba(255,255,255,0.2); border-radius: 2px; margin: 8px auto 4px; flex-shrink: 0; }
.comments-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.comments-header h3 { margin: 0; font-size: 15px; font-weight: 600; }
.comments-close { background: none; border: none; color: var(--text-dim); font-size: 20px; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.comments-close:active { background: var(--surface-2); }
.comments-list { flex: 1; overflow-y: auto; padding: 12px 20px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.comments-empty { text-align: center; color: var(--text-dim); padding: 40px 20px; font-size: 14px; }
.comment-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--surface-2); }
.comment-body { flex: 1; min-width: 0; }
.comment-author { font-size: 12px; font-weight: 600; color: var(--text-dim); margin-bottom: 3px; }
.comment-text { font-size: 14px; color: var(--text); line-height: 1.4; word-wrap: break-word; margin-bottom: 4px; }
.comment-time { font-size: 11px; color: var(--text-mute); }
.comments-form { display: flex; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); background: #0a0a0a; flex-shrink: 0; }
.comments-form input {
    flex: 1; padding: 12px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 100px; color: var(--text);
    font-size: 14px; font-family: inherit;
}
.comments-form input:focus { outline: none; border-color: var(--border-strong); }
.comments-form button {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.comments-form button:active { transform: scale(0.92); }
.comments-form button svg { width: 20px; height: 20px; fill: currentColor; }

/* ============ PROFILE ============ */
.profile-container { height: 100vh; height: 100dvh; overflow-y: auto; padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 20px); background: var(--bg); }
.profile-banner { display: block; width: 100%; height: 180px; overflow: hidden; position: relative; text-decoration: none; }
.profile-banner img { width: 100%; height: 100%; object-fit: cover; }
.profile-banner-empty {
    height: 130px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-mute); font-size: 13px;
}
.profile-header { text-align: center; padding: 0 20px 24px; border-bottom: 1px solid var(--border); }
.profile-avatar {
    width: 92px; height: 92px;
    border-radius: 50%;
    border: 3px solid #fff;
    object-fit: cover;
    margin-top: -46px;
    position: relative; z-index: 2;
    background: #000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.profile-header h2 { margin: 14px 0 16px; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.profile-stats { display: flex; justify-content: center; gap: 32px; margin: 0 0 16px; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat b { font-size: 17px; font-weight: 700; }
.stat span { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.3px; }
.profile-bio { font-size: 14px; color: var(--text); margin-bottom: 18px; line-height: 1.5; }
.profile-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 18px; }
.profile-btn {
    background: var(--surface-2); color: var(--text);
    border: 1px solid var(--border);
    padding: 9px 16px; border-radius: 100px;
    font-size: 13px; font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.profile-btn:active { background: var(--surface); border-color: var(--border-strong); }
.profile-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 16px; }
.profile-actions .btn-primary { max-width: 240px; margin: 0; }
.profile-actions .btn-secondary { max-width: 240px; width: 100%; }
.profile-actions .link-logout { color: var(--text-dim); font-size: 13px; text-decoration: none; padding: 6px 12px; }
.profile-actions .link-admin { color: var(--text); font-size: 13px; text-decoration: none; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 8px; }
.status-pending {
    color: var(--text-dim); font-size: 13px;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    background: var(--surface-2);
    border-radius: 100px;
    border: 1px solid var(--border);
}

/* PROFILE AD BANNER */
.profile-ad-slot { position: relative; margin: 16px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.profile-ad-tag {
    position: absolute; top: 8px; left: 8px;
    background: rgba(255,255,255,0.95);
    color: #000; padding: 3px 8px;
    border-radius: 4px; font-size: 10px;
    font-weight: 700; letter-spacing: 0.4px; z-index: 2;
}
.profile-ad-link { display: block; }
.profile-ad-link img { width: 100%; height: auto; max-height: 240px; object-fit: cover; display: block; }

/* PROFILE TABS */
.profile-tabs { display: flex; border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.profile-tab {
    flex: 1; padding: 16px 0; text-align: center;
    color: var(--text-dim); text-decoration: none;
    font-size: 14px; font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.profile-tab.active { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.profile-tab svg { width: 16px; height: 16px; fill: currentColor; }

/* VIDEO GRID */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.grid-item { position: relative; aspect-ratio: 9/16; background: var(--surface); overflow: hidden; }
.grid-item video, .grid-item img { width: 100%; height: 100%; object-fit: cover; }

/* ============ EDIT PROFILE ============ */
.edit-container { padding: calc(var(--safe-top) + 16px) 20px 40px; max-width: 600px; margin: 0 auto; color: var(--text); overflow-y: auto; height: 100vh; height: 100dvh; }
.edit-section { background: var(--surface); border: 1px solid var(--border); padding: 20px; border-radius: 16px; margin-bottom: 16px; }
.edit-section h4 { margin: 0 0 16px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.edit-section h4 svg { width: 18px; height: 18px; fill: currentColor; }
.edit-form { margin-top: 12px; }
.edit-form .field-label { display: block; margin-top: 14px; color: var(--text-dim); font-size: 12px; font-weight: 500; margin-bottom: 6px; }
.edit-form input[type="file"] { display: block; width: 100%; color: var(--text-dim); font-size: 13px; padding: 10px 0; }
.edit-form input[type="url"], .edit-form input[type="text"] {
    width: 100%; padding: 13px 15px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 10px; color: var(--text);
    font-size: 14px; font-family: inherit;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}
.edit-form input:focus { outline: none; border-color: var(--border-strong); }
.banner-preview { width: 100%; max-height: 180px; object-fit: cover; border-radius: 12px; margin-bottom: 12px; border: 1px solid var(--border); }
.buttons-list { margin-top: 8px; }
.button-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px; background: var(--bg);
    border: 1px solid var(--border); border-radius: 10px;
    margin-bottom: 8px; gap: 12px;
}
.button-row-info { min-width: 0; flex: 1; }
.button-row-info b { display: block; font-size: 14px; margin-bottom: 2px; }
.button-row-info small { color: var(--text-dim); font-size: 11px; word-break: break-all; display: block; }
.btn-delete { background: transparent; color: var(--text-mute); border: 1px solid var(--border-strong); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 14px; line-height: 1; flex-shrink: 0; transition: color 0.2s, border-color 0.2s; }
.btn-delete:active { color: #fff; border-color: #fff; }
.edit-hint { color: var(--text-dim); font-size: 12px; margin: 10px 0 0; }

/* ============ ADMIN ============ */
.admin-container {
    max-width: 900px; margin: 0 auto;
    padding: calc(var(--safe-top) + 24px) 20px 40px;
    color: var(--text);
    overflow-y: auto; height: 100vh; height: 100dvh;
}
.admin-container h2 { margin: 0 0 8px; font-size: 24px; }
.admin-container > p { color: var(--text-dim); font-size: 14px; margin: 0 0 20px; }
.admin-container > a { color: var(--text); text-decoration: none; font-size: 14px; }

.admin-tabs { display: flex; gap: 4px; padding: 4px; background: #0a0a0a; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab { flex-shrink: 0; padding: 10px 16px; color: var(--text-dim); text-decoration: none; font-size: 13px; font-weight: 500; border-radius: 8px; white-space: nowrap; transition: all 0.2s; }
.admin-tab.active { background: #fff; color: #000; font-weight: 600; }
.admin-tab:hover:not(.active) { color: #fff; }

.admin-card { background: #0a0a0a; border: 1px solid var(--border); padding: 20px; border-radius: 14px; margin-bottom: 20px; }
.admin-card h3 { margin: 0 0 16px; font-size: 16px; }
.admin-card input[type="text"],
.admin-card input[type="url"],
.admin-card input[type="email"],
.admin-card input[type="number"] {
    width: 100%; padding: 12px 15px;
    background: #000; border: 1px solid var(--border);
    border-radius: 10px; color: #fff; font-size: 14px;
    font-family: inherit;
    margin-bottom: 12px;
}
.admin-card .field-label { display: block; color: var(--text-dim); font-size: 12px; margin-bottom: 6px; font-weight: 500; }
.admin-card input[type="file"] { display: block; color: var(--text-dim); font-size: 13px; margin-bottom: 12px; width: 100%; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.admin-table { width: 100%; border-collapse: collapse; margin-top: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.admin-table th, .admin-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.admin-table th { background: var(--surface-2); color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-btn { padding: 7px 14px; border: 1px solid var(--border-strong); border-radius: 8px; font-weight: 600; font-size: 12px; cursor: pointer; background: transparent; color: var(--text); transition: all 0.2s; }
.admin-btn.approve { background: #fff; color: #000; border-color: #fff; }
.admin-btn.approve:active { opacity: 0.8; }
.admin-btn.revoke { color: var(--text-dim); }
.admin-btn.revoke:active { background: var(--surface-2); }

.report-status { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.report-status-new { background: rgba(255,255,255,0.15); color: #fff; }
.report-status-resolved { background: rgba(255,255,255,0.05); color: #666; }
.report-status-dismissed { background: rgba(255,255,255,0.05); color: #444; }

.flash-success { color: #fff; background: rgba(255,255,255,0.08); border: 1px solid var(--border); padding: 12px 16px; border-radius: 10px; font-size: 14px; text-align: center; margin-bottom: 16px; }

/* ============ AUTH LANDING ============ */
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; min-height: 100dvh; background: #000; }
.auth-hero { display: flex; flex-direction: column; justify-content: center; padding: 60px 48px; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.04) 0%, transparent 60%); border-right: 1px solid var(--border); position: relative; overflow: hidden; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; margin-bottom: 48px; letter-spacing: -0.02em; }
.brand-mark { width: 40px; height: 40px; background: #fff; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.brand-mark svg { width: 24px; height: 24px; fill: #000; }
.auth-hero h1 { font-size: 42px; line-height: 1.1; font-weight: 800; margin: 0 0 20px; letter-spacing: -0.02em; }
.auth-tagline { color: var(--text-dim); font-size: 16px; line-height: 1.6; margin: 0 0 40px; max-width: 480px; }
.auth-features { display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }
.feature { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 14px; }
.feature-icon { font-size: 24px; flex-shrink: 0; }
.feature b { display: block; font-size: 14px; margin-bottom: 2px; }
.feature p { margin: 0; color: var(--text-dim); font-size: 13px; }
.auth-disclaimer { color: var(--text-mute); font-size: 12px; margin: 0; line-height: 1.5; }
.auth-disclaimer a { color: #fff; }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-form-wrap .auth-box { max-width: 380px; width: 100%; }
.agree-label { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-dim); margin: 16px 0 8px; cursor: pointer; line-height: 1.4; }
.agree-label input { accent-color: #fff; margin-top: 3px; flex-shrink: 0; }
.agree-label a { color: #fff; }
.auth-switch { text-align: center; color: var(--text-dim); font-size: 14px; margin-top: 20px; }

@media (max-width: 860px) {
    .auth-layout { grid-template-columns: 1fr; }
    .auth-hero { padding: 40px 24px; border-right: none; border-bottom: 1px solid var(--border); }
    .auth-hero h1 { font-size: 30px; }
    .auth-features { display: none; }
    .auth-brand { margin-bottom: 24px; }
    .auth-tagline { margin-bottom: 20px; font-size: 14px; }
    .auth-form-wrap { padding: 32px 20px; }
}

/* ============ POLICY ============ */
.policy-page { max-width: 780px; margin: 0 auto; padding: 40px 24px 80px; color: #fff; }
.policy-back { display: inline-block; color: var(--text-dim); text-decoration: none; font-size: 14px; margin-bottom: 24px; }
.policy-page h1 { font-size: 32px; margin: 0 0 6px; letter-spacing: -0.02em; }
.policy-updated { color: var(--text-mute); font-size: 13px; margin: 0 0 32px; }
.policy-page h2 { font-size: 20px; margin: 32px 0 12px; padding-top: 16px; border-top: 1px solid var(--border); }
.policy-page p, .policy-page li { color: var(--text-dim); line-height: 1.7; font-size: 15px; }
.policy-page ul { padding-left: 20px; }
.policy-page b { color: #fff; }
.policy-footer { text-align: center; margin-top: 48px; }
/* ============ SCROLL FIX: AUTH PAGES (MOBILE) ============ */
body.auth-body {
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: auto;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    display: block;
    padding: 0;
}

/* Внутренний контейнер сам управляет раскладкой */
body.auth-body .auth-layout {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

body.auth-body .auth-form-wrap {
    padding: 32px 20px;
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
}

/* На мобилке — вертикальный скролл всей страницы */
@media (max-width: 860px) {
    body.auth-body {
        display: block;
        padding: 0;
    }

    body.auth-body .auth-layout {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
    }

    body.auth-body .auth-hero {
        flex-shrink: 0;
    }

    body.auth-body .auth-form-wrap {
        flex: 1 0 auto;
        padding: 24px 20px;
        padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
    }

    /* Видимая полоса прокрутки для удобства */
    body.auth-body::-webkit-scrollbar {
        width: 6px;
    }
    body.auth-body::-webkit-scrollbar-track {
        background: transparent;
    }
    body.auth-body::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 3px;
    }
}
/* ============ AUTH — ЦЕНТРИРОВАНИЕ ЗАГОЛОВКОВ ============ */
.auth-box h2,
.auth-box .subtitle {
    text-align: center;
}

/* ============ КАСТОМНЫЕ ЧЕКБОКСЫ (фикс вылезания за границы) ============ */
.agree-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    color: var(--text-dim);
    margin: 12px 0;
    cursor: pointer;
    line-height: 1.5;
    padding: 14px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.2s, background 0.2s;
    width: 100%;
    box-sizing: border-box;
}
.agree-label:hover {
    border-color: var(--border-strong);
}
.agree-label:has(input:checked) {
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.04);
}

/* Кастомный чекбокс */
.agree-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    min-width: 22px;
    flex-shrink: 0;
    border: 2px solid var(--border-strong);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    margin: 0;
    position: relative;
    transition: background 0.15s, border-color 0.15s;
}
.agree-label input[type="checkbox"]:checked {
    background: #fff;
    border-color: #fff;
}
.agree-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #000;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}
.agree-label input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--border-strong);
    outline-offset: 2px;
}

/* Текст чекбокса — не вылезает за границы */
.agree-label span {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: left;
}
.agree-label a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.agree-label b {
    color: #fff;
    font-weight: 600;
}
/* ============ КНОПКА ЗВУКА ============ */
.sound-toggle {
    position: absolute;
    top: calc(var(--safe-top) + 64px);
    left: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: transform 0.15s, background 0.2s;
}
.sound-toggle:active {
    transform: scale(0.9);
    background: rgba(255,255,255,0.2);
}
.sound-toggle svg {
    width: 18px;
    height: 18px;
    fill: #fff;
    pointer-events: none;
}

/* ============ КНОПКА УДАЛЕНИЯ (в ленте) ============ */
.action-btn.action-delete .action-btn-circle {
    background: rgba(255, 60, 60, 0.18);
    border-color: rgba(255, 60, 60, 0.35);
}
.action-btn.action-delete .action-btn-circle svg {
    fill: #ff6b6b;
}
.action-btn.action-delete:active .action-btn-circle {
    transform: scale(0.9);
    background: rgba(255, 60, 60, 0.4);
}

/* ============ КНОПКА УДАЛЕНИЯ (в сетке профиля) ============ */
.grid-delete {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 60, 60, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    padding: 0;
    transition: transform 0.15s, background 0.2s;
}
.grid-delete svg {
    width: 14px;
    height: 14px;
    fill: #ff6b6b;
    pointer-events: none;
}
.grid-delete:active {
    transform: scale(0.9);
    background: rgba(255, 60, 60, 0.5);
}
.grid-delete:active svg {
    fill: #fff;
}
/* ============ AUTH: КРАСИВАЯ КАРТОЧКА ПО ЦЕНТРУ ============ */
body.auth-body {
    background: #000;
    position: relative;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
}

body.auth-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 700px 500px at 15% 10%, rgba(255,255,255,0.05), transparent 70%),
        radial-gradient(ellipse 600px 500px at 85% 90%, rgba(255,255,255,0.04), transparent 70%),
        radial-gradient(ellipse 400px 400px at 50% 50%, rgba(255,255,255,0.02), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

body.auth-body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse at center, black, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 80%);
}

.auth-card {
    position: relative;
    z-index: 1;
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 44px 36px 36px;
    max-width: 440px;
    width: 100%;
    box-shadow:
        0 24px 60px rgba(0,0,0,0.6),
        inset 0 1px 0 rgba(255,255,255,0.05);
    animation: authFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-brand-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
}

.auth-brand-center .brand-mark {
    width: 42px;
    height: 42px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255,255,255,0.15);
}

.auth-brand-center .brand-mark svg {
    width: 22px;
    height: 22px;
    fill: #000;
}

.auth-brand-center span {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.auth-card h2 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
}

.auth-card .subtitle {
    color: var(--text-dim);
    font-size: 14px;
    margin: 0 0 28px;
    text-align: center;
}

.auth-card input {
    width: 100%;
    padding: 15px 18px;
    margin-bottom: 12px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: var(--text);
    font-size: 15px;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}
.auth-card input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.3);
    background: rgba(0,0,0,0.7);
}

/* Кнопка "Скачать на телефон" */
.download-app-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 16px;
    padding: 14px 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}
.download-app-btn:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-1px);
}
.download-app-btn:active {
    transform: translateY(0) scale(0.98);
}
.download-app-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 20px;
    color: var(--text-mute);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.08);
}

/* Мобильная версия авторизации */
@media (max-width: 480px) {
    body.auth-body {
        padding: 20px 16px;
        align-items: flex-start;
    }
    .auth-card {
        padding: 32px 24px 24px;
        border-radius: 20px;
        margin-top: 20px;
    }
    .auth-card h2 { font-size: 22px; }
}

/* ============ ПРОФИЛЬ: КОМПАКТНАЯ КРАСИВАЯ СЕТКА ============ */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    padding: 0 3px;
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
        padding: 8px;
    }
}

@media (min-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(5, 1fr);
        max-width: 1100px;
    }
}

.grid-item {
    position: relative;
    aspect-ratio: 9/16;
    background: var(--surface);
    overflow: hidden;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s;
}
@media (min-width: 768px) {
    .grid-item { border-radius: 10px; }
}

.grid-item:hover {
    transform: scale(1.02);
    z-index: 2;
}

.grid-item video,
.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.grid-item:hover video,
.grid-item:hover img {
    transform: scale(1.05);
}

.grid-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 40%);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 1;
}
.grid-item:hover::after {
    opacity: 1;
}

.grid-item .badge-16-mini {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 2px 6px;
    font-size: 9px;
    border-radius: 4px;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2;
    letter-spacing: 0.3px;
}

.grid-delete {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 60, 60, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    padding: 0;
    transition: transform 0.15s, background 0.2s, opacity 0.2s;
    opacity: 0.7;
}
.grid-item:hover .grid-delete { opacity: 1; }
.grid-delete svg {
    width: 12px;
    height: 12px;
    fill: #ff6b6b;
    pointer-events: none;
}
.grid-delete:active {
    transform: scale(0.9);
    background: rgba(255, 60, 60, 0.5);
}

.video-grid .empty-state {
    min-height: 200px;
    padding: 40px 20px;
}

/* Политика — без финальной кнопки */
.policy-footer {
    display: none;
}
/* ============ USERS PAGE ============ */
.users-page {
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    padding: calc(var(--safe-top) + 70px) 16px calc(var(--nav-h) + var(--safe-bottom) + 24px);
    max-width: 800px;
    margin: 0 auto;
    -webkit-overflow-scrolling: touch;
    contain: layout style paint;
}
.users-header { margin-bottom: 20px; }
.users-title { margin: 0 0 16px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }

.users-search { position: relative; display: flex; align-items: center; }
.users-search .search-icon {
    position: absolute; left: 14px;
    width: 18px; height: 18px;
    fill: var(--text-mute);
    pointer-events: none;
}
.users-search input {
    width: 100%;
    padding: 13px 44px 13px 44px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.users-search input:focus { outline: none; border-color: var(--border-strong); }
.search-clear {
    position: absolute; right: 12px;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: var(--text);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; text-decoration: none;
    cursor: pointer;
}
.users-count { margin: 10px 0 0; color: var(--text-dim); font-size: 12px; }

.users-list { display: flex; flex-direction: column; gap: 8px; }

.user-card {
    display: flex; align-items: center; gap: 14px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.user-card:hover { background: var(--surface-2); border-color: var(--border-strong); }
.user-card:active { transform: scale(0.985); }

.user-card-avatar { position: relative; flex-shrink: 0; }
.user-card-avatar img {
    width: 52px; height: 52px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-2);
}
.user-card-role {
    position: absolute;
    bottom: -2px; right: -2px;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700;
    color: #fff;
    border: 2px solid var(--surface);
}
.role-admin    { background: #1D9BF0; }
.role-verified { background: #FF9500; }

.user-card-info { flex: 1; min-width: 0; }
.user-card-name {
    font-size: 15px; font-weight: 700; margin-bottom: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-card-bio {
    font-size: 12px; color: var(--text-dim); margin-bottom: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    line-height: 1.3;
}
.user-card-bio.muted { color: var(--text-mute); font-style: italic; }
.user-card-stats { display: flex; gap: 12px; font-size: 11px; color: var(--text-mute); }
.user-card-arrow {
    color: var(--text-mute); font-size: 18px; flex-shrink: 0;
    transition: transform 0.15s, color 0.2s;
}
.user-card:hover .user-card-arrow { transform: translateX(3px); color: var(--text); }

.pagination {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; margin-top: 24px; padding: 12px;
}
.page-btn {
    padding: 10px 18px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 13px; text-decoration: none;
    transition: background 0.2s;
}
.page-btn:active { background: var(--surface); }
.page-info { color: var(--text-dim); font-size: 13px; }

@media (max-width: 480px) {
    .users-title { font-size: 22px; }
    .user-card { padding: 12px; gap: 12px; }
    .user-card-avatar img { width: 46px; height: 46px; }
    .user-card-name { font-size: 14px; }
    .user-card-stats { font-size: 10px; gap: 8px; }
}

/* ============ ПРОИЗВОДИТЕЛЬНОСТЬ ============ */
.video-feed, .image-feed, .users-page, .profile-container {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: auto;
    contain: layout style paint;
}
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* ============ ПРОСМОТРЫ ============ */
.video-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    flex-wrap: wrap;
}

.video-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.video-views svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
    flex-shrink: 0;
}
/* ============ ФИКС АВАТАРА В ЛЕНТЕ КАРТИНОК ============ */
.image-container .side-actions .avatar {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px;
    max-height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.9);
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.image-container .side-actions .avatar-wrap {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Перебиваем глобальный .image-container img для всех элементов кроме главной картинки */
.image-container > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Модалки / превью не трогаем */
.image-container .comment-avatar,
.image-container .user-card-avatar img {
    width: auto !important;
    height: auto !important;
}