﻿:root {
  --bg: #0a0806;
  --bg-2: #12100c;
  --card: #1a1610;
  --accent: #FFB800;
  --accent-2: #E5A000;
  --accent-glow: rgba(255, 184, 0, 0.4);
  --gold-light: #FFD700;
  --gold-dark: #B8860B;
  --cream: #D4A574;
  --muted: #a89f94;
  --text: #f5f0e8;
  --border: #2d2618;
  --shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Скрытие скроллбара */
html {
  overflow-y: scroll; /* Сохраняем прокрутку, но скрываем скроллбар */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE и Edge */
}

html::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

body {
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: linear-gradient(to right, #080604 0%, #0a0806 15%, #0f0d0a 30%, #12100c 50%, #0f0d0a 70%, #0a0806 85%, #080604 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden; /* Скрываем горизонтальный скроллбар */
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* Золотые светящиеся точки на фоне */
.snowflakes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.snowflake {
  position: absolute;
  top: -10px;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 184, 0, 0.9),
              0 0 12px rgba(255, 184, 0, 0.7),
              0 0 18px rgba(255, 184, 0, 0.5);
  animation: snowfall linear infinite;
  opacity: 0.8;
}

@keyframes snowfall {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0.8;
  }
  100% {
    transform: translateY(100vh) translateX(var(--drift));
    opacity: 0;
  }
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(1680px, 96vw);
  margin: 0 auto;
  padding: 24px;
}

/* Header в корпоративном стиле */
.site-header {
  background: linear-gradient(to right, rgba(184, 134, 11, 0.3) 0%, #1a1610 100%) !important; /* Менее золотой слева, коричневый справа */
  border-bottom: 1px solid rgba(255, 184, 0, 0.2);
  position: fixed !important; /* Закрепленная шапка */
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important; /* Во весь экран */
  z-index: 1000 !important;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  margin: 0 !important; /* Убраны отступы */
}

.header-container {
  max-width: min(1680px, 96vw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 84px;
}

.header-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logo {
  width: 73px;
  height: 73px;
  object-fit: contain;
  border-radius: 50%;
  transition: all 0.3s ease;
  /* Золотой неон */
  filter: drop-shadow(0 0 10px rgba(255, 200, 50, 0.9))
          drop-shadow(0 0 20px rgba(255, 180, 0, 0.7))
          drop-shadow(0 0 30px rgba(255, 150, 0, 0.5));
}

.logo-link:hover .logo,
.logo-link:active .logo {
  /* Красный неон при hover/клике */
  filter: drop-shadow(0 0 8px rgba(255, 80, 80, 1))
          drop-shadow(0 0 16px rgba(255, 50, 50, 0.8))
          drop-shadow(0 0 24px rgba(255, 0, 0, 0.6))
          drop-shadow(0 0 32px rgba(200, 0, 0, 0.4));
  transform: scale(1.05);
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  /* Золотой градиент */
  background: linear-gradient(135deg, #ffd700, #ffb800, #ff9500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  transition: all 0.3s ease;
  /* Золотой неон */
  text-shadow: 0 0 10px rgba(255, 200, 50, 0.5);
  filter: drop-shadow(0 0 8px rgba(255, 180, 0, 0.6));
}

.logo-link:hover .logo-text,
.logo-link:active .logo-text {
  /* Красный при hover */
  background: linear-gradient(135deg, #ff4444, #ff0000, #cc0000);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 12px rgba(255, 50, 50, 0.8));
}

/* Навигация по центру */
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.header-nav::-webkit-scrollbar {
  display: none;
}

/* Guest slogan in header center */
.header-slogan {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.slogan-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slogan-text {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #FFD700, #FFB800, #D4A574);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(255, 184, 0, 0.3);
}

.slogan-stage {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--muted);
  font-family: 'SF Mono', 'Fira Code', 'Consolas', 'Courier New', monospace;
  text-transform: uppercase;
  margin-top: 4px;
}

.nav-link {
  padding: 8px 16px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.nav-link.active {
  color: var(--accent);
  background: rgba(255,184,0,0.1);
}

/* Действия справа */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.create-dropdown {
  position: relative;
}

.btn-create {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--accent), var(--gold-dark));
  color: #0a0806;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-create:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.create-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
}

.create-menu a {
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.2s;
}

.create-menu a:last-child {
  border-bottom: none;
}

.create-menu a:hover {
  background: rgba(255,255,255,0.05);
}

.create-dropdown.open .create-menu {
  display: flex;
}

.token-display {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}

.token-label {
  color: var(--muted);
  font-weight: 500;
}

.token-value {
  color: var(--accent-2);
  font-weight: 700;
}

.auth-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-profile {
  padding: 8px 16px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-profile:hover {
  background: rgba(255,255,255,0.08);
}

.btn-signin {
  padding: 8px 16px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-signin:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--accent);
}

.btn-logout {
  padding: 8px 16px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: rgba(255,100,100,0.1);
  border-color: #ff6b6b;
  color: #ff6b6b;
}

/* User Dropdown Menu */
.user-dropdown {
  position: relative;
}

.user-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.user-dropdown-trigger:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--accent);
}

.user-dropdown.open .user-dropdown-trigger {
  background: rgba(255,184,0,0.1);
  border-color: var(--accent);
}

.user-avatar {
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar svg {
  width: 16px;
  height: 16px;
}

.user-name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-arrow {
  font-size: 10px;
  color: var(--muted);
  transition: transform 0.2s;
}

.user-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow), 0 10px 40px rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  overflow: hidden;
}

.user-dropdown.open .user-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background: rgba(255,255,255,0.05);
}

.dropdown-item.token-balance {
  cursor: default;
  background: rgba(255,184,0,0.05);
}

.dropdown-item.token-balance:hover {
  background: rgba(255,184,0,0.08);
}

.dropdown-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dropdown-icon svg {
  width: 16px;
  height: 16px;
  transition: filter 0.3s;
}

.dropdown-item:hover .dropdown-icon svg {
  filter: drop-shadow(0 0 4px rgba(255,184,0,0.8));
}

.dropdown-label {
  flex: 1;
}

.dropdown-value {
  font-weight: 700;
  color: var(--accent);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.dropdown-item.admin-item {
  color: var(--accent-2);
  display: none; /* Скрыто по умолчанию, показывается только для администраторов через JS */
}

.dropdown-item.admin-item:hover {
  background: rgba(245,193,72,0.1);
}

.dropdown-item.logout-item {
  color: #ff6b6b;
}

.dropdown-item.logout-item:hover {
  background: rgba(255,100,100,0.1);
}

/* Hide old token display when using dropdown */
.token-display.header-hidden {
  display: none !important;
}

/* Hide Sign In button when user dropdown is visible */
.auth-section .user-dropdown[style*="block"] ~ .btn-signin,
.auth-section .user-dropdown:not([style*="none"]) ~ .btn-signin {
  display: none !important;
}

button, .cta-btn {
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--accent), var(--gold-dark));
  color: #0a0806;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
button:hover, .cta-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px var(--accent-glow); }
button.soft, .cta-btn.soft { background: rgba(255,255,255,0.05); color: var(--text); }
button.ghost, .cta-btn.ghost { background: transparent; color: var(--text); }

/* Удалены старые стили навигации - теперь используется header-nav */

.content {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 24px;
}

/* Блоки контента в стиле Civitai */
.content-section {
  width: 100%;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.section-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 0;
  line-height: 1.5;
}

.section-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s;
}

.section-link:hover {
  color: var(--accent-2);
}

.card {
  background: linear-gradient(180deg, rgba(26, 22, 16, 0.98), rgba(18, 16, 12, 0.96));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  width: 100%;
}

.hero h1 {
  margin: 6px 0 8px;
  font-size: 32px;
  font-weight: 700;
}

.eyebrow {
  color: var(--accent-2);
  text-transform: uppercase;
  font-weight: 800;
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.lede {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  font-size: 15px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-head .muted {
  margin: 0;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

input { width: 100%; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); margin: 6px 0; font-size: 13px; }

/* Сетка карточек в стиле Civitai (3-4 колонки) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

@media (min-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 600px) and (max-width: 899px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 599px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
.preview-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(18,26,41,0.9), rgba(12,18,28,0.9));
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  aspect-ratio: 1 / 1;
}

.preview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(245,193,72,0.3);
  border-color: rgba(245,193,72,0.3);
}
.badge-type {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 11px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.1);
}
.badge-type.video { color: var(--accent); }
.badge-type.image { color: var(--accent-2); }
.preview-media {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.06), transparent 45%),
    linear-gradient(135deg, #121a29, #0b1119);
  position: relative;
}

.preview-media img,
.preview-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.preview-media .ph {
  width: 100%;
  height: 100%;
  color: var(--muted);
  display: grid;
  place-items: center;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-size: 12px;
}
.card-meta {
  padding: 12px;
  background: rgba(0,0,0,0.3);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.card-meta .title {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta .muted {
  margin: 4px 0 0;
  font-size: 12px;
}

.attachment-card .attachment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.attachment-body {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.attachment-media {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.06), transparent 45%), linear-gradient(135deg, #1a1610, #12100c);
}
.attachment-media img {
  width: 100%;
  display: block;
  height: auto;
}
.attachment-meta p { margin: 4px 0; }
.badge-type.rating {
  position: static;
  display: inline-block;
  margin-left: 8px;
}
.nsfw-blur {
  filter: blur(14px);
  pointer-events: none;
}
.auth-modal,
.nsfw {
  position: relative;
}
code { padding: 3px 6px; background: rgba(255,255,255,0.06); border-radius: 6px; border: 1px solid var(--border); color: var(--accent-2); }

.footer { margin-top: 14px; text-align: center; color: var(--muted); font-size: 13px; }

.auth-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: auto;
}
.auth-modal.open { display: flex; }
.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}
.auth-modal__panel {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  width: min(480px, 92vw);
  box-shadow: var(--shadow);
  z-index: 1;
}
.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  color: var(--text);
  border: none;
  cursor: pointer;
  font-size: 16px;
}
.modal-tabs {
  display: flex;
  gap: 8px;
  margin: 4px 0 10px;
}
.modal-tabs .tab {
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}
.modal-tabs .tab.active {
  background: linear-gradient(135deg, var(--accent), var(--gold-dark));
  color: #0a0806;
}
.modal-body { margin-top: 4px; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.auth-modal form input[type=\"text\"],
.auth-modal form input[type=\"password\"],
.auth-modal form input[type=\"submit\"] {
  width: 100%;
  margin: 6px 0;
}
.auth-modal form input[type=\"submit\"] {
  padding: 9px 10px;
}

/* Адаптивность для header */
@media (max-width: 1024px) {
  .header-container {
    padding: 0 16px;
    gap: 12px;
  }
  
  .header-nav {
    gap: 2px;
  }
  
  .nav-link {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .token-display {
    display: none; /* Скрываем токены на мобильных */
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
  }
  
  .header-nav {
    order: 3;
    width: 100%;
    margin-top: 8px;
    justify-content: flex-start;
    padding-bottom: 8px;
  }
  
  .header-actions {
    flex: 1;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .header-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .btn-create,
  .btn-signin,
  .btn-profile {
    width: 100%;
  }
}

/* Messages Button */
.btn-messages {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: all 0.3s;
}
.btn-messages:hover {
  border-color: var(--accent);
  background: rgba(255,184,0,0.1);
}
.messages-icon {
  font-size: 16px;
}
.messages-badge {
  background: var(--accent);
  color: var(--bg);
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Language Selector */
.language-selector {
  position: relative;
}

.btn-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: all 0.3s;
}

.btn-lang:hover {
  border-color: var(--accent);
  background: rgba(255,184,0,0.1);
}

.lang-icon {
  font-size: 16px;
}

.lang-code {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 1000;
  display: none;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
}

.lang-option:hover {
  background: rgba(255,255,255,0.05);
}

.lang-option:active {
  background: rgba(255,184,0,0.1);
}

.lang-flag {
  font-size: 18px;
}

.lang-name {
  font-weight: 500;
}

.language-selector.open .lang-dropdown {
  display: block;
}

/* Messages Sidebar */
.messages-sidebar {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100vh;
  background: var(--card);
  border-right: 1px solid var(--border);
  z-index: 1000;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
}
.messages-sidebar.open {
  left: 0;
}
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-header h3 {
  margin: 0;
  font-size: 18px;
}
.sidebar-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
}
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.empty-chats {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
}
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  display: none;
}
.sidebar-overlay.show {
  display: block;
}

/* Chat Items */
.chat-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.2s;
  margin-bottom: 4px;
  position: relative;
}
.chat-item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.chat-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  margin-right: 12px;
}
.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FFB800 0%, #B8860B 100%);
  color: var(--bg);
  font-size: 20px;
  font-weight: bold;
  text-transform: uppercase;
}
.online-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border: 2px solid var(--card);
  border-radius: 50%;
}
.chat-info {
  flex: 1;
  min-width: 0;
}
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.chat-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-time {
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
  margin-left: 8px;
}
.chat-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}
.preview-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.delivery-status {
  margin-left: 8px;
  color: var(--accent);
  font-size: 12px;
}
.unread-badge {
  position: absolute;
  top: 12px;
  right: 16px;
  background: var(--accent);
  color: #0a0806;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* Expanded Chat */
.expanded-chat {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--card);
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.expanded-chat.hidden {
  display: none;
}
.expanded-chat-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.back-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--foreground);
  padding: 0;
  line-height: 1;
}
.expanded-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}
.expanded-chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.expanded-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FFB800 0%, #B8860B 100%);
  color: var(--bg);
  font-size: 18px;
  font-weight: bold;
  text-transform: uppercase;
}
.expanded-chat-name {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.expanded-chat-actions {
  display: flex;
  gap: 8px;
}
.chat-action-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
}
.chat-action-btn:hover {
  color: var(--foreground);
}
.expanded-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.loading, .no-messages {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
}
.message {
  display: flex;
  max-width: 80%;
  animation: messageSlide 0.2s ease-out;
}
@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.message.own-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.message.other-message {
  align-self: flex-start;
}
.message-content {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 14px;
  border-radius: 16px;
  max-width: 100%;
  word-wrap: break-word;
}
.own-message .message-content {
  background: linear-gradient(135deg, var(--accent), var(--gold-dark));
  color: #0a0806;
  border-bottom-right-radius: 4px;
}
.other-message .message-content {
  background: rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 4px;
}
.message-content p {
  margin: 0 0 4px 0;
}
.message-time {
  font-size: 11px;
  opacity: 0.7;
  display: block;
  text-align: right;
}
.message-image {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 4px;
  cursor: pointer;
}
.expanded-chat-input {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  gap: 12px;
}
.expanded-chat-input input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 16px;
  color: var(--foreground);
  font-size: 14px;
}
.expanded-chat-input input:focus {
  outline: none;
  border-color: var(--accent);
}
.send-btn {
  background: linear-gradient(135deg, var(--accent), var(--gold-dark));
  border: none;
  color: #0a0806;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, box-shadow 0.2s;
}
.send-btn:hover {
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* Fix header right side - horizontal layout */
.header-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
}
.create-dropdown {
  display: inline-block;
}

/* Creation Sidebar - глобальные стили для всех страниц */
.creation-sidebar {
  position: fixed !important;
  right: 0 !important;
  left: auto !important;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  padding-right: 0;
  min-width: 48px;
  align-items: flex-end;
  width: auto;
}

.creation-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-right: none;
  border-left: 1px solid var(--border);
  border-radius: 16px 0 0 16px;
  padding: 12px 8px 12px 8px;
  text-decoration: none;
  color: var(--text);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
             padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
             justify-content 0.4s cubic-bezier(0.4, 0, 0.2, 1),
             border-color 0.3s,
             background 0.3s,
             box-shadow 0.3s,
             filter 0.3s;
  pointer-events: auto;
  width: 48px;
  min-width: 48px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

.creation-tab:hover {
  width: 200px;
  min-width: 200px;
  padding-left: 16px;
  background: linear-gradient(135deg, #1f1a12, #1a1610);
  justify-content: flex-start;
  border-color: #FFB800;
  box-shadow:
    0 0 20px rgba(255,184,0,0.6),
    0 0 40px rgba(255,184,0,0.4),
    0 0 60px rgba(255,184,0,0.2),
    0 4px 20px rgba(0,0,0,0.3);
  filter: drop-shadow(0 0 8px rgba(255,184,0,0.8));
  z-index: 1001;
}

.creation-tab.active {
  border-color: #FFB800;
  background: linear-gradient(135deg, rgba(255,184,0,0.08), rgba(255,215,0,0.05));
  box-shadow: 0 0 10px rgba(255,184,0,0.3);
}

.creation-tab.active:hover {
  width: 200px;
  min-width: 200px;
  padding-left: 16px;
  background: #0a0806;
  justify-content: flex-start;
  box-shadow:
    0 0 20px rgba(255,184,0,0.6),
    0 0 40px rgba(255,184,0,0.4),
    0 0 60px rgba(255,184,0,0.2),
    0 4px 20px rgba(0,0,0,0.3);
  filter: drop-shadow(0 0 8px rgba(255,184,0,0.8));
  z-index: 1001;
}

.creation-tab .tab-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s, filter 0.3s;
}

.creation-tab .tab-icon svg {
  width: 24px;
  height: 24px;
  transition: filter 0.3s;
}

.creation-tab:hover .tab-icon {
  transform: scale(1.15);
}

.creation-tab.active .tab-icon {
  transform: scale(1.05);
}

.creation-tab.active:hover .tab-icon {
  transform: scale(1.15);
}

.creation-tab:hover .tab-icon svg {
  filter: drop-shadow(0 0 6px rgba(255,184,0,0.9)) drop-shadow(0 0 12px rgba(255,215,0,0.6));
}

.creation-tab.active .tab-icon svg {
  filter: drop-shadow(0 0 4px rgba(255,184,0,0.6));
}

.creation-tab.active:hover .tab-icon svg {
  filter: drop-shadow(0 0 6px rgba(255,184,0,0.9)) drop-shadow(0 0 12px rgba(255,215,0,0.6));
}

.creation-tab .tab-content {
  margin-left: 12px;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s 0.1s;
  white-space: nowrap;
  overflow: hidden;
}

.creation-tab:hover .tab-content {
  opacity: 1;
  transform: translateX(0);
}

.creation-tab.active .tab-content {
  opacity: 0;
  transform: translateX(-10px);
}

.creation-tab.active:hover .tab-content {
  opacity: 1;
  transform: translateX(0);
}

.creation-tab .tab-content h3 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.creation-tab .tab-content p {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

@media (max-width: 768px) {
  .creation-sidebar {
    display: none;
  }
}

/* ============================================
   TABS STYLES (Posts/Tweets)
   ============================================ */

.tabs-container {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  bottom: -1px;
}

.tab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ============================================
   FEED STYLES (Posts/Tweets List)
   ============================================ */

.feed-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feed-card {
  background: linear-gradient(180deg, rgba(26, 22, 16, 0.98), rgba(18, 16, 12, 0.96));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

.feed-card:hover {
  border-color: rgba(255, 184, 0, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.feed-card-tweet {
  border-left: 3px solid var(--accent);
}

.feed-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.feed-card-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feed-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: #0a0806;
  flex-shrink: 0;
}

.feed-card-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feed-card-author-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

.feed-card-date {
  font-size: 13px;
  color: var(--muted);
}

.feed-card-content {
  margin-bottom: 16px;
  line-height: 1.6;
}

.feed-card-content p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  word-wrap: break-word;
}

.feed-card-footer {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.feed-card-action {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.feed-card-action:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.feed-card-action span:first-child {
  font-size: 18px;
}

.feed-card-action-count {
  font-size: 13px;
  font-weight: 600;
}

.feed-card.placeholder {
  text-align: center;
  padding: 40px 20px;
  opacity: 0.6;
}

.feed-card.placeholder p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .tabs-container {
    gap: 4px;
  }
  
  .tab-btn {
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .feed-card {
    padding: 16px;
  }
  
  .feed-card-footer {
    gap: 16px;
  }
}
