/* =============================================
   ZockSofa – header.css
   ============================================= */

.zs-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #1a1a26;
  border-bottom: 1px solid #2a2a3e;
  box-shadow: 0 2px 16px rgba(0,0,0,.45);
}
.zs-header__inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* --- Logo --- */
.zs-logo {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  text-decoration: none;
  flex-shrink: 0;
}
.zs-logo__main {
  font-size: 1.35rem;
  font-weight: 900;
  color: #e63946;
  letter-spacing: -0.5px;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
.zs-logo__sub {
  font-size: .7rem;
  color: #ccc;
  font-weight: 500;
  letter-spacing: .05px;
}
.zs-logo:hover .zs-logo__main { color: #c1121f; }

/* --- Desktop Nav --- */
.zs-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
  flex-shrink: 0;
}
.zs-nav__link {
  color: #bbb;
  font-size: .9rem;
  font-weight: 500;
  padding: .4rem .75rem;
  border-radius: 7px;
  text-decoration: none;
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.zs-nav__link:hover { color: #fff; background: #2a2a3e; }

.zs-nav__link--new {
  background: #e63946;
  color: #fff !important;
  font-weight: 700;
}
.zs-nav__link--new:hover { background: #c1121f; }

.zs-nav__link--register {
  color: #e63946 !important;
  border: 1.5px solid #e63946;
  font-weight: 700;
}
.zs-nav__link--register:hover { background: #e63946; color: #fff !important; }

/* --- Chat Button mit Badge --- */
.zs-chat-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 8px;
  color: #bbb;
  text-decoration: none;
  transition: background .2s, color .2s;
  flex-shrink: 0;
}
.zs-chat-btn:hover { background: #2a2a3e; color: #fff; }

.zs-chat-badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 18px; height: 18px;
  background: #e63946;
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  line-height: 1;
  animation: zs-pulse 1.8s infinite;
}
.zs-chat-badge--zero {
  background: #2a2a3e;
  color: #666;
  animation: none;
}

@keyframes zs-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .75; transform: scale(1.15); }
}

/* Badge im Mobile-Menü */
.zs-mobile-nav .zs-chat-badge {
  position: static;
  display: inline-flex;
  margin-left: 6px;
  animation: zs-pulse 1.8s infinite;
}

/* --- User Dropdown --- */
.zs-user-menu { position: relative; }
.zs-user-menu__trigger {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: #2a2a3e;
  border: 1.5px solid #3a3a4e;
  border-radius: 8px;
  padding: .35rem .7rem;
  cursor: pointer;
  color: #e0e0e0;
  font-size: .88rem;
  transition: border-color .2s;
}
.zs-user-menu__trigger:hover { border-color: #e63946; }

.zs-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #e63946;
  color: #fff;
  font-size: .8rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.zs-avatar--img {
  object-fit: cover;
  border: 2px solid #e63946;
}
.zs-user-menu__name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zs-user-menu__caret { transition: transform .2s; opacity: .6; }
.zs-user-menu__trigger[aria-expanded="true"] .zs-user-menu__caret { transform: rotate(180deg); }

.zs-user-menu__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px); right: 0;
  background: #1a1a26;
  border: 1px solid #2a2a3e;
  border-radius: 10px;
  min-width: 190px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  overflow: hidden;
  z-index: 300;
}
.zs-user-menu__dropdown.is-open { display: block; }
.zs-user-menu__dropdown a {
  display: block;
  padding: .65rem 1rem;
  color: #ccc;
  font-size: .88rem;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.zs-user-menu__dropdown a:hover { background: #252535; color: #fff; }
.zs-user-menu__divider { height: 1px; background: #2a2a3e; margin: .25rem 0; }
.zs-user-menu__logout { color: #e63946 !important; font-weight: 600; }

/* --- Dropdown Profil-Header --- */
.zs-dropdown-profile {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1rem;
  color: #fff;
  font-size: .88rem;
  font-weight: 600;
}
.zs-dropdown-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e63946;
  flex-shrink: 0;
}

/* --- Mobile Profil-Header --- */
.zs-mobile-profile {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .75rem 1rem;
  margin-bottom: .5rem;
  border-bottom: 1px solid #2a2a3e;
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
}

/* --- Hamburger --- */
.zs-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  margin-left: auto;
  flex-shrink: 0;
}
.zs-hamburger span {
  display: block;
  width: 24px; height: 2.5px;
  background: #e0e0e0;
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.zs-hamburger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.zs-hamburger.is-open span:nth-child(2) { opacity: 0; }
.zs-hamburger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* --- Overlay --- */
.zs-mobile-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 199;
}
.zs-mobile-overlay.is-visible { display: block; }

/* --- Mobile Menü --- */
.zs-mobile-menu {
  display: none;
  position: fixed;
  top: 64px; right: 0;
  width: min(300px, 90vw);
  height: calc(100dvh - 64px);
  background: #1a1a26;
  border-left: 1px solid #2a2a3e;
  overflow-y: auto;
  z-index: 200;
  padding: 1.25rem 1rem;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.zs-mobile-menu.is-open {
  display: block;
  transform: translateX(0);
}
.zs-mobile-nav {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.zs-mobile-nav a {
  display: flex;
  align-items: center;
  padding: .8rem 1rem;
  border-radius: 9px;
  color: #ccc;
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.zs-mobile-nav a:hover { background: #2a2a3e; color: #fff; }
.zs-mobile-nav__logout { color: #e63946 !important; font-weight: 700; }

.zs-no-scroll { overflow: hidden; }

@media (max-width: 768px) {
  .zs-nav       { display: none; }
  .zs-hamburger { display: flex; }
  .zs-logo__sub { display: none; }
}
