/* Сучасний дизайн соцмережі */
* { margin:0; padding:0; box-sizing:border-box; }

body {
    background:#edeef0;
    font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size:13px;
    color:#000;
    line-height:1.4;
}
a { color:#2a5885; text-decoration:none; }
a:hover { color:#2787f5; }
img { border:0; }

/* ── Верхня панель ── */
#header {
    background:#fff;
    border-bottom:1px solid #e7e8ec;
    box-shadow:0 1px 2px rgba(0,0,0,0.04);
    height:48px;
    position:sticky; top:0; z-index:100;
}
#header-inner { max-width:1000px; width:95%; margin:0 auto; height:48px; display:flex; align-items:center; }
#logo a { color:#2787f5; font-size:22px; font-weight:700; letter-spacing:-0.5px; }
#logo a:hover { color:#2787f5; }
#topsearch { margin-left:20px; }
#topsearch input {
    width:220px; padding:8px 14px; border:none; background:#f0f2f5;
    border-radius:18px; font-size:13px; outline:none; font-family:inherit;
}
#topsearch input:focus { background:#e9ebee; }
#topuser { margin-left:auto; color:#818c99; font-size:13px; }
#topuser a { color:#2a5885; }
#hplayer { position:relative; margin-left:14px; }
#hp-toggle { background:none; border:none; cursor:pointer; font-size:19px; line-height:1; color:#7d8a99; padding:4px 7px; border-radius:6px; }
#hp-toggle:hover { background:rgba(0,0,0,0.06); color:#2a5885; }
#hp-toggle.playing { color:#2a5885; animation:hp-pulse 1.4s ease-in-out infinite; }
@keyframes hp-pulse { 0%, 100% { opacity:1; } 50% { opacity:0.45; } }
#hp-panel { display:none; position:absolute; top:42px; left:0; z-index:9000; width:262px; background:#fff; border:1px solid #d3d9df; border-radius:10px; box-shadow:0 6px 24px rgba(0,0,0,0.18); padding:12px; }
#hp-panel.open { display:block; }
#hp-title { font-size:13px; font-weight:600; color:#2a2a2a; margin-bottom:8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#hp-panel .hp-controls { display:flex; gap:6px; margin-bottom:8px; }
#hp-panel .hp-controls button { flex:1; background:#f0f2f5; border:none; border-radius:6px; height:30px; cursor:pointer; font-size:14px; color:#2a5885; }
#hp-panel .hp-controls button:hover { background:#e4e9ef; }
.hp-volrow { display:flex; align-items:center; gap:6px; margin-bottom:10px; font-size:14px; color:#626d7a; }
.hp-volrow input { flex:1; }
#hp-list { max-height:180px; overflow-y:auto; }
.hp-track { font-size:12px; padding:5px 7px; border-radius:5px; cursor:pointer; color:#45688e; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hp-track:hover { background:#f0f2f5; }
.hp-track.active { background:#e7f0fb; color:#2a5885; font-weight:600; }
#hp-list a { font-size:12px; color:#2a5885; }
body.theme-dark #hp-panel { background:#1f1f23; border-color:#3a3a3e; }
body.theme-dark #hp-title { color:#e4e6eb; }
body.theme-dark #hp-panel .hp-controls button { background:#2a2a2d; color:#a6abb2; }
body.theme-dark .hp-track { color:#8aa9d6; }
body.theme-dark .hp-track:hover { background:#2a2a2d; }

/* ── Розкладка ── */
#page { max-width:1000px; width:95%; margin:16px auto; display:flex; gap:16px; align-items:flex-start; }
#sidebar { width:220px; flex-shrink:0; }
#main { flex:1; min-width:0; }
#main.full { max-width:380px; margin:60px auto; }

/* ── Бічне меню ── */
.side-photo { margin-bottom:12px; }
.side-photo img { width:100%; border-radius:8px; display:block; }
.navbox { background:#fff; border-radius:8px; overflow:hidden; box-shadow:0 1px 0 rgba(0,0,0,0.06); }
a.nav { display:block; padding:9px 16px; color:#2a5885; font-size:13px; }
a.nav:hover { background:#f0f2f5; color:#2787f5; }
a.nav-admin { color:#e64646; }

/* ── Картки ── */
.block, .vk-form, .profile-header, .wall-post, .user-list-item, .message {
    background:#fff; border-radius:8px; box-shadow:0 1px 0 rgba(0,0,0,0.06); margin-bottom:12px;
}
h2 { font-size:15px; font-weight:600; color:#000; background:#fff; border-radius:8px; padding:13px 16px; margin-bottom:12px; box-shadow:0 1px 0 rgba(0,0,0,0.06); }
h3 { font-size:14px; font-weight:600; color:#000; margin-bottom:10px; }
p { margin-bottom:8px; }

/* ── Форми ── */
.vk-form { padding:16px; }
.vk-form h2 { background:transparent; box-shadow:none; border-radius:0; padding:0 0 12px 0; margin-bottom:14px; border-bottom:1px solid #edeef0; font-size:18px; }
.vk-form h3 { margin-top:0; }
.vk-form input[type="text"], .vk-form input[type="password"], .vk-form input[type="email"], .vk-form input[type="date"] {
    padding:9px 12px; margin-bottom:10px; border:1px solid #d3d9de; border-radius:6px;
    font-size:13px; width:280px; outline:none; font-family:inherit;
}
.vk-form input:focus { border-color:#2787f5; }
.vk-button {
    background:#2787f5; color:#fff; border:none; border-radius:6px;
    padding:8px 16px; cursor:pointer; font-size:13px; font-weight:500; font-family:inherit;
}
.vk-button:hover { background:#1a72e0; }
textarea { font-family:inherit; font-size:13px; border:1px solid #d3d9de; border-radius:6px; padding:9px 12px; outline:none; }
textarea:focus { border-color:#2787f5; }

/* ── Профіль ── */
.profile-header { padding:20px; display:flex; gap:20px; }
.profile-photo { flex-shrink:0; }
.profile-photo img { width:200px; height:auto; border-radius:8px; display:block; }
.profile-info { flex:1; min-width:0; }
.profile-name { font-size:22px; font-weight:600; color:#000; margin-bottom:10px; }
.profile-status { color:#626d7a; font-size:14px; font-style:italic; margin:-6px 0 10px; }
.online-line { margin:-4px 0 8px; font-size:13px; }
.online-dot { display:inline-block; width:9px; height:9px; border-radius:50%; background:#4caf50; margin-right:5px; }
.online-now { color:#2e7d32; font-weight:bold; }
.online-ago { color:#939393; }
.friend-online { font-size:12px; margin-top:2px; }
.profile-banner { height:200px; border-radius:8px; background-color:#2a5885; background-size:cover; background-position:center; margin-bottom:12px; }
.profile-photo.vip-frame img { border:3px solid #f0c040; box-shadow:0 0 12px rgba(240,192,64,0.7); border-radius:8px; }
.vip-crown { font-size:16px; vertical-align:1px; }
.notif-badge { background:#e0383e; color:#fff; border-radius:10px; padding:0 6px; font-size:11px; font-weight:bold; }
.notif-item { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid #eef0f2; }
.notif-ava { width:40px; height:40px; border-radius:8px; object-fit:cover; display:block; }
.notif-text { font-size:14px; }
.notif-date { color:#939393; font-size:12px; margin-top:2px; }
body.theme-dark .notif-item { border-bottom-color:#2a2a2e; }
body.theme-dark .profile-status { color:#9aa0a8; }
.profile-detail { margin-bottom:5px; color:#000; font-size:13px; }
.profile-detail b, .profile-detail strong { color:#626d7a; font-weight:400; }

.profile-menu { background:#fff; border-radius:8px; box-shadow:0 1px 0 rgba(0,0,0,0.06); margin-bottom:12px; padding:4px; }
.profile-menu a { display:inline-block; padding:8px 14px; color:#2a5885; border-radius:6px; }
.profile-menu a:hover { background:#f0f2f5; color:#2787f5; }

/* ── Стіна ── */
.wall-post { padding:14px 16px; }
.wall-post-author { font-weight:600; margin-bottom:2px; }
.wall-attach { display:flex; gap:8px; align-items:center; margin-top:6px; flex-wrap:wrap; }
.wall-attach-btn { background:#f0f2f5; color:#2a5885; border-radius:6px; padding:5px 12px; cursor:pointer; font-size:13px; }
.wall-attach-btn:hover { background:#e4e9ef; }
.wall-video-input { flex:1; min-width:180px; padding:5px 8px; border:1px solid #C0CAD5; border-radius:4px; font-family:inherit; }
.wall-post-image { margin-top:8px; }
.wall-post-image img { max-width:100%; max-height:400px; border-radius:8px; display:block; }
.wall-post-video { margin-top:8px; width:100%; max-width:480px; aspect-ratio:16/9; }
.wall-post-video iframe { width:100%; height:100%; border:none; border-radius:8px; }
.wall-post-audio { margin-top:8px; }
.wall-post-audio audio { width:100%; max-width:360px; height:38px; }
.wall-repost { margin-top:8px; border-left:3px solid #d3d9df; padding:6px 0 2px 12px; }
.wall-repost-author { font-weight:600; margin-bottom:3px; }
.wall-repost-author a { color:#2a5885; }
body.theme-dark .wall-repost { border-left-color:#3a3a3e; }
body.theme-dark .wall-attach-btn { background:#2a2a2d; color:#6ea8e6; }
body.theme-dark .wall-video-input { background:#2a2a2d; border-color:#3a3a3e; color:#d8dade; }
.wall-post-date { color:#939393; font-size:12px; margin-bottom:8px; }
.wall-post-text { margin-bottom:8px; }
.wall-actions { margin:6px 0; }
.wall-btn { background:#f0f2f5; color:#2a5885; border:none; border-radius:6px; padding:5px 12px; cursor:pointer; font-size:12px; font-family:inherit; margin-right:6px; }
.wall-btn:hover { background:#e4e9ef; }
.wall-btn.liked { background:#2787f5; color:#fff; }
.wall-btn.disliked { background:#7d8a99; color:#fff; }
.ad-block { background:#fff; border:1px solid #e0e0e0; border-radius:8px; padding:10px 14px; margin-bottom:14px; }
.ad-block-title { font-size:11px; text-transform:uppercase; color:#939393; letter-spacing:1px; margin-bottom:8px; }
.ad-post { padding:8px 0; border-bottom:1px solid #f0f0f0; }
.ad-post:last-child { border-bottom:none; }
.wall-comments { margin:8px 0; border-left:2px solid #edeef0; padding-left:10px; }
.wall-comment { margin-bottom:5px; font-size:13px; }
.wall-comment a { font-weight:600; margin-right:5px; }
.wall-comment-form { display:flex; gap:6px; margin-top:6px; }
.wall-comment-input { flex:1; padding:6px 10px; border:1px solid #d3d9de; border-radius:6px; font-size:13px; outline:none; font-family:inherit; }

/* ── Списки людей ── */
.user-list-item { padding:12px 16px; display:flex; align-items:center; gap:12px; }
.user-list-item img { width:50px; height:50px; border-radius:50%; object-fit:cover; flex-shrink:0; }

/* ── Повідомлення ── */
.message { padding:12px 16px; }
.message-header { font-weight:600; margin-bottom:2px; color:#2a5885; }
.message-date { color:#939393; font-size:12px; }

/* ── Підвал ── */
#footer { max-width:1000px; width:95%; margin:16px auto; color:#828282; font-size:12px; text-align:center; }

/* ── Адмін-панель ── */
.admin-stats { display:flex; gap:12px; margin-bottom:12px; }
.admin-stat { flex:1; background:#fff; border-radius:8px; padding:16px; text-align:center; box-shadow:0 1px 0 rgba(0,0,0,0.06); }
.admin-stat .admin-num { font-size:24px; font-weight:600; color:#2787f5; }
.admin-table { width:100%; border-collapse:collapse; background:#fff; border-radius:8px; overflow:hidden; box-shadow:0 1px 0 rgba(0,0,0,0.06); }
.admin-table th, .admin-table td { padding:10px 12px; text-align:left; font-size:13px; border-bottom:1px solid #edeef0; }
.admin-table th { background:#fafbfc; color:#626d7a; font-weight:600; }

/* ── Блоки фото/відео ── */
.block { padding-bottom:4px; }
.block h2 { background:transparent; box-shadow:none; border-radius:0; margin-bottom:0; padding:13px 16px; border-bottom:1px solid #edeef0; }
.block-body { padding:14px 16px; }
.photo-grid { padding:14px 16px; display:flex; flex-wrap:wrap; gap:8px; }
.photo-item { position:relative; }
.photo-item img { width:130px; height:130px; object-fit:cover; border-radius:8px; display:block; }

/* ── Лайтбокс фото (перегляд + лайки + коментарі), як у ВК ── */
.photo-lightbox { position:fixed; inset:0; z-index:10000; }
.pl-backdrop { position:absolute; inset:0; background:rgba(0,0,0,0.85); }
.pl-content { position:absolute; top:4vh; bottom:4vh; left:0; right:0; margin:auto; display:flex; max-width:1100px; width:94%; background:#1c1c1c; border-radius:8px; overflow:hidden; box-shadow:0 10px 50px rgba(0,0,0,0.6); }
.pl-close { position:absolute; top:6px; right:14px; z-index:5; background:transparent; border:none; color:#fff; font-size:32px; line-height:1; cursor:pointer; }
.pl-image-wrap { flex:1; min-width:0; background:#000; display:flex; align-items:center; justify-content:center; }
#pl-image { max-width:100%; max-height:92vh; object-fit:contain; display:block; }
.pl-side { width:330px; flex-shrink:0; background:#fff; padding:16px; display:flex; flex-direction:column; }
.pl-owner { font-weight:bold; margin-bottom:6px; }
.pl-owner a { color:#2a5885; text-decoration:none; }
.pl-desc { color:#444; font-size:13px; margin-bottom:10px; }
.pl-likebar { margin-bottom:10px; }
.pl-like-btn { background:#f0f2f5; border:none; border-radius:6px; padding:7px 16px; cursor:pointer; font-size:14px; color:#626d7a; }
.pl-like-btn.liked { color:#e0383e; }
.pl-like-btn .pl-heart { font-size:16px; vertical-align:-1px; }
.pl-dislike-btn { background:#f0f2f5; border:none; border-radius:6px; padding:7px 16px; cursor:pointer; font-size:14px; color:#626d7a; margin-left:6px; }
.pl-dislike-btn.disliked { color:#5181b8; }
.pl-save-btn { background:#f0f2f5; border:none; border-radius:6px; padding:7px 16px; cursor:pointer; font-size:14px; color:#3c763d; margin-left:6px; }
.pl-save-btn.saved { color:#999; cursor:default; }
.pl-orig { font-size:12px; color:#939393; margin-top:2px; }
.pl-likers { font-size:12px; color:#626d7a; margin-bottom:10px; line-height:1.55; }
.pl-likers a { color:#5181b8; text-decoration:none; }
.pl-likers a:hover { text-decoration:underline; }
.pl-likers-label { color:#939393; }
.pl-comments { flex:1; overflow-y:auto; margin-bottom:10px; min-height:60px; }
.pl-comment { padding:5px 0; font-size:13px; line-height:1.4; border-bottom:1px solid #f0f0f0; word-break:break-word; }
.pl-cname { font-weight:bold; color:#2a5885; text-decoration:none; }
.pl-cdel { background:none; border:none; color:#bbb; cursor:pointer; float:right; font-size:14px; }
.pl-cdel:hover { color:#e0383e; }
.pl-addcomment { display:flex; gap:6px; }
.pl-addcomment input { flex:1; padding:7px 9px; border:1px solid #ccd1d6; border-radius:4px; }
@media (max-width:760px) {
    .pl-content { flex-direction:column; top:0; bottom:0; width:100%; border-radius:0; }
    .pl-image-wrap { max-height:52vh; }
    #pl-image { max-height:52vh; }
    .pl-side { width:100%; flex:1; }
}
body.theme-dark .pl-side { background:#202023; color:#d8dade; }
body.theme-dark .pl-addcomment input { background:#2a2a2d; border-color:#3a3a3e; color:#d8dade; }
body.theme-dark .pl-like-btn { background:#2a2a2d; color:#a6abb2; }
body.theme-dark .pl-dislike-btn { background:#2a2a2d; color:#a6abb2; }

/* ── Кроп аватара (вибір ділянки) ── */
.crop-modal { position:fixed; inset:0; background:rgba(0,0,0,0.6); z-index:10001; align-items:center; justify-content:center; }
.crop-dialog { background:#fff; border-radius:10px; padding:18px; max-width:340px; width:92%; box-shadow:0 10px 40px rgba(0,0,0,0.4); }
.crop-frame { position:relative; width:280px; height:280px; margin:0 auto; overflow:hidden; border-radius:8px; background:#222; cursor:move; touch-action:none; }
.crop-frame img { position:absolute; left:0; top:0; max-width:none; user-select:none; -webkit-user-drag:none; }
body.theme-dark .crop-dialog { background:#202023; color:#d8dade; }
.photo-del-form { position:absolute; top:4px; right:4px; margin:0; }
.photo-del { background:rgba(0,0,0,0.55); color:#fff; border:0; width:20px; height:20px; line-height:18px; font-size:13px; cursor:pointer; border-radius:50%; padding:0; }
.video-grid { padding:14px 16px; display:flex; flex-wrap:wrap; gap:14px; }
.video-item { width:260px; }
.video-item iframe { display:block; border-radius:8px; border:none; width:260px; }
.video-title { font-weight:600; margin:6px 0; }

/* ── Галочка верифікації ── */
.verified {
    display:inline-block; background:#2787f5; color:#fff;
    width:16px; height:16px; line-height:16px; text-align:center;
    border-radius:50%; font-size:10px; vertical-align:middle; margin-left:4px;
}
.profile-name .verified { width:22px; height:22px; line-height:22px; font-size:13px; }
.role-badge { display:inline-block; font-size:11px; padding:2px 8px; border-radius:10px; margin-left:6px; vertical-align:middle; font-weight:500; }
.role-mod { background:#e3f0d8; color:#4a7d2c; }
.role-admin { background:#fde3e3; color:#c43d3d; }
.group-tabs { background:#fff; border-radius:8px; box-shadow:0 1px 0 rgba(0,0,0,0.06); margin-bottom:12px; padding:4px; display:flex; flex-wrap:wrap; gap:2px; }
.gtab-link { padding:8px 14px; cursor:pointer; color:#2a5885; border-radius:6px; user-select:none; }
.gtab-link:hover { background:#f0f2f5; }
.gtab-link.active { background:#2787f5; color:#fff; }
.group-cover { height:200px; border-radius:8px 8px 0 0; background:linear-gradient(135deg,#5481b9,#2a5885); background-size:cover; background-position:center; position:relative; }
.cover-edit-form { position:absolute; right:12px; bottom:12px; margin:0; }
.cover-btn { background:rgba(0,0,0,0.55); color:#fff; padding:6px 12px; border-radius:6px; cursor:pointer; font-size:13px; }
.group-head { background:#fff; border-radius:0 0 8px 8px; padding:0 20px 16px; margin-bottom:12px; display:flex; align-items:flex-end; gap:16px; box-shadow:0 1px 0 rgba(0,0,0,0.06); flex-wrap:wrap; }
.group-avatar { position:relative; margin-top:-50px; }
.group-avatar img { width:130px; height:130px; border-radius:50%; border:4px solid #fff; object-fit:cover; background:#fff; display:block; }
.avatar-cam { position:absolute; right:6px; bottom:6px; background:rgba(0,0,0,0.55); color:#fff; width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:15px; }
.group-head-info { flex:1; padding-bottom:4px; min-width:180px; }
.group-title { font-size:22px; font-weight:700; }
.group-sub { color:#626d7a; font-size:13px; margin-top:2px; }
.group-head-actions { padding-bottom:4px; }
@media (max-width:600px){ .group-avatar{ margin:-50px auto 0; } .group-head{ justify-content:center; text-align:center; } .group-head-info{ text-align:center; } }

/* ── Активні сеанси ── */
.session-row { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid #edeef0; }
.session-row:last-child { border-bottom:none; }
.session-dev { font-weight:600; color:#2a2a2a; }
.session-cur { background:#2787f5; color:#fff; font-size:11px; padding:1px 7px; border-radius:10px; font-weight:400; }
.session-meta { color:#939393; font-size:12px; margin-top:2px; }

/* ── Гаманець JUA coin ── */
.balance-box { background:linear-gradient(135deg,#2787f5,#2a5885); color:#fff; border-radius:10px; padding:18px 20px; margin-bottom:6px; }
.balance-amount { font-size:30px; font-weight:700; }
.balance-amount span { font-size:16px; font-weight:400; opacity:0.85; }
.balance-note { font-size:13px; opacity:0.9; margin-top:2px; }

/* ── Подарунки ── */
.gift-picker { margin-bottom:12px; }
.gift-picker summary { cursor:pointer; color:#2a5885; font-weight:600; }
.gift-grid { display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }
.gift-item { background:#f0f2f5; border:1px solid #e1e4e8; border-radius:8px; padding:8px; width:84px; cursor:pointer; text-align:center; font-family:inherit; display:flex; flex-direction:column; align-items:center; gap:2px; }
.gift-item:hover { background:#e4e9ef; border-color:#2787f5; }
.gift-emoji { font-size:30px; line-height:1; }
.gift-name { font-size:12px; color:#2a2a2a; }
.gift-price { font-size:11px; color:#2787f5; font-weight:600; }
.gift-received { display:flex; flex-wrap:wrap; gap:10px; }
.gift-card { background:#f7f8fa; border:1px solid #eceef1; border-radius:8px; padding:8px; width:92px; text-align:center; }
.gift-card .gift-emoji { font-size:34px; }
.gift-from { display:block; font-size:11px; color:#626d7a; margin-top:2px; }
.gift-msg { display:block; font-size:11px; color:#939393; margin-top:2px; word-break:break-word; }

/* ── Радіо ── */
.radio-list { display:flex; flex-direction:column; gap:8px; }
.radio-row { display:flex; align-items:center; gap:8px; }
.radio-play { flex:1; text-align:left; }

/* ── Стріми ── */
.stream-live-badge { display:inline-block; background:#e0383e; color:#fff; font-size:11px; font-weight:bold; padding:2px 8px; border-radius:3px; vertical-align:middle; }
.stream-layout { display:flex; gap:14px; align-items:flex-start; }
.stream-main { flex:1; min-width:0; }
.stream-player { width:100%; aspect-ratio:16/9; border:none; background:#000; border-radius:8px; display:block; }
.stream-offline { display:flex; align-items:center; justify-content:center; color:#bbb; font-size:14px; }
.stream-chat { width:300px; flex-shrink:0; background:#fff; border:1px solid #e1e4e8; border-radius:8px; display:flex; flex-direction:column; height:420px; }
.stream-chat-head { padding:8px 12px; border-bottom:1px solid #eceef1; font-weight:bold; color:#2a5885; }
.stream-chat-box { flex:1; overflow-y:auto; padding:8px 12px; }
.chat-msg { padding:3px 0; font-size:13px; line-height:1.4; word-break:break-word; }
.chat-name { font-weight:bold; color:#2a5885; }
.stream-chat-input { display:flex; gap:6px; padding:8px; border-top:1px solid #eceef1; }
.stream-chat-input input { flex:1; padding:5px 8px; border:1px solid #ccd1d6; border-radius:4px; }
.stream-list { display:flex; flex-wrap:wrap; gap:12px; }
.stream-card { display:block; width:200px; padding:10px; background:#f7f8fa; border:1px solid #eceef1; border-radius:8px; text-decoration:none; }
.stream-card:hover { border-color:#2787f5; background:#eef4fc; }
.stream-card-title { font-weight:bold; color:#2a2a2a; margin-top:6px; }
.stream-card-author { font-size:12px; color:#626d7a; margin-top:2px; }
@media (max-width:760px) { .stream-layout { flex-direction:column; } .stream-chat { width:100%; height:300px; } }

/* ── Відеодзвінки ── */
.call-stage { position:relative; width:100%; max-width:760px; background:#000; border-radius:10px; overflow:hidden; aspect-ratio:16/9; }
.call-stage #remote-video { width:100%; height:100%; object-fit:contain; background:#000; display:block; }
.call-stage #local-video { position:absolute; right:12px; bottom:12px; width:160px; max-width:32%; border:2px solid #fff; border-radius:8px; background:#222; object-fit:cover; z-index:2; }
.call-controls { margin-top:12px; display:flex; gap:8px; flex-wrap:wrap; }
@media (max-width:600px) { .call-stage #local-video { width:96px; } }
/* ── Групова конференція (mesh) ── */
.conf-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:10px; }
.conf-tile { position:relative; aspect-ratio:4/3; background:#000; border-radius:8px; overflow:hidden; }
.conf-tile video { width:100%; height:100%; object-fit:cover; background:#111; display:block; }
.conf-name { position:absolute; left:8px; bottom:6px; background:rgba(0,0,0,0.55); color:#fff; font-size:12px; padding:2px 8px; border-radius:4px; }
.conf-controls { margin-top:12px; display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
@media (max-width:680px){ .conf-grid { grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); } }

/* ════════════ ТЕМИ ОФОРМЛЕННЯ (перемикаються в адмінці) ════════════ */
/* Базова тема — VK (без перевизначень). Нижче — Facebook і Claude. */

/* ── Тема Facebook ── */
body.theme-fb { background:#f0f2f5; }
body.theme-fb #header { background:#1877f2; border-bottom:none; box-shadow:0 1px 3px rgba(0,0,0,0.2); }
body.theme-fb #logo a, body.theme-fb #logo a:hover { color:#fff; }
body.theme-fb #topuser { color:#dce7fb; }
body.theme-fb #topuser a { color:#fff; }
body.theme-fb #topsearch input { background:rgba(255,255,255,0.25); color:#fff; }
body.theme-fb #topsearch input::placeholder { color:#eaf1fe; }
body.theme-fb #topsearch input:focus { background:rgba(255,255,255,0.35); }
body.theme-fb a, body.theme-fb a.nav, body.theme-fb #topuser a:hover { color:#1877f2; }
body.theme-fb a:hover, body.theme-fb a.nav:hover { color:#166fe5; }
body.theme-fb .vk-button { background:#1877f2; }
body.theme-fb .vk-button:hover { background:#166fe5; }
body.theme-fb .vk-form input:focus, body.theme-fb textarea:focus { border-color:#1877f2; }
body.theme-fb .wall-btn.liked, body.theme-fb .gtab-link.active, body.theme-fb .session-cur, body.theme-fb .role-admin { background:#1877f2; }
body.theme-fb .balance-box { background:linear-gradient(135deg,#1877f2,#0a52c4); }

/* ── Тема Україна (синьо-жовта, кольори прапора) ── */
body.theme-ukraine { background:#eef3fb; }
body.theme-ukraine #header { background:#0057b7; border-bottom:4px solid #ffd700; box-shadow:0 1px 3px rgba(0,0,0,0.2); }
body.theme-ukraine #logo a, body.theme-ukraine #logo a:hover { color:#ffd700; }
body.theme-ukraine #topuser { color:#cfe0fa; }
body.theme-ukraine #topuser a { color:#fff; }
body.theme-ukraine #topuser a:hover { color:#ffd700; }
body.theme-ukraine #topsearch input { background:rgba(255,255,255,0.22); color:#fff; }
body.theme-ukraine #topsearch input::placeholder { color:#eaf1fe; }
body.theme-ukraine #topsearch input:focus { background:rgba(255,255,255,0.32); }
body.theme-ukraine a, body.theme-ukraine a.nav { color:#0057b7; }
body.theme-ukraine a:hover, body.theme-ukraine a.nav:hover { color:#004494; }
body.theme-ukraine .vk-button { background:#0057b7; }
body.theme-ukraine .vk-button:hover { background:#004494; }
body.theme-ukraine .vk-form input:focus, body.theme-ukraine textarea:focus { border-color:#0057b7; }
body.theme-ukraine .wall-btn.liked, body.theme-ukraine .gtab-link.active, body.theme-ukraine .session-cur, body.theme-ukraine .role-admin { background:#0057b7; }
body.theme-ukraine .balance-box { background:linear-gradient(135deg,#0057b7,#004a9e); }
body.theme-ukraine .nav-tab.active, body.theme-ukraine .vip-crown { color:#0057b7; }

/* ── Тема Claude (тепла, кремова — кораловий акцент) ── */
body.theme-claude { background:#f0eee6; color:#1a1a18; }
body.theme-claude #header { background:#faf9f5; border-bottom:1px solid #e3e0d8; box-shadow:none; }
body.theme-claude #logo a, body.theme-claude #logo a:hover { color:#c96442; }
body.theme-claude #topsearch input { background:#efece4; }
body.theme-claude #topsearch input:focus { background:#e7e3d9; }
body.theme-claude #topuser a { color:#c96442; }
body.theme-claude a { color:#c96442; }
body.theme-claude a:hover { color:#a8482b; }
body.theme-claude a.nav { color:#46423a; }
body.theme-claude a.nav:hover { background:#efece4; color:#c96442; }
body.theme-claude .block, body.theme-claude .vk-form, body.theme-claude .profile-header, body.theme-claude .wall-post, body.theme-claude .user-list-item, body.theme-claude .message, body.theme-claude .navbox, body.theme-claude h2 { background:#fdfcfa; border-radius:12px; box-shadow:0 1px 3px rgba(60,50,30,0.08); }
body.theme-claude .vk-button { background:#c96442; border-radius:9px; }
body.theme-claude .vk-button:hover { background:#a8482b; }
body.theme-claude .vk-form input:focus, body.theme-claude textarea:focus { border-color:#c96442; }
body.theme-claude .wall-btn.liked, body.theme-claude .gtab-link.active, body.theme-claude .session-cur, body.theme-claude .role-admin { background:#c96442; }
body.theme-claude .balance-box { background:linear-gradient(135deg,#c96442,#a8482b); }

/* ── Тема Темна (нічна) ── */
body.theme-dark { background:#161618; color:#d8dade; }
body.theme-dark #header { background:#202023; border-bottom:1px solid #2e2e31; box-shadow:none; }
body.theme-dark #logo a, body.theme-dark #logo a:hover { color:#6ea8e6; }
body.theme-dark #topsearch input { background:#2a2a2d; color:#d8dade; border-color:#3a3a3e; }
body.theme-dark #topsearch input::placeholder { color:#8b8f96; }
body.theme-dark #topuser { color:#9aa0a8; }
body.theme-dark #topuser a { color:#6ea8e6; }
body.theme-dark a { color:#6ea8e6; }
body.theme-dark a:hover { color:#8fbdee; }
body.theme-dark a.nav { color:#c2c6cc; }
body.theme-dark a.nav:hover { background:#2a2a2d; color:#6ea8e6; }
body.theme-dark .block, body.theme-dark .vk-form, body.theme-dark .profile-header, body.theme-dark .wall-post, body.theme-dark .user-list-item, body.theme-dark .message, body.theme-dark .navbox, body.theme-dark h2, body.theme-dark .group-head, body.theme-dark .group-tabs { background:#202023; box-shadow:none; color:#d8dade; border-color:#2e2e31; }
body.theme-dark .block h2, body.theme-dark .block h3, body.theme-dark h2, body.theme-dark h3, body.theme-dark .profile-name, body.theme-dark .group-title { color:#eceef1; }
body.theme-dark .block-body, body.theme-dark .profile-detail, body.theme-dark .wall-post-date, body.theme-dark .session-meta, body.theme-dark label { color:#a6abb2; }
body.theme-dark input[type=text], body.theme-dark input[type=email], body.theme-dark input[type=password], body.theme-dark input[type=tel], body.theme-dark input[type=url], body.theme-dark input[type=search], body.theme-dark input[type=number], body.theme-dark textarea, body.theme-dark select { background:#2a2a2d; border:1px solid #3a3a3e; color:#d8dade; }
body.theme-dark input::placeholder, body.theme-dark textarea::placeholder { color:#8b8f96; }
body.theme-dark .vk-button, body.theme-dark button[type=submit] { background:#3a6ea5; color:#fff; }
body.theme-dark .vk-button:hover { background:#4a7fb8; }
body.theme-dark .wall-btn { background:#2a2a2d; color:#a6abb2; }
body.theme-dark .wall-btn.liked, body.theme-dark .gtab-link.active, body.theme-dark .session-cur, body.theme-dark .role-admin { background:#3a6ea5; color:#fff; }
body.theme-dark .gtab-link { color:#a6abb2; }
body.theme-dark .user-list-item { border-color:#2e2e31; }
body.theme-dark .balance-box { background:linear-gradient(135deg,#3a6ea5,#27496d); }
body.theme-dark .stream-chat { background:#202023; border-color:#2e2e31; }
body.theme-dark .stream-chat-head, body.theme-dark .chat-name { color:#6ea8e6; }
body.theme-dark .stream-chat-head, body.theme-dark .stream-chat-input { border-color:#2e2e31; }
body.theme-dark .stream-chat-input input { background:#2a2a2d; border-color:#3a3a3e; color:#d8dade; }
body.theme-dark .stream-card { background:#26262a; border-color:#2e2e31; }
body.theme-dark .stream-card-title { color:#e4e6eb; }

/* ── Групи: темна тема (під сучасний ВК) ── */
.gm-root { border-radius:10px; padding:12px; }
.gm-root.gm-night { background:#19191a; }
.gm-root.gm-night .group-cover { border-radius:10px 10px 0 0; }
.gm-root.gm-night .group-head { background:#222223; border-radius:0 0 10px 10px; box-shadow:none; }
.gm-root.gm-night .group-avatar img { border-color:#222223; }
.gm-root.gm-night .group-title { color:#e1e3e6; }
.gm-root.gm-night .group-sub { color:#828a96; }
.gm-root.gm-night .group-tabs { background:#222223; box-shadow:none; }
.gm-root.gm-night .gtab-link { color:#a3adb8; }
.gm-root.gm-night .gtab-link:hover { background:#2e2f31; color:#e1e3e6; }
.gm-root.gm-night .gtab-link.active { background:#3f4042; color:#fff; }
.gm-root.gm-night .block { background:#222223; box-shadow:none; color:#e1e3e6; }
.gm-root.gm-night .block h2, .gm-root.gm-night .block h3, .gm-root.gm-night h2, .gm-root.gm-night h3 { color:#e1e3e6; }
.gm-root.gm-night .block-body { color:#cfd3d8; }
.gm-root.gm-night .wall-post { color:#e1e3e6; }
.gm-root.gm-night .wall-post-author a, .gm-root.gm-night .wall-comment a, .gm-root.gm-night a { color:#71aaeb; }
.gm-root.gm-night .wall-post-date, .gm-root.gm-night .session-meta { color:#828a96; }
.gm-root.gm-night .wall-btn { background:#2e2f31; color:#a3adb8; }
.gm-root.gm-night .wall-btn:hover { background:#3a3b3d; }
.gm-root.gm-night .wall-btn.liked { background:#5181b8; color:#fff; }
.gm-root.gm-night .wall-comments { border-left-color:#2e2f31; }
.gm-root.gm-night .wall-comment-input, .gm-root.gm-night input[type=text], .gm-root.gm-night input[type=url], .gm-root.gm-night input[type=search], .gm-root.gm-night textarea { background:#2a2a2b; border:1px solid #3a3b3d; color:#e1e3e6; }
.gm-root.gm-night input::placeholder, .gm-root.gm-night textarea::placeholder { color:#7a828c; }
.gm-root.gm-night .vk-button, .gm-root.gm-night button[type=submit] { background:#5181b8; color:#fff; }
.gm-root.gm-night .user-list-item { color:#e1e3e6; border-color:#2e2f31; }
.gm-root.gm-night .user-list-item a { color:#71aaeb; }
.gm-root.gm-night label { color:#a3adb8; }
/* Денна тема груп = світла тема сайту (без перевизначень). Перемикання — JS за годиною. */
.gm-list { border:1px solid #edeef0; border-radius:6px; overflow:hidden; }
.gm-track { padding:8px 10px; border-bottom:1px solid #edeef0; display:flex; align-items:center; gap:8px; }
.gm-track:last-child { border-bottom:none; }
.gm-play { cursor:pointer; color:#2a5885; flex:1; }
.gm-play:hover { color:#2787f5; }
.gm-play.playing { color:#2787f5; font-weight:600; }
.gm-del { background:none; border:0; color:#b0b0b0; cursor:pointer; font-size:18px; line-height:1; padding:0 4px; }
.gm-del:hover { color:#C43D3D; }

/* ── Зміна аватара на профілі ── */
.profile-photo { width:200px; }
.avatar-edit { margin-top:8px; display:flex; flex-direction:column; gap:6px; }
.avatar-file-form { margin:0; }
.avatar-btn { display:block; text-align:center; background:#f0f2f5; color:#2a5885; border:none; border-radius:6px; padding:7px 12px; cursor:pointer; font-size:13px; font-family:inherit; }
.avatar-btn:hover { background:#e4e9ef; }
#camBox { width:240px; max-width:100%; }

/* ── Музика ── */
.music-item { background:#fff; border-radius:8px; box-shadow:0 1px 0 rgba(0,0,0,0.06); margin-bottom:12px; padding:14px 16px; }
.music-item strong { font-size:14px; }
.music-item audio { display:block; }

/* Адаптивність: мобільні та планшети */
@media (max-width: 1000px) {
    #page, #header-inner, #footer { width:96%; }
}
@media (max-width: 760px) {
    body { font-size:14px; }
    #header { height:auto; min-height:48px; }
    #header-inner { width:100%; padding:8px 12px; }
    #logo { flex-shrink:0; }
    #logo a { font-size:19px; }
    #topsearch { margin-left:12px; flex:1; }
    #topsearch input { width:100%; }
    #topuser { display:none; }
    #page { flex-direction:column; width:100%; padding:8px; margin:0 auto; gap:10px; }
    #sidebar { width:100%; }
    .side-photo { display:none; }
    .navbox { display:flex; flex-wrap:wrap; }
    .navbox a.nav { flex:0 0 auto; }
    #main { width:100%; }
    #main.full { max-width:100%; margin:16px auto; }
    .profile-header { flex-direction:column; align-items:center; text-align:center; gap:12px; }
    .profile-photo img { width:150px; height:auto; }
    .profile-name { font-size:20px; }
    .profile-menu { text-align:center; }
    .video-item, .video-item iframe { width:100%; }
    .admin-stats { flex-wrap:wrap; }
    .admin-stat { flex:1 1 calc(50% - 6px); }
    .admin-table { font-size:12px; }
    .vk-form input[type="text"], .vk-form input[type="password"], .vk-form input[type="email"], .vk-form input[type="date"] { width:100%; }
}
@media (max-width: 420px) {
    #logo a { font-size:17px; }
    .photo-item img { width:106px; height:106px; }
    .profile-photo img { width:120px; height:auto; }
    .vk-button { padding:8px 12px; }
    .admin-stat { flex:1 1 100%; }
}
