/* ==========================================================================
   FindKpop — shared stylesheet
   Design language: "price ticker meets photocard" — a live deal tracker
   built around the merch fans actually collect (photocards, tickets, holo).
   ========================================================================== */

:root {
  /* -- color: stage-black base, coral stage-light + holo gold accents -- */
  --ink: #0a0a10;
  --ink-raised: #0f0f17;
  --surface: #15151f;
  --surface-2: #1b1b28;
  --line: #26263a;
  --line-soft: #1d1d2a;
  --paper: #f4f2ee;
  --muted: #9391a6;
  --muted-dim: #6b697c;

  --coral: #ff3d77;
  --coral-dim: rgba(255, 61, 119, 0.14);
  --gold: #f6c453;
  --gold-dim: rgba(246, 196, 83, 0.14);
  --focus: #7c9cff;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 12px 30px -18px rgba(0, 0, 0, 0.7);
  --shadow-raised: 0 20px 44px -20px rgba(0, 0, 0, 0.75);

  --font-display: "Unbounded", "Inter", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

button,
input,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--coral);
  color: #12121a;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ==========================================================================
   NAV
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  background: rgba(10, 10, 16, 0.78);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--paper);
  white-space: nowrap;
}

.logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 3px var(--coral-dim);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-links a {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--paper);
  background: var(--surface-2);
}

.nav-links a.active {
  color: var(--ink);
  background: var(--paper);
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 24px 0;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(560px 280px at 50% -10%, rgba(255, 61, 119, 0.22), transparent 70%),
    radial-gradient(420px 240px at 85% 0%, rgba(246, 196, 83, 0.14), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid rgba(246, 196, 83, 0.28);
  padding: 6px 14px;
  border-radius: 999px;
}

.eyebrow-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

.hero h1 {
  margin-top: 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--coral), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold);
}

.hero-sub {
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* SEARCH */
.search-form {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-shell {
  display: flex;
  width: min(520px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-shell:focus-within {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px var(--coral-dim);
}

.search-shell input {
  flex: 1;
  min-width: 0;
  padding: 15px 16px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--paper);
}

.search-shell input::placeholder {
  color: var(--muted-dim);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.12s ease, background 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  padding: 15px 24px;
  background: var(--coral);
  color: #17070e;
  border-radius: 12px;
  font-size: 14px;
}

.btn-primary:hover {
  background: #ff5c8d;
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(23, 7, 14, 0.35);
  border-top-color: #17070e;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn-primary.is-loading .spinner {
  display: inline-block;
}

.btn-primary.is-loading .btn-label {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* QUICK TAGS */
.quick {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.chip:hover {
  border-color: var(--coral);
  color: var(--paper);
  background: var(--coral-dim);
}

/* TICKER */
.ticker {
  position: relative;
  z-index: 1;
  margin-top: 44px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 36px;
  padding: 13px 0;
  animation: ticker 32s linear infinite;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.ticker-item::after {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  margin-left: 36px;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   SORT BAR + RESULTS
   ========================================================================== */

.sort-bar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.result-count {
  font-size: 13px;
  color: var(--muted-dim);
  font-family: var(--font-mono);
}

.select-shell {
  position: relative;
}

.select-shell::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.select-shell select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 11px 36px 11px 16px;
  border-radius: 10px;
  cursor: pointer;
}

.select-shell select:hover {
  border-color: #333349;
}

.results {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 24px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

/* CARD */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: #34344a;
}

.card-media {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--surface-2);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--gold);
  color: #241804;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

.card h3 {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.price-row {
  position: relative;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1.5px dashed var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.price-row::before,
.price-row::after {
  content: "";
  position: absolute;
  top: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  border: 1px solid var(--line);
}

.price-row::before { left: -26px; }
.price-row::after { right: -26px; }

.price {
  font-family: var(--font-mono);
  color: var(--gold);
  font-weight: 600;
  font-size: 15px;
}

.store {
  font-size: 12px;
  color: var(--muted-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45%;
}

.card-link {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--coral);
  text-decoration: none;
}

.card-link:hover {
  color: #ff6b98;
}

.card-link-disabled {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted-dim);
}

/* SKELETON */
.skeleton .card-media,
.skeleton .sk-line {
  background: linear-gradient(100deg, var(--surface-2) 30%, #24243480 50%, var(--surface-2) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.sk-line {
  height: 12px;
  border-radius: 6px;
  margin-top: 14px;
}

.sk-line.short { width: 60%; margin-top: 10px; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* STATE PANEL (empty / error) */
.state-panel {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--muted);
}

.state-panel .state-icon {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin-bottom: 10px;
}

.state-panel h4 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--paper);
  margin-bottom: 8px;
}

.state-panel p {
  font-size: 14px;
  max-width: 380px;
  margin: 0 auto;
}

.state-panel.is-error {
  border-color: rgba(255, 61, 119, 0.3);
  background: rgba(255, 61, 119, 0.04);
}

/* ==========================================================================
   ARTISTS PAGE
   ========================================================================== */

.toolbar {
  position: relative;
  z-index: 1;
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar .search-shell {
  width: min(360px, 100%);
}

.toolbar .search-shell input {
  padding: 13px 16px;
}

.group {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 24px 24px;
}

.group-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-dim);
  padding: 24px 0 14px;
  border-top: 1px solid var(--line-soft);
}

.group:first-of-type .group-label {
  border-top: none;
  padding-top: 0;
}

.artist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}

.id-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 14px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.id-card:hover,
.id-card:focus-visible {
  transform: translateY(-4px);
  border-color: #34344a;
  background: var(--surface-2);
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: rgba(10, 10, 16, 0.82);
}

.avatar-0 { background: linear-gradient(135deg, #ff3d77, #f6c453); }
.avatar-1 { background: linear-gradient(135deg, #7c9cff, #ff3d77); }
.avatar-2 { background: linear-gradient(135deg, #f6c453, #ff7a3d); }
.avatar-3 { background: linear-gradient(135deg, #b76bff, #ff3d77); }
.avatar-4 { background: linear-gradient(135deg, #4adede, #7c9cff); }
.avatar-5 { background: linear-gradient(135deg, #ff7a3d, #f6c453); }

.id-card h3 {
  font-size: 13.5px;
  font-weight: 600;
}

.id-card .tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted-dim);
  text-transform: uppercase;
}

.no-results-inline {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

/* ==========================================================================
   ABOUT PAGE
   ========================================================================== */

.about-grid {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 90px;
  display: grid;
  gap: 16px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
}

.panel.accent {
  border-left: 3px solid var(--coral);
  border-top-color: var(--line);
}

.panel .panel-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  display: block;
}

.panel h2 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  margin-bottom: 10px;
}

.panel p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14.5px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 40px auto 0;
  max-width: 760px;
  padding: 0 24px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  background: linear-gradient(100deg, var(--coral), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat span {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  border-top: 1px solid var(--line-soft);
  padding: 48px 24px 32px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}

.footer-brand .logo {
  margin-bottom: 8px;
}

.footer-brand p {
  color: var(--muted-dim);
  font-size: 13px;
  max-width: 280px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-col h5 {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-dim);
  margin-bottom: 12px;
  font-weight: 600;
}

.footer-col a {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 9px;
}

.footer-col a:hover {
  color: var(--paper);
}

.footer-bottom {
  max-width: 1180px;
  margin: 36px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--muted-dim);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 720px) {
  .nav { padding: 14px 18px; }
  .nav-links a { padding: 7px 11px; font-size: 13px; }
  .hero { padding: 56px 18px 0; }
  .results { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; padding: 8px 18px 60px; }
  .sort-bar { padding: 28px 18px 12px; }
  .card { padding: 12px; }
  .price-row::before,
  .price-row::after { display: none; }
  .stat-row { grid-template-columns: 1fr; padding: 0 18px; }
  .footer-inner { flex-direction: column; }
  .about-grid { padding: 36px 18px 70px; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 30px; }
  .artist-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* ==========================================================================
   MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
  .eyebrow-pulse { animation: none; }
  .card:hover, .id-card:hover { transform: none; }
  .skeleton .card-media, .skeleton .sk-line { animation: none; }
}
