/* header.css — общие стили для <header> и навигации */

/* Отключаем выделение и тач‐меню в шапке сайта */
header {
  -webkit-touch-callout: none;   /* отключить меню при долгом таче */
  -webkit-user-select: none;     /* Safari */
  -khtml-user-select: none;      /* Konqueror */
  -moz-user-select: none;        /* Firefox */
  -ms-user-select: none;         /* Internet Explorer/Edge */
  user-select: none;             /* стандарт */
  touch-action: manipulation;    /* запретить двойной тап-зум/скролл */
}
header a, header .header-container, header .site-title {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

header {
  position: relative;
  padding: 0;
}


.header-container {
  position: absolute;
  top: 20px;
  left: 10px;
  display: flex;
  align-items: center;
  margin-top: -80px;
}

.logo img {
  padding: 0;
  width: 40px;
  height: 40px;
  margin-right: 5px;
}

.welcome {
      border-radius: 0;
      padding: 0;
      margin: 1rem 0;
      color: #44BBC1;
    }

@media (max-width: 600px) {
    .welcome {
      border-radius: 0;
      padding: 0;
      margin: 3rem 0;
      color: #44BBC1;
    }
}

.site-title { /*темная тема осталась в styles.css questions.css */
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 10px;
  color: #1e1e1e;
}
@media (max-width: 1200px) {
  .site-title {
    display: none;
  }
}

nav {
  padding: 8px;
  text-align: center;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

@media (max-width: 600px) {
  nav {
    margin: 0 auto;     /* выравниваем по центру */
  }
}

@media (min-width: 600px) and (max-width: 900px) {
  nav {
    max-width: 500px;   /* общий контейнер уже */
    margin: 0 auto;     /* выравниваем по центру */
  }
}

nav ul {
  list-style-type: none;
  padding: 0;
  margin: 10px 0; /* в styles.css: 10px 0; в questions.css: 10px 10px */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 20px;
}

nav li {
  margin-right: 8px;
}

a {
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 10px;
  color: #1A1A1A;
  transition: background-color 0.2s;
}

a.answer-link {
  background-color: #8CD136; /* есть в questions.css, отсутствует в styles.css */
  color: #F1F1F1;            /* есть в questions.css, отсутствует в styles.css */
}

/* отступ между соседними кнопками (оставляем как есть) */
.answer-links .answer-link + .answer-link {
  margin-left: 0.5em;
  background-color: #64B8FF;
}

a.answer-link.author-link {
  display: inline-flex;
  align-items: center;
  width: auto;
  padding: 4.5px 8px;
}

/* картинка-аватар внутри кнопки слева от текста */
a.answer-link.author-link img {
  width: 24px;
  height: 24px;
  margin-left: 8px;      /* теперь отступ справа, между аватаром и текстом */
  object-fit: cover;
  border-radius: 50%;
}

a:hover { /*темная тема осталась в styles.css questions.css */
  background-color: #1A1A1A;
  color: #F1F1F1;
}

.answer-links .answer-link.author-link:hover {
  background-color: #1A1A1A;
  color: #F1F1F1;
}

html[data-theme="dark"] .answer-links .answer-link.author-link:hover {
        background-color: #F1F1F1;
        color: #1A1A1A;
  }

b {
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 10px;
  background-color: #58BEFE;
  color: #FFFFFF;
  transition: background-color 0.2s;
  cursor: pointer;
}

b:hover {
  background-color: rgba(255, 255, 255, 1);
  color: #1A1A1A;
}

html[data-theme="dark"] a {
    background-color: #1A1A1A;
    color: #FFFFFF;
}

@media (max-width: 600px) {
  a, b {
    margin-top: 7px;
    margin-bottom: 7px;
  }
}

@media (pointer: coarse) {
  html {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;

    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;

    touch-action: manipulation !important;
  }
}