/* ===== Шапка: базовая раскладка ===== */
.header {
  display: grid;
  grid-template-columns: auto 1fr auto; /* логотип | поиск | auth */
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
}

.top-search { width: 100%; }
.top-search input[type="search"]{
  width:100%;
  height:38px;
  padding:8px 12px;
  border-radius:12px;
  border:1px solid #2a2f3a;
  background:#0f1320;
  color:#e5e7eb;
}

/* Блок ссылок авторизации */
.auth-links{ display:flex; gap:8px; align-items:center; }

/* Кнопки-пилюли */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:9px 12px; line-height:1; border-radius:12px;
  text-decoration:none; white-space:nowrap; font-weight:600;
}
.btn-outline{ border:1px solid #3b4252; color:#e5e7eb; background:transparent; }
.btn-primary{ background:#3b82f6; color:#fff; border:1px solid #3b82f6; }

/* ===== Мобильный режим ===== */
@media (max-width: 640px){
  /* Шапку собираем в одну колонку: логотип → поиск → кнопки */
  .header{
    grid-template-columns: 1fr;
    gap:10px;
  }
  .logo{ order:1; }
  .top-search{ order:2; }
  .auth-links{
    order:3;
    display:grid;
    grid-template-columns: 1fr 1fr; /* две ровные кнопки */
    gap:8px;
  }
  /* убираем любые абсолютные позиционирования, если где-то были */
  .auth-links, .auth-links * { position: static !important; }
}

/* Очень узкие устройства — кнопки в столбик */
@media (max-width: 360px){
  .auth-links{ grid-template-columns: 1fr; }
}

/* Небольшая тень, чтобы кнопки не “слиплись” с полем поиска при скролле */
.auth-links .btn { box-shadow: 0 1px 2px rgba(0,0,0,.12); }

/* Опционально: делаем “Регистрация” более заметной на мобилке */
@media (max-width: 640px){
  .auth-links a[href*="register"], .auth-links .btn-primary { font-weight:700; }
}


/* === Footer bar === */
.site-footer__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font-size: 14px;
  color: #aaa;
  background: #0a0a0a;
  border-top: 1px solid #222;
}

/* На узких экранах (мобильных) — выравниваем по центру и скрываем "ALL RIGHTS RESERVED" */
@media (max-width: 600px) {
  .site-footer__bar {
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    text-align: center;
  }
  .site-footer__bar div:last-child {
    display: none; /* скрываем "ALL RIGHTS RESERVED" */
  }
}

/* Немного “живости” для копирайта */
.site-footer__bar span#copyYear {
  font-weight: 500;
  color: #fff;
}


.site-footer__bar {
  background: rgba(0, 0, 0, 0.5);
}
.site-footer__bar div:first-child {
  color: rgba(255, 255, 255, 0.5);
}

.auth-links .btn { box-shadow: 0 2px 4px rgba(0,0,0,.2); }

