/* ==========================================================================
   СОЛНЕЧНАЯ ХАКАСИЯ — sunny-khakassia.ru
   Главная таблица стилей с модулем антифрода и безопасности
   ========================================================================== */

:root {
  /* Dark Theme Palette (Mountain & Solar) */
  --bg-app: #080d1a;
  --bg-navbar: rgba(13, 20, 36, 0.94);
  --bg-card: #121b2d;
  --bg-card-hover: #1a263e;
  --bg-input: #1b263b;
  --bg-subtle: #172237;

  --border-color: #21304d;
  --border-subtle: #2d4168;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Khakassia Sun / Gold */
  --solar-gold: #f59e0b;
  --solar-amber: #d97706;
  --solar-gradient: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  --solar-glow: rgba(245, 158, 11, 0.35);

  --accent-red: #ef4444;
  --accent-green: #10b981;
  --accent-blue: #38bdf8;

  --font-heading: 'Montserrat', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.5);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

[data-theme="light"] {
  --bg-app: #f1f5f9;
  --bg-navbar: rgba(255, 255, 255, 0.95);
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #f1f5f9;
  --bg-subtle: #e2e8f0;

  --border-color: #e2e8f0;
  --border-subtle: #cbd5e1;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --solar-gold: #d97706;
  --solar-amber: #b45309;
  --solar-glow: rgba(217, 119, 6, 0.25);

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input, textarea, select {
  font-family: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   SECURITY BANNER STRIP (ПРЕДУПРЕЖДЕНИЕ О МОШЕННИКАХ)
   ========================================================================== */
.security-banner-strip {
  background: linear-gradient(90deg, #7f1d1d 0%, #991b1b 50%, #7f1d1d 100%);
  color: #fecaca;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(239, 68, 68, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 90;
}

.security-banner-content {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-close-banner {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(254, 202, 202, 0.25);
  color: #fecaca;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  margin-left: 12px;
}
.btn-close-banner:hover {
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  border-color: #ef4444;
  transform: scale(1.1);
}

.shield-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* ==========================================================================
   TOP NAVBAR
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  height: 68px;
  background-color: var(--bg-navbar);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.brand-sun-icon {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 0 10px var(--solar-glow));
  transition: transform var(--transition-fast);
}
.nav-brand:hover .brand-sun-icon {
  transform: rotate(20deg) scale(1.1);
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.accent-gold {
  color: var(--solar-gold);
}

.brand-domain {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-tab:hover {
  background-color: var(--bg-card);
  color: var(--text-main);
}

.nav-tab.active {
  background: var(--bg-card);
  color: var(--solar-gold);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.tab-icon {
  font-size: 1.15rem;
}

.tab-badge {
  background: var(--solar-gold);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.tab-badge.warning {
  background: var(--accent-red);
}

/* Navbar Right Controls */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-moderation {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--accent-red);
  color: #fca5a5;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-moderation:hover {
  background: var(--accent-red);
  color: #fff;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 5px 12px 5px 6px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-pill:hover {
  border-color: var(--solar-gold);
  background-color: var(--bg-card-hover);
}

.user-pill-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--solar-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  overflow: hidden;
  color: #fff;
}

.user-pill-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-pill-info {
  display: flex;
  flex-direction: column;
}

.user-pill-name {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
}

.user-pill-handle {
  font-size: 0.72rem;
  color: var(--solar-gold);
  line-height: 1.2;
}

/* Verified Badge */
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--solar-gradient);
  color: #fff;
  font-size: 0.65rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: 0 0 6px var(--solar-glow);
}

/* Banned Badge */
.banned-badge {
  background: var(--accent-red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tab-view {
  display: block;
}

.tab-view.hidden {
  display: none !important;
}

/* ==========================================================================
   FEED LAYOUT
   ========================================================================== */
.feed-layout {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
}

.feed-main-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Hero Banner Card */
.khakassia-hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.hero-image-wrap {
  width: 100%;
  height: 290px;
  position: relative;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 13, 26, 0.04) 0%, rgba(8, 13, 26, 0.22) 42%, rgba(8, 13, 26, 0.88) 100%);
}

.hero-content {
  position: absolute;
  bottom: 18px;
  left: 20px;
  right: 20px;
  color: #fff;
}

.hero-badge {
  display: inline-block;
  background: var(--solar-gradient);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
  box-shadow: 0 2px 8px var(--solar-glow);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.hero-subtitle {
  font-size: 0.85rem;
  color: #e2e8f0;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Create Post Card */
.create-post-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.create-post-header {
  display: flex;
  gap: 14px;
}

.post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--solar-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  overflow: hidden;
  color: #fff;
  border: 2px solid var(--border-color);
}

.post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#postContentInput {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.95rem;
  line-height: 1.5;
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border-color var(--transition-fast);
}

#postContentInput:focus {
  border-color: var(--solar-gold);
}

/* Media upload preview */
.media-upload-preview {
  position: relative;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  max-height: 320px;
  overflow: hidden;
}

.preview-inner img, .preview-inner video {
  max-width: 100%;
  max-height: 280px;
  border-radius: var(--radius-sm);
  display: block;
}

.btn-cancel-media {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.create-post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.create-post-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-attach-media {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-attach-media:hover {
  background: var(--bg-card-hover);
  border-color: var(--solar-gold);
  color: var(--solar-gold);
  transform: translateY(-1px);
}

.btn-publish {
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 22px !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  border-radius: var(--radius-md) !important;
  flex-shrink: 0 !important;
  box-shadow: 0 4px 14px var(--solar-glow) !important;
}

/* Feed Bar Header */
.feed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
}

.feed-bar-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
}

.feed-posts-count {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ==========================================================================
   POST ITEM CARD
   ========================================================================== */
.posts-stream {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.post-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.post-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-author-box {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.post-author-info {
  display: flex;
  flex-direction: column;
}

.post-author-name {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-author-name:hover {
  color: var(--solar-gold);
}

.author-handle {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--solar-gold);
}

.post-meta-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.post-city-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-subtle);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.post-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-text-content {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-main);
  word-break: break-word;
}

.post-text-content p {
  margin-bottom: 8px;
}
.post-text-content p:last-child {
  margin-bottom: 0;
}

/* Post Media */
.post-media-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-color);
}

.post-media-container img, .post-media-container video {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
}

/* Post Actions Bar */
.post-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.btn-post-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-post-action:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.btn-post-action.liked {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.btn-report-scam {
  margin-left: auto;
  color: var(--text-dim);
}
.btn-report-scam:hover {
  color: var(--accent-red);
  border-color: var(--accent-red);
}

/* Comments Section */
.post-comments-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-item {
  display: flex;
  gap: 10px;
}

.comment-bubble {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px;
}

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-author {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.comment-author:hover {
  color: var(--solar-gold);
}

.comment-handle {
  font-size: 0.75rem;
  color: var(--solar-gold);
}

.comment-time {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.comment-text {
  font-size: 0.88rem;
  line-height: 1.4;
  word-break: break-word;
}

/* Comment Form */
.comment-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.comment-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-fast);
}
.comment-input:focus {
  border-color: var(--solar-gold);
}

.btn-send-comment {
  background: var(--solar-gradient);
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
}

/* ==========================================================================
   FEED SIDEBAR WIDGETS
   ========================================================================== */
.feed-side-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.side-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

/* Anti-Fraud Info Card */
.anti-fraud-card {
  border-color: rgba(239, 68, 68, 0.4);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.08) 0%, var(--bg-card) 100%);
}
.anti-fraud-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.anti-fraud-header h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: #fca5a5;
}
.anti-fraud-icon {
  font-size: 1.4rem;
}
.anti-fraud-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.solar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.solar-header h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
}
.solar-header p {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.solar-icon {
  font-size: 2.2rem;
}

.solar-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
}

.stat-val {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--solar-gold);
}
.stat-lbl {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.cities-widget h4 {
  font-family: var(--font-heading);
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.cities-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.city-tag {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.city-tag:hover {
  background: var(--solar-gold);
  color: #fff;
  border-color: var(--solar-gold);
}

.chat-invite-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}
.invite-icon {
  font-size: 2.5rem;
}
.chat-invite-card h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
}
.chat-invite-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   TAB 2: CHAT VIEW
   ========================================================================== */
.chat-layout {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  height: calc(100vh - 100px);
  display: flex;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

.chat-sidebar {
  width: 280px;
  background-color: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.chat-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}
.chat-sidebar-header h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
}

.chat-channel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color var(--transition-fast);
  border-left: 3px solid transparent;
}
.chat-channel-item:hover {
  background-color: var(--bg-card-hover);
}
.chat-channel-item.active {
  background-color: var(--bg-subtle);
  border-left-color: var(--solar-gold);
}

.channel-icon {
  font-size: 1.3rem;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
}

.channel-name {
  font-weight: 700;
  font-size: 0.92rem;
}
.channel-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.dm-section-title {
  padding: 12px 16px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
}

.chat-dm-list {
  display: flex;
  flex-direction: column;
}

/* Chat Main Area */
.chat-main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-app);
}

.chat-main-header {
  height: 64px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  background-color: var(--bg-card);
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-header-icon {
  font-size: 1.6rem;
}
.chat-header-info h3 {
  font-size: 1.05rem;
  font-family: var(--font-heading);
}
.chat-header-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
}

.chat-input-area {
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-card);
}

.chat-input-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 8px 12px;
}

#chatMessageInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  max-height: 100px;
  line-height: 22px;
  font-size: 0.95rem;
}

.chat-typing-line {
  min-height: 18px;
  font-size: 0.72rem;
  font-style: italic;
  color: var(--text-dim);
  padding-top: 4px;
}

/* ==========================================================================
   TAB 3: FRIENDS & COMMUNITY
   ========================================================================== */
.friends-layout {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.friends-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.friends-header-bar h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
}

.friends-search-box input {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  font-size: 0.9rem;
  width: 280px;
  outline: none;
}
.friends-search-box input:focus {
  border-color: var(--solar-gold);
}

.friends-section-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 14px;
}

.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.user-card-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.user-card-item:hover {
  transform: translateY(-2px);
  border-color: var(--solar-gold);
}

.user-card-top {
  display: flex;
  gap: 12px;
  cursor: pointer;
}

.user-card-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-card-handle {
  font-size: 0.8rem;
  color: var(--solar-gold);
  font-weight: 600;
}

.user-card-city {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.user-card-bio {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  height: 36px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.user-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* ==========================================================================
   TAB 4: PROFILE VIEW
   ========================================================================== */
.profile-layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-header-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.profile-cover {
  width: 100%;
  height: 240px;
  background: #000;
  position: relative;
  overflow: hidden;
}

.profile-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
}

.btn-change-cover {
  /* Inherits styles from .cover-buttons-group */
}

.profile-extra-details {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.profile-detail-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.profile-tg-link {
  color: #38bdf8 !important;
  text-decoration: none;
  transition: all var(--transition-fast);
}
.profile-tg-link:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}

.profile-bar {
  padding: 0 24px 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-avatar-container {
  margin-top: -60px;
  position: relative;
  width: 110px;
  height: 110px;
}

.profile-big-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px solid var(--bg-card);
  background: var(--solar-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  color: #fff;
}

.profile-big-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-change-avatar {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--solar-gold);
  border: 2px solid var(--bg-card);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.profile-names {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-names h2 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
}

.profile-handle {
  font-size: 0.95rem;
  color: var(--solar-gold);
  font-weight: 600;
}

.profile-city-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.status-dot-inline {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  display: inline-block;
  margin-left: 6px;
}

.profile-bio-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 600px;
  margin-top: 4px;
}

.profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.profile-stats-bar {
  display: flex;
  border-top: 1px solid var(--border-color);
  background: var(--bg-subtle);
}

.profile-stat-item {
  flex: 1;
  text-align: center;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.profile-stat-item strong {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--solar-gold);
}

.profile-stat-item span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.profile-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
}

.profile-subtab {
  background: transparent;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.profile-subtab.active {
  color: var(--solar-gold);
  border-bottom-color: var(--solar-gold);
}

/* ==========================================================================
   BUTTONS & CONTROLS
   ========================================================================== */
.btn-primary {
  background: var(--solar-gradient);
  border: none;
  color: #fff;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 2px 8px var(--solar-glow);
  transition: all var(--transition-fast);
}
.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}
.btn-primary.full-width {
  width: 100%;
}

.btn-secondary {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--solar-gold);
}
.btn-secondary.full-width {
  width: 100%;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.btn-icon:hover {
  background: var(--bg-card);
  color: var(--text-main);
}

.btn-icon-sm {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
}

.btn-icon-xs {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
}

.btn-send {
  background: var(--solar-gradient);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  padding: 26px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
}

.external-url-display {
  background: var(--bg-input);
  border: 1px dashed var(--accent-red);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-family: monospace;
  font-size: 0.85rem;
  word-break: break-all;
  margin-bottom: 14px;
}

.auth-brand-logo {
  text-align: center;
  margin-bottom: 20px;
}
.sun-logo-large {
  font-size: 3rem;
  display: block;
  margin-bottom: 4px;
}
.auth-brand-logo h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
}
.domain-tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--solar-gold);
  font-weight: 600;
}

.auth-tabs {
  display: flex;
  background: var(--bg-input);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}
.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 0;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.auth-tab.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.form-group input, .form-group select, .form-group textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 0.9rem;
  outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--solar-gold);
}

.field-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.avatar-presets {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.avatar-option {
  height: 40px;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
}
.avatar-option.selected {
  border-color: var(--solar-gold);
  background: rgba(245, 158, 11, 0.15);
}

.form-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--accent-red);
  color: #fca5a5;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.auth-hint {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 12px;
}
.auth-hint a {
  color: var(--solar-gold);
  font-weight: 600;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

/* Avatar upload modal preview */
.avatar-crop-preview {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.crop-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--solar-gold);
  background: var(--solar-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  overflow: hidden;
  color: #fff;
}
.crop-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Moderation Reports List */
.reports-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
}

.report-item {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.report-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.report-reason {
  font-weight: 700;
  color: var(--accent-red);
  font-size: 0.9rem;
}
.report-details {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-main);
  background: var(--bg-subtle);
  padding: 8px;
  border-radius: var(--radius-sm);
}
.report-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* Lightbox */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}
.lightbox-modal img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}
.btn-close-lightbox {
  position: absolute;
  top: 20px;
  right: 24px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

/* ========================================================
   NEW FEATURES: NOTIFICATIONS, POLLS, SEARCH, VOICE, AUDIO
   ======================================================== */

/* 1. Notifications Dropdown */
.notifications-wrapper {
  position: relative;
}

.btn-notifications {
  position: relative;
  font-size: 1.15rem;
}

.notifications-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg-card);
  animation: pulse-badge 1.8s infinite;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.notifications-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 210;
  overflow: hidden;
  animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 0.88rem;
  background: var(--bg-subtle);
}

.notifications-list {
  max-height: 360px;
  overflow-y: auto;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.15s;
}

.notification-item:hover {
  background: var(--bg-hover);
}

.notification-item.unread {
  background: rgba(234, 153, 31, 0.08);
}

.notification-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--solar-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  overflow: hidden;
}

.notification-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notification-text {
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--text-main);
}

.notification-text strong {
  color: var(--solar-gold);
}

.notification-time {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 3px;
}

.notifications-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* 2. Poll Creator & Display */
.poll-creator-box {
  background: var(--bg-input);
  border: 1px dashed var(--solar-gold);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poll-creator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--solar-gold);
}

.poll-input-question, .poll-opt-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 0.85rem;
  color: var(--text-main);
  outline: none;
}

.poll-options-inputs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.poll-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 10px 0;
}

.poll-question-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.poll-option-row {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 0.15s;
}

.poll-option-row:hover {
  border-color: var(--solar-gold);
}

.poll-option-row.voted {
  border-color: var(--solar-gold);
  box-shadow: 0 0 0 1px var(--solar-gold);
}

.poll-progress-bg {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: rgba(234, 153, 31, 0.22);
  transition: width 0.4s ease;
  z-index: 1;
}

.poll-option-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 0.85rem;
}

.poll-option-text {
  font-weight: 500;
  color: var(--text-main);
}

.poll-option-stats {
  font-weight: 700;
  color: var(--solar-gold);
  font-size: 0.82rem;
}

.poll-footer-info {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
}

/* 3. Post Location & Pinned Badges */
.post-location-select {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-size: 0.8rem;
  color: var(--text-main);
  cursor: pointer;
  outline: none;
}

.post-location-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--solar-gold);
  background: rgba(234, 153, 31, 0.1);
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.post-location-badge:hover {
  background: rgba(234, 153, 31, 0.2);
}

.pinned-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #e67e22, #f39c12);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  margin-left: 6px;
}

.post-card.pinned {
  border: 1px solid rgba(234, 153, 31, 0.4);
  box-shadow: 0 2px 12px rgba(234, 153, 31, 0.1);
}

.btn-pin-post {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.btn-pin-post:hover {
  opacity: 1;
}

/* 4. Feed Search & Popular Tags */
.feed-search-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.feed-search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  gap: 8px;
  transition: border-color 0.15s;
}

.feed-search-box:focus-within {
  border-color: var(--solar-gold);
}

.feed-search-input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 0.88rem;
  color: var(--text-main);
  outline: none;
}

.btn-clear-search {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.9rem;
}

.popular-tags-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tags-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 600;
}

.tag-pill {
  font-size: 0.75rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--solar-gold);
  padding: 2px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.tag-pill:hover, .tag-pill.active {
  background: var(--solar-gold);
  color: #fff;
  border-color: var(--solar-gold);
}

.hashtag-link {
  color: var(--solar-gold);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.hashtag-link:hover {
  text-decoration: underline;
}

/* 5. Voice Recording & Audio Player */
.btn-voice-record {
  font-size: 1.15rem;
}

.voice-recording-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid var(--accent-red);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  animation: fadeInDown 0.2s ease;
}

.recording-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-red);
  animation: recPulse 1s infinite;
}

@keyframes recPulse {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
  100% { transform: scale(0.9); opacity: 1; }
}

.recording-timer {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--accent-red);
}

.recording-label {
  font-size: 0.82rem;
  color: var(--text-main);
  flex: 1;
}

.recording-actions {
  display: flex;
  gap: 8px;
}

.btn-voice-cancel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.75rem;
}

.btn-voice-send {
  background: var(--accent-green);
  border: none;
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
}

.voice-audio-bubble {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.voice-audio-bubble audio {
  max-width: 260px;
  height: 36px;
  border-radius: 18px;
  outline: none;
}

/* 6. Admin Panel Navigation & Management */
.admin-modal-nav {
  display: flex;
  gap: 6px;
  padding: 0 16px 10px;
  border-bottom: 1px solid var(--border-color);
}

.admin-nav-tab {
  background: transparent;
  border: none;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.admin-nav-tab:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.admin-nav-tab.active {
  background: var(--solar-gold);
  color: #fff;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.admin-stat-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.admin-stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--solar-gold);
}

.admin-stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
}

.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  gap: 10px;
}

.admin-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--solar-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.admin-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-user-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* 7. Khakassia Atmospheric Ambient Audio Bar */
.btn-music-toggle {
  font-size: 1.15rem;
}

.khakassia-audio-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--solar-gold);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.25);
  z-index: 190;
  padding: 8px 16px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.audio-bar-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.audio-track-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.audio-track-icon {
  font-size: 1.5rem;
  animation: rotateMusic 4s linear infinite;
}

@keyframes rotateMusic {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.audio-track-info strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-main);
}

.audio-track-info small {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-audio-play {
  font-size: 1.1rem;
}

#audioVolumeSlider {
  width: 80px;
  accent-color: var(--solar-gold);
  cursor: pointer;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-color);
  border-top-color: var(--solar-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* Responsive & Mobile Fullscreen Optimization */
@media (max-width: 900px) {
  .feed-layout {
    grid-template-columns: 1fr;
  }
  .feed-side-col {
    display: none;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }
  
  .navbar {
    padding: 0 10px;
    height: 56px;
  }
  .tab-title {
    display: none !important;
  }
  .brand-domain {
    display: none !important;
  }
  .brand-title {
    font-size: 0.95rem;
  }
  .nav-tabs {
    gap: 4px;
  }
  .nav-tab {
    padding: 6px 9px;
    font-size: 0.85rem;
  }
  .user-pill {
    padding: 3px;
    border-radius: 50%;
  }
  .user-pill-info {
    display: none !important;
  }
  .btn-moderation {
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  /* Chat mobile full-screen layout with Telegram-like navigation */
  .chat-layout {
    height: calc(100dvh - 56px);
    width: 100%;
    max-width: 100%;
    margin: 0;
    border: none;
  }

  .chat-layout:not(.mobile-chat-open) .chat-sidebar {
    width: 100% !important;
    display: flex !important;
    border-right: none;
  }

  .chat-layout:not(.mobile-chat-open) .channel-info,
  .chat-layout:not(.mobile-chat-open) .chat-sidebar-header h3,
  .chat-layout:not(.mobile-chat-open) .dm-section-title span {
    display: block !important;
  }

  .chat-layout:not(.mobile-chat-open) .chat-main-area {
    display: none !important;
  }

  .chat-layout.mobile-chat-open .chat-sidebar {
    display: none !important;
  }

  .chat-layout.mobile-chat-open .chat-main-area {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
  }

  .btn-chat-back {
    display: inline-flex !important;
  }

  .chat-main-header {
    padding: 0 8px;
    height: 52px;
    gap: 6px;
  }

  .chat-header-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .chat-header-info h3 {
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
  }

  .chat-header-info p {
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
  }

  .chat-header-actions {
    gap: 4px;
    flex-shrink: 0;
  }

  .btn-chat-action {
    padding: 4px 6px;
    font-size: 0.72rem;
  }

  /* Мобильные размеры карточек (убираем эффект приближения / гигантизма) */
  .khakassia-hero-card, .hero-image-wrap {
    height: 140px !important;
    max-height: 140px !important;
  }
  .hero-content {
    bottom: 8px !important;
    left: 10px !important;
    right: 10px !important;
  }
  .hero-content h2 {
    font-size: 1.15rem !important;
    margin: 0 0 2px 0 !important;
  }
  .hero-content p {
    font-size: 0.72rem !important;
    line-height: 1.25 !important;
    margin-top: 2px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .hero-badge {
    font-size: 0.65rem !important;
    padding: 2px 6px !important;
  }

  .security-banner-strip {
    padding: 5px 8px !important;
    font-size: 0.72rem !important;
    line-height: 1.25 !important;
  }
  .security-badge {
    font-size: 0.62rem !important;
    padding: 1px 5px !important;
  }

  .create-post-card {
    padding: 10px 12px !important;
  }
  .post-input {
    min-height: 48px !important;
    font-size: 0.85rem !important;
    padding: 8px 10px !important;
  }
  .post-card {
    padding: 12px !important;
    margin-bottom: 12px !important;
  }

  .global-music-player {
    height: 54px !important;
    padding: 0 8px !important;
    gap: 6px !important;
  }
  .player-volume-wrap {
    display: none !important;
  }
  .player-track-info {
    max-width: 140px !important;
  }

  .chat-video-circle-wrap {
    width: 170px !important;
    height: 170px !important;
  }

  .feed-layout, .friends-layout, .profile-container, .music-layout {
    padding: 10px 8px 50px;
    max-width: 100%;
  }
}

/* Chat Header Action Buttons & Back Button */
.btn-chat-back {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.btn-chat-back:hover {
  background: var(--bg-card-hover);
  border-color: var(--solar-gold);
  color: var(--solar-gold);
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.btn-chat-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.btn-chat-action:hover {
  background: var(--bg-card-hover);
  border-color: var(--solar-gold);
  color: var(--solar-gold);
}
.btn-chat-action.btn-danger-action {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}
.btn-chat-action.btn-danger-action:hover {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
}

/* Music Track Cover & Online Badge */
.track-cover-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-card);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Invite Friends Modal Items */
.invite-friend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  gap: 12px;
}
.invite-friend-details {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.invite-friend-name {
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.invite-friend-sub {
  font-size: 0.74rem;
  color: var(--text-dim);
}

/* ==========================================================================
   PINNED CHAT, STICKERS & CONFIRM MODAL STYLES
   ========================================================================== */
.chat-pinned-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(234, 153, 31, 0.12);
  border-bottom: 1px solid rgba(234, 153, 31, 0.3);
  font-size: 0.86rem;
  color: var(--text-main);
  animation: fadeIn 0.2s ease-in-out;
}

.chat-pinned-bar .pinned-icon {
  font-size: 1.15rem;
  color: var(--solar-gold);
}

.chat-pinned-bar .pinned-content {
  flex: 1;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-pinned-bar .pinned-content:hover {
  text-decoration: underline;
}

.chat-pinned-bar strong {
  color: var(--solar-gold);
  margin-right: 6px;
}

/* Chat Stickers Drawer */
.stickers-drawer {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin-bottom: 12px;
  overflow: hidden;
  animation: fadeIn 0.2s ease-out;
}

.stickers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--solar-gold);
}

.stickers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 10px;
  padding: 14px;
  max-height: 220px;
  overflow-y: auto;
}

.sticker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: var(--bg-input);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}
.sticker-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--solar-gold);
  transform: translateY(-2px) scale(1.05);
}

.sticker-item .sticker-emoji {
  font-size: 1.85rem;
  line-height: 1.2;
}

.sticker-item .sticker-name {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72px;
}

/* Sticker Bubble in Chat */
.chat-sticker-bubble {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 18px;
  background: rgba(234, 153, 31, 0.08);
  border: 1px solid rgba(234, 153, 31, 0.25);
  border-radius: var(--radius-lg);
  margin-top: 6px;
  transition: transform 0.2s ease;
  user-select: none;
}
.chat-sticker-bubble:hover {
  transform: scale(1.04);
}
.chat-sticker-bubble .sticker-big-emoji {
  font-size: 3.4rem;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}
.chat-sticker-bubble .sticker-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--solar-gold);
  margin-top: 6px;
}

/* Custom Confirmation Modal */
.confirm-modal {
  padding: 30px 24px;
}

.confirm-icon-wrap {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
}

/* ==========================================================================
   FIXES & ENHANCEMENTS: NOTIFICATIONS, CHAT BUTTONS, MUSIC & CREATOR
   ========================================================================== */

/* Fix: "Все прочитаны" button styling (Screenshot 1 fix) */
.btn-text-sm {
  background: transparent !important;
  border: 1px solid rgba(255, 184, 0, 0.4) !important;
  color: #ffb800 !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  outline: none;
}
.btn-text-sm:hover {
  background: rgba(255, 184, 0, 0.18) !important;
  border-color: #ffb800 !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(255, 184, 0, 0.25);
}

/* Fix: Chat input action buttons (Screenshot 2 fix) */
.btn-input-action {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--text-secondary) !important;
  font-size: 1.2rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
  outline: none !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
}
.btn-input-action:hover {
  background: rgba(255, 184, 0, 0.15) !important;
  border-color: rgba(255, 184, 0, 0.45) !important;
  color: #fff !important;
  transform: translateY(-1px);
}
.btn-input-action:active {
  transform: translateY(0);
}
.btn-voice-record.recording {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  animation: pulse-voice 1.2s infinite;
}
@keyframes pulse-voice {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* Creator Badge: "👑 Создатель сайта" */
.creator-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #ffb800 0%, #ff8c00 100%);
  color: #0b0f17;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(255, 184, 0, 0.45);
  margin-left: 6px;
  vertical-align: middle;
}

/* Interactive Cities & Regions tags */
.city-tag {
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.city-tag:hover {
  background: rgba(255, 184, 0, 0.15) !important;
  border-color: rgba(255, 184, 0, 0.4) !important;
  color: #fff !important;
  transform: translateY(-1px);
}
.city-tag.active {
  background: linear-gradient(135deg, #ffb800, #ff8c00) !important;
  color: #0b0f17 !important;
  font-weight: 700 !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px rgba(255, 184, 0, 0.35);
}

/* Chat Sidebar: "+ Чат" and channels */
.btn-create-channel {
  background: rgba(255, 184, 0, 0.15);
  border: 1px solid rgba(255, 184, 0, 0.35);
  color: #ffb800;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-create-channel:hover {
  background: #ffb800;
  color: #0b0f17;
}
.chat-channels-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

/* Profile Cover Controls Toolbar */
.cover-buttons-group {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 20;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.cover-buttons-group.hidden,
.cover-buttons-group .btn-change-cover.hidden,
.cover-buttons-group .btn-adjust-cover.hidden {
  display: none !important;
}

.cover-buttons-group .btn-change-cover,
.cover-buttons-group .btn-adjust-cover {
  position: static !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  color: #f1f5f9 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 7px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.2s ease !important;
  box-shadow: none !important;
  height: auto !important;
  width: auto !important;
  line-height: 1.4 !important;
}

.cover-buttons-group .btn-change-cover:hover,
.cover-buttons-group .btn-adjust-cover:hover {
  background: rgba(255, 184, 0, 0.22) !important;
  border-color: #ffb800 !important;
  color: #ffb800 !important;
  transform: translateY(-1px);
}
.cover-pos-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cover-pos-btn {
  flex: 1 1 calc(50% - 8px);
  padding: 9px 12px;
  font-size: 0.85rem;
}

/* Profile Anthem Widget */
.profile-anthem-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.08) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid rgba(255, 184, 0, 0.25);
  border-radius: 12px;
  max-width: 480px;
}
.anthem-disc {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 184, 0, 0.15);
  border: 1px solid rgba(255, 184, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.anthem-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.anthem-tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #ffb800;
  font-weight: 600;
}
.anthem-title {
  font-size: 0.92rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.anthem-artist {
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-anthem-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffb800;
  color: #0b0f17;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.btn-anthem-play:hover {
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(255, 184, 0, 0.5);
}

/* Private Profile Lock Box */
.private-profile-lock-box {
  text-align: center;
  padding: 50px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-top: 20px;
}
.private-profile-lock-box .lock-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}
.private-profile-lock-box h3 {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 6px;
}
.private-profile-lock-box p {
  font-size: 0.9rem;
  color: var(--text-dim);
  max-width: 400px;
  margin: 0 auto;
}

/* ==========================================================================
   MUSIC TAB & GLOBAL AUDIO PLAYER
   ========================================================================== */
.music-layout {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 90px;
}
.music-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.music-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.music-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.music-sun-icon {
  font-size: 2.5rem;
}
.music-title-wrap h2 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.music-title-wrap p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 500px;
}
.music-search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  gap: 10px;
}
.music-search-icon {
  font-size: 1.1rem;
  color: var(--text-dim);
}
.music-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.95rem;
}
.music-genre-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.genre-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.genre-chip:hover {
  background: rgba(255, 184, 0, 0.12);
  border-color: rgba(255, 184, 0, 0.3);
  color: #fff;
}
.genre-chip.active {
  background: #ffb800;
  color: #0b0f17;
  font-weight: 600;
  border-color: transparent;
}
.music-content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.tracks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.track-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
}
.track-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 184, 0, 0.25);
}
.track-item.playing {
  background: rgba(255, 184, 0, 0.08);
  border-color: rgba(255, 184, 0, 0.4);
}
.track-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.track-play-btn:hover, .track-item.playing .track-play-btn {
  background: #ffb800;
  color: #0b0f17;
  border-color: transparent;
}
.track-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.track-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-artist {
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-genre-tag {
  font-size: 0.72rem;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  color: var(--text-dim);
}
.track-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.track-btn-save {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  color: var(--text-dim);
  transition: all 0.2s ease;
  padding: 4px;
}
.track-btn-save:hover {
  transform: scale(1.15);
}
.track-btn-save.saved {
  color: #ffb800;
}
.track-btn-anthem {
  background: rgba(255, 184, 0, 0.1);
  border: 1px solid rgba(255, 184, 0, 0.25);
  color: #ffb800;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.track-btn-anthem:hover {
  background: #ffb800;
  color: #0b0f17;
}

/* STICKY BOTTOM MUSIC PLAYER */
.global-music-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 74px;
  background: rgba(11, 15, 23, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 184, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 20px;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
}
.player-track-info {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 260px;
  min-width: 200px;
}
.player-cover-disc {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 184, 0, 0.15);
  border: 1px solid rgba(255, 184, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  animation: spin-disc 10s linear infinite paused;
}
.player-cover-disc.rotating {
  animation-play-state: running;
}
@keyframes spin-disc {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.player-meta {
  flex: 1;
  min-width: 0;
}
.player-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-artist {
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-btn-like {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.player-btn-like:hover { transform: scale(1.15); }
.player-center-controls {
  flex: 1;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.player-buttons {
  display: flex;
  align-items: center;
  gap: 14px;
}
.player-ctrl-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.2s ease;
}
.player-ctrl-btn:hover { color: #fff; }
.player-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffb800;
  border: none;
  color: #0b0f17;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.player-play-btn:hover { transform: scale(1.08); }
.player-progress-line {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}
.player-time {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  width: 35px;
  text-align: center;
}
.progress-bar-wrap {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffb800, #ff8c00);
  border-radius: 4px;
  position: relative;
}
.player-extra-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 240px;
  justify-content: flex-end;
}
.player-set-anthem-btn {
  background: rgba(255, 184, 0, 0.12);
  border: 1px solid rgba(255, 184, 0, 0.35);
  color: #ffb800;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.player-set-anthem-btn:hover {
  background: #ffb800;
  color: #0b0f17;
}
.volume-slider-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.volume-slider-wrap input {
  width: 70px;
  accent-color: #ffb800;
  cursor: pointer;
}
.emoji-picker-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.emoji-opt {
  font-size: 1.5rem;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}
.emoji-opt:hover, .emoji-opt.active {
  background: rgba(255, 184, 0, 0.15);
  border-color: #ffb800;
  transform: scale(1.1);
}

/* ==========================================================================
   TOAST NOTIFICATIONS (Стильные всплывающие уведомления вместо alert)
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 76px;
  right: 20px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  width: calc(100vw - 32px);
  pointer-events: none;
}
@media (max-width: 768px) {
  .toast-container {
    top: 66px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}
.toast {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  background: rgba(16, 22, 34, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5), 0 0 16px rgba(0, 0, 0, 0.25);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
  overflow: hidden;
}
.toast.toast-show {
  transform: translateX(0);
  opacity: 1;
}
.toast.toast-hide {
  transform: translateX(120%);
  opacity: 0;
}
.toast-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.toast-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 184, 0, 0.5);
  background: var(--bg-card);
}
.toast-content {
  flex: 1;
  min-width: 0;
}
.toast-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
  margin-bottom: 2px;
  line-height: 1.25;
}
.toast-body {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.35;
  word-break: break-word;
}
.toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
  flex-shrink: 0;
}
.toast-close:hover {
  color: #fff;
}
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--solar-gold, #ffb800);
  opacity: 0.85;
  transform-origin: left;
}
.toast.toast-success {
  border-left: 4px solid #22c55e;
}
.toast.toast-success .toast-progress {
  background: #22c55e;
}
.toast.toast-error {
  border-left: 4px solid #ef4444;
}
.toast.toast-error .toast-progress {
  background: #ef4444;
}
.toast.toast-warning {
  border-left: 4px solid #f59e0b;
}
.toast.toast-warning .toast-progress {
  background: #f59e0b;
}
.toast.toast-info {
  border-left: 4px solid #3b82f6;
}
.toast.toast-info .toast-progress {
  background: #3b82f6;
}
.toast.toast-message {
  border-left: 4px solid #ffb800;
  background: linear-gradient(135deg, rgba(18, 24, 38, 0.98), rgba(36, 26, 12, 0.98));
}
.toast.toast-message .toast-progress {
  background: #ffb800;
}

/* Беджи непрочитанных сообщений в каналах и ЛС */
.channel-unread-pill {
  margin-left: auto;
  background: var(--solar-gold, #ffb800);
  color: #0b0f17;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 0 10px rgba(255, 184, 0, 0.35);
  flex-shrink: 0;
}
.tab-badge {
  animation: badgePop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes badgePop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   TELEGRAM-STYLE PROFILE MUSIC STATUS
   ========================================================================== */
.tg-music-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 20px;
  cursor: pointer;
  color: #60a5fa;
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 6px;
  transition: all var(--transition-fast);
  user-select: none;
}
.tg-music-status:hover {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}
.tg-music-status.playing {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(234, 153, 31, 0.2));
  border-color: var(--solar-gold);
  box-shadow: 0 0 12px rgba(234, 153, 31, 0.3);
}
.tg-music-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
}
.tg-music-body {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}
.tg-music-artist {
  font-weight: 700;
  color: #93c5fd;
}
.tg-music-sep {
  color: rgba(255, 255, 255, 0.4);
}
.tg-music-title {
  color: #fff;
  font-weight: 500;
}
.tg-music-arrow {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

/* ==========================================================================
   MODERATOR BADGE
   ========================================================================== */
.moderator-badge {
  display: inline-block;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.35);
  vertical-align: middle;
}

/* ==========================================================================
   CHAT VIDEO CIRCLE (КРУЖОЧКИ КАК В TELEGRAM)
   ========================================================================== */
.btn-circle-record-btn {
  font-size: 1.15rem;
}
.btn-circle-record-btn:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #ef4444 !important;
}

.chat-video-circle-wrap {
  position: relative;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--solar-gold);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  background: #000;
  margin-top: 6px;
  cursor: pointer;
}
.chat-video-circle {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.chat-circle-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 2.2rem;
  border-radius: 50%;
  transition: opacity var(--transition-fast);
  pointer-events: none;
}
.chat-video-circle-wrap.playing .chat-circle-play-overlay {
  opacity: 0;
}

.video-circle-ring {
  position: absolute;
  inset: -6px;
  border: 4px dashed #ef4444;
  border-radius: 50%;
  animation: circleSpin 3s linear infinite;
  pointer-events: none;
}
@keyframes circleSpin {
  100% { transform: rotate(360deg); }
}

.video-circle-timer-tag {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: #ef4444;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 3px 12px;
  border-radius: 14px;
  border: 1px solid rgba(239, 68, 68, 0.5);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.empty-chat-placeholder {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-dim);
}
