/* ========== ПЕРЕМЕННЫЕ ========== */
:root {
  --bg: #0a0e27;
  --bg-secondary: #131942;
  --card: #1a2150;
  --card-hover: #262633;
  --accent: #7c5cff;
  --accent-light: #9d85ff;
  --accent-dark: #5a3fd6;
  --text: #f0f0f5;
  --text-secondary: #9090a0;
  --border: #2a2a38;
  --success: #4ade80;
  --danger: #f87171;
  --warning: #fbbf24;
  --telegram: #229ED9;
  --ban: #dc2626;
  --ton: #0098EA;
}

/* ========== DESKTOP LAYOUT (PC VERSION) ========== */
@media (min-width: 768px) {
  .app {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: none;
    transform: none;
  }
  
  .content {
    padding: 24px;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .card {
    border-radius: 24px;
  }
  
  .modal-content {
    max-width: 500px;
  }
}

/* ========== VISUAL IMPROVEMENTS ========== */
.btn {
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(124, 92, 255, 0.3);
}

.btn-small {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-tiny {
  padding: 6px 12px;
  font-size: 12px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  padding: 0;
}

.nav-tab {
  padding: 12px;
  font-size: 13px;
}

.nav-icon {
  font-size: 20px;
}

.nav-label {
  font-size: 12px;
}

.user-avatar-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 18px;
}

/* ========== TELEGRAM LINK STYLES ========== */
.profile-telegram {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  padding: 4px 10px;
  background: rgba(34, 158, 217, 0.1);
  border-radius: 8px;
  font-size: 13px;
}

.tg-icon {
  font-size: 18px;
}

.tg-link {
  color: var(--telegram);
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
}

.tg-link:hover {
  text-decoration: underline;
}

.tg-hidden {
  font-size: 11px;
  color: var(--warning);
  background: rgba(251, 191, 36, 0.1);
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 4px;
}

/* ========== WALLET IMPROVEMENTS ========== */
.wallet-btn {
  cursor: pointer;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  transition: all 0.2s;
}

.wallet-btn:hover {
  border-color: var(--ton);
  box-shadow: 0 4px 20px rgba(0, 152, 234, 0.2);
}

.wallet-address {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: monospace;
  font-size: 13px;
  color: var(--accent);
}

.copy-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.nft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.nft-item img {
  border-radius: 8px;
  object-fit: cover;
}

.nft-item {
  aspect-ratio: 1;
  overflow: hidden;
}

.tokens-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.token-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.token-item:last-child {
  border-bottom: none;
}

.token-icon img {
  border-radius: 50%;
}

.tonscan-link {
  color: var(--ton);
  font-size: 12px;
  text-decoration: none;
  font-family: monospace;
}

.tonscan-link:hover {
  text-decoration: underline;
}

/* ========== БАЗОВЫЕ СТИЛИ ========== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

.hidden { display: none !important; }

/* ========== LAYOUT ========== */
.app {
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content { flex: 1; padding: 16px; padding-bottom: 100px; }

/* ========== HEADER ========== */
.header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 15, 20, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: none;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--accent), #ff6b9d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
  white-space: nowrap;
  text-transform: uppercase;
}

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

/* ========== НАВИГАЦИЯ ========== */
.nav-tabs {
  display: flex;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 57px;
  z-index: 99;
}

.nav-tab {
  flex: 1;
  padding: 10px 6px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.nav-icon { font-size: 18px; }
.nav-label { font-size: 11px; }
.nav-tab:hover { color: var(--text); background: var(--card); }
.nav-tab.active { color: var(--accent); border-bottom-color: var(--accent); background: rgba(124, 92, 255, 0.1); }

/* ========== КНОПКИ ========== */
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  position: relative;
  flex-shrink: 0;
}

.icon-btn:hover { background: var(--card-hover); color: var(--accent); }

.badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: white;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #ff6b9d);
  border: 2px solid var(--border);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: white; }
.btn-secondary { background: var(--bg-secondary); color: var(--text); border: 1px solid var(--border); }
.btn-telegram { background: var(--telegram); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-success { background: var(--success); color: var(--bg); }
.btn-warning { background: var(--warning); color: var(--bg); }
.btn-ton { background: var(--ton); color: white; }
.btn-small { padding: 6px 12px; font-size: 11px; border-radius: 8px; width: auto; }
.btn-tiny { padding: 4px 8px; font-size: 10px; border-radius: 6px; width: auto; }
.btn-disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ========== КАРТОЧКИ ========== */
.card {
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
  overflow: hidden;
}

.card-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body { padding: 16px; }

/* ========== ФОРМЫ ========== */
.input-group { margin-bottom: 16px; }

.input-label {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, textarea, select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  transition: all 0.2s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.15);
}

textarea { min-height: 100px; resize: vertical; }

/* ========== АВТОРИЗАЦИЯ ========== */
.auth-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-logo {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--accent), #ff6b9d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  text-transform: lowercase;
  letter-spacing: 3px;
  margin-bottom: 32px;
}


.auth-card { width: 100%; max-width: 400px; }

.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.auth-tab.active { background: var(--accent); color: white; }

.captcha-box {
  background: var(--bg);
  padding: 16px;
  border-radius: 14px;
  margin-bottom: 16px;
  text-align: center;
}

.captcha-question { font-size: 24px; font-weight: 700; margin-bottom: 12px; font-family: monospace; }
.captcha-hint { font-size: 12px; color: var(--text-secondary); margin-top: 8px; }

/* ========== АВАТАРЫ ========== */
.avatar {
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #ff6b9d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}

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

.avatar-xs { width: 32px; height: 32px; font-size: 14px; border-radius: 10px; }
.avatar-sm { width: 40px; height: 40px; font-size: 16px; border-radius: 12px; }
.avatar-md { width: 56px; height: 56px; font-size: 22px; }
.avatar-lg { width: 80px; height: 80px; font-size: 32px; border-radius: 20px; }
.avatar-xl { width: 100px; height: 100px; font-size: 40px; border-radius: 24px; }

/* ========== ПРОФИЛЬ ========== */
.profile-card {
  overflow: hidden;
}

/* Баннер */
.profile-banner {
  height: 120px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  position: relative;
}

.profile-banner.has-image {
  background-size: cover;
  background-position: center;
}

/* Основная секция профиля */
.profile-main {
  display: flex;
  align-items: flex-end;
  padding: 0 16px;
  margin-top: -50px;
  position: relative;
  z-index: 1;
}

.profile-avatar-container {
  flex-shrink: 0;
}

.profile-avatar {
  border: 4px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: border-color 0.3s ease;
}

.profile-avatar.online {
  border-color: var(--success);
  box-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
}

.profile-avatar.offline {
  border-color: var(--text-secondary);
}

.profile-info {
  flex: 1;
  padding-left: 16px;
  padding-bottom: 8px;
  min-width: 0;
}

.profile-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profile-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 0;
  word-break: break-word;
  line-height: 1.3;
}

.profile-online-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.profile-online-indicator.online {
  color: var(--success);
  background: rgba(74, 222, 128, 0.15);
}

.profile-online-indicator.offline {
  color: var(--text-secondary);
  background: rgba(144, 144, 160, 0.1);
}

/* Детали профиля */
.profile-details {
  padding: 16px;
  text-align: left;
}

.profile-username {
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
}

.profile-id {
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 8px;
}

.profile-telegram {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  padding: 4px 10px;
  background: rgba(34, 158, 217, 0.1);
  border-radius: 8px;
  font-size: 13px;
}

.tg-link {
  color: var(--telegram);
  text-decoration: none;
  font-weight: 500;
}

.tg-link:hover { text-decoration: underline; }

.hidden-badge {
  font-size: 10px;
  color: var(--warning);
  background: rgba(251, 191, 36, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

.tg-id-small {
  font-size: 10px;
  color: var(--text-secondary);
  margin-left: 6px;
}

.profile-registered {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* Статус онлайн */
.profile-status-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.profile-status-online.online {
  color: var(--success);
  background: rgba(74, 222, 128, 0.1);
}

.profile-status-online.offline {
  color: var(--text-secondary);
  background: rgba(144, 144, 160, 0.1);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  animation: pulse-online 2s infinite;
}

.status-dot.offline {
  background: var(--text-secondary);
}

@keyframes pulse-online {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* Секция био */
.profile-bio-section {
  padding: 0 16px 16px;
}

.profile-bio {
  color: var(--text-secondary);
  background: var(--bg);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}

/* Статистика */
.profile-stats {
  display: flex;
  justify-content: space-around;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.stat { text-align: center; }
.stat-value { font-size: 20px; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 12px; color: var(--text-secondary); }

/* Кнопки действий */
.profile-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
}

.profile-actions .btn { flex: 1; }

/* Админ кнопки */
.profile-admin-buttons {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
  flex-wrap: wrap;
}

.profile-admin-buttons .btn {
  flex: 1;
  min-width: 100px;
}

/* ========== БЕЙДЖИ ========== */
.badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
}

.badge-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  border: 1px solid var(--border);
  margin-bottom: 6px;
}

.badge:hover .badge-tooltip { opacity: 1; }

.badge-admin { background: linear-gradient(135deg, var(--warning), #ea580c); color: var(--bg); }
.badge-vip { background: linear-gradient(135deg, #a855f7, #7c3aed); color: white; }
.badge-verified { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: white; }
.badge-developer { background: linear-gradient(135deg, var(--success), #16a34a); color: var(--bg); }
.badge-telegram { background: linear-gradient(135deg, var(--telegram), #1a8ac9); color: white; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
}

.status-muted { background: rgba(251, 191, 36, 0.2); color: var(--warning); }
.status-banned { background: rgba(220, 38, 38, 0.2); color: var(--ban); }

/* ========== КОШЕЛЕК ========== */
.wallet-section {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.wallet-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  background: var(--bg);
  border-radius: 14px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.wallet-btn:hover { border-color: var(--ton); }

.wallet-info { display: flex; align-items: center; gap: 12px; }
.wallet-icon { font-size: 24px; }
.wallet-label { font-weight: 600; }
.wallet-address { font-size: 12px; color: var(--text-secondary); font-family: monospace; }

.wallet-dropdown {
  display: none;
  background: var(--bg);
  border-radius: 14px;
  margin-top: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.wallet-dropdown.active { display: block; }

.wallet-balance {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.wallet-balance-title { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.wallet-balance-value { font-size: 24px; font-weight: 700; color: var(--ton); }
.wallet-balance-usd { font-size: 14px; color: var(--text-secondary); }

.wallet-tokens { padding: 16px; }

.wallet-link {
  color: var(--accent);
  text-decoration: none;
  font-family: monospace;
  font-size: 12px;
}

.wallet-link:hover { text-decoration: underline; }

.copy-btn {
  cursor: pointer;
  margin-left: 6px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.copy-btn:hover { opacity: 1; }

.nft-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  padding: 0 16px;
  color: var(--text-secondary);
}

.nft-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 16px 16px;
}

.nft-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}

.nft-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tokens-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.token-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.token-item:last-child { border-bottom: none; }

.token-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  overflow: hidden;
}

.token-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.token-info { flex: 1; }
.token-name { font-size: 13px; font-weight: 500; }
.token-balance { font-size: 12px; color: var(--text-secondary); }

/* ========== ПОСТЫ ========== */
.create-post { padding: 16px; border-bottom: 1px solid var(--border); }
.create-post textarea { min-height: 80px; margin-bottom: 12px; font-size: 15px; }
.post-cooldown { font-size: 12px; color: var(--warning); margin-bottom: 8px; text-align: center; }

.post { padding: 16px; border-bottom: 1px solid var(--border); }
.post:last-child { border-bottom: none; }

.post-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.post-author { flex: 1; min-width: 0; }

.post-author-name {
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.post-author-name:hover { color: var(--accent); }
.post-author-badge { font-size: 10px; padding: 2px 6px; border-radius: 6px; }
.post-time { font-size: 12px; color: var(--text-secondary); }

.post-content {
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 12px;
}

.post-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.post-action {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 10px;
  transition: all 0.2s;
}

.post-action:hover { color: var(--accent); background: rgba(124, 92, 255, 0.1); }
.post-action.liked { color: var(--danger); }
.post-action.delete:hover { color: var(--danger); background: rgba(248, 113, 113, 0.1); }
.post-action.restrict:hover { color: var(--warning); background: rgba(251, 191, 36, 0.1); }
.post-action.edit:hover { color: var(--success); background: rgba(74, 222, 128, 0.1); }

/* ========== КОММЕНТАРИИ ========== */
.comments-section { border-top: 1px solid var(--border); }
.comments-header { padding: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }

.comments-disabled {
  padding: 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  background: var(--bg);
  margin: 0 16px 16px;
  border-radius: 12px;
}

.comment-form { display: flex; gap: 8px; padding: 0 16px 16px; }
.comment-form input { flex: 1; font-size: 14px; padding: 12px 14px; }
.comment-form .btn { width: auto; padding: 12px 16px; }

.comments-list { padding: 0 16px 16px; }

.comment {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: var(--bg);
  border-radius: 14px;
  margin-bottom: 8px;
  position: relative;
}

.comment-content { flex: 1; min-width: 0; }
.comment-author { font-weight: 600; font-size: 13px; color: var(--accent); cursor: pointer; }
.comment-author:hover { text-decoration: underline; }
.comment-text { font-size: 14px; margin-top: 4px; word-break: break-word; }
.comment-time { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }

.comment-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; }

.comment-action {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
  background: var(--card);
}

.comment-action:hover { background: var(--accent); color: white; }
.comment-action.delete:hover { background: var(--danger); }
.comment-action.restrict:hover { background: var(--warning); }

/* ========== ДРУЗЬЯ ========== */
.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
  gap: 12px;
  padding: 16px;
}

.friend-card {
  text-align: center;
  padding: 14px 8px;
  border-radius: 16px;
  background: var(--bg);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.friend-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.friend-card .avatar { margin: 0 auto 8px; }
.friend-card .name { font-size: 12px; color: var(--text-secondary); word-break: break-word; }

.request-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg);
  border-radius: 14px;
  margin-bottom: 8px;
}

.request-info { flex: 1; min-width: 0; }
.request-name { font-weight: 600; cursor: pointer; }
.request-name:hover { color: var(--accent); }
.request-actions { display: flex; gap: 6px; }

/* ========== УВЕДОМЛЕНИЯ ========== */
.notif-panel {
  position: fixed;
  bottom: 70px;
  right: 12px;
  width: 320px;
  max-width: calc(100vw - 24px);
  max-height: 380px;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
  z-index: 200;
  display: none;
  flex-direction: column;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.4);
}

.notif-panel.active { display: flex; }

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.notif-title { font-weight: 600; font-size: 14px; }

.notif-close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
}

.notif-close:hover { background: var(--danger); color: white; }

.notif-list { flex: 1; overflow-y: auto; padding: 6px; }

.notif-item {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: rgba(124, 92, 255, 0.1); }

.notif-content { flex: 1; min-width: 0; }
.notif-text { font-size: 12px; line-height: 1.4; }
.notif-admin { font-size: 11px; color: var(--warning); margin-top: 2px; }
.notif-admin span { cursor: pointer; text-decoration: underline; }
.notif-post-preview { font-size: 11px; color: var(--text-secondary); margin-top: 4px; font-style: italic; }
.notif-time { font-size: 10px; color: var(--text-secondary); margin-top: 4px; }

.notif-actions { display: flex; gap: 4px; margin-top: 6px; }
.notif-actions .btn { flex: 1; padding: 6px 8px; font-size: 10px; }

.notif-delete {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 10px;
  opacity: 0;
  transition: all 0.2s;
  flex-shrink: 0;
}

.notif-item:hover .notif-delete { opacity: 1; }
.notif-delete:hover { background: var(--danger); color: white; }

/* ========== МЕНЮ ========== */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 300;
  display: none;
  backdrop-filter: blur(4px);
}

.menu-overlay.active { display: block; }

.menu-panel {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100%;
  background: var(--card);
  z-index: 301;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.menu-overlay.active .menu-panel { right: 0; }

.menu-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-user-info { flex: 1; min-width: 0; }
.menu-user-name { font-weight: 600; font-size: 16px; }
.menu-user-username { font-size: 13px; color: var(--text-secondary); }

.menu-items { flex: 1; padding: 8px; overflow-y: auto; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 15px;
}

.menu-item:hover { background: var(--bg); }
.menu-item.danger { color: var(--danger); }

/* ========== НАСТРОЙКИ ========== */
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.settings-item:last-child { border-bottom: none; }
.settings-label { font-size: 14px; font-weight: 500; }
.settings-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* Предпросмотр профиля в настройках */
.settings-profile-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  flex-wrap: wrap;
}

.settings-profile-info { flex: 1; min-width: 120px; }
.settings-profile-name { font-size: 18px; font-weight: 600; }
.settings-profile-username { font-size: 14px; color: var(--accent); }

.toggle {
  width: 48px;
  height: 28px;
  background: var(--bg);
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border);
}

.toggle.active { background: var(--accent); border-color: var(--accent); }

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 10px;
  transition: all 0.2s;
}

.toggle.active::after { left: 23px; }

.cooldown-info { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }

/* ========== МОДАЛЬНЫЕ ОКНА ========== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
}

.modal.active { display: flex; }

.modal-content {
  background: var(--card);
  border-radius: 24px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border);
}

.modal-header { padding: 20px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 18px; }
.modal-body { padding: 20px; }
.modal-footer { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.modal-footer .btn { flex: 1; }

.badge-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  border: 1px solid var(--border);
}

.badge-option:hover { border-color: var(--accent); }
.badge-option input { width: auto; margin: 0; }

/* ========== TELEGRAM ========== */
.telegram-box {
  background: linear-gradient(135deg, rgba(34, 158, 217, 0.1), rgba(34, 158, 217, 0.05));
  border: 1px solid var(--telegram);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
}

.telegram-icon { font-size: 48px; margin-bottom: 12px; }
.telegram-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.telegram-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }

.telegram-code {
  background: var(--bg);
  padding: 16px;
  border-radius: 14px;
  font-family: monospace;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--telegram);
  margin-bottom: 16px;
}

.telegram-steps { text-align: left; font-size: 13px; color: var(--text-secondary); }
.telegram-steps li { margin-bottom: 8px; }

/* ========== ОГРАНИЧЕНИЯ ========== */
.restrict-tabs { display: flex; gap: 8px; margin-bottom: 16px; }

.restrict-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 500;
  background: var(--bg);
  border: 2px solid var(--border);
  transition: all 0.2s;
}

.restrict-tab.active { border-color: var(--accent); background: rgba(124, 92, 255, 0.1); }
.restrict-tab.ban-tab.active { border-color: var(--ban); background: rgba(220, 38, 38, 0.1); }

.duration-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.duration-grid label {
  padding: 12px;
  background: var(--bg);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  border: 2px solid var(--border);
  font-size: 13px;
  transition: all 0.2s;
}

.duration-grid label:hover { border-color: var(--accent); }
.duration-grid input:checked + label { border-color: var(--accent); background: rgba(124, 92, 255, 0.15); }
.duration-grid input { display: none; }

/* ========== ПРЕДУПРЕЖДЕНИЯ ========== */
.muted-warning, .banned-warning {
  border-radius: 14px;
  padding: 14px;
  margin: 16px;
  text-align: center;
  font-size: 13px;
}

.muted-warning { background: rgba(251, 191, 36, 0.1); border: 1px solid var(--warning); color: var(--warning); }
.banned-warning { background: rgba(220, 38, 38, 0.1); border: 1px solid var(--ban); color: var(--ban); }

.tg-required-warning {
  background: rgba(34, 158, 217, 0.1);
  border: 1px solid var(--telegram);
  color: var(--telegram);
  border-radius: 14px;
  padding: 14px;
  margin: 16px;
  text-align: center;
  font-size: 13px;
}

/* ========== ПУСТЫЕ СОСТОЯНИЯ ========== */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-secondary); }
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state-text { font-size: 14px; }

/* ========== АЛЕРТЫ ========== */
.alert {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  color: var(--text);
  padding: 14px 24px;
  border-radius: 14px;
  border: 1px solid var(--border);
  z-index: 9999;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  max-width: 90%;
  text-align: center;
  transition: opacity 0.3s ease;
}

.alert.error { border-color: var(--danger); background: rgba(248, 113, 113, 0.15); }
.alert.success { border-color: var(--success); background: rgba(74, 222, 128, 0.15); }

/* ========== АДМИН-ПАНЕЛЬ ========== */
.admin-tabs {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.admin-tab {
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  background: var(--bg);
  color: var(--text-secondary);
  transition: all 0.2s;
}

.admin-tab.active { background: var(--accent); color: white; }

.admin-search { padding: 0 16px 16px; }
.admin-search input { padding: 12px 16px; font-size: 14px; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th {
  background: var(--bg);
  padding: 14px 10px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.admin-table td { padding: 14px 10px; border-bottom: 1px solid var(--border); }
.admin-table tr:hover { background: var(--bg); }

.user-cell { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.user-cell:hover { color: var(--accent); }

.role-badge { font-size: 10px; padding: 3px 8px; border-radius: 6px; font-weight: 600; }
.role-admin { background: var(--warning); color: var(--bg); }
.role-level { background: var(--accent); color: white; margin-left: 4px; }

.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.roles-list { max-height: 300px; overflow-y: auto; }

.role-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--bg);
  border-radius: 12px;
  margin-bottom: 8px;
}

.role-info { display: flex; align-items: center; gap: 10px; }
.role-desc { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* ========== МОДАЛКА "ВСЯ ИНФОРМАЦИЯ" ========== */
.full-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.full-info-card {
  background: var(--bg);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  border: 1px solid var(--border);
}

.full-info-icon { font-size: 24px; margin-bottom: 6px; }
.full-info-label { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.full-info-value { font-size: 13px; font-weight: 600; margin-top: 4px; word-break: break-all; }
.full-info-hidden { font-size: 10px; color: var(--warning); margin-top: 4px; }

.full-info-section-block {
  background: var(--bg);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.full-info-section-title { font-size: 13px; font-weight: 600; margin-bottom: 10px; }

.full-info-settings {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--card);
  border-radius: 8px;
  font-size: 11px;
}

.setting-item.active { background: rgba(74, 222, 128, 0.1); color: var(--success); }

.status-block {
  padding: 12px;
  border-radius: 10px;
  text-align: center;
}

.status-block.clear { background: rgba(74, 222, 128, 0.1); }
.status-block.muted { background: rgba(251, 191, 36, 0.1); }
.status-block.banned { background: rgba(248, 113, 113, 0.1); }

.status-line { font-size: 14px; font-weight: 600; }
.status-reason { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

.restrictions-list { max-height: 150px; overflow-y: auto; }

.restriction-item-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--card);
  border-radius: 8px;
  margin-bottom: 6px;
}

.restriction-type {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.restriction-type.ban { background: rgba(248, 113, 113, 0.2); color: var(--danger); }
.restriction-type.mute { background: rgba(251, 191, 36, 0.2); color: var(--warning); }

.restriction-details { flex: 1; font-size: 12px; }
.restriction-date { font-size: 10px; color: var(--text-secondary); margin-top: 2px; }

.text-muted { color: var(--text-secondary); }
.wallet-link-small { color: var(--accent); text-decoration: none; font-size: 12px; }
.wallet-link-small:hover { text-decoration: underline; }

.tg-link-small { color: var(--telegram); text-decoration: none; font-size: 13px; }
.tg-link-small:hover { text-decoration: underline; }

.tg-id-small { 
  font-size: 10px; 
  color: var(--text-secondary); 
  background: var(--bg); 
  padding: 2px 6px; 
  border-radius: 4px; 
  margin-left: 6px; 
}

.full-info-tg-id {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: monospace;
  margin-top: 4px;
}

.full-info-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.full-info-badges .badge {
  font-size: 11px;
  padding: 4px 10px;
}

/* ========== ТЕМЫ ========== */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg);
}

.theme-option:hover {
  border-color: var(--accent);
}

.theme-option.active {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.1);
}

.theme-preview {
  width: 100%;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.theme-option span {
  font-size: 12px;
  font-weight: 500;
}

/* Светлая тема */
body.theme-light {
  --bg: #f5f5f5;
  --bg-secondary: #e8e8e8;
  --card: #ffffff;
  --card-hover: #f0f0f0;
  --text: #1a1a2e;
  --text-secondary: #6b6b80;
  --border: #d0d0d8;
}

/* Тема Полночь */
body.theme-midnight {
  --bg: #0f0f23;
  --bg-secondary: #1a1a3e;
  --card: #252550;
  --card-hover: #2f2f60;
  --accent: #00d4aa;
  --accent-light: #33e0be;
  --accent-dark: #00a888;
}

/* Тема Закат */
body.theme-sunset {
  --bg: #2d1f3d;
  --bg-secondary: #3d2a50;
  --card: #4a3260;
  --card-hover: #5a4070;
  --accent: #ff7e5f;
  --accent-light: #ff9a7f;
  --accent-dark: #e66040;
}

/* ========== ЭМОДЗИ ========== */
.emojis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.emoji-item {
  background: var(--bg);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  border: 1px solid var(--border);
}

.emoji-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 8px;
}

.emoji-name {
  font-size: 12px;
  color: var(--accent);
  font-family: monospace;
  margin-bottom: 8px;
}

.emoji-actions {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.emoji-preview-box {
  background: var(--bg);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin-top: 12px;
}

.emoji-preview-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.emoji-preview {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-preview img {
  max-width: 64px;
  max-height: 64px;
}

/* Inline эмодзи в тексте */
.inline-emoji {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin: 0 2px;
  display: inline-block;
}

/* Эмодзи возле ника */
.profile-emoji {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  display: inline-block;
}

/* Выбор эмодзи */
.emoji-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.emoji-selector-item {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.emoji-selector-item:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

.emoji-selector-item.selected {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.2);
}

.emoji-selector-item img {
  max-width: 32px;
  max-height: 32px;
}

/* Эмодзи возле ника */
.profile-emoji {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-left: 6px;
}

/* Предпросмотр оформления */
.appearance-preview {
  background: var(--bg);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.appearance-preview-title {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.appearance-preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.appearance-preview-info {
  flex: 1;
}

.appearance-preview-name {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.appearance-preview-username {
  font-size: 13px;
  color: var(--accent);
}

/* Выбор эмодзи для ника */
.emoji-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  background: var(--bg);
  border-radius: 12px;
  margin-top: 8px;
}

.emoji-selector-item {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.emoji-selector-item:hover {
  border-color: var(--accent);
  transform: scale(1.1);
}

.emoji-selector-item.selected {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.2);
}

.emoji-selector-item img {
  max-width: 32px;
  max-height: 32px;
}

.emoji-selector-none {
  font-size: 12px;
  color: var(--text-secondary);
}

.premium-only-notice {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  padding: 12px;
  margin-top: 8px;
  font-size: 13px;
  color: #a855f7;
  text-align: center;
}

/* Выбор эмодзи */
.emoji-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.emoji-selector-item {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.emoji-selector-item:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

.emoji-selector-item.selected {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.2);
}

.emoji-selector-item img {
  max-width: 32px;
  max-height: 32px;
}

/* Эмодзи возле ника */
.profile-emoji {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-left: 6px;
}

/* Предпросмотр оформления */
.appearance-preview {
  background: var(--bg);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.appearance-preview-title {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.appearance-preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.appearance-preview-info {
  flex: 1;
}

.appearance-preview-name {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.appearance-preview-username {
  font-size: 13px;
  color: var(--accent);
}

/* Выбор эмодзи для ника */
.emoji-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  background: var(--bg);
  border-radius: 12px;
  margin-top: 8px;
}

.emoji-selector-item {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.emoji-selector-item:hover {
  border-color: var(--accent);
  transform: scale(1.1);
}

.emoji-selector-item.selected {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.2);
}

.emoji-selector-item img {
  max-width: 32px;
  max-height: 32px;
}

.emoji-selector-none {
  font-size: 12px;
  color: var(--text-secondary);
}

.premium-only-notice {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  padding: 12px;
  margin-top: 8px;
  font-size: 13px;
  color: #a855f7;
  text-align: center;
}

/* ========== ТЕМЫ ========== */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg);
}

.theme-option:hover {
  border-color: var(--accent);
}

.theme-option.active {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.1);
}

.theme-preview {
  width: 100%;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.theme-option span {
  font-size: 12px;
  font-weight: 500;
}

/* Светлая тема */
body.theme-light {
  --bg: #f5f5f5;
  --bg-secondary: #e8e8e8;
  --card: #ffffff;
  --card-hover: #f0f0f0;
  --text: #1a1a2e;
  --text-secondary: #6b6b80;
  --border: #d0d0d8;
}

/* Тема Полночь */
body.theme-midnight {
  --bg: #0f0f23;
  --bg-secondary: #1a1a3e;
  --card: #252550;
  --card-hover: #2f2f60;
  --accent: #00d4aa;
  --accent-light: #33e0be;
  --accent-dark: #00a888;
}

/* Тема Закат */
body.theme-sunset {
  --bg: #2d1f3d;
  --bg-secondary: #3d2a50;
  --card: #4a3260;
  --card-hover: #5a4070;
  --accent: #ff7e5f;
  --accent-light: #ff9a7f;
  --accent-dark: #e66040;
}

/* Тема Океан */
body.theme-ocean {
  --bg: #0a192f;
  --bg-secondary: #112240;
  --card: #1d3557;
  --card-hover: #264573;
  --accent: #64ffda;
  --accent-light: #8affea;
  --accent-dark: #4cd9b0;
  --text: #ccd6f6;
  --text-secondary: #8892b0;
  --border: #233554;
}

/* Тема Роза */
body.theme-rose {
  --bg: #1a1a2e;
  --bg-secondary: #25253d;
  --card: #302b4d;
  --card-hover: #3d3760;
  --accent: #e94560;
  --accent-light: #ff6b8a;
  --accent-dark: #c73e54;
  --text: #f5f5f5;
  --text-secondary: #b0b0c0;
  --border: #433d5c;
}

/* ========== ПРЕДПРОСМОТР В РЕДАКТОРЕ ========== */
.edit-preview {
  background: var(--bg);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 2px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.edit-preview-banner {
  height: 100px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  background-size: cover;
  background-position: center;
  transition: background 0.3s ease;
}

.edit-preview-content {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 0 16px 16px;
  margin-top: -50px;
}

.edit-preview-content .avatar {
  border: 4px solid var(--card);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  flex-shrink: 0;
}

.edit-preview-info {
  flex: 1;
  padding-top: 40px;
}

.edit-preview-name {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.edit-preview-username {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
}

/* Копируемый юзернейм */
.copyable {
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.copyable:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

.copyable:active {
  transform: scale(0.98);
}

.copyable::after {
  content: '📋';
  opacity: 0;
  margin-left: 6px;
  font-size: 12px;
  transition: opacity 0.2s;
}

.copyable:hover::after {
  opacity: 1;
}

/* ========== ДВУХКОЛОНОЧНЫЙ РЕДАКТОР ПРОФИЛЯ ========== */
.edit-page-layout {
  display: flex;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.edit-fields-column {
  flex: 1.2;
  min-width: 300px;
}

.edit-preview-column {
  flex: 1;
  min-width: 320px;
  max-width: 400px;
  position: sticky;
  top: 80px;
  align-self: flex-start;
}

.edit-preview-card {
  overflow: hidden;
}

.edit-preview-card .profile-main {
  margin-top: -50px;
}

.edit-preview-card .profile-name-row {
  font-size: 18px;
}

.edit-preview-card .profile-details {
  padding: 12px 16px;
}

.edit-preview-card .profile-bio-section {
  padding: 0 16px 12px;
}

.edit-preview-card .profile-stats {
  padding: 12px;
}

.edit-preview-card .stat-value {
  font-size: 16px;
}

@media (max-width: 900px) {
  .edit-page-layout {
    flex-direction: column;
  }
  
  .edit-preview-column {
    width: 100%;
    position: static;
    order: -1;
  }
}

/* ========== АНИМАЦИИ ========== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

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

/* Анимации для элементов */
.card {
  animation: slideUp 0.3s ease;
}

.post {
  animation: fadeIn 0.3s ease;
}

.comment {
  animation: slideUp 0.2s ease;
}

.modal.active .modal-content {
  animation: scaleIn 0.2s ease;
}

.menu-overlay.active .menu-panel {
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.notif-panel.active {
  animation: slideUp 0.3s ease;
}

.friend-card:hover {
  animation: pulse 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 600px) {
  .hide-mobile { display: none !important; }
  .content { padding: 12px; padding-bottom: 80px; }
  .card { border-radius: 16px; }
  .profile-header { padding: 20px 12px; }
  .profile-name { font-size: 22px; }
  .admin-table { font-size: 12px; }
  .admin-table th, .admin-table td { padding: 10px 6px; }
  .notif-panel { bottom: 70px; right: 8px; left: 8px; width: auto; }
}
