/* Анимации */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

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

/* Основные цвета */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --text-primary: #000000;
  --text-secondary: #666666;
  --border-color: #e0e0e0;
  --accent-color: #000000;
  --accent-hover: #333333;
}

/* Стили аутентификации */
.sphere-auth {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background: var(--bg-primary);
}

.auth-container {
  width: 100%;
  max-width: 450px;
  text-align: center;
  animation: fadeIn 0.6s ease-out;
}

.logo {
  margin-bottom: 40px;
  animation: slideDown 0.8s ease-out;
}

.logo h1 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.logo p {
  color: var(--text-secondary);
  font-size: 16px;
}

.form-wrapper {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  animation: scaleIn 0.5s ease-out;
  border: 1px solid var(--border-color);
}

.form-header {
  display: flex;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
}

.tab-button {
  flex: 1;
  background: none;
  border: none;
  padding: 15px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.tab-button.active {
  color: var(--text-primary);
}

.tab-button::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.tab-button.active::after {
  width: 100%;
}

.progress-bar {
  margin-bottom: 30px;
  height: 4px;
  background-color: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background-color: var(--accent-color);
  transition: width 0.5s ease-in-out;
  border-radius: 2px;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid var(--border-color);
  color: var(--text-secondary);
}

.step-dot.active {
  background-color: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
  transform: scale(1.1);
}

.auth-form, .step-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: slideUp 0.5s ease-out;
}

.input-group {
  position: relative;
}

.auth-input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 16px;
  transition: all 0.3s ease;
  outline: none;
}

.auth-input:focus {
  border-color: var(--accent-color);
}

.auth-input::placeholder {
  color: #999;
}

/* Загрузка аватарки */
.avatar-upload-options {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.upload-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--bg-secondary);
  min-width: 120px;
}

.upload-option:hover {
  border-color: var(--accent-color);
  background: var(--bg-primary);
}

.upload-option span {
  font-weight: 500;
  color: var(--text-primary);
}

.media-preview {
  margin: 20px 0;
  text-align: center;
}

.preview-media {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.preview-media video {
  border-radius: 8px;
}

.step-buttons {
  display: flex;
  gap: 15px;
}

.auth-button {
  padding: 15px;
  background-color: var(--accent-color);
  color: #ffffff;
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
}

.auth-button:hover:not(:disabled) {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.auth-button:disabled {
  background-color: #999;
  border-color: #999;
  cursor: not-allowed;
}

.auth-button.secondary {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.auth-button.secondary:hover {
  background-color: var(--bg-secondary);
}

/* Социальная сеть */
.social-network {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-primary);
}

/* Десктопная боковая панель */
.sidebar.desktop-only {
  width: 280px;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  padding: 20px 0;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  width: 100%;
}

.nav-item:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: var(--accent-color);
  color: #ffffff;
}

.nav-item span {
  flex: 1;
}

/* Десктопная верхняя панель */
.top-bar.desktop-only {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 280px;
  right: 0;
  z-index: 100;
  height: 70px;
}

.logo-section h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.search-btn {
  padding: 8px;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-secondary);
}

.search-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-clickable {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.user-avatar-clickable:hover {
  transform: scale(1.05);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.user-avatar video {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.username {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.logout-btn {
  padding: 8px 16px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.logout-btn:hover {
  background: var(--bg-secondary);
}

/* Мобильная навигация */
.mobile-nav.mobile-only {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 8px;
  z-index: 1000;
}

.nav-items-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.nav-item-mobile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 11px;
  flex: 1;
  transition: all 0.2s ease;
}

.nav-item-mobile.active {
  color: var(--text-primary);
}

.nav-item-mobile:hover {
  color: var(--text-primary);
}

.nav-icon-mobile {
  width: 24px;
  height: 24px;
}

/* Мобильный хедер */
.mobile-header.mobile-only {
  display: none;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 16px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

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

.mobile-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.mobile-user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Основной контент */
.main-content {
  flex: 1;
  margin-left: 280px;
  margin-top: 70px;
  padding: 0;
  min-height: calc(100vh - 70px);
  background: var(--bg-primary);
}

/* Лента */
.feed {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px;
  width: 100%;
}

/* Создание поста */
.create-post {
  background: var(--bg-primary);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.create-post-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.post-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-input {
  border: none;
  background: none;
  outline: none;
  font-size: 16px;
  resize: none;
  min-height: 60px;
  font-family: inherit;
  line-height: 1.5;
  color: var(--text-primary);
  width: 100%;
}

.post-input::placeholder {
  color: var(--text-secondary);
}

.post-actions-create {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.file-upload-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.file-upload-btn:hover {
  background: var(--bg-secondary);
}

.file-upload-btn input {
  display: none;
}

.post-submit {
  padding: 8px 24px;
  background: var(--accent-color);
  color: #ffffff;
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 14px;
}

.post-submit:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.post-submit:disabled {
  background: #999;
  border-color: #999;
  cursor: not-allowed;
}

.image-preview-create {
  position: relative;
  margin-top: 12px;
}

.image-preview-create img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.remove-image-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Пост */
.post {
  background: var(--bg-primary);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  animation: fadeIn 0.5s ease-out;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.post-user {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.post-user:hover {
  transform: scale(1.05);
}

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.post-avatar video {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

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

.post-username {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
}

.post-username:hover {
  text-decoration: underline;
}

.post-time {
  font-size: 12px;
  color: var(--text-secondary);
}

.post-more-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.post-more-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.post-content {
  margin-bottom: 16px;
  line-height: 1.6;
  color: var(--text-primary);
}

.post-content p {
  margin-bottom: 12px;
}

.post-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 12px;
  border: 1px solid var(--border-color);
}

.post-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.post-actions {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  background: none;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.action-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.action-btn.liked {
  color: #000000;
  border-color: #000000;
}

.action-btn span {
  font-size: 13px;
}

/* Комментарии */
.comments-section {
  margin-top: 16px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.comment {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.comment-avatar video {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.comment-content {
  flex: 1;
  background: var(--bg-secondary);
  padding: 12px;
  border-radius: 8px;
}

.comment-username {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
  display: block;
  color: var(--text-primary);
}

.comment-text {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.comment-time {
  font-size: 11px;
  color: var(--text-secondary);
}

.comment-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.comment-input {
  flex: 1;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 20px;
  outline: none;
  font-size: 14px;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.comment-input:focus {
  border-color: var(--accent-color);
}

.comment-submit {
  padding: 12px 20px;
  background: var(--accent-color);
  color: #ffffff;
  border: 2px solid var(--accent-color);
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.comment-submit:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Пустая лента */
.empty-feed {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.empty-feed p {
  margin-bottom: 8px;
}

.empty-feed p:first-child {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Поиск */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: 2000;
  animation: fadeIn 0.3s ease-out;
}

.search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.search-input-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: 20px;
  border: 2px solid var(--border-color);
}

.search-input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 16px;
  color: var(--text-primary);
}

.close-search {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.close-search:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.search-results {
  padding: 20px;
}

/* Профиль */
.profile-page {
  background: var(--bg-primary);
  min-height: 100vh;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.back-button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.back-button:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.profile-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-banner {
  height: 200px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
}

.banner-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.banner-placeholder:hover {
  color: var(--text-primary);
}

.profile-info {
  padding: 20px;
}

.profile-avatar-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: -60px;
  margin-bottom: 20px;
}

.profile-avatar {
  position: relative;
}

.avatar-media {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.avatar-media video {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.edit-avatar-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--accent-color);
  color: #ffffff;
  border: 2px solid var(--accent-color);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.edit-avatar-btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.edit-avatar-btn input {
  display: none;
}

.edit-profile-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent-color);
  color: #ffffff;
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.edit-profile-btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.profile-details {
  margin-bottom: 20px;
}

.profile-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.profile-username {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.profile-location {
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.profile-stats {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin: 20px 0;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.stat strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat span {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Контент вкладок */
.tab-content {
  padding: 24px;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

.tab-content h2 {
  margin-bottom: 16px;
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.tab-content p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Настройки */
.settings-list {
  background: var(--bg-primary);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

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

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

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch label {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.toggle-switch label:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.toggle-switch input:checked + label {
  background-color: var(--accent-color);
}

.toggle-switch input:checked + label:before {
  transform: translateX(20px);
}

/* Адаптивность */
@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
  
  .mobile-only {
    display: block !important;
  }
  
  .mobile-nav.mobile-only {
    display: block;
  }
  
  .mobile-header.mobile-only {
    display: block;
  }
  
  .main-content {
    margin-left: 0;
    margin-top: 0;
    padding-top: 80px;
    padding-bottom: 70px;
    min-height: 100vh;
  }
  
  .feed, .tab-content {
    padding: 16px;
  }
  
  .create-post, .post {
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
  }
  
  .post-actions-create {
    flex-direction: column;
    align-items: stretch;
  }
  
  .file-upload-btn, .post-submit {
    flex: 1;
    text-align: center;
  }
  
  .action-btn span {
    font-size: 12px;
  }
  
  .comment-form {
    flex-direction: column;
  }
  
  .comment-submit {
    border-radius: 8px;
  }
  
  .profile-avatar-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .profile-stats {
    justify-content: space-around;
  }
}

@media (max-width: 480px) {
  .sphere-auth {
    padding: 16px;
  }
  
  .form-wrapper {
    padding: 20px;
    border-radius: 8px;
  }
  
  .logo h1 {
    font-size: 36px;
  }
  
  .auth-input {
    padding: 12px 16px;
  }
  
  .auth-button {
    padding: 12px;
  }
  
  .step-buttons {
    flex-direction: column;
  }
  
  .avatar-upload-options {
    flex-direction: column;
    align-items: center;
  }
  
  .upload-option {
    width: 100%;
    max-width: 200px;
  }
  
  .mobile-header {
    padding: 8px 12px;
  }
  
  .mobile-header h1 {
    font-size: 18px;
  }
  
  .user-avatar {
    width: 32px;
    height: 32px;
  }
  
  .logout-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .profile-avatar .avatar-media {
    width: 80px;
    height: 80px;
  }
}

/* Сетка постов в профиле */
.profile-posts {
  padding: 20px;
  border-top: 1px solid var(--border-color);
}

.profile-posts h3 {
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.profile-post-preview {
  aspect-ratio: 1;
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.profile-post-preview:hover {
  transform: scale(1.02);
}

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

.text-post-preview {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.text-post-preview p {
  font-size: 12px;
  line-height: 1.4;
}

.no-posts {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

/* Утилиты для скрытия/показа */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

/* Плавные переходы */
* {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* Улучшенная доступность */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Улучшенные скроллбары */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}