/* --- ГЛОБАЛЬНЫЕ СТИЛИ И ПЕРЕМЕННЫЕ --- */
@import url('https://fonts.googleapis.com/css2?family=Caveat&family=Montserrat:wght@400;600&family=Open+Sans:wght@400;600&family=Oswald:wght@400;600&family=Pacifico&family=Roboto:wght@400;700&display=swap');

:root {
    --blur: blur(25px) saturate(150%);
    --bg-window: rgba(15, 15, 15, 0.45); 
    --border-window: 1px solid rgba(255, 255, 255, 0.08);
    --border-highlight: 1px solid rgba(255, 255, 255, 0.2);
    --shadow-window: none; 
    --header-bg: rgba(255, 255, 255, 0.03);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent: #3b82f6; 
    --icon-size: 28px;
    --icon-font: 11px;
    --icon-box: 80px;
    
    /* Переменная уровня затемнения обоев */
    --wallpaper-dim: 0; 
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 10px; transition: all 0.3s ease; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); box-shadow: 0 0 10px rgba(59, 130, 246, 0.5); }

body, html { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; font-family: 'Segoe UI', system-ui, sans-serif; user-select: none; color: var(--text-main); background-color: #000; }

#desktop { width: 100vw; height: 100vh; position: relative; transition: background 1s ease; overflow: hidden; }

/* Пленка затемнения поверх фона, но под иконками и окнами */
#desktop::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, var(--wallpaper-dim));
    pointer-events: none;
    z-index: 1; 
}

.theme-dark { background-color: #050a14; background-image: radial-gradient(circle at 15% 30%, rgba(16, 185, 129, 0.12) 0%, transparent 60%), radial-gradient(circle at 85% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 60%); }
.theme-blue { background-color: #020617; background-image: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.2) 0%, transparent 70%), radial-gradient(circle at 0% 100%, rgba(14, 165, 233, 0.15) 0%, transparent 60%); }
.theme-red { background-color: #1a0505; background-image: radial-gradient(circle at 80% 0%, rgba(220, 38, 38, 0.2) 0%, transparent 70%), radial-gradient(circle at 20% 100%, rgba(249, 115, 22, 0.12) 0%, transparent 60%); }
.theme-black { background-color: #000000; background-image: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05) 0%, transparent 70%), radial-gradient(circle at 0% 100%, rgba(255, 255, 255, 0.03) 0%, transparent 60%); }

.icon-badge { position: absolute; top: -2px; right: 15px; background: #ef4444; color: white; font-size: 10px; font-weight: bold; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 10px; display: none; justify-content: center; align-items: center; border: 2px solid #050a14; z-index: 25; box-shadow: 0 0 10px rgba(239, 68, 68, 0.5); pointer-events: none; }
.desktop-icon.highlight-msg .icon-svg { filter: drop-shadow(0 0 8px var(--accent)); stroke: #fff; animation: pulse-border 2s infinite; }
@keyframes pulse-border { 0% { opacity: 1; } 50% { opacity: 0.7; } 100% { opacity: 1; } }

#auth-buttons { position: absolute; top: 30px; right: 30px; display: flex; gap: 12px; z-index: 9000; }
#widget-menu { position: absolute; bottom: 85px; right: 30px; width: 220px; background: var(--bg-window); backdrop-filter: var(--blur); border-radius: 16px; border: var(--border-window); display: none; flex-direction: column; padding: 10px; z-index: 9500; box-shadow: var(--shadow-window); }
#minimized-menu { position: absolute; bottom: 85px; right: 180px; width: 220px; background: var(--bg-window); backdrop-filter: var(--blur); border-radius: 16px; border: var(--border-window); display: none; flex-direction: column; padding: 10px; z-index: 9500; box-shadow: var(--shadow-window); }

.auth-btn { background: rgba(0, 0, 0, 0.3); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.8); padding: 8px 20px; border-radius: 50px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 6px; }
.auth-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.auth-btn.primary { background: var(--accent); color: white; border: 1px solid var(--accent); box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3); }
.auth-btn.primary:hover { background: #2563eb; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4); }

#user-profile-btn { display: none; align-items: center; gap: 10px; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(10px); padding: 6px 16px; border-radius: 50px; border: 1px solid var(--accent); box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2); }

.auth-tabs { display: flex; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 20px; }
.auth-tab { flex: 1; text-align: center; padding: 10px; cursor: pointer; color: rgba(255,255,255,0.6); border-bottom: 2px solid transparent; transition: 0.2s; font-size: 14px; font-weight: 500; }
.auth-tab:hover { color: #fff; }
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.form-input { width: 100%; padding: 10px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); color: #fff; border-radius: 8px; box-sizing: border-box; outline: none; transition: 0.2s; }
.form-input:focus { border-color: var(--accent); }
.form-row { display: flex; gap: 10px; width: 100%; }

#workspace-slider { position: absolute; top: 0; left: 0; width: 200vw; height: 100vh; display: flex; transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); z-index: 5; pointer-events: none; }
.workspace { width: 100vw; height: 100vh; position: relative; flex-shrink: 0; pointer-events: auto; }

.desktop-icon { position: absolute; display: flex; flex-direction: column; align-items: center; color: rgba(255, 255, 255, 0.85); cursor: pointer; width: var(--icon-box); font-size: var(--icon-font); font-weight: 500; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); z-index: 10; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.icon-wrapper { width: calc(var(--icon-size) + 16px); height: calc(var(--icon-size) + 16px); border-radius: calc(var(--icon-size) / 2.2); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.2); transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); }
.icon-svg { width: var(--icon-size); height: var(--icon-size); stroke-width: 1.5; fill: none; pointer-events: none; }
.desktop-icon:hover { color: #fff; }
.desktop-icon:hover .icon-wrapper { transform: scale(1.08) translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.4); border-color: rgba(255,255,255,0.4); }

.window { position: absolute; top: 15vh; left: 25vw; width: 550px; height: 380px; background: var(--bg-window); backdrop-filter: var(--blur); border-radius: 16px; display: none; flex-direction: column; overflow: hidden; border: var(--border-window); resize: both; min-width: 300px; min-height: 200px; }
.window.active { border: var(--border-highlight); }
.window-header { background: var(--header-bg); padding: 12px 18px; display: flex; justify-content: space-between; align-items: center; cursor: grab; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 13px; font-weight: 500; }
.window-header:active { cursor: grabbing; }

.header-title { display: flex; align-items: center; gap: 10px; }
.header-icon { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0.8; }

.widget-window { width: 320px; height: 250px; border-radius: 24px; background: rgba(10, 10, 10, 0.3); min-width: 250px; min-height: 150px; }
.widget-window .window-header { background: transparent; border-bottom: none; padding: 15px 20px 5px 20px; }
.widget-window .window-content { padding: 5px 20px 20px 20px; }
        
.close-btn, .pin-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0; transition: all 0.2s; }
.close-btn:hover { color: #ef4444; }
.pin-btn:hover { color: #fff; }
.widget-window.pinned { z-index: 1 !important; background: rgba(15, 15, 15, 0.15); box-shadow: none; border: 1px solid rgba(255,255,255,0.02); }
.widget-window.pinned .window-header { cursor: default; }
.widget-window.pinned .close-btn { display: none; }
.widget-window.pinned .pin-btn { color: var(--accent); transform: rotate(45deg); }

.window-content { padding: 25px; flex-grow: 1; overflow-y: auto; font-size: 13px; line-height: 1.6; color: var(--text-muted); position: relative; }
.window-content h2 { margin-top: 0; color: #fff; font-weight: 400; font-size: 16px; margin-bottom: 10px; }

.bottom-panel { position: absolute; bottom: 30px; background: rgba(0, 0, 0, 0.3); backdrop-filter: blur(10px); padding: 8px 15px; border-radius: 50px; display: flex; align-items: center; gap: 12px; z-index: 1000; border: 1px solid rgba(255,255,255,0.1); color: rgba(255, 255, 255, 0.7); font-size: 12px; transition: all 0.2s ease; }
#support-btn { left: 30px; cursor: pointer; }
#support-btn:hover { background: rgba(0, 0, 0, 0.5); color: #fff; border-color: rgba(255,255,255,0.3); }
#friends-btn { left: 160px; cursor: pointer; } 
#friends-btn:hover { background: rgba(0, 0, 0, 0.5); color: #fff; border-color: rgba(255,255,255,0.3); }
#center-domain-btn { left: 50%; transform: translateX(-50%); cursor: pointer; }
#center-domain-btn:hover { background: rgba(0, 0, 0, 0.5); color: #fff; border-color: rgba(255,255,255,0.3); }

#right-controls { right: 30px; gap: 10px; }
.control-btn { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px; border-radius: 20px; transition: 0.2s; }
.control-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.control-divider { width: 1px; height: 15px; background: rgba(255,255,255,0.1); }
.screen-nav-btn { display: flex; justify-content: center; align-items: center; width: 22px; height: 22px; border-radius: 6px; cursor: pointer; background: transparent; transition: 0.2s; font-weight: bold; }
.screen-nav-btn:hover { background: rgba(255,255,255,0.1); }
.screen-nav-btn.active { background: var(--accent); color: white; }

.widget-item { padding: 10px 15px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: background 0.2s; font-size: 13px; color: rgba(255,255,255,0.8); }
.widget-item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.widget-item svg { width: 16px; height: 16px; stroke-width: 2; }

/* --- ВНУТРЕННИЕ СТИЛИ ОКНА НАСТРОЕК --- */
.settings-container { display: flex; width: 100%; height: 100%; }
.settings-sidebar { width: 180px; background: rgba(0,0,0,0.2); border-right: 1px solid rgba(255,255,255,0.05); display: flex; flex-direction: column; padding: 15px 10px; gap: 5px; }
.settings-tab { padding: 10px 15px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.6); transition: all 0.2s; font-size: 13px; font-weight: 500; }
.settings-tab svg { width: 16px; height: 16px; }
.settings-tab:hover { background: rgba(255,255,255,0.05); color: #fff; }
.settings-tab.active { background: rgba(59, 130, 246, 0.15); color: var(--accent); border-left: 3px solid var(--accent); }
        
.settings-body { flex: 1; padding: 25px 35px; overflow-y: auto; }
.settings-section { display: none; animation: fadeIn 0.3s ease; }
.settings-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
        
.settings-section h2 { margin-top: 0; color: #fff; font-size: 18px; margin-bottom: 25px; font-weight: 500; }
.setting-group-large { background: rgba(0,0,0,0.2); padding: 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.03); margin-bottom: 20px; }
.setting-title-large { font-size: 14px; color: #fff; font-weight: 500; margin-bottom: 5px; }
.setting-desc { font-size: 12px; color: var(--text-muted); margin: 0 0 15px 0; }
.setting-options { display: flex; gap: 8px; background: rgba(0,0,0,0.3); padding: 5px; border-radius: 10px; }
.setting-opt-btn { flex: 1; padding: 8px 0; text-align: center; border-radius: 8px; font-size: 13px; cursor: pointer; color: rgba(255,255,255,0.7); transition: 0.2s; border: 1px solid transparent; }
.setting-opt-btn:hover { color: #fff; }
.setting-opt-btn.active { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.1); box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.theme-cards-container { display: flex; flex-direction: column; gap: 10px; }
.theme-card { display: flex; align-items: center; gap: 15px; padding: 12px 15px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); cursor: pointer; transition: all 0.2s; }
.theme-card:hover { background: rgba(255,255,255,0.06); transform: translateX(5px); }
.theme-card.active { border-color: var(--accent); background: rgba(59, 130, 246, 0.1); }
.color-preview { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 2px 10px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.2); }
        
/* --- СТИЛИ ПРОФИЛЯ --- */
.profile-header-card { display: flex; align-items: center; gap: 20px; padding: 20px 25px; background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 100%); border-bottom: 1px solid rgba(255,255,255,0.05); }
.profile-avatar { width: 80px; height: 80px; border-radius: 16px; background: var(--accent); display: flex; justify-content: center; align-items: center; font-size: 32px; font-weight: bold; color: #fff; box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3); position: relative; cursor: pointer; overflow: hidden; }
.profile-avatar::after { content: '📸'; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; font-size: 24px; opacity: 0; transition: 0.2s; }
.profile-avatar:hover::after { opacity: 1; }
.profile-main-info { flex: 1; }
.profile-main-info h2 { margin: 0 0 5px 0; font-size: 24px; display: flex; align-items: center; gap: 10px; }

.role-badge { font-size: 11px; padding: 3px 8px; border-radius: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; }
.role-badge.admin { background: rgba(239, 68, 68, 0.15); color: #ef4444; border-color: rgba(239, 68, 68, 0.3); }
.role-badge.user { background: rgba(156, 163, 175, 0.15); color: #9ca3af; border-color: rgba(156, 163, 175, 0.3); }
        
.prof-body-container { display: flex; flex-direction: column; height: calc(100% - 120px); }
.prof-tabs { display: flex; padding: 0 25px; border-bottom: 1px solid rgba(255,255,255,0.05); flex-shrink: 0;}
.prof-tab { padding: 15px 20px; cursor: pointer; color: var(--text-muted); font-size: 13px; font-weight: 500; border-bottom: 2px solid transparent; transition: 0.2s; }
.prof-tab:hover { color: #fff; }
.prof-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
        
.prof-section { display: none; padding: 25px; animation: fadeIn 0.3s ease; overflow-y: auto; flex: 1; }
.prof-section.active { display: block; }
        
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.info-box { background: rgba(0,0,0,0.2); padding: 15px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.02); }
.info-label { font-size: 11px; color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.5px; }
.info-value { font-size: 14px; color: #fff; font-weight: 500; }
        
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.stat-card { background: rgba(0,0,0,0.3); padding: 20px; border-radius: 16px; text-align: center; border: 1px solid rgba(255,255,255,0.03); }
.stat-val { font-size: 28px; font-weight: bold; color: var(--accent); font-family: 'Oswald', sans-serif; }
.stat-name { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

/* --- ЛЕНТА/СТЕНА --- */
.wall-composer { background: rgba(0,0,0,0.3); padding: 15px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); margin-bottom: 20px; position: relative;}
.wall-textarea { width: 100%; background: transparent; border: none; color: #fff; resize: none; outline: none; font-family: inherit; font-size: 13px; min-height: 60px; }
.wall-controls { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 10px;}
.wall-post { background: rgba(255,255,255,0.02); padding: 20px; border-radius: 16px; margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.03); }
.post-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.post-avatar { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,0.1); display:flex; justify-content:center; align-items:center; font-weight:bold; overflow: hidden;}
.post-avatar img { width:100%; height:100%; object-fit:cover; }
.post-author { color: #fff; font-weight: 600; font-size: 14px; }
.post-date { color: var(--text-muted); font-size: 11px; }
.post-text { font-size: 14px; color: rgba(255,255,255,0.9); line-height: 1.5; margin-bottom: 15px; word-break: break-word; white-space: pre-wrap;}
.wall-youtube { width: 100%; border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; margin-bottom: 15px; }
.wall-youtube iframe { width: 100%; height: 100%; border: none; }
.wall-poll { background: rgba(0,0,0,0.2); padding: 15px; border-radius: 12px; margin-bottom: 15px; border: 1px solid rgba(255,255,255,0.05); }
.poll-q { font-weight: 600; font-size: 14px; margin-bottom: 10px; color: #fff; }
.poll-opt { position: relative; background: rgba(255,255,255,0.05); border-radius: 8px; margin-bottom: 8px; cursor: pointer; overflow: hidden; border: 1px solid transparent; transition: 0.2s;}
.poll-opt:hover { border-color: var(--accent); }
.poll-opt.voted { border-color: var(--accent); background: rgba(59,130,246,0.1); }
.poll-progress { position: absolute; top: 0; left: 0; height: 100%; background: rgba(59,130,246,0.3); z-index: 1; transition: width 0.3s ease; }
.poll-text-inner { position: relative; z-index: 2; padding: 10px 15px; display: flex; justify-content: space-between; font-size: 13px; }
.wall-actions { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 15px;}
.reaction-chip { display: inline-flex; align-items: center; gap: 4px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; padding: 4px 10px; font-size: 12px; cursor: pointer; transition: 0.15s; user-select: none; }
.reaction-chip:hover { background: rgba(59,130,246,0.2); border-color: rgba(59,130,246,0.4); }
.reaction-chip.mine { background: rgba(59,130,246,0.2); border-color: rgba(59,130,246,0.5); }
.wall-comments { padding-top: 15px; border-top: 1px dashed rgba(255,255,255,0.05); }
.comment-item { display: flex; gap: 10px; margin-bottom: 12px; }
.comment-avatar { width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,0.1); display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:bold; flex-shrink: 0; overflow:hidden;}
.comment-avatar img { width:100%; height:100%; object-fit:cover; }
.comment-body { background: rgba(0,0,0,0.2); padding: 10px 12px; border-radius: 12px; border-top-left-radius: 2px; flex: 1; }
.comment-author { font-size: 12px; font-weight: 600; color: #fff; margin-bottom: 4px; display: flex; justify-content: space-between;}
.comment-text { font-size: 13px; color: rgba(255,255,255,0.8); word-break: break-word;}
.comment-input-row { display: flex; gap: 8px; margin-top: 10px; align-items: center; position: relative;}
.comment-input-row input { flex: 1; padding: 8px 12px; border-radius: 20px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); color: #fff; font-size: 12px; outline: none;}
.emoji-trigger-btn { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; transition: 0.15s; flex-shrink:0;}
.emoji-trigger-btn:hover { background: rgba(255,255,255,0.15); transform: scale(1.1); }
.wall-emoji-picker { position: absolute; background: #141414; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; z-index: 1000; box-shadow: 0 10px 30px rgba(0,0,0,0.8); display: none; flex-direction: column; width: 280px; padding: 10px;}
.wall-emoji-picker.visible { display: flex; }
.emoji-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; height: 150px; overflow-y: auto;}
.emoji-item { display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; padding: 5px; border-radius: 8px; transition: 0.1s;}
.emoji-item:hover { background: rgba(255,255,255,0.1); transform: scale(1.2); }

/* --- СТИЛИ ФОРУМА --- */
.forum-cat-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); padding: 15px 20px; border-radius: 12px; margin-bottom: 12px; display: flex; align-items: center; gap: 15px; cursor: pointer; transition: 0.2s; }
.forum-cat-card:hover { background: rgba(59,130,246,0.1); border-color: var(--accent); }
.forum-cat-icon { font-size: 24px; background: rgba(0,0,0,0.3); width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.forum-cat-info { flex: 1; }
.forum-cat-title { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.forum-cat-desc { font-size: 12px; color: var(--text-muted); }
.forum-cat-stats { font-size: 11px; color: var(--text-muted); text-align: right; }
.forum-topic-card { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); padding: 12px 15px; border-radius: 10px; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: 0.2s; }
.forum-topic-card:hover { background: rgba(255,255,255,0.06); }
.forum-topic-card.pinned { border-left: 3px solid var(--accent); background: rgba(59,130,246,0.05); }
.topic-avatar { width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.topic-avatar img { width: 100%; height: 100%; object-fit: cover; }
.topic-info { flex: 1; }
.topic-title { font-size: 14px; font-weight: 500; color: #fff; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.topic-meta { font-size: 11px; color: var(--text-muted); }
.topic-stats { font-size: 11px; color: var(--text-muted); text-align: right; display: flex; flex-direction: column; gap: 4px; }
.forum-post { display: flex; gap: 15px; margin-bottom: 15px; border: 1px solid rgba(255,255,255,0.04); background: rgba(0,0,0,0.25); border-radius: 12px; padding: 15px; }
.fpost-sidebar { width: 120px; flex-shrink: 0; text-align: center; border-right: 1px solid rgba(255,255,255,0.05); padding-right: 15px; display: flex; flex-direction: column; align-items: center; }
.fpost-avatar { width: 64px; height: 64px; border-radius: 12px; background: rgba(255,255,255,0.1); margin: 0 auto 10px auto; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 4px 10px rgba(0,0,0,0.3);}
.fpost-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fpost-author { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 6px; word-break: break-word;}
.fpost-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.fpost-header { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--text-muted); margin-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }
.fpost-text { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,0.9); white-space: pre-wrap; word-break: break-word; }
.forum-breadcrumbs { padding: 12px 20px; background: rgba(0,0,0,0.3); border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 12px; font-weight: 500; display: flex; gap: 8px; align-items: center; }
.crumb-link { color: var(--accent); cursor: pointer; transition: 0.2s; }
.crumb-link:hover { text-decoration: underline; }
.crumb-sep { color: var(--text-muted); }

/* --- СТИЛИ ДРУЗЕЙ --- */
.friend-card { background: rgba(0,0,0,0.2); padding: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; gap: 12px; }
.friend-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); display: flex; justify-content: center; align-items: center; font-weight: bold; overflow: hidden; }
.friend-info { flex: 1; }
.friend-login { font-size: 14px; font-weight: 600; color: #fff; display: flex; align-items: center; gap: 5px; cursor: pointer; }
.friend-login:hover { color: var(--accent); text-decoration: underline; }
.friend-name { font-size: 11px; color: var(--text-muted); }
.friend-actions { display: flex; gap: 8px; }
.friend-action-btn { background: rgba(255,255,255,0.05); border: none; color: #fff; padding: 6px; border-radius: 6px; cursor: pointer; transition: 0.2s; display:flex; align-items:center; justify-content:center;}
.friend-action-btn:hover { background: var(--accent); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-online { background: #10b981; box-shadow: 0 0 5px #10b981; }
.status-offline { background: var(--text-muted); }

/* --- СТИЛИ ВСЕХ МОДАЛЬНЫХ ОКОН (ПЕРЕКРЫТИЕ ЭКРАНА) --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); display: none; justify-content: center; align-items: center; z-index: 9999; pointer-events: auto; }
.modal { background: #141414; width: 500px; padding: 25px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 10px 40px rgba(0,0,0,0.8); position: relative; }
.modal h2 { margin: 0 0 20px 0; font-size: 18px; font-weight: 500; color: #fff; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.btn-cancel { background: transparent; color: var(--text-muted); border: 1px solid rgba(255,255,255,0.1); padding: 8px 15px; border-radius: 6px; cursor: pointer; transition: 0.2s; font-size: 13px; font-weight: 500;}
.btn-cancel:hover { background: rgba(255,255,255,0.05); color: #fff; }
.btn-save { background: var(--accent); color: white; border: none; padding: 8px 15px; border-radius: 6px; cursor: pointer; transition: 0.2s; font-size: 13px; font-weight: 500;}
.btn-save:hover { background: #2563eb; transform: translateY(-1px); box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);}

/* --- СИСТЕМНЫЕ КНОПКИ УПРАВЛЕНИЯ ОКНОМ --- */
.header-controls { display: flex; align-items: center; gap: 4px; }
.win-btn { background: transparent; border: none; color: var(--text-muted); width: 28px; height: 28px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; transition: 0.2s; }
.win-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.win-btn.close-btn:hover { background: #ef4444; color: #fff; }

/* --- ПОЛНОЭКРАННЫЙ РЕЖИМ --- */
.window.maximized { top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; border-radius: 0; border: none; transform: none !important; z-index: 99999 !important; }
.window.maximized .window-header { cursor: default; border-radius: 0; }

/* --- МЕНЮ СВЕРНУТЫХ ОКОН --- */
#minimized-menu { position: absolute; bottom: 85px; right: 180px; width: 220px; background: var(--bg-window); backdrop-filter: var(--blur); border-radius: 16px; border: var(--border-window); display: none; flex-direction: column; padding: 10px; z-index: 1100; box-shadow: var(--shadow-window); }
.minimized-count { background: var(--accent); color: #fff; border-radius: 50%; padding: 2px 6px; font-size: 10px; margin-left: 6px; font-weight: bold; display: none; }

/* --- СТИЛИ ДОСКИ (BOARD) --- */
.board-tool-btn { background: transparent; border: 1px solid transparent; color: var(--text-muted); width: 40px; height: 40px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 20px; transition: 0.2s; }
.board-tool-btn:hover { background: rgba(255,255,255,0.05); color: #fff; }
.board-tool-btn.active { background: var(--accent); color: #fff; box-shadow: 0 0 15px rgba(59, 130, 246, 0.4); }

.brush-size-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; cursor: pointer; transition: 0.2s; border: 1px solid transparent; }
.brush-size-btn:hover { background: rgba(255,255,255,0.1); }
.brush-size-btn.active { background: rgba(59, 130, 246, 0.2); border-color: var(--accent); }

/* --- ВИДЖЕТЫ НА ДОСКЕ (YouTube) --- */
.board-widget { position: absolute; background: #141414; border: 1px solid rgba(255,255,255,0.15); border-radius: 12px; pointer-events: auto; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,0.6); }
.board-widget-header { height: 30px; background: rgba(255,255,255,0.05); cursor: grab; display: flex; justify-content: space-between; align-items: center; padding: 0 10px; border-bottom: 1px solid rgba(255,255,255,0.05); user-select: none; border-top-left-radius: 12px; border-top-right-radius: 12px; }
.board-widget-header:active { cursor: grabbing; }
.board-widget-content { flex: 1; position: relative; }
.board-widget-content iframe { width: 100%; height: 100%; border: none; border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }
.board-widget-resize { position: absolute; bottom: 0; right: 0; width: 20px; height: 20px; cursor: nwse-resize; display: flex; align-items: flex-end; justify-content: flex-end; padding: 3px 5px; font-size: 10px; color: rgba(255,255,255,0.4); z-index: 10; }
.iframe-shield { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: none; z-index: 5; }

/* --- СТИЛИ ДЛЯ ТЕКСТА И СТИКЕРОВ НА ДОСКЕ --- */
.board-text-node {
    position: absolute;
    min-width: 50px;
    min-height: 24px;
    outline: none;
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.4;
    padding: 4px 8px;
    border: 2px solid transparent; /* Заменили пунктир на рамку для лучшего вида */
    border-radius: 4px;
    color: #ffffff;
    white-space: pre-wrap; 
    word-break: break-word;
    box-sizing: border-box; /* Важно для ресайза стикеров */
}

/* Состояние выделения (один клик) */
.board-text-node.selected {
    border-color: rgba(59, 130, 246, 0.8);
}

/* Состояние редактирования (двойной клик) */
.board-text-node:focus {
    border-color: rgba(59, 130, 246, 0.8);
    cursor: text;
}

#text-format-toolbar button:hover {
    background: rgba(0,0,0,0.05) !important;
    border-radius: 4px;
}

/* --- СТИЛИ ДЛЯ ОБОЕВ --- */
#desktop {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.wallpaper-preview {
    width: 60px;
    height: 40px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
}

.upload-btn {
    display: block;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent);
    border: 1px dashed var(--accent);
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

.upload-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    color: #fff;
}

/* Кастомный ползунок затемнения */
.range-slider { -webkit-appearance: none; width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 4px; outline: none; margin-top: 10px; }
.range-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; background: var(--accent); border-radius: 50%; cursor: pointer; transition: transform 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.5); }
.range-slider::-webkit-slider-thumb:hover { transform: scale(1.3); }

/* --- СТИЛИ ДЛЯ АУДИОПЛЕЕРА (В стиле Telegram) --- */
.board-audio-node {
    border-radius: 25px;
    transition: box-shadow 0.1s;
}
.audio-play-btn:hover {
    background: #2563eb !important;
    transform: scale(1.05);
}
.audio-timeline-wrap:hover .audio-progress {
    filter: brightness(1.2);
    box-shadow: 0 0 5px rgba(59, 130, 246, 0.8);
}

/* --- СТИЛИ ДЛЯ АДМИНКИ И ВЫБОРА ДОСОК --- */
.admin-tab { padding: 12px 20px; color: var(--text-muted); cursor: pointer; font-size: 14px; font-weight: 500; border-radius: 8px; margin-bottom: 5px; transition: 0.2s; }
.admin-tab:hover { background: rgba(255,255,255,0.05); color: #fff; }
.admin-tab.active { background: rgba(59,130,246,0.15); color: var(--accent); }
.admin-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); padding: 15px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; }
.admin-card-title { font-weight: 600; color: #fff; font-size: 16px; margin-bottom: 5px; }

.board-item-card { background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01)); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 20px; cursor: pointer; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; height: 120px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.board-item-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 15px 40px rgba(59,130,246,0.3); background: rgba(59,130,246,0.05); }
.board-item-card h3 { margin: 0; font-size: 18px; color: #fff; font-weight: 600; }
.board-empty-msg { width: 100%; text-align: center; padding: 50px 20px; color: var(--text-muted); font-size: 16px; background: rgba(255,255,255,0.02); border-radius: 16px; border: 1px dashed rgba(255,255,255,0.1); }