*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg-deep: #0c0e14;
  --bg-panel: #141824;
  --bg-panel-2: #1a2130;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e9ecf1;
  --muted: rgba(233, 236, 241, 0.64);
  --accent: #3ee0b9;
  --accent-dim: rgba(62, 224, 185, 0.18);
  --warn: #f4c46b;
  --danger: #f08080;
  --radius: 14px;
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
  font-family:
    'Recursive',
    ui-sans-serif,
    system-ui,
    sans-serif;
  font-feature-settings:
    'ss01' 1,
    'ss03' 1,
    'ss05' 1;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.55;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
}

.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 100% 80% at 20% -20%, rgba(62, 224, 185, 0.12), transparent 52%),
    radial-gradient(circle at 92% 8%, rgba(94, 128, 255, 0.08), transparent 38%),
    linear-gradient(180deg, var(--bg-deep) 0%, #08090d 100%);
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem clamp(1.25rem, 4vw, 2.5rem) 4rem;
}

.masthead {
  margin-bottom: 2.25rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-variation-settings: 'CASL' 0, 'MONO' 1;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.masthead h1 {
  font-family: 'Literata', Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.9rem, 4.5vw, 2.5rem);
  line-height: 1.18;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0;
  font-size: 1.06rem;
  color: var(--muted);
  max-width: 48ch;
}

.panel {
  background: linear-gradient(145deg, var(--bg-panel) 0%, var(--bg-panel-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.35rem, 3vw, 1.85rem);
  box-shadow: var(--shadow);
}

.search-panel {
  margin-bottom: 1.5rem;
}

.search-form,
.cache-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.search-form .field,
.cache-form .field-inline {
  flex: 1 1 240px;
  min-width: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.field input {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: inherit;
  font-variation-settings: 'MONO' 1;
  font-size: 1rem;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.field input::placeholder {
  color: rgba(233, 236, 241, 0.32);
}

.field input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.btn {
  appearance: none;
  border-radius: 10px;
  border: none;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0.76rem 1.35rem;
  font-size: 0.95rem;
  transition:
    transform 0.06s ease,
    filter 0.15s ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(160deg, #4af0c9 0%, #2aab8f 95%);
  color: #081012;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.35rem 0;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(233, 236, 241, 0.36);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.status {
  border-radius: 10px;
  padding: 0.85rem 1.05rem;
  margin-bottom: 1.25rem;
  font-variation-settings: 'MONO' 0;
  border: 1px solid transparent;
}

.status.busy {
  background: rgba(62, 224, 185, 0.1);
  border-color: rgba(62, 224, 185, 0.22);
}

.status.success {
  background: rgba(62, 224, 185, 0.08);
}

.status.err {
  background: rgba(240, 128, 128, 0.1);
  border-color: rgba(240, 128, 128, 0.25);
  color: #ffc8c8;
}

.result .user-card {
  margin-bottom: 1.5rem;
}

.user-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 540px) {
  .user-head {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .avatar-wrap {
    margin: 0 auto;
  }

  .facts {
    justify-content: center;
  }

  .search-form,
  .cache-form {
    flex-direction: column;
  }

  .search-form .btn-primary,
  .btn-ghost {
    width: 100%;
  }
}

.avatar-wrap {
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  width: 112px;
  height: 112px;
  flex-shrink: 0;
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-meta {
  min-width: 0;
}

.user-name {
  font-family: 'Literata', serif;
  font-weight: 600;
  margin: 0 0 0.2rem;
  font-size: 1.5rem;
  line-height: 1.2;
}

.user-handle {
  margin: 0 0 0.95rem;
  color: var(--muted);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  margin: 0;
}

.facts dt {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(233, 236, 241, 0.45);
}

.facts dd {
  margin: 0.28rem 0 0;
  font-variation-settings: 'MONO' 1;
  font-feature-settings:
    'tnum' 1,
    'lnum' 1;
}

.collect-banner {
  margin-top: 1.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
}

.banner-title {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.banner-stats {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.banner-stats li {
  font-variation-settings: 'MONO' 0;
  font-size: 0.85rem;
  padding: 0.35rem 0.62rem;
  border-radius: 999px;
  background: rgba(62, 224, 185, 0.1);
  border: 1px solid rgba(62, 224, 185, 0.2);
}

.outfits-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.outfits-heading-row h2 {
  margin: 0;
  font-family: 'Literata', serif;
  font-weight: 600;
  font-size: 1.2rem;
}

.badge {
  font-size: 0.78rem;
  font-variation-settings: 'MONO' 1;
  padding: 0.25rem 0.62rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.muted.small {
  font-size: 0.82rem;
  margin: 0 0 1.15rem;
  color: var(--muted);
}

.pill {
  font-family:
    Recursive,
    monospace;
  font-variation-settings: 'MONO' 1;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.outfits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.95rem;
}

.outfit-cell {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
}

.outfit-thumb {
  aspect-ratio: 1;
  overflow: hidden;
  background: #0a0c12;
}

.outfit-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.outfit-thumb.placeholder {
  display: grid;
  place-items: center;
  font-size: 1.85rem;
  color: rgba(255, 255, 255, 0.12);
}

.outfit-caption {
  padding: 0.62rem 0.72rem;
  font-size: 0.82rem;
  line-height: 1.36;
}

.outfit-caption strong {
  display: block;
  font-weight: 600;
}

.outfit-id {
  margin-top: 0.28rem;
  font-size: 0.74rem;
  color: var(--muted);
  font-variation-settings: 'MONO' 1;
}

.foot {
  margin-top: 3rem;
  font-size: 0.76rem;
  color: rgba(233, 236, 241, 0.36);
}

.foot kbd {
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
