:root {
  --primary-dark: #413028;
  --accent-green: #2D6A4F;
  --accent-red: #580B08;
  --bg-main: #D9CFC5;
  --card-bg: #B19D8F;
  --header-bg: #9C8373;
}

body {
  background-color: var(--bg-main);
  font-family: 'Inter', sans-serif;
  margin: 0;
  color: var(--primary-dark);
}

/* Публичная шапка - Темная и контрастная */
.public-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(156, 131, 115, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  max-width: 1280px;
  margin: 0 auto;
}

.logo img {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.header-cta {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: rgba(65, 48, 40, 0.3);
  padding: 8px 20px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-cta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.login-link {
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border-radius: 50px;
}

.login-link:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

/* Кнопка регистрации в шапке */
.public-header .btn-dark {
  background: #fff;
  border: none;
  color: #413028;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.public-header .btn-dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  background: #f8f9fa;
}

.validation-users-page {
  min-height: 100vh;
  padding: 30px 0 50px;
  background: var(--bg-main);
}

.public-hero {
  position: relative;
  margin-bottom: 40px;
  padding: 80px 0;
  background: linear-gradient(135deg, rgba(65, 48, 40, 0.95), rgba(88, 11, 8, 0.85)), 
              url('https://images.unsplash.com/photo-1490481651871-ab68de25d43d?auto=format&fit=crop&w=1600&q=80');
  background-size: cover;
  background-position: center;
  border-radius: 0 0 40px 40px;
  color: #fff;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.public-hero .container {
  position: relative;
  z-index: 2;
}

.public-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top right, rgba(216, 118, 83, 0.3), transparent);
  pointer-events: none;
}

.public-hero__badge {
  display: inline-block;
  background: rgba(216, 118, 83, 0.9);
  color: #fff;
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(216, 118, 83, 0.3);
  backdrop-filter: blur(5px);
}

.public-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(32px, 6vw, 56px);
  color: #fff;
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
  animation: slideUp 0.8s ease-out;
}

.public-hero p {
  margin: 0 auto 30px;
  font-size: 19px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  line-height: 1.6;
  animation: slideUp 0.8s ease-out 0.2s backwards;
}

.progress-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-counter {
  font-size: 13px;
  color: #5e4438;
}

.progress-bar {
  width: 260px;
  height: 8px;
  border-radius: 999px;
  background: #cdbdaf;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #413028, #d87653);
}

.community-brands {
  margin-bottom: 80px; /* Еще больше воздуха между лентой и формой */
}

.brand-card-container {
  display: grid;
  grid-template-columns: 1fr 350px; /* Чуть шире боковая колонка */
  gap: 40px;
  margin-top: 20px;
}

.brand-card__main,
.social-proof,
.next-brands {
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid rgba(88, 11, 8, 0.08);
  box-shadow: 0 15px 40px rgba(65, 48, 40, 0.15);
  /* Более глубокая тень */
}

.brand-showcase {
  border-bottom: 1px solid rgba(88, 11, 8, 0.1);
}

.brand-header {
  position: relative;
}

.brand-visual {
  height: 360px;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
}

.brand-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  color: #fff9f2;
  background: linear-gradient(to top, rgba(53, 37, 29, 0.8), rgba(53, 37, 29, 0.2), transparent);
  padding: 20px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 10px;
  background: rgba(216, 118, 83, 0.8);
}

.brand-name {
  margin: 0;
  font-size: 28px;
}

.brand-category {
  font-size: 14px;
  opacity: 0.92;
}

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

.skip-btn,
.brand-number {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 11px;
}

.skip-btn {
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(65, 48, 40, 0.5);
  color: #fff9f2;
  cursor: pointer;
}

.brand-number {
  background: rgba(216, 118, 83, 0.2);
  color: #580b08;
  border: 1px solid rgba(88, 11, 8, 0.2);
}

.evaluation-section {
  padding: 18px;
}

.evaluation-title {
  margin: 0 0 12px;
  font-size: 24px;
  color: #580b08;
}

.criteria-ratings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.criteria-item {
  border: 1px solid rgba(88, 11, 8, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  padding: 12px;
}

.criteria-item label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #413028;
}

.stars-small {
  display: flex;
  gap: 5px;
  font-size: 26px;
}

.stars-small span {
  color: #6B5146;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.stars-small span:hover,
.stars-small span.active {
  color: #FFD700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
  transform: scale(1.1);
}

.feedback-section {
  border-radius: 14px;
  border: 1px solid rgba(88, 11, 8, 0.1);
  background: rgba(255, 255, 255, 0.2);
  padding: 12px;
  margin-bottom: 14px;
}

.age-selection {
  margin-bottom: 10px;
}

.age-selection label,
.comment-section label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #5e4438;
}

.age-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.age-btn {
  border: 1px solid rgba(88, 11, 8, 0.2);
  background: var(--bg-main);
  color: var(--primary-dark);
  border-radius: 999px;
  font-size: 13px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.age-btn.active,
.age-btn:hover {
  border-color: #580b08;
  background: #413028;
  color: #f4efe8;
}

.comment-section textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  background: var(--bg-main);
  border: 1px solid rgba(88, 11, 8, 0.2);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--primary-dark);
  resize: vertical;
  transition: all 0.2s;
}

.comment-section textarea:focus {
  border-color: #580b08;
  box-shadow: 0 0 0 3px rgba(88, 11, 8, 0.12);
}

.submit-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.review-notice {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  display: none;
}

.review-notice.success {
  display: block;
  color: #164d12;
  background: #e4f7e8;
  border: 1px solid #9de2aa;
}

.review-notice.error {
  display: block;
  color: #5a1b1b;
  background: #fbeaea;
  border: 1px solid #f1a4a4;
}

.btn {
  border-radius: 12px;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 600;
}

.btn-light {
  border: 1px solid rgba(88, 11, 8, 0.2);
  color: #413028;
  background: #d4c6b9;
}

.btn-dark {
  border: 1px solid #413028;
  color: #f4efe8;
  background: linear-gradient(90deg, #413028, #5a4438);
}

.social-proof {
  padding: 16px;
}

.social-proof h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.community-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.community-metric {
  border: 1px solid rgba(88, 11, 8, 0.1);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  padding: 10px;
}

.community-metric strong {
  display: block;
  font-size: 24px;
  color: #580b08;
}

.community-metric span {
  font-size: 13px;
  color: #5e4438;
}

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

.review-card {
  border: 1px solid rgba(88, 11, 8, 0.1);
  background: var(--bg-main);
  border-radius: 12px;
  padding: 10px;
}

.review-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.review-card__top strong {
  font-size: 14px;
}

.review-card__top span {
  font-size: 12px;
  color: #6e5448;
}

.review-card p {
  margin: 0;
  font-size: 13px;
  color: #4f3b33;
}

.interaction-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  color: #5e4438;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.interaction-btn:hover:not(.static) {
  background: rgba(45, 106, 79, 0.08);
  color: #2D6A4F;
}

.interaction-btn.active {
  background: rgba(45, 106, 79, 0.12);
  color: #2D6A4F;
  font-weight: 700;
}

.interaction-btn img {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.interaction-btn.active img {
  filter: sepia(1) saturate(5) hue-rotate(90deg);
  transform: scale(1.1);
}

.interaction-btn.static {
  cursor: default;
  pointer-events: none;
}

.next-brands {
  margin-top: 16px;
  padding: 16px;
}

.next-brands h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.brands-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.brand-preview-card {
  position: relative;
  background: #B19D8F;
  border-radius: 28px;
  border: 1px solid rgba(88, 11, 8, 0.1);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 4px 15px rgba(65, 48, 40, 0.1);
}

.brand-preview-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(65, 48, 40, 0.2);
  border-color: #580b08;
}

.card-image-box {
  position: relative;
  height: 260px;
  overflow: hidden;
}

.card-stats-overlay {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 5;
}

.card-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
  font-size: 12px;
  font-weight: 600;
}

.card-stat-item img, 
.card-stat-item svg {
  width: 14px;
  height: 14px;
}

.card-stat-item img {
  filter: brightness(0) invert(1); /* Делаем иконку лайка белой */
}

.comment-icon, .buy-icon {
  stroke: white;
}

.card-stat-item.buy-stat {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 10px;
    margin-left: 2px;
}

.brand-preview-card .card-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.brand-preview-card:hover .card-image-box img {
  transform: scale(1.05);
}

/* Пагинация */
.pagination-container {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.page-btn {
    background: #413028;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: #580b08;
    transform: translateY(-2px);
}

.page-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.page-info {
    font-size: 14px;
    color: #413028;
    font-weight: 500;
}

.page-info span {
    font-weight: 700;
    color: #580b08;
}

.ai-badge-mini {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.preview-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(180deg, rgba(177, 157, 143, 0.8), #B19D8F);
}

.brand-main-meta h4 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  color: #413028;
  letter-spacing: -0.01em;
}

.brand-tagline-mini {
  display: block;
  font-size: 14px;
  color: #6e5448;
  opacity: 0.9;
  line-height: 1.4;
}

.brand-owner-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(65, 48, 40, 0.12);
}

.owner-mini-avatar {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  object-fit: cover;
  background: #D9CFC5;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.owner-mini-name {
  font-size: 13px;
  font-weight: 600;
  color: #413028;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-preview-card.current {
  border: 3px solid #580b08;
  box-shadow: 0 25px 50px rgba(88, 11, 8, 0.15);
}

.community-brands h2 {
  margin: 0 0 8px;
  font-size: 24px;
  color: #580b08;
}

.section-note {
  margin: 0 0 18px;
  color: #5e4438;
  font-size: 14px;
}

.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

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

@media (max-width: 1080px) {
  .brand-card {
    grid-template-columns: 1fr;
  }

  .social-proof {
    order: -1;
  }

  .community-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .public-header {
    background: var(--header-bg);
  }
  
  .header-container {
    flex-direction: column;
    gap: 8px;
    padding: 12px 20px;
    align-items: center;
  }

  .header-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  #site-balance {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
  }

  .public-header .login-link {
    flex: 1 1 40%;
    min-width: 120px;
    padding: 10px;
    font-size: 14px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: #fff !important;
  }

  .public-header .btn-dark {
    flex: 1 1 40%;
    min-width: 120px;
    padding: 10px;
    font-size: 14px;
    text-align: center;
    justify-content: center;
    border-radius: 50px;
  }

  .header-cta {
    display: none;
  }
}

  .header-cta {
    display: none; /* Скрываем на мобильных для экономии места */
  }

  .public-hero {
    position: relative;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(65, 48, 40, 0.95), rgba(88, 11, 8, 0.85)), 
                url('https://images.unsplash.com/photo-1490481651871-ab68de25d43d?auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    border-radius: 0 0 30px 30px;
    margin-bottom: 30px;
    color: #fff;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  }

  .public-hero .container {
    position: relative;
    z-index: 2;
  }

  .public-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(216, 118, 83, 0.3), transparent);
    pointer-events: none;
  }

  .public-hero__badge {
    display: inline-block;
    background: rgba(216, 118, 83, 0.9);
    color: #fff;
    border-radius: 999px;
    padding: 8px 20px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(216, 118, 83, 0.3);
    backdrop-filter: blur(5px);
  }

  .public-hero h1 {
    font-size: 32px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    animation: slideUp 0.8s ease-out;
  }

  .public-hero p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    animation: slideUp 0.8s ease-out 0.2s backwards;
  }

  .validation-users-page {
    padding-top: 16px;
  }

  .brands-preview {
    grid-template-columns: repeat(2, 1fr) !important; /* Лента в 2 колонки */
    gap: 15px; /* Уменьшаем зазор для мобильных */
  }

  .brand-preview-card {
    border-radius: 20px;
  }

  .card-image-box {
    height: 180px; /* Уменьшаем высоту картинки */
  }

  .preview-info {
    padding: 12px;
  }

  .brand-main-meta h4 {
    font-size: 16px;
  }

  .brand-tagline-mini {
    font-size: 12px;
  }

  .brand-owner-meta {
    padding-top: 8px;
  }

  /* Перемещаем блок "уже оценило" под комментарий */
  .brand-card-container {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
  }

  .brand-card__main {
    order: 1;
  }

  .social-proof {
    order: 2;
    margin-top: 20px;
  }

  .criteria-ratings,
  .community-metrics {
    grid-template-columns: 1fr;
  }

  .brand-visual {
    height: 280px;
  }

  .brand-name {
    font-size: 23px;
  }

  .progress-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .progress-bar {
    width: 100%;
    max-width: 340px;
  }

  .submit-actions {
    flex-direction: column;
  }
}

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

/* Стили для фильтров */
.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.section-note {
    font-size: 14px;
    color: #5e4438;
    margin: 0;
    opacity: 0.8;
}

.feed-filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    background: #fff;
    border: 1px solid rgba(65, 48, 40, 0.2);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #413028;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #fdfaf7;
    border-color: #413028;
}

.filter-btn.active {
    background: #413028;
    color: #fff;
    border-color: #413028;
    box-shadow: 0 4px 10px rgba(65, 48, 40, 0.2);
}

/* Стили поиска */
.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

#brand-search {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid rgba(65, 48, 40, 0.2);
    border-radius: 25px;
    font-size: 14px;
    color: #413028;
    background: #fff;
    transition: all 0.3s ease;
}

#brand-search:focus {
    outline: none;
    border-color: #413028;
    box-shadow: 0 0 0 3px rgba(65, 48, 40, 0.1);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    opacity: 0.5;
    pointer-events: none;
}