:root {
  --bg: #121b24;
  --surface: #1a2a38;
  --surface-2: #24384a;
  --text: #f5f7fa;
  --muted: #c8d4e0;
  --primary: #ff6a2a;
  --primary-hover: #ff7a3f;
  --border: #3f596f;
  --ring: #ffd230;
  --shadow: 0 16px 34px rgba(255, 106, 42, 0.22);
  --radius: 16px;
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.25rem;
  --space-5: 1.75rem;
  --space-6: 2.5rem;
  --maxw: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", "Gill Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 90, 34, 0.45) 0%, transparent 42%),
    radial-gradient(circle at 90% 20%, rgba(255, 178, 34, 0.26) 0%, transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(20, 45, 66, 0.8) 0%, transparent 52%),
    var(--bg);
  line-height: 1.5;
}

a,
button,
select {
  font: inherit;
}

a:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 12px;
}

.wrap {
  width: min(var(--maxw), 100% - 2rem);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

header {
  padding: var(--space-6) 0 var(--space-4);
}

.brand-row {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--space-3);
  border: 1px solid var(--border);
  background: linear-gradient(140deg, rgba(255, 106, 42, 0.2), rgba(255, 210, 48, 0.16));
  border-radius: 999px;
  padding: 0.35rem 0.8rem 0.35rem 0.35rem;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(255, 210, 48, 0.6);
  box-shadow: 0 0 18px rgba(255, 106, 42, 0.5);
}

.brand-name {
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 106, 42, 0.45);
  font-size: 0.85rem;
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 0 20px rgba(255, 106, 42, 0.25);
}

.subtitle {
  margin: var(--space-1) 0 0;
  color: var(--muted);
  max-width: 60ch;
}

main {
  padding-bottom: var(--space-6);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.filter-label {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
}

.filter-select {
  min-width: 170px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
}

.empty-state {
  margin: var(--space-3) 0 0;
  color: var(--muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  display: grid;
  gap: var(--space-3);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #ff8349;
}

.paddle-visual {
  height: 140px;
  background: linear-gradient(135deg, #21374a 0%, #2d455a 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.paddle-visual::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 92px;
  height: 112px;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.4), transparent 35%),
    linear-gradient(160deg, #415c73, #2d4a63);
  border-radius: 52% 52% 46% 46% / 58% 58% 42% 42%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22);
}

.paddle-visual::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 24px;
  height: 40px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #ff9c28, #ff6a2a);
  border-radius: 9px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.paddle-visual.has-image::before,
.paddle-visual.has-image::after {
  content: none;
}

.paddle-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.topline {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: var(--space-2);
}

.title-wrap {
  margin: 0;
  padding: 0;
  display: grid;
  align-content: start;
}

.name {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.25;
}

.brand {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.badge {
  justify-self: start;
  align-self: start;
  margin-top: 0;
  padding: 0.3rem 0.6rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid #ff944f;
  color: #ffd56b;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
  line-height: 1.2;
}

.desc {
  margin: 0;
  color: #d2dce7;
  font-size: 0.95rem;
}

.actions {
  margin-top: auto;
}

.shop-btn,
.pending-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  transition: transform 120ms ease, background-color 120ms ease;
  cursor: pointer;
}

.shop-btn {
  background: var(--primary);
  color: #ffffff;
}

.shop-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.pending-btn {
  background: #2b3f50;
  border-color: #4d677d;
  color: #b2c2d1;
  cursor: not-allowed;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  border: 1px solid var(--border);
  background: rgba(28, 42, 56, 0.92);
  color: var(--text);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-weight: 700;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  z-index: 20;
  cursor: pointer;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
