/* datei: /public/css/header.css
   thesweeper - header styles (logo centered + huge, NOT cut at top)
   update:
   - logged-in layout: left user block (avatar + username + dashboard) / right logout
   - keeps logo visually centered via absolute positioning
*/

.site-header{
  position: sticky;
  top: 0;
  z-index: 50;

  background: rgba(2, 2, 3, 0.84);
  border-bottom: 1px solid rgba(243,246,246,0.10);
}

.site-header::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(900px 150px at 18% 0%, rgba(33,172,218,0.18), transparent 62%),
    radial-gradient(700px 150px at 82% 0%, rgba(193,100,46,0.12), transparent 60%),
    linear-gradient(180deg, rgba(243,246,246,0.06), transparent 48%);
  opacity: 1;
}

.site-header::after{
  content:"";
  position:absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  pointer-events:none;
  background: linear-gradient(90deg,
    transparent,
    rgba(33,172,218,0.40),
    rgba(243,246,246,0.16),
    rgba(193,100,46,0.32),
    transparent
  );
  opacity: .75;
}

.header-inner{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;

  padding: 10px 0;
  min-height: 68px;
}

.header-spacer{ display:none; }

/* ---------------------------
   LEFT (logged in)
---------------------------- */
.header-left{
  position: relative;
  z-index: 3;
  margin-right: auto; /* pushes actions to the far right */
  pointer-events: auto;
}

.user-nav{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}

.user-avatar{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background:
    radial-gradient(12px 12px at 30% 30%, rgba(78,240,255,0.55), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  border: 1px solid rgba(78,240,255,0.25);
  box-shadow:
    0 0 0 4px rgba(78,240,255,0.08),
    0 10px 24px rgba(0,0,0,0.35);
  flex: 0 0 auto;
}

.user-name{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;

  font-family: "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(236,244,255,0.92);

  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  padding: 8px 10px;
  border-radius: 14px;

  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.22);
  transition: transform .12s ease, border-color .12s ease, background-color .12s ease;
}

.user-name:hover{
  border-color: rgba(78,240,255,0.26);
  background: rgba(0,0,0,0.30);
}

.user-name:active{
  transform: translateY(1px);
}

.user-name:focus-visible{
  outline: 2px solid rgba(78,240,255,0.55);
  outline-offset: 2px;
}

.header-actions{
  position: relative;
  z-index: 3;

  display: inline-flex;
  gap: 10px;
  align-items: center;

  pointer-events: auto;
}

.header-actions .btn{
  padding: 10px 14px;
  border-radius: 16px;
}

/* optional: slightly tighter nav button inside left block */
.btn.btn-nav{
  padding: 10px 14px;
  border-radius: 16px;
}

/* ---------------------------
   BRAND (center, huge)
---------------------------- */
.brand{
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 2;

  /* wichtig: logo darf nicht buttons blocken */
  pointer-events: none;
  user-select: none;
}

.brand-mark{
  width: 300px;
  height: 300px;

  border-radius: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;

  display:flex;
  align-items:center;
  justify-content:center;

  position: relative;
  transform: translateY(0);

  pointer-events: none;
}

.brand-mark::before{ content:none; }

.brand-mark img{
  width: 100%;
  height: 100%;
  display:block;

  object-fit: contain;
  object-position: 50% 50%;

  /* ✅ logo höher */
  transform: translateY(-50px);

  filter: saturate(1.06) contrast(1.10);
  pointer-events: none;
}

/* ---------------------------
   RESPONSIVE
---------------------------- */
@media (max-width: 980px){
  .header-inner{
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    justify-items: center;
    row-gap: 10px;

    padding: 10px 0;
    min-height: 0;
  }

  .header-left{
    margin-right: 0;
    justify-self: center;
  }

  .user-nav{
    flex-wrap: wrap;
    justify-content: center;
  }

  .brand{
    position: static;
    transform: none;
    pointer-events: none;
  }

  .brand-mark{
    width: 220px;
    height: 220px;
  }

  .brand-mark img{
    transform: translateY(-36px);
  }

  .header-actions{
    justify-self: center;
  }

  .user-name{
    max-width: 260px;
  }
}

@media (max-width: 560px){
  .brand-mark{
    width: 190px;
    height: 190px;
  }

  .brand-mark img{
    transform: translateY(-30px);
  }

  .header-actions .btn,
  .btn.btn-nav{
    padding: 10px 13px;
  }

  .user-name{
    max-width: 220px;
  }
}
