/* Социальное: аватары, волна с комментариями, профиль, лента, «поделиться», статистика */

/* Аватар — первая буква имени на градиенте (цвет по логину) */
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: inline-grid; place-items: center;
  font-family: var(--display); font-weight: 900; color: #fff; font-size: 15px; vertical-align: middle;
  background: linear-gradient(135deg, hsl(var(--h) 75% 58%), hsl(calc(var(--h) + 40) 70% 42%));
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}
.avatar.xs { width: 22px; height: 22px; font-size: 11px; }
.avatar.lg { width: 96px; height: 96px; font-size: 40px; margin: 6px auto 12px; display: grid; }
.avatar.xl { width: 200px; height: 200px; font-size: 88px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }

/* Волна в плеере: полоса перемотки поверх волновой формы */
.seek-wrap { position: relative; flex: 1; display: flex; align-items: center; height: 30px; }
.seek-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.seek-wrap input[type=range] { position: relative; z-index: 1; width: 100%; }
.seek-wrap.has-wave input[type=range] { background: transparent !important; height: 30px; }
.seek-wrap.has-wave input[type=range]::-webkit-slider-thumb { opacity: 0; }
.seek-wrap.has-wave:hover input[type=range]::-webkit-slider-thumb { opacity: 1; }
.c-marks { position: absolute; left: 0; right: 0; bottom: -7px; height: 8px; z-index: 2; pointer-events: none; }
.c-mark {
  position: absolute; width: 8px; height: 8px; border-radius: 50%; padding: 0; transform: translateX(-50%); pointer-events: auto;
  background: hsl(var(--h) 75% 62%); border: 1px solid rgba(0, 0, 0, .4); cursor: pointer;
}
.c-mark:hover { transform: translateX(-50%) scale(1.6); }

/* Пузырь комментария над плеером */
.c-bubble {
  position: fixed; right: 24px; bottom: 112px; z-index: 12; max-width: min(380px, calc(100vw - 32px)); display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid rgba(255, 255, 255, .1); backdrop-filter: blur(18px); box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
  animation: pop .25s ease-out;
}
.c-bubble b { font-size: 13px; }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }

/* Всплывающее поле комментария */
.comment-pop {
  position: fixed; right: 16px; bottom: 104px; z-index: 13; width: min(440px, calc(100vw - 32px)); padding: 12px; border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 96%, transparent); border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
.comment-pop .muted { margin-bottom: 8px; }
.share-row { display: flex; gap: 8px; align-items: center; margin: 6px 0 12px; }
.share-row input { flex: 1; min-width: 0; margin: 0 !important; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--field); color: var(--text); font: inherit; }

/* Страница трека */
.track-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.track-stats span { padding: 4px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid rgba(255, 255, 255, .06); font-size: 13px; color: var(--muted); }
.big-wave { position: relative; height: 110px; margin-bottom: 26px; cursor: pointer; border-radius: 14px; }
.big-wave canvas { width: 100%; height: 100%; display: block; }
.bw-mark { position: absolute; bottom: -14px; transform: translateX(-50%); pointer-events: none; }
.comment-form { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.comment-form input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--field); color: var(--text); font: inherit; outline: none; }
.comment-form input:focus { border-color: var(--accent); }
.comments { display: flex; flex-direction: column; gap: 6px; max-width: 860px; }
.comment { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 14px; }
.comment:hover { background: var(--panel-2); }
.c-body { flex: 1; min-width: 0; }
.c-at { background: none; border: 0; color: var(--accent); font-size: 12px; padding: 0 4px; font-weight: 700; }
.actions .heart svg { width: 26px; height: 26px; }
.actions .heart:not(.on) { visibility: visible; }

/* Профиль и люди */
.profile-hero .bio { max-width: 640px; margin: 10px 0 0; color: #e5e1ef; }
.card.person { text-align: center; }
.card.person .btn { margin-top: 10px; }
.check { display: flex; gap: 8px; align-items: center; margin: 10px 0; font-size: 13px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

/* Лента */
.feed { display: flex; flex-direction: column; gap: 10px; max-width: 860px; margin-top: 20px; }
.feed-item { display: flex; gap: 12px; padding: 14px; border-radius: 18px; background: var(--panel-2); border: 1px solid rgba(255, 255, 255, .05); }
.fi-body { flex: 1; min-width: 0; }
.fi-head { margin-bottom: 8px; font-size: 13px; }
.fi-comment { margin-bottom: 8px; font-style: italic; }
.fi-track { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, .03); cursor: pointer; }
.fi-track:hover { background: var(--hover); }
.fi-track .cover { width: 56px; height: 56px; border-radius: 10px; }
.fi-track .t-text { flex: 1; min-width: 0; }
.fi-track .big-play { width: 42px; height: 42px; }
.fi-track .big-play svg { width: 20px; height: 20px; }
.fi-track .more { visibility: visible; }

/* Статистика */
.spark { width: 100%; height: 90px; display: block; }
.spark rect { fill: var(--accent); opacity: .85; }
.spark rect:hover { fill: var(--accent-2); opacity: 1; }
.pct { display: inline-block; width: 60px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; vertical-align: middle; }
.pct i { display: block; height: 100%; background: var(--grad); }

@media (max-width: 800px) {
  .avatar.xl { width: 120px; height: 120px; font-size: 54px; }
  .c-bubble, .comment-pop { right: 8px; left: 8px; bottom: 150px; max-width: none; width: auto; }
  .seek-wrap { height: 24px; }
}
