:root {
  color-scheme: dark;
  --bg: #080b0e;
  --surface: rgba(18, 25, 30, 0.86);
  --surface-strong: rgba(8, 11, 14, 0.92);
  --line: rgba(233, 180, 76, 0.24);
  --line-cool: rgba(142, 161, 173, 0.32);
  --text: #f5f3ed;
  --muted: #cfc8ba;
  --dim: #918b81;
  --accent: #e9b44c;
  --accent-cool: #8ea1ad;
  --danger: #ffb3a6;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(90deg, rgba(8, 11, 14, 0.92), rgba(8, 11, 14, 0.72) 48%, rgba(8, 11, 14, 0.9)),
    linear-gradient(180deg, rgba(8, 11, 14, 0.42), rgba(8, 11, 14, 0.95)),
    url("app_background_fhd.jpg") center / cover fixed,
    var(--bg);
  color: var(--text);
}

a {
  color: var(--accent);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-shell {
  width: min(1320px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding: 10px 0 28px;
}

.site-title {
  margin: 0;
  max-width: 760px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: 0;
}

.site-subtitle {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.action-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 13px;
  background: rgba(8, 11, 14, 0.58);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.action-link.primary {
  border-color: transparent;
  background: var(--accent);
  color: #10161b;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr auto;
  gap: 12px;
  align-items: center;
  margin: 8px 0 22px;
  padding: 12px;
  border: 1px solid var(--line-cool);
  border-radius: var(--radius);
  background: rgba(8, 11, 14, 0.6);
  backdrop-filter: blur(12px);
}

.search-field {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(245, 243, 237, 0.22);
  border-radius: 6px;
  padding: 0 13px;
  background: rgba(8, 11, 14, 0.72);
  color: var(--text);
  outline: none;
}

.search-field:focus {
  border-color: var(--accent);
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-tab {
  min-height: 38px;
  border: 1px solid rgba(245, 243, 237, 0.2);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(16, 22, 27, 0.72);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.category-tab[aria-pressed="true"] {
  border-color: transparent;
  background: var(--accent);
  color: #10161b;
}

.feed-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(70px, 1fr));
  gap: 8px;
  min-width: 190px;
}

.feed-counts div {
  border: 1px solid rgba(245, 243, 237, 0.14);
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(16, 22, 27, 0.72);
}

.feed-counts strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.feed-counts span {
  display: block;
  margin-top: 4px;
  color: var(--dim);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-line {
  min-height: 24px;
  margin: 0 0 18px;
  color: var(--muted);
}

.status-line.error {
  color: var(--danger);
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 410px);
  gap: 20px;
  align-items: start;
}

.creator-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.creator-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid rgba(245, 243, 237, 0.16);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-align: left;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.creator-card[aria-selected="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(233, 180, 76, 0.18), 0 18px 50px rgba(0, 0, 0, 0.34);
}

.creator-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #10161b;
}

.creator-card-body {
  display: grid;
  gap: 8px;
  padding: 13px;
}

.creator-category {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.creator-card h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.05;
}

.creator-location {
  color: var(--muted);
  font-size: 13px;
}

.creator-bio {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.detail-panel {
  position: sticky;
  top: 18px;
  overflow: hidden;
  border: 1px solid var(--line-cool);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.detail-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #10161b;
}

.detail-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.detail-body h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.detail-meta span {
  border: 1px solid rgba(245, 243, 237, 0.14);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.04);
}

.detail-bio {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.gallery-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.gallery-strip img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: #10161b;
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 86px;
  gap: 14px;
  align-items: center;
}

.contact-links {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.contact-links a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-image {
  width: 86px;
  height: 86px;
  border-radius: 6px;
  background: #f8fafc;
}

.empty-state {
  display: none;
  border: 1px solid var(--line-cool);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(8, 11, 14, 0.72);
  color: var(--muted);
}

.empty-state.is-visible {
  display: block;
}

@media (max-width: 1120px) {
  .toolbar {
    grid-template-columns: 1fr;
  }

  .feed-counts {
    width: 100%;
    max-width: 320px;
  }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: static;
  }
}

@media (max-width: 840px) {
  .site-shell {
    width: min(100% - 28px, 680px);
    padding-top: 22px;
  }

  .site-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .creator-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body {
    background-attachment: scroll;
  }

  .creator-grid {
    grid-template-columns: 1fr;
  }

  .contact-row {
    grid-template-columns: 1fr;
  }
}
