﻿.surface-card {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--surface-overlay);
  border: 0.5px solid var(--outline);
  box-shadow: inset 1px 1px 0 rgba(212, 175, 55, 0.08);
}

.glass-surface {
  backdrop-filter: blur(var(--blur));
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 0.5px solid rgba(77, 70, 53, 0.3);
  background: rgba(19, 19, 20, 0.4);
  color: rgba(208, 197, 175, 0.54);
  transition:
    color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease,
    border-color 180ms ease;
}

.icon-button:hover {
  color: var(--gold);
  background: rgba(53, 52, 54, 0.34);
  border-color: rgba(212, 175, 55, 0.32);
  transform: translateY(-1px);
}

.icon-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.icon-button .icon-svg {
  width: 1.32rem;
  height: 1.32rem;
}

.quicksearch-menu {
  position: absolute;
  top: calc(100% + 0.8rem);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 0.4rem;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background: rgba(20, 20, 21, 0.95);
  border: 0.5px solid rgba(77, 70, 53, 0.32);
  box-shadow: var(--shadow-soft);
}

.quicksearch-hit,
.quicksearch-empty {
  border-radius: var(--radius-md);
}

.quicksearch-hit {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 0.75rem 0.85rem;
  background: rgba(28, 27, 28, 0.72);
  transition: background-color 180ms ease, transform 180ms ease;
}

.quicksearch-hit:hover {
  background: rgba(53, 52, 54, 0.44);
  transform: translateY(-1px);
}

.quicksearch-hit__media {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.65rem;
  height: 2.65rem;
  overflow: hidden;
  border-radius: 0.55rem;
  background: rgba(14, 14, 15, 0.72);
  border: 0.5px solid rgba(77, 70, 53, 0.32);
}

.quicksearch-hit__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quicksearch-hit__copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.quicksearch-hit__copy strong {
  font-size: 0.96rem;
  font-weight: 700;
}

.quicksearch-hit__copy small,
.quicksearch-empty {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.quicksearch-empty {
  padding: 0.85rem;
  background: rgba(28, 27, 28, 0.72);
}

.header-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: var(--gold-ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 0 0 rgba(242, 202, 80, 0);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.header-login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(242, 202, 80, 0.28);
  filter: brightness(1.02);
}

.header-profile {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  min-height: 2.8rem;
  padding: 0.35rem 0.4rem 0.35rem 0.45rem;
  border-radius: 0.85rem;
  border: 0.5px solid rgba(77, 70, 53, 0.32);
  background: rgba(28, 27, 28, 0.84);
  max-width: 26rem;
}

.header-profile__avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  overflow: hidden;
  border: 0.5px solid rgba(212, 175, 55, 0.3);
  background: rgba(14, 14, 15, 0.8);
}

.header-profile__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-profile__copy {
  display: grid;
  min-width: 0;
  gap: 0.08rem;
}

.header-profile__copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text);
}

.header-profile__copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(208, 197, 175, 0.56);
  font-size: 0.66rem;
  font-weight: 600;
}

.header-profile__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.header-profile__link,
.header-profile__logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0 0.75rem;
  border-radius: 0.65rem;
  background: rgba(19, 19, 20, 0.58);
  border: 0.5px solid rgba(77, 70, 53, 0.28);
  color: rgba(229, 226, 227, 0.74);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.header-profile__link:hover,
.header-profile__logout:hover {
  color: var(--gold);
  border-color: rgba(212, 175, 55, 0.32);
}

.auth-skeleton {
  width: 10rem;
  height: 2.5rem;
  border-radius: 0.7rem;
  background: linear-gradient(90deg, rgba(28, 27, 28, 0.76), rgba(53, 52, 54, 0.46), rgba(28, 27, 28, 0.76));
  background-size: 220% 100%;
  animation: auth-pulse 1.4s linear infinite;
}

@keyframes auth-pulse {
  0% { background-position: 0 0; }
  100% { background-position: 220% 0; }
}

@media (max-width: 980px) {
  .header-profile {
    max-width: min(100%, 26rem);
  }
}

@media (max-width: 720px) {
  .header-profile {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: stretch;
  }

  .header-profile__actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}
