@import url('https://fonts.googleapis.com/css?family=MedievalSharp|Merriweather:400,700&display=swap');

body {
  font-family: 'Merriweather', 'Georgia', serif;
  background: #2a251f repeat;
  color: #e8dac3;
  margin: 0;
  padding: 0;
  line-height: 30px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2em 2em;
  background: linear-gradient(90deg, #28221a 70%, #604920 100%);
  color: #f4ecd3;
  box-shadow: 0 2px 20px #1a140d;
  font-family: 'Merriweather', 'Georgia', serif;
  border-bottom: 3px solid #bfa76a;
  position: fixed; 
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

header nav, .header-auth {
  display: flex;
  gap: 1.1em;
  align-items: center;
}

header nav a, .header-auth a {
  color: #f4ecd3;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.08em;
  padding: 2px 6px;
  border-radius: 8px;
  transition: background .18s, color .18s;
  font-family: 'MedievalSharp', 'Merriweather', serif;
}

header nav a:hover,
header nav a.active {
  background: #bfa76a;
  color: #2a251f;
}

code {
  background: #2f2517cc;
  color: #ffe189;
  padding: 2px 2px;
  border-radius: 7px;
  font-family: "Fira Mono", "Menlo", monospace;
  font-weight: 600;
  box-shadow: 0 1px 8px #bfa76a33 inset;
  border: 1px solid #bfa76a33;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1em;
}

.header-auth a {
  background: #433825;
  border: 2px solid #bfa76a;
  box-shadow: 0 1px 4px #1a140d;
  padding: 6px 12px;
}

.header-auth a:hover {
  background: #bfa76a;
  color: #2a251f;
  box-shadow: 0 2px 8px #1a140d;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
  cursor: pointer;
  min-height: 34px;
  flex-direction: row;
}

.user-head {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 2px 8px #1a140d;
  border: 2px solid #bfa76a;
  background: #2a251f;
  transition: box-shadow .18s, border .18s;
}

.user-info:focus .user-head,
.user-info:focus-visible .user-head {
  outline: none;
  box-shadow: 0 0 0 3px #bfa76a77;
  border-color: #e8dac3;
}

.user-pseudo {
  color: #d3b676;
  font-weight: bold;
  font-size: 1.09em;
  font-family: 'Merriweather', 'Georgia', serif;
  margin-left: 7px;
  user-select: none;
}

.user-info-buttons {
  display: none;
  flex-direction: column;
  gap: 6px;
  position: absolute;
  left: 50%;
  top: 110%;
  transform: translateX(-50%);
  z-index: 150;
  background: #433825;
  border: 2px solid #bfa76a;
  border-radius: 12px;
  box-shadow: 0 2px 24px #1a140d;
  padding: 16px 18px;
  transition: none;
}

.user-info-buttons.open {
  display: flex;
}

.logout-btn,
.admin-panel-btn,
.header-profil-link {
  background: transparent;
  color: #bfa76a;
  border-radius: 8px;
  padding: 8px 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.07em;
  border: none;
  box-shadow: none;
  transition: background .18s, color .18s;
  opacity: 1;
  pointer-events: auto;
  position: static;
  display: block;
  font-family: 'MedievalSharp', 'Merriweather', serif;
}

.logout-btn:hover,
.admin-panel-btn:hover,
.header-profil-link:hover {
  background: #bfa76a;
  color: #2a251f;
}

main {
  margin-top: 125px;
}

@media (max-width: 700px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1em 0.7em;
  }
  header nav {
    margin-bottom: 0.5em;
  }
  .header-user {
    margin-bottom: 0.5em;
  }
  .user-info {
    align-items: center;
    flex-direction: row;
    width: 100px;
  }
  .user-info-buttons {
    left: 0;
    top: 110%;
    width: 100%;
    transform: none;
    gap: 4px;
    padding: 12px 4px;
  }
  .logout-btn,
  .admin-panel-btn,
  .header-profil-link {
    padding: 8px 0;
    width: 100%;
  }
}