:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fbff;
  --header-surface: #ffffff;
  --hero-surface: linear-gradient(135deg, #405de6 0%, #5851db 18%, #833ab4 40%, #c13584 62%, #e1306c 78%, #fd1d1d 90%, #f77737 100%);
  --footer-surface: #faf7fb;
  --text: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --accent: #e1306c;
  --accent-2: #405de6;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

html[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #0f1728;
  --surface-2: #121d31;
  --header-surface: #0f1728;
  --hero-surface: linear-gradient(135deg, #2d1a48 0%, #4c1d95 28%, #831843 58%, #9f1239 78%, #ea580c 100%);
  --footer-surface: #111827;
  --text: #eef4ff;
  --muted: #9fb0c8;
  --line: #23314a;
  --accent: #ff78a5;
  --accent-2: #8ea2ff;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, #eef3fb 100%);
}

html[data-theme="dark"] body {
  background: linear-gradient(180deg, #0b1220 0%, #10192b 100%);
}

a {
  color: inherit;
}

img,
video {
  display: block;
  max-width: 100%;
}

.page-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 42px;
}

.site-header {
  margin-bottom: 14px;
}

.top-nav,
.hero,
.search-panel,
.results-stack > section,
.how-strip article,
.faq-strip article,
.site-footer {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.top-nav {
  min-height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  background: var(--header-surface);
}

.creator-strip {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: #0d1117;
  box-shadow: var(--shadow);
  overflow: hidden;
}

html[data-theme="dark"] .creator-strip {
  background: #090d15;
}

.creator-strip-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.creator-strip-track::-webkit-scrollbar {
  display: none;
}

.recent-creator {
  width: 84px;
  flex: 0 0 84px;
  display: grid;
  gap: 8px;
  justify-items: center;
  text-decoration: none;
  color: #f8fbff;
}

.recent-creator-ring {
  width: 72px;
  height: 72px;
  padding: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f9ce34 0%, #ee2a7b 48%, #6228d7 100%);
}

.recent-creator-avatar {
  width: 100%;
  height: 100%;
  border: 3px solid #0d1117;
  border-radius: 999px;
  object-fit: cover;
  background: #202938;
}

html[data-theme="dark"] .recent-creator-avatar {
  border-color: #090d15;
}

.recent-creator-name {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 0.83rem;
  color: rgba(248, 251, 255, 0.94);
}

.wordmark {
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.wordmark span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav-links a {
  text-decoration: none;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle,
.brand-badge,
.scroll-top {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 12px;
}

.theme-toggle {
  position: relative;
  cursor: pointer;
}

.theme-sun,
.theme-moon {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
}

.theme-sun {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fbbf24;
}

.theme-moon {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid #a5b4fc;
  border-right-color: transparent;
  border-top-color: transparent;
  transform: translate(-50%, -50%) rotate(-35deg);
  opacity: 0;
}

html[data-theme="dark"] .theme-sun {
  opacity: 0;
}

html[data-theme="dark"] .theme-moon {
  opacity: 1;
}

.brand-badge,
.footer-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
}

.content {
  display: grid;
  gap: 14px;
}

.hero {
  min-height: 300px;
  border-radius: 20px;
  padding: 26px;
  display: flex;
  align-items: end;
  background: var(--hero-surface);
  color: #f8fbff;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  filter: blur(6px);
}

.hero-copy {
  max-width: 620px;
  position: relative;
  z-index: 1;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 8px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 700;
}

.hero h1,
.empty-state h2,
.result-copy h2 {
  margin: 0;
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero h1 {
  max-width: 10ch;
  font-size: clamp(2rem, 4vw, 4rem);
}

.hero p:last-child,
.result-text,
.empty-state p,
.ad-slot p,
.micro-copy p,
.how-strip p,
.faq-strip p,
.site-footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero p:last-child {
  color: rgba(248, 251, 255, 0.8);
}

.search-panel,
.result-section,
.empty-state {
  border-radius: 18px;
  padding: 18px;
}

.resolver-form {
  margin: 0;
}

.input-frame {
  min-height: 60px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.input-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(225, 48, 108, 0.1);
  position: relative;
}

.input-link::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 18px;
  height: 10px;
  transform: translate(-50%, -50%);
  border: 2px solid var(--accent);
  border-left: 0;
  border-right: 0;
  border-radius: 12px;
}

.input-frame input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

.submit-button,
.button,
.ghost-button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.submit-button,
.button {
  background: linear-gradient(135deg, #e1306c 0%, #c13584 52%, #833ab4 100%);
  color: #fff;
}

.ghost-button {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.ad-slot,
.micro-copy,
.ad-inline {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--surface-2);
}

.ad-slot span,
.ad-inline span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 700;
}

.results-stack {
  display: grid;
  gap: 14px;
}

.empty-state {
  background: var(--surface);
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 18px;
  align-items: start;
}

.result-copy h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.4rem);
  margin-bottom: 10px;
}

.owner-chip {
  width: fit-content;
  max-width: 100%;
  margin: 0 0 14px;
  padding: 8px 12px 8px 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  text-decoration: none;
  color: inherit;
}

.owner-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 999px;
  object-fit: cover;
  background: #d7deea;
}

.owner-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.94rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #e1306c 0%, #833ab4 100%);
}

.owner-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.owner-meta strong,
.owner-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-meta strong {
  font-size: 0.95rem;
}

.owner-meta span {
  color: var(--muted);
  font-size: 0.88rem;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 14px;
}

.vote-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.vote-button {
  min-height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.vote-button span {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.vote-button span svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.vote-button strong,
.vote-button em {
  font-style: normal;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.player-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  min-height: 420px;
}

.player-wrap img,
.player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-fallback {
  display: grid;
  place-items: center;
  color: #fff;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88px;
  height: 88px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  z-index: 2;
}

.play-badge::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-40%, -50%);
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #fff;
}

.player-wrap.is-playing .play-badge {
  opacity: 0;
  pointer-events: none;
}

.ad-inline {
  margin-top: 14px;
}

.catalog-section {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.catalog-head {
  margin-bottom: 16px;
}

.catalog-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  letter-spacing: -0.04em;
}

.catalog-head p:last-child,
.catalog-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.catalog-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}

.catalog-media {
  position: relative;
  display: block;
  min-height: 190px;
  background: #000;
}

.catalog-media img,
.catalog-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-body {
  padding: 11px;
}

.catalog-body .owner-chip {
  margin-bottom: 8px;
  padding: 6px 10px 6px 6px;
}

.catalog-body h3 {
  margin: 0 0 6px;
  font-size: 0.94rem;
  line-height: 1.3;
}

.catalog-body h3 a {
  color: inherit;
  text-decoration: none;
}

.catalog-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.88rem;
}

.catalog-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.catalog-actions {
  display: flex;
  gap: 8px;
}

.catalog-card .vote-row {
  margin-bottom: 10px;
}

.catalog-card .vote-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.catalog-card .button,
.catalog-card .ghost-button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.85rem;
}

.creator-page {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px 24px 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.creator-page-head {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  margin-bottom: 22px;
}

.creator-page-avatar-wrap {
  flex: 0 0 150px;
}

.creator-page-avatar {
  width: 150px;
  height: 150px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  background: #d7deea;
}

.creator-page-copy h2 {
  margin: 0;
  font-size: 1.7rem;
  letter-spacing: -0.04em;
}

.creator-page-topline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.creator-page-button {
  min-height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  background: var(--surface-2);
}

.creator-page-name {
  display: block;
  margin-bottom: 10px;
  font-size: 1rem;
}

.creator-page-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-bottom: 10px;
}

.creator-page-stats span {
  color: var(--text);
}

.creator-page-copy p {
  margin: 0;
  color: var(--muted);
}

.creator-page-tabs {
  margin-bottom: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
}

.creator-page-tabs span {
  margin-top: -1px;
  padding: 14px 0 10px;
  border-top: 1px solid var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

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

.creator-tile {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: 2px;
}

.creator-tile-link,
.creator-tile-media {
  display: block;
  aspect-ratio: 1 / 1;
}

.creator-tile-media img,
.creator-tile-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.creator-tile-actions {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  z-index: 3;
}

.tile-download {
  min-width: 84px;
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(12, 17, 23, 0.72);
  color: #fff;
  text-decoration: none;
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-footer {
  margin-top: 14px;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  background: var(--footer-surface);
  border-color: var(--line);
  color: var(--text);
}

.footer-logo {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  margin-bottom: 8px;
}

.footer-links {
  display: grid;
  gap: 8px;
  text-align: right;
}

.footer-links a {
  text-decoration: none;
  color: var(--muted);
}

.site-footer p {
  color: var(--muted);
}

.footer-logo {
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
}

.scroll-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  cursor: pointer;
}

.vote-notice {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(12, 17, 23, 0.92);
  color: #fff;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 30;
}

.vote-notice.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.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: 900px) {
  .nav-links,
  .result-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

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

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

  .nav-links {
    display: none;
  }

  .result-grid {
    display: grid;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 18px, 1120px);
  }

  .hero,
  .search-panel,
  .result-section,
  .empty-state,
  .how-strip article,
  .faq-strip article,
  .site-footer {
    border-radius: 14px;
  }

  .hero {
    padding: 18px;
  }

  .creator-strip {
    padding: 10px 12px;
  }

  .recent-creator {
    width: 72px;
    flex-basis: 72px;
  }

  .recent-creator-ring {
    width: 62px;
    height: 62px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .input-frame {
    grid-template-columns: 1fr;
  }

  .input-icon {
    display: none;
  }

  .submit-button,
  .button,
  .ghost-button {
    width: 100%;
  }

  .result-actions,
  .result-meta,
  .catalog-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .creator-page {
    padding: 16px 16px 14px;
  }

  .creator-page-head {
    gap: 16px;
  }

  .creator-page-avatar-wrap {
    flex-basis: 96px;
  }

  .creator-page-avatar {
    width: 96px;
    height: 96px;
  }

  .creator-page-topline {
    flex-wrap: wrap;
    gap: 10px;
  }

  .creator-page-copy h2 {
    font-size: 1.25rem;
  }

  .creator-page-stats {
    gap: 12px;
  }

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

  .catalog-media {
    min-height: 160px;
  }

  .catalog-body {
    padding: 10px;
  }
}
