﻿/* ===========================
   ЦВЕТОВАЯ ПАЛИТРА (не менять)
=========================== */
:root {
  --bg-deep:    #1a1209;
  --bg-base:    #241a0e;
  --bg-card:    #2e2012;
  --bg-hover:   #3a2918;
  --border:     #4a3520;
  --text-main:  #e8d5b0;
  --text-muted: #9e8060;
  --accent:     #c8860a;
  --accent-lit: #e8a020;
  --amber:      #f0b942;
  --wood-light: #6b4c2a;
  --danger:     #e05a2b;
}

/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-deep);
  color: var(--text-main);
  font-size: 14px;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; }
.hidden { display: none !important; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--wood-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===========================
   APP LAYOUT — 3 колонки
   left-sidebar | center-feed | right-panel
=========================== */
.app-layout {
  display: grid;
  grid-template-columns: 220px 1fr 280px;
  grid-template-rows: 100vh;
  min-height: 100vh;
}

/* ===========================
   LEFT SIDEBAR
=========================== */
.left-sidebar {
  grid-column: 1;
  background: var(--bg-base);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 0;
}

.ls-logo {
  padding: 0 20px 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.logo-text {
  font-size: 22px;
  font-family: 'Georgia', serif;
  font-style: italic;
  font-weight: bold;
  background: linear-gradient(45deg, var(--accent), var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ls-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
  flex: 1;
}

.ls-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  transition: background 0.18s, color 0.18s;
  position: relative;
}

.ls-nav-item i {
  font-size: 18px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

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

.ls-nav-item.active {
  background: var(--bg-card);
  color: var(--amber);
  border-left: 3px solid var(--accent);
}

.ls-nav-item.ls-create {
  color: var(--accent);
  font-weight: 700;
}

.ls-nav-item.ls-logout {
  color: var(--text-muted);
}

.ls-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
}

.ls-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}

.ls-bottom {
  padding: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ===========================
   CENTER FEED
=========================== */
.center-feed {
  grid-column: 2;
  overflow-y: auto;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* STORIES */
.stories-bar {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
  scrollbar-width: none;
  flex-shrink: 0;
}
.stories-bar::-webkit-scrollbar { display: none; }

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.18s;
}
.story-item:hover { transform: translateY(-2px); }

.story-ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(45deg, var(--accent), var(--amber));
}
.story-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--bg-card);
}
.story-item span {
  font-size: 11px;
  color: var(--text-muted);
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* POST */
.post {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 20px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.post:hover { box-shadow: 0 4px 20px rgba(200,134,10,0.1); }

.post-header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 10px;
}
.post-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}
.post-header-info { flex: 1; min-width: 0; }
.post-username {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  display: block;
}
.post-username:hover { color: var(--amber); }
.post-location {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}
.post-location i { font-size: 10px; margin-right: 3px; }
.post-time {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.post-more {
  font-size: 16px;
  color: var(--text-muted);
  padding: 4px;
  flex-shrink: 0;
  transition: color 0.2s;
}
.post-more:hover { color: var(--text-main); }

.post-image {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 6px;
}
.post-actions-left { display: flex; gap: 6px; }

.act-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-hover);
  border: none;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  transition: background 0.18s, color 0.18s;
}
.act-btn:hover { background: var(--border); color: var(--text-main); }
.act-btn i { font-size: 15px; }
.act-btn.liked { color: var(--danger); }
.act-btn.liked i::before { font-weight: 900; }

.post-caption {
  padding: 6px 16px 4px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-main);
}

.post-add-comment {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.post-add-comment input {
  flex: 1;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 14px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s;
}
.post-add-comment input::placeholder { color: var(--text-muted); }
.post-add-comment input:focus { border-color: var(--accent); }
.post-add-comment button {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  transition: color 0.18s;
}
.post-add-comment button:hover { color: var(--amber); }

/* ===========================
   RIGHT PANEL
=========================== */
.right-panel {
  grid-column: 3;
  background: var(--bg-base);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.rp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.rp-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rp-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}
.rp-profile-info { flex: 1; min-width: 0; }
.rp-username {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rp-username:hover { color: var(--amber); }
.rp-name {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
}
.rp-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  transition: color 0.18s;
}
.rp-link:hover { color: var(--amber); }

.rp-stats {
  display: flex;
  justify-content: space-around;
  text-align: center;
}
.rp-stat { display: flex; flex-direction: column; gap: 2px; }
.rp-stat-n { font-size: 18px; font-weight: 700; color: var(--amber); }
.rp-stat-l { font-size: 11px; color: var(--text-muted); }

.rp-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.rp-section-title span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rp-section-title a {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  transition: color 0.18s;
}
.rp-section-title a:hover { color: var(--amber); }

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.suggestion-item:last-child { margin-bottom: 0; }
.suggestion-item img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.suggestion-username {
  font-weight: 600;
  font-size: 13px;
  display: block;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggestion-reason {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}
.follow-btn {
  margin-left: auto;
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s;
}
.follow-btn:hover { background: var(--accent); color: #fff; }
.follow-btn.following {
  border-color: var(--border);
  color: var(--text-muted);
}

.rp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rp-tag {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.rp-tag:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.rp-footer {
  font-size: 11px;
  color: var(--wood-light);
  text-align: center;
  padding-top: 8px;
  margin-top: auto;
}

/* ===========================
   PROFILE PAGE
=========================== */
.profile-area {
  grid-column: 2 / 4;   /* занимает центр + правую область */
  overflow-y: auto;
  padding-bottom: 40px;
}

/* Cover */
.profile-cover {
  position: relative;
  margin-bottom: 0;
}
.cover-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.profile-header-card {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  padding: 0 32px 20px;
  background: linear-gradient(to top, var(--bg-base) 60%, transparent);
  margin-top: -80px;
  position: relative;
}
.profile-avatar-wrap { flex-shrink: 0; }
.profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-base);
  box-shadow: 0 0 0 3px var(--accent);
}
.profile-info { flex: 1; padding-bottom: 4px; }
.profile-top-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.profile-top-row h2 { font-size: 22px; font-weight: 600; color: var(--text-main); }
.profile-edit-btn {
  padding: 7px 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  transition: background 0.18s, border-color 0.18s;
}
.profile-edit-btn:hover { background: var(--bg-hover); border-color: var(--accent); }
.profile-settings-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  transition: color 0.18s;
}
.profile-settings-btn:hover { color: var(--amber); }
.profile-bio {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.profile-stats {
  display: flex;
  gap: 28px;
}
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.stat-number { font-size: 17px; font-weight: 700; color: var(--text-main); }
.stat-label { font-size: 12px; color: var(--text-muted); }

/* Highlights */
.profile-highlights {
  display: flex;
  gap: 20px;
  padding: 16px 32px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-base);
  overflow-x: auto;
  scrollbar-width: none;
}
.profile-highlights::-webkit-scrollbar { display: none; }
.highlight-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.18s;
}
.highlight-item:hover { transform: translateY(-2px); }
.highlight-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  padding: 2px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.highlight-ring:hover { border-color: var(--amber); box-shadow: 0 0 14px rgba(240,185,66,0.25); }
.highlight-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.hl-add { background: var(--bg-hover); color: var(--text-muted); font-size: 22px; }
.highlight-item span { font-size: 11px; color: var(--text-muted); }

/* Tabs */
.profile-tabs {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  background: var(--bg-base);
}
.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 14px 24px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  transition: color 0.15s;
}
.tab-btn.active { border-bottom-color: var(--amber); color: var(--text-main); }
.tab-btn:hover { color: var(--text-main); }

/* Grid */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: var(--bg-deep);
}
.grid-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
}
.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.2s, transform 0.3s;
}
.grid-item:hover img { filter: brightness(0.5) sepia(0.3); transform: scale(1.04); }
.grid-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  transition: opacity 0.2s;
  color: var(--amber);
  font-weight: 700;
  font-size: 15px;
}
.grid-item:hover .grid-overlay { opacity: 1; }
.grid-overlay span { display: flex; align-items: center; gap: 6px; }

/* ===========================
   POST MODAL
=========================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}
.modal-content {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  max-width: 880px;
  width: 90%;
  max-height: 88vh;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7);
}
.modal-image { width: 55%; object-fit: cover; }
.modal-right {
  width: 45%;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--bg-card);
}
.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.modal-header strong { color: var(--text-main); }
.modal-comments {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}
.modal-comment { font-size: 14px; line-height: 1.5; color: var(--text-main); }
.modal-comment strong { color: var(--amber); margin-right: 6px; }
.modal-actions {
  display: flex;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-bottom: 12px;
}
.action-icon {
  font-size: 22px;
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.15s, color 0.15s;
}
.action-icon:hover { transform: scale(1.15); color: var(--amber); }
.action-icon.liked { color: var(--danger); }
.modal-add-comment { display: flex; gap: 8px; }
.modal-add-comment input {
  flex: 1;
  border: none;
  border-bottom: 1px solid var(--border);
  outline: none;
  font-size: 14px;
  padding-bottom: 4px;
  background: transparent;
  color: var(--text-main);
}
.modal-add-comment input::placeholder { color: var(--text-muted); }
.modal-add-comment button {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 700;
  transition: color 0.18s;
}
.modal-add-comment button:hover { color: var(--amber); }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,0.5);
  border: none;
  font-size: 18px;
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 301;
  transition: background 0.18s;
}
.modal-close:hover { background: var(--accent); }

/* ===========================
   AUTH PAGE
=========================== */
.auth-page {
  background: var(--bg-deep);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 360px;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 40px 36px 28px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.auth-logo {
  font-family: 'Georgia', serif;
  font-style: italic;
  font-size: 36px;
  text-align: center;
  margin-bottom: 28px;
  background: linear-gradient(45deg, var(--accent), var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.5;
}
.auth-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 10px;
  outline: none;
  color: var(--text-main);
  transition: border-color 0.15s;
}
.auth-input::placeholder { color: var(--text-muted); }
.auth-input:focus { border-color: var(--accent); background: var(--bg-hover); }
.auth-password-wrap { position: relative; margin-bottom: 10px; }
.auth-password-wrap .auth-input { width: 100%; margin-bottom: 0; padding-right: 76px; }
.auth-show-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  transition: color 0.18s;
}
.auth-show-pass:hover { color: var(--amber); }
.auth-btn {
  width: 100%;
  padding: 11px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  margin-top: 8px;
  transition: background 0.2s, transform 0.1s;
}
.auth-btn:hover { background: var(--accent-lit); transform: translateY(-1px); }
.auth-btn:active { transform: translateY(0); }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-fb-btn {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px;
  transition: color 0.18s;
}
.auth-fb-btn:hover { color: var(--amber); }
.auth-forgot { display: block; text-align: center; font-size: 12px; color: var(--accent); margin-top: 14px; }
.auth-terms { font-size: 11px; color: var(--text-muted); text-align: center; margin: 12px 0; line-height: 1.5; }
.auth-terms a { color: var(--text-muted); font-weight: 600; }
.auth-switch-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  font-size: 14px;
  width: 100%;
  color: var(--text-main);
}
.auth-switch-card a { color: var(--accent); font-weight: 700; }
.auth-switch-card a:hover { color: var(--amber); }
.auth-app { text-align: center; padding: 20px 0; }
.auth-app p { margin-bottom: 12px; font-size: 14px; color: var(--text-muted); }
.auth-app-badges { display: flex; justify-content: center; gap: 10px; }
.auth-app-badges img { height: 34px; width: auto; opacity: 0.65; transition: opacity 0.18s; }
.auth-app-badges img:hover { opacity: 1; }

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1100px) {
  .app-layout { grid-template-columns: 220px 1fr; }
  .right-panel { display: none; }
  .profile-area { grid-column: 2; }
}

@media (max-width: 700px) {
  .app-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .left-sidebar {
    grid-column: 1;
    grid-row: 3;
    height: auto;
    flex-direction: row;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 0;
    border-right: none;
    border-top: 1px solid var(--border);
    z-index: 100;
  }
  .ls-logo, .ls-bottom, .ls-nav span, .ls-badge { display: none; }
  .ls-nav {
    flex-direction: row;
    justify-content: space-around;
    padding: 8px 0;
    width: 100%;
  }
  .ls-nav-item { flex-direction: column; gap: 0; padding: 6px 10px; font-size: 20px; border-radius: 0; }
  .ls-nav-item.active { border-left: none; border-top: 2px solid var(--accent); }
  .center-feed { grid-column: 1; padding: 12px; padding-bottom: 70px; }
  .profile-area { grid-column: 1; padding-bottom: 70px; }
  .profile-header-card { flex-direction: column; align-items: flex-start; padding: 16px; }
  .profile-grid { grid-template-columns: repeat(3, 1fr); }
  .modal-content { flex-direction: column; }
  .modal-image { width: 100%; max-height: 55vw; }
  .modal-right { width: 100%; }
}


/* ===========================
   EMPTY STATES
=========================== */
.empty-feed {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  gap: 16px;
}
.empty-feed-icon i {
  font-size: 72px;
  color: var(--border);
}
.empty-feed h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-main);
}
.empty-feed p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}
.empty-feed-btn {
  margin-top: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s;
}
.empty-feed-btn:hover { background: var(--accent-lit); }

.profile-empty-grid {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  gap: 14px;
  text-align: center;
}
.profile-empty-grid i {
  font-size: 56px;
  color: var(--border);
}
.profile-empty-grid h3 {
  font-size: 18px;
  color: var(--text-main);
}
.profile-empty-grid p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 280px;
}

/* ===========================
   RIGHT PANEL — empty suggest
=========================== */
.rp-empty-suggest {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 0 8px;
  text-align: center;
}
.rp-empty-suggest i {
  font-size: 32px;
  color: var(--border);
}
.rp-empty-suggest p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===========================
   RIGHT PANEL — avatar icon
=========================== */
.rp-avatar-wrap {
  flex-shrink: 0;
}
.rp-avatar-icon {
  font-size: 48px;
  color: var(--wood-light);
}
.rp-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

/* ===========================
   PROFILE — avatar icon fallback
=========================== */
.profile-avatar-icon {
  font-size: 110px;
  color: var(--wood-light);
  display: block;
}
.post-avatar-icon {
  font-size: 42px;
  color: var(--wood-light);
  flex-shrink: 0;
}
.comment-avatar-icon {
  font-size: 28px;
  color: var(--wood-light);
  flex-shrink: 0;
}

/* ===========================
   PROFILE COVER — placeholder
=========================== */
.cover-placeholder {
  width: 100%;
  height: 180px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cover-edit-btn {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s;
}
.cover-edit-btn:hover { color: var(--text-main); border-color: var(--accent); }

/* ===========================
   PROFILE HEADER CARD (новый стиль без cover img)
=========================== */
.profile-header-card {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  padding: 24px 32px;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border);
}
.profile-avatar-wrap {
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
}
.avatar-edit-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s;
  color: #fff;
  font-size: 20px;
}
.profile-avatar-wrap:hover .avatar-edit-overlay { opacity: 1; }

/* ===========================
   POST MENU
=========================== */
.post-menu {
  position: absolute;
  right: 16px;
  top: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  z-index: 50;
  min-width: 140px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.post-menu button {
  width: 100%;
  background: none;
  border: none;
  color: var(--danger);
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s;
}
.post-menu button:hover { background: var(--bg-hover); }
.post-header { position: relative; }

/* ===========================
   CREATE POST MODAL
=========================== */
.create-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  width: 90%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7);
}
.create-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.create-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}
.create-upload-area {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: border-color 0.18s, background 0.18s;
}
.create-upload-area:hover { border-color: var(--accent); background: var(--bg-hover); }
.create-upload-area i { font-size: 40px; margin-bottom: 10px; display: block; }
.create-upload-area p { font-size: 14px; margin-bottom: 4px; }
.create-upload-area span { font-size: 11px; color: var(--wood-light); }
.create-preview {
  width: 100%;
  border-radius: 10px;
  max-height: 340px;
  object-fit: cover;
}
.create-caption {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 14px;
  resize: vertical;
  min-height: 70px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.18s;
}
.create-caption::placeholder { color: var(--text-muted); }
.create-caption:focus { border-color: var(--accent); }
.create-submit-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s;
}
.create-submit-btn:hover { background: var(--accent-lit); }

/* ===========================
   EDIT PROFILE MODAL
=========================== */
.edit-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  width: 90%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7);
}
.edit-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* ===========================
   AUTH ERROR
=========================== */
.auth-error {
  background: rgba(224,90,43,0.15);
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 4px;
}

/* ===========================
   GAMES PAGE
=========================== */
.games-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.games-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}
.games-title i { color: var(--accent); }
.games-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow 0.2s;
}
.game-card:hover { box-shadow: 0 4px 20px rgba(200,134,10,0.12); }
.game-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.game-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
}
.game-card-info { flex: 1; }
.game-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.game-card-meta {
  font-size: 12px;
  color: var(--text-muted);
}
.game-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.game-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  text-decoration: none;
}
.game-btn-play {
  background: var(--accent);
  color: #fff;
}
.game-btn-play:hover { background: var(--accent-lit); }
.game-btn-share {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.game-btn-share:hover { color: var(--amber); border-color: var(--amber); }
.game-btn-delete {
  background: rgba(224,90,43,0.12);
  border: 1px solid rgba(224,90,43,0.3);
  color: var(--danger);
  padding: 8px 12px;
  margin-left: auto;
}
.game-btn-delete:hover { background: var(--danger); color: #fff; }
.game-btn-add {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.game-btn-add:hover { color: var(--amber); border-color: var(--amber); }

/* Create Game Modal */
.create-game-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7);
}
.game-card-edit {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.game-card-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.game-card-num {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-card-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.18s;
}
.game-card-remove:hover { color: var(--danger); }
.game-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  gap: 10px;
}

/* ===========================
   GAMES PLAY PAGE
=========================== */
.games-play-body {
  background: var(--bg-deep);
  min-height: 100vh;
  display: flex;
  justify-content: center;
}
.games-play-wrap {
  width: 100%;
  max-width: 780px;
  padding: 32px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.games-play-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.games-play-title {
  flex: 1;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.games-play-counter {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}
.games-play-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 560px) {
  .games-play-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* Card flip */
.play-card {
  perspective: 800px;
  cursor: pointer;
  aspect-ratio: 1;
}
.play-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.4, 0.2, 0.2, 1);
  border-radius: 14px;
}
.play-card.flipped .play-card-inner { transform: rotateY(180deg); }
.play-card-front,
.play-card-back {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.play-card-front {
  background: var(--bg-card);
  border: 2px solid var(--border);
  transition: border-color 0.2s;
}
.play-card:hover .play-card-front { border-color: var(--accent); }
.play-card-num {
  font-size: clamp(32px, 8vw, 56px);
  font-weight: 900;
  color: var(--amber);
  font-family: 'Georgia', serif;
}
.play-card-back {
  background: var(--bg-hover);
  border: 2px solid var(--accent);
  transform: rotateY(180deg);
  text-align: center;
}
.play-card-back p {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.5;
  word-break: break-word;
}
.games-play-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.not-auth-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 14px;
  color: var(--text-muted);
  flex-wrap: wrap;
  text-align: center;
}
.not-auth-banner i { color: var(--amber); font-size: 18px; }
.not-auth-banner a {
  font-weight: 700;
  color: var(--accent);
  transition: color 0.18s;
}
.not-auth-banner a:hover { color: var(--amber); }


/* ===========================
   SHARE PROFILE BUTTON
=========================== */
.profile-share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1px solid var(--accent);
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.profile-share-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* ===========================
   SHARE MODAL
=========================== */
.share-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7);
}

/* Превью профиля внутри модалки */
.share-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.share-preview-avatar {
  flex-shrink: 0;
}
.share-preview-avatar i {
  font-size: 48px;
  color: var(--wood-light);
}
.share-preview-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}
.share-preview-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.share-preview-info strong {
  font-size: 15px;
  color: var(--text-main);
}
.share-preview-info span {
  font-size: 13px;
  color: var(--text-muted);
}

/* Поле со ссылкой */
.share-link-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}
.share-link-input {
  flex: 1;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text-muted);
  font-size: 12px;
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
}
.share-copy-btn {
  flex-shrink: 0;
  padding: 9px 14px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.share-copy-btn:hover {
  border-color: var(--accent);
  color: var(--amber);
}

/* Кнопки шаринга */
.share-buttons {
  display: flex;
  gap: 10px;
}
.share-btn {
  flex: 1;
  padding: 9px 8px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity 0.18s, transform 0.1s;
}
.share-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.share-btn-tg     { background: #2CA5E0; color: #fff; }
.share-btn-wa     { background: #25D366; color: #fff; }
.share-btn-native { background: var(--bg-hover); border: 1px solid var(--border); color: var(--text-main); }

.share-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* ===========================
   TOAST NOTIFICATION
=========================== */
.share-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  border: 1px solid var(--accent);
  color: var(--amber);
  padding: 10px 24px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  z-index: 500;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  white-space: nowrap;
}
.share-toast.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===========================
   PUBLIC PROFILE PAGE (user.html)
=========================== */
.public-profile-page {
  background: var(--bg-deep);
  min-height: 100vh;
}

.pub-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.pub-logo { font-size: 20px; }
.pub-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.pub-login-btn {
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  transition: border-color 0.18s;
}
.pub-login-btn:hover { border-color: var(--accent); color: var(--amber); }
.pub-register-btn {
  padding: 7px 16px;
  background: var(--accent);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  transition: background 0.18s;
}
.pub-register-btn:hover { background: var(--accent-lit); }

.pub-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 16px 80px;
}

/* Профиль не найден */
.pub-not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 20px;
  gap: 16px;
  text-align: center;
}
.pub-not-found i {
  font-size: 64px;
  color: var(--border);
}
.pub-not-found h2 { font-size: 22px; color: var(--text-main); }
.pub-not-found p  { font-size: 14px; color: var(--text-muted); }
.pub-home-btn {
  margin-top: 8px;
  padding: 9px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
}

/* Обложка */
.pub-cover {
  width: 100%;
  height: 200px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.pub-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Карточка профиля */
.pub-profile-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 0 24px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.pub-avatar-wrap { flex-shrink: 0; }
.pub-avatar-icon {
  font-size: 90px;
  color: var(--wood-light);
  display: block;
}
.pub-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
}
.pub-info { flex: 1; min-width: 0; }
.pub-info h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.pub-fullname {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.pub-location {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.pub-location i { margin-right: 4px; }
.pub-bio {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 12px;
}
.pub-stats {
  display: flex;
  gap: 20px;
}
.pub-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.pub-stat span {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}
.pub-stat small {
  font-size: 11px;
  color: var(--text-muted);
}
.pub-share-own-btn {
  position: absolute;
  top: 20px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
}
.pub-share-own-btn:hover { border-color: var(--accent); color: var(--amber); }

/* Вкладка публикаций */
.pub-tabs-row {
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.pub-tab-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-main);
  border-bottom: 2px solid var(--amber);
  padding-bottom: 14px;
}

/* Сетка постов */
.pub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-top: 4px;
}
.pub-grid-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
}
.pub-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.2s;
}
.pub-grid-item:hover img { filter: brightness(0.7); }

/* Баннер регистрации */
.pub-signup-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-base);
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  z-index: 50;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}
.pub-signup-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.pub-signup-inner i {
  font-size: 28px;
  color: var(--accent);
  flex-shrink: 0;
}
.pub-signup-inner div {
  flex: 1;
}
.pub-signup-inner strong {
  display: block;
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 2px;
}
.pub-signup-inner span {
  font-size: 12px;
  color: var(--text-muted);
}
.pub-signup-cta {
  flex-shrink: 0;
  padding: 9px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.18s;
}
.pub-signup-cta:hover { background: var(--accent-lit); }

@media (max-width: 500px) {
  .pub-signup-inner span { display: none; }
  .pub-profile-card { flex-wrap: wrap; }
  .pub-share-own-btn { position: static; margin-top: 12px; width: 100%; justify-content: center; }
}


/* ================================================
   АДАПТИВНОСТЬ — все размеры экранов
   Desktop  > 1100px  — 3 колонки
   Tablet    768–1100  — 2 колонки (нет right panel)
   Phone     < 768px  — 1 колонка + нижний таббар
   Small     < 400px  — дополнительные поправки
================================================ */

/* ── ПЛАНШЕТ (768px – 1100px) ────────────────── */
@media (max-width: 1100px) {
  .app-layout {
    grid-template-columns: 220px 1fr;
    grid-template-rows: auto;
    min-height: 100vh;
  }
  .right-panel { display: none; }
  .profile-area { grid-column: 2; }
  .center-feed  { grid-column: 2; }

  /* Левый сайдбар чуть уже */
  .left-sidebar { width: 200px; min-width: 200px; }

  /* Посты чуть уже — убрать лишний padding */
  .center-feed { padding: 20px 16px; }
}

/* ── УЗКИЙ ПЛАНШЕТ (600px – 768px) ──────────── */
@media (max-width: 768px) {

  /* Убрать текст из левого сайдбара, оставить иконки */
  .app-layout {
    grid-template-columns: 64px 1fr;
  }
  .left-sidebar {
    width: 64px;
    min-width: 64px;
    padding: 16px 0;
    align-items: center;
  }
  .ls-logo { padding: 0 0 20px; text-align: center; }
  .ls-logo .logo-text { font-size: 14px; }
  .ls-nav-item span,
  .ls-badge { display: none; }
  .ls-nav-item {
    justify-content: center;
    padding: 12px 0;
    width: 100%;
  }
  .ls-nav-item i { font-size: 20px; width: auto; }
  .ls-avatar { width: 24px; height: 24px; }
  .ls-nav-item.active { border-left: 3px solid var(--accent); }

  .center-feed { padding: 16px 12px; }
  .profile-area { grid-column: 2; }

  /* Профиль — вертикально */
  .profile-header-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px;
    gap: 16px;
  }
  .profile-top-row { justify-content: center; flex-wrap: wrap; }
  .profile-stats   { justify-content: center; }

  /* Модалки — полноэкранные */
  .create-modal-content,
  .edit-modal-content,
  .share-modal-content {
    width: 96%;
    max-width: 100%;
    border-radius: 12px 12px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
  }
  .modal-overlay {
    align-items: flex-end;
  }
}

/* ── ТЕЛЕФОН (< 480px) ───────────────────────── */
@media (max-width: 480px) {

  /* Левый сайдбар превращается в нижний таббар */
  .app-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }

  .left-sidebar {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: 56px;
    min-width: unset;
    flex-direction: row;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    padding: 0;
    border-right: none;
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(0,0,0,0.3);
  }

  .ls-logo  { display: none; }
  .ls-bottom { display: none; }

  .ls-nav {
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    padding: 0;
    gap: 0;
    flex: 1;
  }
  .ls-nav-item {
    flex-direction: column;
    gap: 2px;
    padding: 6px 4px;
    border-radius: 0;
    font-size: 9px;
    flex: 1;
    justify-content: center;
    border-left: none !important;
    border-top: 2px solid transparent;
  }
  .ls-nav-item.active {
    border-top: 2px solid var(--accent);
    color: var(--amber);
    background: transparent;
  }
  .ls-nav-item span {
    display: block;
    font-size: 9px;
    line-height: 1;
  }
  .ls-nav-item i   { font-size: 18px; }
  .ls-avatar       { width: 20px; height: 20px; }
  .ls-badge        { display: none; }

  /* Скрыть пункты которые не помещаются (оставить 5) */
  .ls-nav-item:nth-child(n+6) { display: none; }

  /* Контент — добавить отступ снизу под таббар */
  .center-feed  {
    grid-column: 1;
    padding: 12px 8px 72px;
  }
  .profile-area {
    grid-column: 1;
    padding-bottom: 72px;
  }

  /* Посты — убрать border-radius на краях */
  .post { border-radius: 10px; }

  /* Лента историй */
  .stories-bar { padding: 12px; border-radius: 10px; }
  .story-ring  { width: 50px; height: 50px; }

  /* Профиль */
  .profile-header-card { padding: 16px; }
  .profile-avatar-icon { font-size: 80px; }
  .profile-avatar      { width: 80px; height: 80px; }

  /* Auth */
  .auth-card    { padding: 28px 20px 20px; border-radius: 10px; }
  .auth-wrapper { padding: 16px; }

  /* Публичный профиль */
  .pub-container { padding: 0 8px 80px; }
  .pub-cover     { height: 140px; }
  .pub-avatar-icon { font-size: 70px; }
  .pub-avatar      { width: 70px; height: 70px; }
  .pub-profile-card { flex-wrap: wrap; padding: 14px 0; }
  .pub-share-own-btn { position: static; width: 100%; justify-content: center; margin-top: 10px; }

  /* Сетка */
  .profile-grid { gap: 2px; }
  .pub-grid     { gap: 2px; }

  /* Кнопки шаринга */
  .share-buttons { flex-direction: column; }
}

/* ── ОЧЕНЬ МАЛЕНЬКИЙ ТЕЛЕФОН (< 360px) ──────── */
@media (max-width: 360px) {
  .ls-nav-item i   { font-size: 16px; }
  .ls-nav-item span { display: none; }
  .ls-nav { justify-content: space-evenly; }

  .post-actions { flex-wrap: wrap; gap: 6px; }
  .act-btn span { display: none; }
  .act-btn      { padding: 6px 10px; }

  .auth-logo { font-size: 28px; }
}

/* ── БОЛЬШОЙ ЭКРАН (> 1400px) ────────────────── */
@media (min-width: 1400px) {
  .app-layout {
    grid-template-columns: 240px 1fr 300px;
  }
  .center-feed { padding: 32px 32px; }
  .right-panel { padding: 32px 24px; }
}

/* ── ШИРИНА ПОСТОВ на мобилке ────────────────── */
@media (max-width: 600px) {
  .post-image { max-height: 420px; }
  .create-preview { max-height: 260px; }
  .modal-content  { flex-direction: column; }
  .modal-image    { width: 100%; max-height: 50vw; }
  .modal-right    { width: 100%; }
}

/* ── ПЛАНШЕТ горизонтальный / iPad Pro ───────── */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .app-layout { grid-template-columns: 200px 1fr; }
  .center-feed { padding: 16px 20px; }
}

/* Убрать hover-эффекты на тач-устройствах */
@media (hover: none) {
  .ls-nav-item:hover { background: transparent; }
  .post:hover        { box-shadow: none; }
  .act-btn:hover     { background: var(--bg-hover); color: var(--text-muted); }
  .story-ring:hover  { transform: none; }
}


/* ===========================
   AUTH FOOTER
=========================== */
.auth-footer {
  text-align: center;
  padding: 20px 0 12px;
  font-size: 12px;
  color: var(--wood-light);
}
.auth-footer a {
  color: var(--text-muted);
  transition: color 0.18s;
}
.auth-footer a:hover { color: var(--amber); }

.rp-footer a {
  color: var(--wood-light);
  transition: color 0.18s;
}
.rp-footer a:hover { color: var(--amber); }
