:root {
  color-scheme: light dark;
  --background: #f6f9fc;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-dark: rgba(17, 24, 39, 0.65);
  --text: #1f2933;
  --text-muted: #4f5b66;
  --accent: #ff7a59;
  --accent-strong: #ff5c33;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #f9fbff 0%, #eef1ff 40%, #fff7f2 100%);
  color: var(--text);
}

.hero {
  background: radial-gradient(circle at top left, #ffd2c6, transparent 60%),
    radial-gradient(circle at top right, #d4e7ff, transparent 50%),
    radial-gradient(circle at bottom, #fff0c6, transparent 55%);
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}

.hero__content {
  margin: 0 auto;
  max-width: 64rem;
  background: var(--surface);
  backdrop-filter: blur(10px);
  padding: 2.5rem 1.5rem;
  border-radius: 1.75rem;
  box-shadow: var(--shadow);
}

h1 {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  margin-bottom: 1rem;
  color: var(--text);
}

.hero p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 auto 1.5rem;
  max-width: 42rem;
  color: var(--text-muted);
}

code {
  background-color: rgba(31, 41, 51, 0.08);
  padding: 0.2rem 0.4rem;
  border-radius: 0.4rem;
  font-size: 0.95rem;
}

.search {
  display: grid;
  gap: 0.75rem;
}

.search__label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search__field {
  display: flex;
  align-items: center;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.65);
  padding: 0.25rem 0.5rem 0.25rem 1rem;
  border: 1px solid rgba(79, 91, 102, 0.15);
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.search__field:focus-within {
  box-shadow: 0 0 0 4px rgba(255, 122, 89, 0.2);
  transform: translateY(-2px);
}

.search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  padding: 0.6rem 0.75rem 0.6rem 0;
}

.search input:focus {
  outline: none;
}

.search__clear {
  border: none;
  background: none;
  font-size: 1.75rem;
  color: var(--text-muted);
  padding: 0 0.75rem;
  cursor: pointer;
  border-radius: 50%;
}

.search__clear:focus-visible {
  outline: 3px solid rgba(255, 122, 89, 0.45);
  outline-offset: 2px;
}

main {
  flex: 1;
  padding: 2rem 1.25rem 4rem;
  max-width: 90rem;
  margin: 0 auto;
  width: 100%;
}

.status {
  text-align: center;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1.5rem;
}

.sticker-card {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 1.25rem;
  padding: 1rem;
  display: grid;
  gap: 1rem;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.sticker-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.18);
}

.sticker-card__media {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 8rem;
}

.sticker-card__media img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
}

.sticker-card__title {
  margin: 0;
  font-size: 1.05rem;
  text-transform: capitalize;
  color: var(--text);
}

.sticker-card__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms
      ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 3px solid rgba(255, 122, 89, 0.45);
  outline-offset: 2px;
}

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 10px 25px rgba(255, 122, 89, 0.35);
}

.btn--primary:active {
  transform: translateY(1px);
}

.btn--ghost {
  background: rgba(31, 41, 51, 0.08);
  color: var(--text);
}

.footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .hero__content {
    padding: 2rem 1.25rem;
  }

  .sticker-grid {
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  }

  .sticker-card {
    padding: 0.85rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0f172a;
    --surface: rgba(15, 23, 42, 0.8);
    --text: #f9fbff;
    --text-muted: #cbd5f5;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  }

  body {
    background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.2), transparent 60%),
      radial-gradient(circle at top right, rgba(59, 130, 246, 0.25), transparent 55%),
      radial-gradient(circle at bottom, rgba(249, 115, 22, 0.22), transparent 55%),
      #0f172a;
    color: var(--text);
  }

  .hero__content,
  .sticker-card {
    background: var(--surface-dark);
  }

  .search__field {
    background-color: rgba(15, 23, 42, 0.6);
    border-color: rgba(203, 213, 225, 0.2);
  }

  .btn--ghost {
    background: rgba(148, 163, 184, 0.18);
    color: var(--text);
  }
}
