:root {
    --bg-primary: #0a0a0f;
    --bg-glass: rgba(18, 18, 22, 0.65);
    --border-glass: rgba(255, 255, 255, 0.12);
    --text-primary: #f0f0f0;
    --text-muted: #8e8e9a;
    --accent: #c0c0d0;
    --radius-lg: 28px;
    --radius-md: 18px;
    --transition: 0.3s cubic-bezier(0.2, 0.9, 0.4, 1);
    --online: #2ecc71;
    --offline: #95a5a6;
}

* { margin:0; padding:0; box-sizing:border-box; font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif; }
body { background:var(--bg-primary); color:var(--text-primary); min-height:100vh; overflow-x:hidden; -webkit-font-smoothing:antialiased; position:relative; animation:bodyFadeIn .6s ease; }
@keyframes bodyFadeIn { from { opacity:0; } to { opacity:1; } }

.dot-bg { position:fixed; top:0; left:0; width:100%; height:100%; background-image:radial-gradient(circle at 15% 25%, rgba(255,255,255,0.12) 0%, transparent 50%), radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1) 0%, transparent 50%), radial-gradient(circle at 50% 50%, rgba(255,255,255,0.06) 0%, transparent 70%); pointer-events:none; z-index:0; }
.app-shell { position:relative; z-index:1; display:flex; min-height:100vh; opacity:0; animation:appShellFade .8s ease forwards; }
@keyframes appShellFade { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* Сайдбар */
.sidebar { width:72px; background:rgba(20,20,25,0.9); backdrop-filter:blur(20px); display:flex; flex-direction:column; align-items:center; padding:24px 0 0 0; border-right:1px solid var(--border-glass); position:fixed; top:0; left:0; bottom:0; height:100vh; z-index:100; gap:20px; }
.sidebar-bottom { position:absolute; bottom:24px; left:0; right:0; display:flex; flex-direction:column; align-items:center; gap:20px; }
.sidebar-icon { width:44px; height:44px; display:flex; align-items:center; justify-content:center; border-radius:14px; color:var(--text-muted); font-size:20px; transition:all var(--transition); text-decoration:none; position:relative; }
.sidebar-icon.active, .sidebar-icon:hover:not(#logoutSidebarBtn):not(#discordSidebarIcon):not(#badgeAdminBtn) { background:rgba(255,255,255,0.08); color:var(--text-primary); }
#discordSidebarIcon:hover { color:#7289da; background:transparent; }
#badgeAdminBtn:hover { background:rgba(255,255,255,0.1); }
#logoutSidebarBtn { background:transparent; border:none; cursor:pointer; color:var(--text-muted); }
#logoutSidebarBtn:hover { background:transparent; color:#e05d5d; }
.sidebar-icon img { width:26px; height:26px; border-radius:50%; }

.main-content { margin-left:72px; flex:1; padding:32px 32px 100px 32px; position:relative; min-height:100vh; overflow-y:auto; max-height:100vh; }
.page { display:none; opacity:0; transform:translateY(16px); transition:opacity .4s ease, transform .4s ease; }
.page.active { display:block; opacity:1; transform:translateY(0); animation:fadeSlideIn .5s ease; }
@keyframes fadeSlideIn { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }

.smooth-loader-overlay { position:fixed; top:0; left:0; width:100%; height:100%; background:var(--bg-primary); z-index:9999; display:flex; flex-direction:column; align-items:center; justify-content:center; opacity:0; pointer-events:none; transition:opacity .4s ease; }
.smooth-loader-overlay.show { opacity:1; pointer-events:all; }
.smooth-loader-logo { width:80px; height:80px; margin-bottom:24px; animation:float 2s ease-in-out infinite; }
.smooth-loader-spinner { font-size:28px; color:var(--accent); animation:spin 1s linear infinite, pulse 1.5s ease-in-out infinite; }
@keyframes spin { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity:.6; transform:scale(1) rotate(0deg); } 50% { opacity:1; transform:scale(1.1) rotate(180deg); } }

.modal { display:flex; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); backdrop-filter:blur(8px); align-items:center; justify-content:center; z-index:200; opacity:0; visibility:hidden; transition:opacity .35s ease, visibility .35s; }
.modal.active { opacity:1; visibility:visible; }
.modal-content { max-width:440px; width:90%; padding:36px 32px; text-align:center; border-radius:32px; transform:scale(0.95); transition:transform .35s cubic-bezier(0.2,0.9,0.4,1); }
.modal.active .modal-content { transform:scale(1); }

.loader-container { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:80px 0; gap:20px; }
.loader-icon { font-size:48px; color:var(--accent); animation:float 2s ease-in-out infinite; }
.loader-progress { width:260px; height:6px; background:rgba(255,255,255,0.1); border-radius:10px; overflow:hidden; }
.loader-bar { height:100%; background:var(--accent); border-radius:10px; transition:width .3s ease; width:0%; }
.loader-status { color:var(--text-muted); font-size:14px; }

@keyframes float { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-10px); } }

.glass-panel { background:var(--bg-glass); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px); border:1px solid var(--border-glass); border-radius:var(--radius-lg); padding:32px; margin-bottom:32px; transition:all var(--transition); }

.hero { text-align:center; padding:56px 40px; background:radial-gradient(circle at 50% 30%, rgba(255,255,255,0.04) 0%, transparent 60%); }
.hero-logo { width:90px; height:90px; margin-bottom:24px; animation:float 3s ease-in-out infinite; }
.hero h1 { font-size:52px; font-weight:800; letter-spacing:-1px; margin-bottom:16px; background:linear-gradient(135deg, #f5f5f7, #b0b0b0); -webkit-background-clip:text; background-clip:text; color:transparent; }
.hero-subtitle { font-size:20px; color:var(--text-muted); max-width:550px; margin:0 auto 28px; line-height:1.5; }
.hero-description { font-size:16px; color:var(--text-muted); max-width:650px; margin:0 auto 32px; line-height:1.6; }

.user-stats-row { display:flex; gap:20px; justify-content:center; margin-bottom:32px; }
.stat-badge { background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.12); border-radius:24px; padding:16px 32px; text-align:center; transition:.3s; }
.stat-badge:hover { background:rgba(255,255,255,0.1); }
.stat-badge .number { font-size:28px; font-weight:700; color:var(--accent); }
.stat-badge .label { font-size:13px; color:var(--text-muted); margin-top:6px; }

.btn { display:inline-flex; align-items:center; gap:10px; padding:14px 32px; border-radius:40px; border:1px solid rgba(255,255,255,0.2); background:rgba(40,42,48,0.6); backdrop-filter:blur(12px); color:var(--text-primary); font-weight:600; cursor:pointer; transition:all var(--transition); text-decoration:none; font-size:15px; transform:scale(1); }
.btn:hover { transform:translateY(-2px) scale(1.02); box-shadow:0 8px 25px rgba(0,0,0,0.4); border-color:rgba(255,255,255,0.3); }
.btn-icon { padding:14px; gap:0; }
.btn-primary { background:linear-gradient(135deg, #4a4d58, #2a2c34); border-color:#a0a8c0; color:white; }
.btn-primary:hover { background:linear-gradient(135deg, #5a5e6a, #3a3c44); }

.announcement-card { display:flex; flex-direction:column; gap:16px; }
.announcement-header { font-weight:700; font-size:18px; display:flex; align-items:center; gap:10px; color:var(--text-primary); }
.announcement-body { display:flex; align-items:flex-start; gap:18px; }
.announcement-body img { width:48px; height:48px; border-radius:50%; object-fit:cover; border:2px solid var(--border-glass); }
.announcement-content p { font-size:15px; line-height:1.6; color:var(--text-primary); }
.announcement-footer { margin-top:12px; font-size:13px; color:var(--text-muted); display:flex; justify-content:space-between; align-items:center; gap:12px; }

.section-title { font-size:36px; font-weight:700; text-align:center; margin:48px 0 32px; letter-spacing:-0.5px; background:linear-gradient(135deg, #f5f5f7, #b0b0b0); -webkit-background-clip:text; background-clip:text; color:transparent; }
.subtitle { text-align:center; color:var(--text-muted); font-size:18px; margin-bottom:40px; }

.benefits-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(250px, 1fr)); gap:20px; margin-bottom:40px; }
.benefit-card { text-align:center; padding:28px 20px; transition:all var(--transition); display:flex; flex-direction:column; align-items:center; justify-content:flex-start; }
.benefit-card i { font-size:40px; color:var(--accent); margin-bottom:16px; }
.benefit-card h3 { font-size:20px; margin-bottom:10px; }
.benefit-card p { color:var(--text-muted); font-size:14px; line-height:1.5; }

/* Карточки ADD */
.add-services-grid { display:flex; flex-direction:row; flex-wrap:nowrap; justify-content:center; align-items:stretch; gap:20px; margin-bottom:32px; overflow-x:auto; padding:0 8px; }
.add-service-card { flex:1 1 300px; max-width:450px; min-width:280px; display:flex; flex-direction:row; align-items:center; padding:32px 24px; gap:24px; cursor:pointer; transition:all var(--transition); }
.add-service-card:hover { transform:translateY(-2px); box-shadow:0 10px 25px rgba(0,0,0,0.5); }
.add-card-left { display:flex; flex-direction:column; align-items:center; gap:12px; flex-shrink:0; }
.add-card-left i, .add-card-left img { font-size:36px; color:var(--accent); width:48px; height:48px; }
.add-card-right { flex:1; display:flex; flex-direction:column; justify-content:center; }
.add-card-right h3 { font-size:22px; font-weight:700; margin-bottom:8px; padding-bottom:8px; background:linear-gradient(to right, var(--accent), transparent) bottom left no-repeat; background-size:60% 2px; }
.add-card-right p { color:var(--text-muted); font-size:14px; line-height:1.5; margin-bottom:16px; max-width:100%; }
.add-card-right .btn { align-self:flex-start; padding:10px 24px; font-size:14px; }

/* 3D фигуры */
.three-deco, .add-plus-shape, .ai-shape, .dirmess-shape { width:80px; height:80px; background:radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15), transparent 70%); border-radius:30% 70% 70% 30% / 30% 30% 70% 70%; animation:morph 8s ease-in-out infinite; }
.add-plus-shape { box-shadow:0 0 15px rgba(192,192,208,0.4), inset 0 0 10px rgba(255,255,255,0.15); animation:morph 8s ease-in-out infinite, silverGlow 3s ease-in-out infinite; }
.ai-shape { box-shadow:0 0 15px rgba(170,0,255,0.4); animation:morph 8s ease-in-out infinite, aiGlow 3s ease-in-out infinite; }
.dirmess-shape { box-shadow:0 0 15px rgba(0,200,255,0.4); animation:morph 8s ease-in-out infinite, dirmessGlitch 2s ease-in-out infinite; }
@keyframes morph { 0%,100% { border-radius:30% 70% 70% 30% / 30% 30% 70% 70%; } 50% { border-radius:70% 30% 30% 70% / 70% 70% 30% 30%; } }
@keyframes silverGlow { 0%,100% { box-shadow:0 0 10px rgba(192,192,208,0.3); } 50% { box-shadow:0 0 25px rgba(220,220,240,0.7); } }
@keyframes aiGlow { 0%,100% { box-shadow:0 0 10px rgba(170,0,255,0.3); } 50% { box-shadow:0 0 30px rgba(170,0,255,0.8); } }
@keyframes dirmessGlitch { 0%,100% { box-shadow:0 0 10px rgba(0,200,255,0.3); transform:scale(1); } 25% { box-shadow:0 0 20px rgba(0,200,255,0.7); transform:scale(1.03) translateX(-1px); } 50% { box-shadow:0 0 30px rgba(0,200,255,0.9); transform:scale(0.97) translateX(1px); } 75% { box-shadow:0 0 20px rgba(0,200,255,0.7); transform:scale(1.02) translateY(-1px); } }

/* Профиль */
.profile-panel { background:var(--bg-glass); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px); border:1px solid var(--border-glass); border-radius:var(--radius-lg); overflow:hidden; margin-bottom:32px; }
.profile-cover { height:180px; position:relative; overflow:hidden; cursor:default; background:linear-gradient(160deg, #1e1e32 0%, #0a0a14 100%); }
.profile-cover .cover-bg-layer { position:absolute; top:0; left:0; width:100%; height:100%; transition:filter .3s ease; }
.profile-cover img.cover-bg-layer { width:100%; height:100%; display:block; }
.profile-cover .cover-dark-overlay { position:absolute; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0); z-index:2; transition:background .3s ease; pointer-events:none; }
.profile-cover:hover .cover-dark-overlay { background:rgba(0,0,0,0.3); }
.profile-cover:hover .cover-bg-layer { filter:blur(4px) brightness(0.6); }
.cover-actions { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); display:flex; align-items:center; gap:0; z-index:3; opacity:0; transition:opacity .3s ease; pointer-events:none; filter:none!important; }
.profile-cover:hover .cover-actions { opacity:1; pointer-events:auto; }
.cover-action { display:flex; align-items:center; justify-content:center; height:38px; background:rgba(255,255,255,0.08); backdrop-filter:blur(10px); border:1px solid rgba(255,255,255,0.2); color:var(--text-primary); cursor:pointer; transition:all .3s ease; overflow:hidden; white-space:nowrap; filter:none!important; }
.cover-action:first-child { border-radius:24px 0 0 24px; border-right:none; }
.cover-action:last-child { border-radius:0 24px 24px 0; border-left:none; }
.cover-action i { font-size:16px; padding:0 12px; }
.cover-action span { max-width:0; overflow:hidden; transition:max-width .3s ease, padding .3s ease; font-size:14px; font-weight:500; }
.cover-action:hover span { max-width:100px; padding-right:12px; }
.cover-action:hover { background:rgba(255,255,255,0.15); }

.edit-cover-btn, .back-btn-profile, .gpx-back-btn { position:absolute; top:16px; background:rgba(0,0,0,0.4); backdrop-filter:blur(8px); border:1px solid rgba(255,255,255,0.15); border-radius:30px; padding:6px 14px; color:white; font-weight:500; font-size:13px; cursor:pointer; display:flex; align-items:center; gap:6px; z-index:5; opacity:.7; }
.edit-cover-btn { right:24px; }
.back-btn-profile { left:24px; }
.gpx-back-btn { right:24px; }
.edit-cover-btn:hover, .back-btn-profile:hover, .gpx-back-btn:hover { background:rgba(0,0,0,0.6); opacity:1; }

.avatar-section { display:flex; justify-content:center; padding:0 32px; margin-top:-55px; position:relative; z-index:5; }
.avatar-wrapper { position:relative; width:110px; height:110px; border-radius:50%; background:linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0.1)); box-shadow:0 10px 25px rgba(0,0,0,0.5), 0 0 25px rgba(255,255,255,0.05); display:flex; align-items:center; justify-content:center; padding:4px; }
.avatar-wrapper img { width:100%; height:100%; border-radius:50%; object-fit:cover; display:block; }
.avatar-wrapper i { font-size:54px; color:#5a5a6e; }

.profile-nickname-center { display:flex; justify-content:center; margin-top:12px; margin-bottom:4px; padding:0 32px; }
.nickname-badge { display:inline-flex; align-items:center; background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.2); border-radius:12px; padding:4px 16px; font-size:22px; font-weight:700; color:var(--text-primary); backdrop-filter:blur(4px); letter-spacing:-0.3px; }

.ai-btn-nick, .action-btn-mini, .friend-action-btn { width:26px; height:26px; border-radius:8px; background:rgba(192,192,208,0.15); border:1px solid var(--accent); color:var(--accent); font-size:14px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; transition:all .2s; margin-left:6px; vertical-align:middle; }
.ai-btn-nick:hover, .action-btn-mini:hover, .friend-action-btn:hover { background:rgba(192,192,208,0.3); color:#fff; }

.description-card-new { background:rgba(255,255,255,0.03); border:1px solid var(--border-glass); border-radius:16px; padding:14px 18px; color:var(--text-muted); font-size:14px; line-height:1.5; margin:16px auto 12px auto; text-align:center; max-width:260px; width:fit-content; box-shadow:inset 0 0 0 1px rgba(255,255,255,0.05); }
.badges-panel-centered { background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.10); border-radius:14px; padding:6px 10px; display:flex; flex-wrap:nowrap; gap:6px; align-items:center; justify-content:flex-start; min-width:130px; max-width:100%; width:fit-content; overflow-x:auto; box-shadow:inset 0 0 0 1px rgba(255,255,255,0.05); margin:0 auto 12px auto; }
.badges-panel-centered::-webkit-scrollbar { height:4px; }
.badges-panel-centered::-webkit-scrollbar-thumb { background:var(--accent); border-radius:2px; }
.badges-empty { color:var(--text-muted); font-size:13px; width:100%; text-align:center; }
.badge-item { background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.12); border-radius:24px; padding:4px 12px 4px 6px; display:flex; align-items:center; gap:6px; font-size:13px; font-weight:600; transition:.2s; flex-shrink:0; }
.badge-item:hover { background:rgba(255,255,255,0.1); }
.badge-icon { font-size:18px; width:24px; height:24px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:rgba(255,255,255,0.08); }

.meta-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:12px; margin-top:8px; margin-bottom:16px; }
.meta-row-centered { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:12px; margin:8px 24px 16px; }

.status-badge { display:inline-flex; align-items:center; padding:4px 14px; border-radius:20px; font-size:13px; font-weight:600; gap:6px; }
.status-badge.online { background:rgba(46,204,113,0.15); color:#2ecc71; }
.status-badge.online::before { content:''; width:8px; height:8px; border-radius:50%; background:#2ecc71; display:inline-block; }
.status-badge.offline { background:rgba(160,160,176,0.15); color:var(--text-muted); }

.regdate { display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--text-muted); background:rgba(255,255,255,0.03); padding:4px 12px; border-radius:20px; }
.regdate i { font-size:12px; }

/* Градиенты бейджей */
.badge-bronze { background:linear-gradient(135deg, #cd7f32, #8b5a2b); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.badge-silver { background:linear-gradient(135deg, #c0c0c0, #808080); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.badge-gold { background:linear-gradient(135deg, #ffd700, #b8860b); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.badge-diamond { background:linear-gradient(135deg, #b0e0e6, #87ceeb); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.badge-emerald { background:linear-gradient(135deg, #50c878, #2e8b57); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.badge-amethyst { background:linear-gradient(135deg, #9fc1ff, #d88edf); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.badge-legendary { background:linear-gradient(135deg, #e68585, #c51cb2); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.badge-century { background:linear-gradient(90deg, #89CFF0, #9955bb, #89CFF0); background-size:200% auto; -webkit-background-clip:text; -webkit-text-fill-color:transparent; animation:centuryShift 3s linear infinite; }
@keyframes centuryShift { to { background-position:200% center; } }
.badge-creator-seller { background:linear-gradient(135deg, #f3f3f3, #a8a8a8); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.badge-diamond-lady { background:linear-gradient(135deg, #ffb6c1, #ff69b4); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.badge-control-diamond { background:linear-gradient(135deg, #dfdee2, #cdced1); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.badge-bot-manager { background:linear-gradient(135deg, #6bfbff, #3eb8ba); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.badge-assistant { background:linear-gradient(135deg, #b9b7b7, #d7c0c0); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.badge-ticket-hold { background:linear-gradient(135deg, #b9b7b7, #d7c0c0); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.badge-sales-manager { background:linear-gradient(135deg, #8df3b4, #39f47b); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.badge-partner-manager { background:linear-gradient(135deg, #5fcaf9, #5d87d5); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.badge-advertiser { background:linear-gradient(135deg, #def5fe, #b1c5f6); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.badge-diamond-richest { background:linear-gradient(135deg, #84e98f, #0ea23d); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.badge-work { background:linear-gradient(135deg, #f2a7a5, #ffaadc); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }

/* Стена */
.profile-wall { padding-top:56px; }
.wall-input { display:flex; gap:12px; margin-bottom:20px; align-items:flex-start; }
.wall-input textarea { flex:1; background:rgba(255,255,255,0.06); border:1px solid var(--border-glass); border-radius:18px; padding:14px 18px; color:var(--text-primary); resize:none; font-size:15px; outline:none; transition:.3s; }
.wall-input textarea:focus { border-color:var(--accent); }
.wall-author-preview { display:flex; align-items:center; gap:10px; margin-bottom:12px; font-size:14px; color:var(--text-muted); }
.wall-author-preview img { width:28px; height:28px; border-radius:50%; object-fit:cover; }
.wall-post { padding:16px; margin-bottom:12px; }
.wall-post-footer { display:flex; align-items:center; gap:20px; margin-top:12px; flex-wrap:wrap; }
.reaction-btn { background:transparent; border:none; color:var(--text-muted); cursor:pointer; display:flex; align-items:center; gap:6px; font-size:15px; transition:.2s; padding:4px 8px; border-radius:12px; }
.reaction-btn:hover { background:rgba(255,255,255,0.08); }
.reaction-btn.active { color:var(--accent); background:rgba(160,160,176,0.2); font-weight:bold; }
.reaction-more { width:32px; height:32px; border-radius:50%; padding:0; justify-content:center; font-size:16px; letter-spacing:1px; font-weight:bold; }

#userSearch { width:100%; padding:14px 20px; background:rgba(255,255,255,0.06); border:1px solid var(--border-glass); border-radius:20px; color:var(--text-primary); font-size:16px; margin-bottom:24px; outline:none; transition:.3s; }
#userSearch:focus { border-color:var(--accent); }

.sort-container { display:flex; gap:12px; align-items:center; margin-bottom:20px; flex-wrap:wrap; }
.sort-btn { padding:8px 20px; border-radius:24px; font-size:14px; background:rgba(255,255,255,0.06); border:1px solid var(--border-glass); cursor:pointer; transition:.3s; color:var(--text-muted); }
.sort-btn.active { background:var(--accent); color:#1a1a1a; border-color:transparent; }
.sort-btn.badge-active { background:rgba(160,160,176,0.15); color:var(--text-primary); border-color:var(--accent); }

.user-card { display:flex; align-items:center; gap:18px; padding:20px; cursor:pointer; transition:all var(--transition); border-radius:20px; margin-bottom:8px; }
.user-card:hover { background:rgba(255,255,255,0.07); }
.user-card h4 { font-size:17px; margin-bottom:4px; }
.user-card span { font-size:14px; color:var(--text-muted); }

.gpx-container { padding:24px; }
.gpx-toolbar { display:flex; align-items:center; gap:14px; margin-bottom:20px; flex-wrap:wrap; }
.gpx-title { font-size:24px; font-weight:800; background:linear-gradient(135deg, #f5f5f7, #b0b0b0); -webkit-background-clip:text; background-clip:text; color:transparent; margin-right:auto; }
#gpx-map { height:420px; border-radius:var(--radius-lg); overflow:hidden; margin-bottom:20px; }
.gpx-dashboard { margin-bottom:20px; }
.chart-wrap { width:100%; height:220px; margin-bottom:20px; }
.gpx-stats-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:16px; }
.gpx-stat-card { text-align:center; padding:18px; background:rgba(255,255,255,0.04); border-radius:18px; }
.gpx-stat-card i { font-size:22px; margin-bottom:8px; color:var(--accent); }
.stat-label { display:block; font-size:13px; color:var(--text-muted); margin-bottom:2px; }

#aiReview { display:none; align-items:flex-start; gap:20px; padding:24px; border-radius:24px; background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.1); }
#aiReview img { width:48px; height:48px; border-radius:50%; object-fit:cover; flex-shrink:0; }
#aiReview p { font-size:15px; color:var(--text-primary); line-height:1.5; }
#gpxOwnerInfo { text-align:center; padding:24px; border-radius:24px; background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.1); }
#gpxOwnerInfo .owner-name { font-size:18px; font-weight:600; margin-top:8px; }
#gpxOwnerInfo .gpx-name { font-size:20px; font-weight:700; margin-bottom:12px; }

.modal-content h3 { margin-bottom:24px; font-size:22px; }
.modal-content input, .modal-content textarea { width:100%; padding:14px 18px; margin-bottom:16px; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.15); border-radius:16px; color:var(--text-primary); font-size:15px; outline:none; transition:border-color .3s; }
.modal-content input:focus, .modal-content textarea:focus { border-color:var(--accent); }
.modal-logo { margin-bottom:24px; animation:float 3s ease-in-out infinite; }

.auth-tabs { display:flex; gap:8px; margin-bottom:24px; }
.auth-tab { flex:1; padding:10px; border-radius:24px; border:1px solid rgba(255,255,255,0.15); background:rgba(255,255,255,0.04); color:var(--text-muted); cursor:pointer; transition:.2s; font-weight:600; }
.auth-tab.active { background:var(--accent); color:#1a1a1a; border-color:transparent; }

.login-status { font-size:13px; margin-bottom:12px; text-align:left; padding-left:4px; }
.login-status.valid { color:#2ecc71; }
.login-status.invalid { color:#e05d5d; }

#scrollToTopBtn { position:fixed; bottom:36px; right:36px; width:52px; height:52px; border-radius:50%; background:var(--bg-glass); backdrop-filter:blur(16px); border:1px solid var(--border-glass); color:var(--text-primary); font-size:24px; display:none; align-items:center; justify-content:center; cursor:pointer; z-index:200; transition:opacity .3s; }
#scrollToTopBtn.visible { display:flex; }

/* Бот (удалён) */
#diamond-bot-btn { display:none; }

/* QR (удалён) */
.qr-rounded-wrapper, .qr-scanner-modal { display:none; }

/* Модалка выдачи бейджей */
.badge-modal-content { max-width:700px; width:95%; padding:40px 36px; max-height:85vh; overflow-y:auto; }
.badge-modal-content h3 { font-size:24px; margin-bottom:28px; display:flex; align-items:center; gap:12px; color:var(--text-primary); }
.badge-search { margin-bottom:24px; }
.badge-user-list { max-height:220px; overflow-y:auto; margin-bottom:24px; }
.badge-user-row { display:flex; align-items:center; gap:12px; padding:12px 16px; border-radius:16px; cursor:pointer; transition:background .2s; }
.badge-user-row:hover { background:rgba(255,255,255,0.08); }
.badge-user-row img { width:36px; height:36px; border-radius:50%; object-fit:cover; }
.badge-options-container { margin-top:16px; }
.badge-options-scroll { display:flex; gap:16px; overflow-x:auto; padding-bottom:12px; scroll-snap-type:x mandatory; }
.badge-option-card { flex:0 0 auto; width:160px; padding:16px; border-radius:20px; background:rgba(255,255,255,0.04); border:1px solid var(--border-glass); text-align:center; scroll-snap-align:start; transition:.2s; display:flex; flex-direction:column; align-items:center; gap:10px; }
.badge-option-card:hover { background:rgba(255,255,255,0.08); border-color:var(--accent); }
.badge-option-card .badge-icon-large { font-size:28px; width:44px; height:44px; background:rgba(255,255,255,0.1); border-radius:12px; display:flex; align-items:center; justify-content:center; }
.badge-option-card .badge-name { font-weight:600; font-size:14px; }
.badge-option-card button { margin-top:auto; padding:6px 14px; border-radius:20px; font-size:13px; font-weight:600; border:1px solid var(--border-glass); background:rgba(255,255,255,0.08); color:var(--text-primary); cursor:pointer; transition:.2s; }
.badge-option-card button:hover { background:rgba(255,255,255,0.15); }
.badge-option-card button.remove { color:#e05d5d; }
.badge-option-card button.assign { color:#2ecc71; }

/* Карточки GPX */
.profile-gpx-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:16px; margin-top:24px; }
.gpx-card { background:rgba(255,255,255,0.04); border:1px solid var(--border-glass); border-radius:var(--radius-md); padding:20px; cursor:pointer; transition:all var(--transition); }
.gpx-card:hover { background:rgba(255,255,255,0.08); border-color:var(--accent); transform:translateY(-2px); }
.gpx-card i { font-size:28px; color:var(--accent); margin-bottom:12px; }
.gpx-card h4 { font-size:16px; font-weight:600; margin-bottom:8px; }
.gpx-card-date { font-size:13px; color:var(--text-muted); margin-bottom:12px; }
.gpx-card-stats { display:flex; gap:16px; font-size:14px; color:var(--text-muted); }
.gpx-card-stats span:first-child { color:var(--text-primary); }
.empty-gpx-message { text-align:center; padding:40px; color:var(--text-muted); font-size:16px; }

/* Модалка настройки обложки */
.cover-setup-modal { max-width:700px; width:95%; }
.cover-options-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:12px; margin-bottom:20px; }
.cover-option { height:60px; border-radius:16px; cursor:pointer; border:2px solid transparent; transition:.2s; }
.cover-option:hover { border-color:var(--accent); }
.cover-option.selected { border-color:white; box-shadow:0 0 15px rgba(255,255,255,0.2); }
.cover-preview-container { position:relative; width:100%; height:250px; overflow:hidden; border-radius:var(--radius-md); margin-bottom:20px; background:#1a1a1a; cursor:grab; user-select:none; }
.cover-preview-container:active { cursor:grabbing; }
.cover-preview-container img { position:absolute; top:50%; left:50%; transform-origin:center; height:100%; width:auto; min-width:100%; }
.cover-controls { display:flex; align-items:center; gap:16px; justify-content:center; }
.cover-controls input[type="range"] { flex:1; max-width:200px; }

/* Diamond Plus */
.plus-panel { position:relative; background:var(--bg-glass); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px); border:1px solid var(--border-glass); border-radius:var(--radius-lg); overflow:hidden; margin-bottom:32px; }
.plus-header { background:linear-gradient(135deg, #2a2a35, #1a1a22, #2a2a35); background-size:200% 200%; animation:plusGradient 6s ease infinite; padding:50px 32px; text-align:center; position:relative; z-index:2; }
@keyframes plusGradient { 0% { background-position:0% 50%; } 50% { background-position:100% 50%; } 100% { background-position:0% 50%; } }
.plus-header h1 { font-size:48px; font-weight:800; background:linear-gradient(135deg, #e0e0e0, #c0c0d0, #e0e0e0); background-size:200% auto; -webkit-background-clip:text; -webkit-text-fill-color:transparent; animation:shimmer 3s linear infinite; margin-bottom:8px; }
@keyframes shimmer { to { background-position:200% center; } }
.plus-subtitle { color:var(--text-muted); font-size:18px; }
.plus-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:20px; padding:32px; position:relative; z-index:2; }
.plus-card { background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); border-radius:var(--radius-md); padding:24px; transition:.3s; opacity:0; transform:translateY(20px); animation:fadeInUp .6s forwards; }
.plus-card:nth-child(1) { animation-delay:.1s; } .plus-card:nth-child(2) { animation-delay:.2s; } .plus-card:nth-child(3) { animation-delay:.3s; } .plus-card:nth-child(4) { animation-delay:.4s; } .plus-card:nth-child(5) { animation-delay:.5s; } .plus-card:nth-child(6) { animation-delay:.6s; }
@keyframes fadeInUp { to { opacity:1; transform:translateY(0); } }
.plus-card:hover { background:rgba(255,255,255,0.06); border-color:var(--accent); transform:translateY(-4px); box-shadow:0 10px 20px rgba(192,192,208,0.15); }
.plus-card-icon { font-size:32px; color:var(--accent); margin-bottom:16px; transition:transform .3s; animation:iconFloat 3s ease-in-out infinite; }
.plus-card:nth-child(odd) .plus-card-icon { animation-delay:0s; } .plus-card:nth-child(even) .plus-card-icon { animation-delay:1.5s; }
@keyframes iconFloat { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-4px); } }
.plus-card:hover .plus-card-icon { transform:scale(1.1) rotate(2deg); }
.plus-card-title { font-size:18px; font-weight:700; margin-bottom:8px; }
.plus-card-desc { font-size:14px; color:var(--text-muted); line-height:1.5; }
.plus-card-extra { margin-top:12px; font-size:13px; color:var(--accent); font-weight:500; }
.faq-section { padding:32px; border-top:1px solid var(--border-glass); position:relative; z-index:2; }
.faq-title { font-size:24px; font-weight:700; margin-bottom:24px; text-align:center; }
.faq-item { background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); border-radius:var(--radius-md); padding:20px 24px; margin-bottom:12px; cursor:pointer; transition:.2s; opacity:0; transform:translateY(15px); animation:fadeInUp .5s forwards; }
.faq-item:nth-child(2) { animation-delay:.1s; } .faq-item:nth-child(3) { animation-delay:.2s; } .faq-item:nth-child(4) { animation-delay:.3s; }
.faq-item:hover { background:rgba(255,255,255,0.06); border-color:var(--accent); }
.faq-q { font-weight:600; font-size:15px; display:flex; align-items:center; gap:8px; }
.faq-q i { color:var(--accent); font-size:14px; transition:transform .3s; }
.faq-item.open .faq-q i { transform:rotate(90deg); }
.faq-a { color:var(--text-muted); font-size:14px; margin-top:8px; display:none; }
.faq-item.open .faq-a { display:block; }
.plus-cta { background:rgba(255,255,255,0.02); border-top:1px solid var(--border-glass); padding:32px; display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap; position:relative; z-index:2; }
.plus-price .amount { font-size:48px; font-weight:800; background:linear-gradient(135deg, #f5f5f7, #b0b0b0); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
.plus-price .period { color:var(--text-muted); font-size:18px; }
.plus-btn { display:inline-flex; align-items:center; gap:10px; padding:16px 40px; border-radius:40px; border:1px solid var(--accent); background:linear-gradient(135deg, rgba(192,192,208,0.15), rgba(192,192,208,0.05)); background-size:200% 200%; animation:btnGradient 3s ease infinite; backdrop-filter:blur(12px); color:var(--text-primary); font-weight:700; font-size:18px; cursor:pointer; transition:.3s; }
@keyframes btnGradient { 0% { background-position:0% 50%; } 50% { background-position:100% 50%; } 100% { background-position:0% 50%; } }
.plus-btn:hover { background:rgba(255,255,255,0.1); border-color:#fff; transform:translateY(-2px); box-shadow:0 8px 25px rgba(192,192,208,0.2); }
#particleCanvas { position:absolute; top:0; left:0; width:100%; height:100%; pointer-events:none; z-index:1; }

/* Diamond Database */
.db-header { background:linear-gradient(135deg, #2a2a35, #1a1a22, #2a2a35); background-size:200% 200%; animation:dbGradient 6s ease infinite; border-radius:var(--radius-lg) var(--radius-lg) 0 0; padding:50px 32px; text-align:center; position:relative; }
@keyframes dbGradient { 0% { background-position:0% 50%; } 50% { background-position:100% 50%; } 100% { background-position:0% 50%; } }
.db-header h1 { font-size:42px; font-weight:800; background:linear-gradient(135deg, #e0e0e0, #c0c0d0, #e0e0e0); background-size:200% auto; -webkit-background-clip:text; -webkit-text-fill-color:transparent; animation:shimmer 3s linear infinite; margin-bottom:8px; }
.db-subtitle { color:var(--text-muted); font-size:18px; }
.db-content { padding:32px; display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:20px; }
.db-card { background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); border-radius:var(--radius-md); padding:24px; text-align:center; transition:.3s; }
.db-card:hover { background:rgba(255,255,255,0.06); border-color:var(--accent); transform:translateY(-4px); box-shadow:0 10px 20px rgba(192,192,208,0.1); }
.db-card-icon { font-size:36px; color:var(--accent); margin-bottom:16px; }
.db-card-title { font-size:18px; font-weight:700; margin-bottom:8px; }
.db-card-desc { font-size:14px; color:var(--text-muted); line-height:1.5; }
.db-card-highlight { margin-top:12px; font-size:16px; font-weight:700; color:var(--accent); }
.db-plans { display:flex; gap:20px; padding:0 32px 32px; flex-wrap:wrap; justify-content:center; }
.plan-card { flex:1 1 280px; background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); border-radius:var(--radius-md); padding:32px 24px; text-align:center; transition:.3s; position:relative; overflow:hidden; }
.plan-card:hover { border-color:var(--accent); transform:translateY(-4px); box-shadow:0 10px 20px rgba(192,192,208,0.15); }
.plan-badge { position:absolute; top:16px; right:16px; background:var(--accent); color:#0a0a0f; font-size:12px; font-weight:700; padding:4px 12px; border-radius:20px; }
.plan-name { font-size:20px; font-weight:700; margin-bottom:8px; }
.plan-size { font-size:36px; font-weight:800; margin-bottom:16px; }
.plan-price { font-size:16px; color:var(--text-muted); margin-bottom:24px; }
.plan-features { list-style:none; text-align:left; font-size:14px; color:var(--text-muted); margin-bottom:24px; }
.plan-features li { padding:6px 0; display:flex; align-items:center; gap:8px; }
.plan-features i { color:var(--accent); font-size:14px; }
.db-faq-section { padding:32px; border-top:1px solid var(--border-glass); }
.db-faq-title { font-size:24px; font-weight:700; margin-bottom:24px; text-align:center; }
.db-faq-item { background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.08); border-radius:var(--radius-md); padding:20px 24px; margin-bottom:12px; cursor:pointer; transition:.2s; }
.db-faq-item:hover { background:rgba(255,255,255,0.06); }
.db-faq-q { font-weight:600; font-size:15px; display:flex; align-items:center; gap:8px; }
.db-faq-q i { color:var(--accent); font-size:14px; transition:transform .3s; }
.db-faq-item.open .db-faq-q i { transform:rotate(90deg); }
.db-faq-a { color:var(--text-muted); font-size:14px; margin-top:8px; display:none; }
.db-faq-item.open .db-faq-a { display:block; }
.db-cta { background:rgba(255,255,255,0.02); border-top:1px solid var(--border-glass); padding:32px; text-align:center; }

/* Фильтр по бейджам */
.badge-filter-modal .modal-content { max-width:600px; }
.badge-filter-grid { display:flex; flex-wrap:wrap; gap:12px; justify-content:center; }
.badge-filter-item { background:rgba(255,255,255,0.04); border:1px solid var(--border-glass); border-radius:var(--radius-md); padding:12px 20px; cursor:pointer; transition:.2s; font-size:14px; font-weight:600; display:flex; align-items:center; gap:8px; }
.badge-filter-item.active { border-color:var(--accent); background:rgba(160,160,176,0.2); }
.badge-filter-item:hover { background:rgba(255,255,255,0.08); }
.reset-filter-btn { margin-top:20px; }

/* Кнопки Дополнения и AI анализа */
.actions-row { display:flex; justify-content:center; gap:12px; margin:16px 0; }
.action-btn { background:linear-gradient(135deg, #4a4d58, #2a2c34); border:1px solid var(--accent); color:white; padding:10px 24px; border-radius:30px; font-weight:600; font-size:15px; cursor:pointer; transition:all var(--transition); display:inline-flex; align-items:center; gap:8px; box-shadow:0 4px 15px rgba(0,0,0,0.3); }
.action-btn:hover { background:linear-gradient(135deg, #5a5e6a, #3a3c44); box-shadow:0 8px 25px rgba(0,0,0,0.5); transform:translateY(-2px); }

/* ====== СТРАНИЦА ЧАТОВ ====== */
.page#page-chats.active {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    padding: 0; margin: 0;
    display: flex; flex-direction: column;
}

.chats-container {
    display: flex;
    flex: 1; min-height: 0;
    margin: 0; border-radius: 0;
}

/* левая панель */
.chat-list-panel {
    width: 320px;
    background: rgba(20, 20, 25, 0.7);
    backdrop-filter: blur(15px);
    border-right: 1px solid var(--border-glass);
    display: flex; flex-direction: column; flex-shrink: 0;
}

.chat-list-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-glass);
}

.chat-list-header h2 {
    font-size: 22px; font-weight: 700;
    margin: 0 0 16px 0;
    display: flex; align-items: center; gap: 8px;
}

.chat-search-box { position: relative; }

.chat-search-box input {
    width: 100%; padding: 12px 16px 12px 40px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-glass);
    border-radius: 24px; color: var(--text-primary);
    font-size: 14px; outline: none; transition: border-color 0.3s;
}

.chat-search-box input:focus { border-color: var(--accent); }

.chat-search-box i {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%); color: var(--text-muted); font-size: 14px;
}

.chat-list { flex: 1; overflow-y: auto; padding: 8px 12px; }

.chat-section { background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.1); border-radius:20px; margin:12px 0; padding:12px; }
.chat-section-title { padding:8px 12px; font-size:13px; font-weight:600; color:var(--accent); display:flex; align-items:center; gap:8px; text-transform:uppercase; }

.chat-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 14px;
    cursor: pointer; transition: background 0.2s; margin-bottom: 2px; position: relative;
}

.chat-item:hover { background: rgba(255,255,255,0.06); }
.chat-item.active { background: rgba(192,192,208,0.15); border: 1px solid var(--accent); }

.chat-item-avatar {
    width: 46px; height: 46px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
    position: relative;
}

.chat-item-avatar img { width: 100%; height: 100%; object-fit: cover; }

.chat-item-info { flex: 1; min-width: 0; }
.chat-item-name { font-weight: 600; font-size: 15px; }
.chat-item-last-msg { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.chat-item-meta { text-align: right; font-size: 11px; color: var(--text-muted); }

.online-dot {
    width: 10px; height: 10px;
    background: var(--online);
    border-radius: 50%;
    border: 2px solid #1a1a22;
    position: absolute;
    bottom: 2px; right: 2px;
}

.unread-badge { background: var(--accent); color: #1a1a1a; border-radius: 12px; padding: 2px 7px; font-size: 11px; font-weight: 700; margin-top: 4px; display: inline-block; }
.chat-section-empty { padding: 24px; text-align: center; color: var(--text-muted); }

/* прогресс-бар в списке чатов */
.list-loader { display:flex; flex-direction:column; align-items:center; justify-content:center; flex:1; gap:20px; color:var(--text-muted); }
.list-loader i { font-size:32px; color:var(--accent); animation:float 2s ease-in-out infinite; }
.list-loader-progress { width:200px; height:4px; background:rgba(255,255,255,0.08); border-radius:4px; overflow:hidden; }
.list-loader-progress .fill { height:100%; background:var(--accent); border-radius:4px; width:0%; transition:width 0.2s; }

/* правая панель */
.chat-view-panel {
    flex: 1; display: flex; flex-direction: column;
    background: rgba(255,255,255,0.01); position: relative; overflow: hidden;
}

.chat-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); font-size: 16px; }

.active-chat-view { display: none; flex-direction: column; height: 100%; animation: fadeSlideInChat 0.3s ease; }
@keyframes fadeSlideInChat { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }

.chat-header {
    padding: 16px 24px; border-bottom: 1px solid var(--border-glass);
    display: flex; align-items: center; gap: 12px;
    background: rgba(18,18,22,0.4); backdrop-filter: blur(10px);
}

.chat-header-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer;
}

.chat-header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-header-info { flex: 1; cursor: pointer; }
.chat-header-name { font-weight: 600; font-size: 16px; }
.chat-header-status { font-size: 13px; color: var(--text-muted); }
.chat-header-status.online { color: var(--online); }

.chat-actions { display: flex; gap: 8px; }
.chat-action-btn {
    width: 40px; height: 40px; border-radius: 12px;
    background: rgba(255,255,255,0.06); border: 1px solid var(--border-glass);
    color: var(--text-primary); display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.2s; font-size: 16px;
}
.chat-action-btn:hover { background: rgba(255,255,255,0.12); }

.messages-container { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }

.message { display: flex; gap: 10px; max-width: 75%; animation: msgFadeIn 0.2s ease; }
@keyframes msgFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.message.sent { align-self: flex-end; flex-direction: row-reverse; }
.message.received { align-self: flex-start; }

.msg-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
}
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }

.msg-content {
    background: rgba(255,255,255,0.07); padding: 10px 14px; border-radius: 18px;
    font-size: 14px; line-height: 1.4; word-wrap: break-word;
}
.message.sent .msg-content { background: rgba(192,192,208,0.2); border: 1px solid var(--accent); }

.msg-footer { display: flex; align-items: center; gap: 8px; margin-top: 4px; justify-content: flex-end; }
.message.received .msg-footer { justify-content: flex-start; }
.msg-time { font-size: 10px; color: var(--text-muted); }

.msg-reaction-btn {
    width: 24px; height: 24px; border-radius: 50%;
    background: rgba(255,255,255,0.05); border: 1px solid transparent;
    color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 14px; transition: 0.2s;
}
.msg-reaction-btn:hover { background: rgba(255,255,255,0.1); color: var(--accent); }
.msg-reaction-btn.active { background: rgba(192,192,208,0.2); border-color: var(--accent); color: var(--accent); }

.msg-reactions-display { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; justify-content: flex-end; }
.message.received .msg-reactions-display { justify-content: flex-start; }
.msg-reaction-badge {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px; padding: 2px 8px; font-size: 12px; display: flex; align-items: center; gap: 4px; color: var(--text-muted);
}

.system-msg { text-align: center; color: var(--text-muted); font-size: 13px; margin: 8px 0; }

.message-input-area {
    padding: 16px 24px; border-top: 1px solid var(--border-glass);
    display: flex; align-items: center; gap: 10px; background: rgba(18,18,22,0.4);
}

.message-input-area input {
    flex: 1; padding: 12px 18px; background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-glass); border-radius: 24px;
    color: var(--text-primary); font-size: 14px; outline: none;
}
.message-input-area input:focus { border-color: var(--accent); }

.send-btn {
    width: 44px; height: 44px; border-radius: 12px;
    background: linear-gradient(135deg, #4a4d58, #2a2c34);
    border: 1px solid var(--accent); color: white; font-size: 18px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}

.voice-record-btn {
    width: 44px; height: 44px; border-radius: 12px;
    background: rgba(255,255,255,0.06); border: 1px solid var(--border-glass);
    color: var(--text-muted); font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.voice-record-btn:hover { background: rgba(255,255,255,0.1); color: var(--accent); }

/* запись голосового */
.voice-recording-area { display:flex; align-items:center; gap:12px; flex:1; background:rgba(255,255,255,0.04); border-radius:16px; padding:8px 16px; }
.voice-waveform-large { display:flex; align-items:center; gap:2px; height:32px; flex:1; justify-content:space-between; }
.voice-bar-large { flex:1; background:var(--accent); border-radius:2px; transition:height 0.05s; min-height:3px; max-width:4px; }
.voice-timer-large { font-family:monospace; font-size:15px; color:var(--text-primary); min-width:45px; text-align:center; }
.voice-stop-btn { width:36px; height:36px; border-radius:12px; background:rgba(224,93,93,0.1); border:1px solid #e05d5d; color:#e05d5d; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:14px; }

/* голосовое сообщение в чате */
.voice-message { display:flex; align-items:center; gap:10px; background:rgba(255,255,255,0.04); border-radius:14px; padding:10px 14px; margin:4px 0; max-width:75%; min-width:180px; width:fit-content; }
.voice-message.sent { align-self:flex-end; flex-direction:row-reverse; background:rgba(192,192,208,0.15); border:1px solid var(--accent); }
.voice-play-btn { width:32px; height:32px; border-radius:50%; background:rgba(255,255,255,0.1); border:1px solid var(--border-glass); color:var(--accent); display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:14px; flex-shrink:0; }
.voice-wave { display:flex; align-items:flex-end; gap:2px; flex:1; height:28px; }
.voice-wave-bar { flex:1; background:var(--accent); border-radius:1px; min-height:4px; opacity:0.8; }
.voice-time { font-family:monospace; font-size:12px; color:var(--text-muted); min-width:38px; text-align:right; }
.voice-message.sent .voice-time { text-align:left; }

/* мини-профиль (выезжает справа) */
.mini-profile-panel {
    position: absolute;
    top: 0; right: -360px;
    width: 340px; height: 100%;
    background: rgba(20,20,25,0.95);
    backdrop-filter: blur(30px);
    border-left: 1px solid var(--border-glass);
    transition: right 0.35s ease;
    z-index: 50;
    padding: 32px 24px;
    display: flex; flex-direction: column; align-items: center; gap: 20px; overflow-y: auto;
}
.mini-profile-panel.active { right: 0; }
.mini-profile-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.06); border: 1px solid var(--border-glass); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); }
.mini-profile-avatar-large { width: 96px; height: 96px; border-radius: 50%; background: rgba(255,255,255,0.1); border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; overflow: hidden; margin-top: 24px; }
.mini-profile-avatar-large img { width: 100%; height: 100%; object-fit: cover; }
.mini-profile-name { font-size: 22px; font-weight: 700; text-align: center; }
.mini-profile-tag { color: var(--accent); font-size: 14px; text-align: center; }
.mini-profile-status { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.04); border: 1px solid var(--border-glass); border-radius: 20px; padding: 6px 16px; font-size: 13px; }
.mini-profile-desc { background: rgba(255,255,255,0.03); border: 1px solid var(--border-glass); border-radius: var(--radius-md); padding: 12px; font-size: 14px; color: var(--text-muted); text-align: center; width: 100%; }
.mini-profile-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.mini-profile-badge { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 20px; padding: 4px 12px; font-size: 12px; font-weight: 600; }
.mini-profile-date { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.04); border: 1px solid var(--border-glass); border-radius: 20px; padding: 6px 16px; font-size: 13px; color: var(--text-muted); }
.mini-profile-btn { background: linear-gradient(135deg, #4a4d58, #2a2c34); border: 1px solid var(--accent); border-radius: 30px; padding: 12px 24px; font-weight: 600; font-size: 15px; color: white; cursor: pointer; display: flex; align-items: center; gap: 8px; justify-content: center; width: 100%; }

/* Оверлей звонка */
.call-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); backdrop-filter: blur(15px); z-index: 100; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 24px; }
.call-avatar { width: 100px; height: 100px; border-radius: 50%; background: rgba(255,255,255,0.1); overflow: hidden; animation: pulse-ring 2s infinite; display: flex; align-items: center; justify-content: center; }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(192,192,208,0.5); } 70% { box-shadow: 0 0 0 20px rgba(192,192,208,0); } 100% { box-shadow: 0 0 0 0 rgba(192,192,208,0); } }
.call-name { font-size: 24px; font-weight: 700; }
.call-status { color: var(--text-muted); font-size: 15px; }
.call-controls { display: flex; gap: 20px; }
.call-btn { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,0.1); border: 1px solid var(--border-glass); color: white; font-size: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; }
.call-btn:hover { background: rgba(255,255,255,0.2); }
.call-btn.end-call { background: #e05d5d; border-color: #e05d5d; width: 64px; height: 64px; }

/* модалка эмодзи */
.emoji-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); z-index: 200; display: none; align-items: center; justify-content: center; }
.emoji-modal-overlay.active { display: flex; }
.emoji-modal { background: var(--bg-glass); backdrop-filter: blur(24px); border: 1px solid var(--border-glass); border-radius: var(--radius-lg); padding: 24px; width: 580px; max-width: 95vw; max-height: 80vh; overflow-y: auto; box-shadow: 0 20px 40px rgba(0,0,0,0.6); }
.emoji-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.emoji-modal-title { font-weight: 700; font-size: 18px; color: var(--text-primary); }
.emoji-categories { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.emoji-cat-btn { background: rgba(255,255,255,0.04); border: 1px solid var(--border-glass); border-radius: 20px; padding: 6px 14px; cursor: pointer; color: var(--text-muted); font-size: 14px; display: flex; align-items: center; gap: 6px; transition: all 0.2s; }
.emoji-cat-btn.active { background: var(--accent); color: #0a0a0f; border-color: var(--accent); }
.emoji-cat-btn:hover { background: rgba(255,255,255,0.08); }
.emoji-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start; padding: 4px; }
.emoji-item { width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; font-size: 28px; border-radius: 14px; cursor: pointer; transition: background 0.15s; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); }
.emoji-item:hover { background: rgba(255,255,255,0.12); }

/* Звонки – глобальные стили */
.incoming-call-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(20px);
    z-index: 1000; display: none; flex-direction: column;
    align-items: center; justify-content: center; gap: 32px;
}
.incoming-call-overlay.active { display: flex; }
.caller-avatar {
    width: 120px; height: 120px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: 2px solid var(--accent);
    display: flex; align-items: center; justify-content: center;
    animation: callPulse 1.5s ease-in-out infinite;
    overflow: hidden;
}
.caller-avatar img { width: 100%; height: 100%; object-fit: cover; }
@keyframes callPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(192,192,208,0.6); } 50% { box-shadow: 0 0 0 25px rgba(192,192,208,0); } }
.caller-name { font-size: 28px; font-weight: 700; color: white; }
.caller-type { font-size: 18px; color: var(--text-muted); }
.call-actions { display: flex; gap: 24px; }
.call-accept-btn, .call-decline-btn {
    width: 64px; height: 64px; border-radius: 50%;
    border: 1px solid; display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 24px; transition: transform 0.2s;
}
.call-accept-btn { background: rgba(46,204,113,0.2); border-color: #2ecc71; color: #2ecc71; }
.call-decline-btn { background: rgba(224,93,93,0.2); border-color: #e05d5d; color: #e05d5d; }
.call-accept-btn:hover { transform: scale(1.1); background: rgba(46,204,113,0.4); }
.call-decline-btn:hover { transform: scale(1.1); background: rgba(224,93,93,0.4); }
.call-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.92); backdrop-filter: blur(30px);
    z-index: 1001; display: none; flex-direction: column;
    align-items: center; justify-content: center;
}
.call-modal.active { display: flex; }
.call-modal-content { display: flex; flex-direction: column; align-items: center; gap: 24px; width: 90%; max-width: 800px; }
.call-boxes { display: flex; gap: 20px; width: 100%; justify-content: center; }
.call-box {
    flex: 1; max-width: 360px; aspect-ratio: 4 / 3;
    border-radius: 24px; overflow: hidden;
    background: #1a1a24; border: 2px solid var(--accent);
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.call-box video { width: 100%; height: 100%; object-fit: cover; }
.call-box-avatar {
    width: 100%; height: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 12px;
    color: var(--text-muted); font-size: 16px;
    background: radial-gradient(circle at center, rgba(255,255,255,0.05), transparent);
}
.call-box-avatar i { font-size: 56px; }
.call-modal-name { font-size: 22px; font-weight: 700; color: white; }
.call-modal-timer { font-family: monospace; font-size: 20px; color: var(--text-muted); }
.call-modal-controls { display: flex; gap: 20px; }
.call-modal-btn {
    width: 56px; height: 56px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    color: white; font-size: 22px; cursor: pointer; display: flex;
    align-items: center; justify-content: center; transition: 0.2s;
}
.call-modal-btn:hover { background: rgba(255,255,255,0.2); }
.call-modal-btn.disabled { opacity: 0.4; pointer-events: none; }
.call-modal-btn.end-call { background: rgba(224,93,93,0.3); border-color: #e05d5d; color: #e05d5d; }
.call-modal-btn.end-call:hover { background: rgba(224,93,93,0.6); }

/* Мобильная версия */
@media (max-width: 768px) {
    .main-content { margin-left:0; padding:20px 20px 140px; max-height:none; overflow-y:visible; }
    .sidebar { position:fixed; bottom:0; top:auto; left:0; right:0; width:100%; height:auto; flex-direction:row; justify-content:space-around; align-items:center; padding:12px 8px; background:rgba(20,20,25,0.95); backdrop-filter:blur(20px); border-right:none; border-top:1px solid var(--border-glass); gap:4px; }
    .sidebar-bottom { position:static; display:flex; flex-direction:row; align-items:center; gap:4px; }
    .sidebar-icon { width:48px; height:48px; font-size:24px; margin:0; }
    .sidebar-icon img { width:30px; height:30px; }
    .page { padding-bottom:20px; font-size:16px; }
    .hero { padding:40px 24px; }
    .hero h1 { font-size:36px; }
    .hero-subtitle { font-size:18px; }
    .hero-description { font-size:15px; }
    .section-title { font-size:28px; margin:36px 0 24px; }
    .btn { padding:18px 32px; font-size:18px; border-radius:40px; }
    .btn-icon { padding:18px; }
    .glass-panel { padding:28px 24px; margin-bottom:24px; border-radius:24px; }
    .benefits-grid { grid-template-columns:1fr; gap:20px; }
    .benefit-card { padding:28px 24px; }
    .benefit-card i { font-size:40px; }
    .benefit-card h3 { font-size:20px; margin-bottom:12px; }
    .benefit-card p { font-size:16px; }
    .modal-content { max-width:95%; padding:28px 24px; flex-direction:column!important; }
    .login-image { display:none!important; }
    .login-form { padding:24px!important; }
    #gpx-map { height:300px; }
    .gpx-stats-grid { grid-template-columns:repeat(2, 1fr); }
    .add-services-grid { flex-wrap:wrap; justify-content:center; }
    .add-service-card { flex:0 0 100%; max-width:100%; min-width:auto; padding:24px 16px; gap:16px; }
    .add-card-left i, .add-card-left img { font-size:28px; width:36px; height:36px; }
    .three-deco, .add-plus-shape, .ai-shape, .dirmess-shape { width:60px; height:60px; }
    .profile-header { flex-wrap:wrap; gap:16px; }
    .profile-info h2 { font-size:24px; }
    .user-card { padding:18px; }
    .user-card h4 { font-size:18px; }
    #diamond-bot-btn { width:56px; height:56px; bottom:100px; right:16px; }
    #diamond-bot-btn img { width:44px; height:44px; }
    .diamond-bot-modal { width:calc(100% - 32px); right:16px; bottom:170px; height:380px; }
    .cover-preview-container { height:180px; }
    .badge-option-card { width:130px; }
    .profile-gpx-grid { grid-template-columns:1fr; }
    .chats-container { flex-direction:column; }
    .chat-list-panel { width:100%; border-right:none; border-bottom:1px solid var(--border-glass); }
    .chat-view-panel { height:60%; }
    .mini-profile-panel { right: -100%; width: 100%; }
    .mini-profile-panel.active { right: 0; }
}
