/* css/header.css — compact site chrome */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 17, 23, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.12);
}

.site-header__bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  padding: 0.4rem 0.9rem 0.4rem;
}

.site-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.site-header__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  white-space: nowrap;
}

.site-brand {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  text-decoration: none;
  line-height: 1.1;
}

.site-brand__name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.site-brand__tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 1rem;
  margin-top: 0.28rem;
}

.site-nav__link,
.site-nav__gen {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.site-nav__link {
  background-color: transparent;
  background-image: linear-gradient(to right, #a5b4fc, #d8b4fe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.site-nav__drop {
  position: relative;
}

.site-nav__menu {
  position: absolute;
  left: -0.45rem;
  top: 100%;
  min-width: 13.5rem;
  padding: 0.2rem 0.25rem;
  border-radius: 0 0.55rem 0.55rem 0.55rem;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  z-index: 60;
}

.site-nav__menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -2px;
  height: 2px;
}

.site-nav__menu[hidden] {
  display: none;
}

@media (hover: hover) {
  .site-nav__drop:hover .site-nav__menu,
  .site-nav__drop:hover .site-nav__menu[hidden],
  .site-nav__drop.is-open .site-nav__menu {
    display: block;
  }
}

.site-nav__menu a {
  display: block;
  padding: 0.4rem 0.55rem;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 800;
  background-image: linear-gradient(to right, #a5b4fc, #d8b4fe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.site-nav__gen {
  background-image: linear-gradient(to right, #fb7185, #ef4444 55%, #be123c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.site-search {
  position: relative;
  display: flex;
  align-items: center;
}

.site-search input {
  width: 9.5rem;
  min-width: 0;
  height: 1.85rem;
  padding: 0 1.7rem 0 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(10, 15, 30, 0.72);
  color: #e2e8f0;
  font: inherit;
  font-size: 0.75rem;
  -webkit-appearance: none;
  appearance: none;
}

.site-search input::-webkit-search-decoration,
.site-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.site-search input:focus {
  outline: none;
  width: 12.5rem;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.site-search__go {
  position: absolute;
  right: 0.15rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.55rem;
  height: 1.55rem;
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.site-search__go svg {
  width: 0.9rem;
  height: 0.9rem;
}

.site-search__results {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  width: min(20rem, 70vw);
  max-height: 18rem;
  overflow: auto;
  padding: 0.3rem;
  border-radius: 0.7rem;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  z-index: 70;
}

.site-search__results[hidden] {
  display: none;
}

.site-search__hit,
.site-search__empty {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-radius: 0.45rem;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.78rem;
  background: none;
  border: 0;
}

.site-search__hit:hover,
.site-search__hit.is-on {
  background: rgba(99, 102, 241, 0.16);
}

.site-search__kicker {
  display: block;
  font-size: 0.65rem;
  color: #64748b;
  margin-bottom: 0.1rem;
}

.site-search__empty {
  color: #64748b;
}

.site-auth {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  position: relative;
  flex-shrink: 0;
}

.site-auth__login {
  font-size: 0.78rem;
  font-weight: 600;
  background-image: linear-gradient(to right, #a5b4fc, #d8b4fe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-decoration: none;
}

.site-auth__join {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  padding: 0.28rem 0.7rem;
  border-radius: 0.5rem;
  background: linear-gradient(90deg, #4f46e5, #9333ea);
}

.site-auth__credits {
  border: 0;
  background: transparent;
  color: #e2e8f0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  padding: 0.15rem 0.1rem;
  white-space: nowrap;
}

.site-auth__credits:hover {
  color: #fff;
}

.site-auth__avatar {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
}

.site-auth__avatar img,
.site-auth__avatar .default-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(165, 180, 252, 0.45);
  font-size: 0.62rem;
}

.site-auth__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  width: 12.5rem;
  padding: 0.3rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 70;
}

.site-auth__menu[hidden] {
  display: none;
}

.site-auth__who {
  padding: 0.45rem 0.6rem 0.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  margin-bottom: 0.2rem;
}

.site-auth__who strong {
  display: block;
  color: #c7d2fe;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-auth__who span {
  display: block;
  color: #64748b;
  font-size: 0.68rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-auth__menu a,
.site-auth__menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.42rem 0.6rem;
  border: 0;
  background: none;
  color: #cbd5e1;
  text-decoration: none;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 0.45rem;
  cursor: pointer;
}

.site-auth__menu a:hover,
.site-auth__menu button:hover {
  background: rgba(99, 102, 241, 0.16);
  color: #f8fafc;
}

.site-auth__menu .is-buy {
  color: #e2e8f0;
}

.site-auth__menu .is-out {
  color: #fca5a5;
}

.site-auth__menu .is-out:hover {
  background: rgba(127, 29, 29, 0.35);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .site-brand__tag { display: none; }
  .site-search { width: 1.85rem; }
  .site-search:focus-within { width: auto; }
  .site-search input {
    width: 1.85rem;
    min-width: 1.85rem;
    max-width: 1.85rem;
    padding-left: 0.15rem;
    color: transparent;
  }
  .site-search input::placeholder { color: transparent; }
  .site-search input:focus {
    width: 8rem;
    min-width: 8rem;
    max-width: 8rem;
    color: #e2e8f0;
    padding-left: 0.6rem;
  }
  .site-search input:focus::placeholder { color: #64748b; }
  .site-header__bar { padding: 0.35rem 0.7rem 0.4rem; }
  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .site-auth__credits { font-size: 0.72rem; }
  .site-nav { gap: 0.15rem 0.75rem; }
}

.site-footer {
  background: rgba(15, 23, 42, 0.8);
  border-top: 1px solid rgba(99, 102, 241, 0.18);
  margin-top: 3rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.25rem;
  padding: 1.1rem 0.9rem;
  color: #64748b;
  font-size: 0.8rem;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.site-footer__nav a {
  color: #94a3b8;
  text-decoration: none;
  font-weight: 600;
}

.site-footer__nav a:hover {
  color: #e2e8f0;
}
