/* ===== Bibliothek ===== */
body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(255, 92, 138, .16), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(255, 181, 71, .08), transparent 60%),
    var(--night);
  min-height: 100vh;
}

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(23, 18, 46, .78);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid rgba(59, 50, 112, .6);
}
.brand {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  font: 700 1.05rem/1 var(--f-display); letter-spacing: -.01em;
}
.brand img { border-radius: 10px; }
.search {
  margin-left: auto; position: relative; width: min(340px, 52vw);
}
.search-icon {
  position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%);
  color: var(--mute); pointer-events: none;
}
.search input {
  width: 100%; height: 42px; padding: 0 16px 0 42px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--night-2); outline: none;
  transition: border-color .15s, background .15s;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--amber); background: var(--night-3); }

main { padding: 0 clamp(16px, 4vw, 48px) 40px; max-width: 1440px; margin: 0 auto; }

/* ---------- Hero: das vorgestellte Spiel ---------- */
.hero {
  --c: var(--pink);
  position: relative; isolation: isolate; overflow: hidden;
  margin: 28px 0 8px;
  border-radius: 28px;
  min-height: clamp(380px, 52vh, 540px);
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center;
  gap: clamp(20px, 4vw, 56px);
  padding: clamp(28px, 5vw, 64px);
  background: var(--night-2);
  border: 1px solid rgba(255, 255, 255, .06);
}
.hero-bg {
  position: absolute; inset: -40px; z-index: -2;
  filter: blur(46px) saturate(1.4); opacity: .55; transform: scale(1.1);
}
.hero-bg .cover, .hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(23, 18, 46, .96) 0%, rgba(23, 18, 46, .78) 45%, rgba(23, 18, 46, .2) 100%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .14) 0 1px, transparent 1px 4px);
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center;
  color: var(--mute); font-weight: 650; font-size: .92rem; margin-bottom: 18px;
}
.hero-meta .genre {
  padding: 5px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--c) 22%, transparent);
  color: color-mix(in srgb, var(--c) 55%, white 45%);
}
.hero h1 {
  margin: 0 0 18px;
  font: 800 clamp(2.4rem, 6.4vw, 5.6rem)/.92 var(--f-display);
  letter-spacing: -.045em; text-wrap: balance;
  color: #fff;
  text-shadow: 0 0 1px #fff, 0 0 26px color-mix(in srgb, var(--c) 75%, transparent), 0 0 70px color-mix(in srgb, var(--c) 45%, transparent);
  animation: marquee-on 1.4s steps(1) both;
}
@keyframes marquee-on {
  0% { opacity: 0; }
  12% { opacity: .9; }
  18% { opacity: .15; }
  30% { opacity: 1; }
  36% { opacity: .35; }
  44%, 100% { opacity: 1; }
}
.hero p.tag {
  margin: 0 0 30px; max-width: 46ch;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: #d9d1f5;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* große Kassette rechts */
.hero-cart {
  justify-self: center; width: min(100%, 380px);
  transform: rotate(4deg);
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .55)) drop-shadow(0 0 60px color-mix(in srgb, var(--c) 35%, transparent));
}
.hero-cart .cart-shell { pointer-events: none; }

/* ---------- Regale ---------- */
.shelf { margin-top: 44px; }
.shelf-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-bottom: 22px; }
.shelf-title {
  margin: 0; font: 700 clamp(1.15rem, 2.2vw, 1.45rem)/1.2 var(--f-display); letter-spacing: -.02em;
}
.shelf > .shelf-title { margin-bottom: 18px; }
.shelf-title small { color: var(--faint); font: 650 .95rem var(--f-body); margin-left: .5em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 36px; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--mute);
  font-weight: 650; font-size: .9rem;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { color: var(--ink); border-color: var(--mute); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--night); border-color: var(--ink); }

/* zuletzt gespielt: kompakte Leiste */
.recent {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.recent a {
  --c: var(--pink);
  flex: none; scroll-snap-align: start;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 18px 8px 8px; border-radius: 16px;
  background: var(--night-2); border: 1px solid var(--line);
  text-decoration: none; font-weight: 650;
  transition: border-color .15s, background .15s;
}
.recent a:hover { border-color: var(--c); background: var(--night-3); }
.recent .cover { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; flex: none; }
.recent .cover img { width: 100%; height: 100%; object-fit: cover; }
.recent .cover.art span { font-size: 1.1rem; left: 8px; bottom: 6px; }
.recent .cover.art::before { display: none; }

/* ---------- Kassetten-Raster ---------- */
.grid {
  display: grid; gap: clamp(18px, 2.4vw, 32px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 236px), 1fr));
}

.cart { --c: var(--pink); display: block; text-decoration: none; color: inherit; }
.cart-shell {
  position: relative;
  padding: 26px 14px 14px;
  border-radius: 14px 14px 18px 18px;
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 30%),
    linear-gradient(160deg, color-mix(in srgb, var(--c) 46%, #2a2150), color-mix(in srgb, var(--c) 18%, #1b1538));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 -3px 0 rgba(0, 0, 0, .25);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
/* Griffrillen oben */
.cart-shell::before {
  content: ''; position: absolute; left: 22px; right: 52px; top: 9px; height: 9px;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .28) 0 3px, rgba(255, 255, 255, .1) 3px 4px, transparent 4px 9px);
  border-radius: 2px;
}
.cart-label {
  position: relative; overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 4 / 3;
  background: var(--night);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .25), 0 0 0 4px rgba(255, 255, 255, .12);
}
.cart-label .cover { position: absolute; inset: 0; }
.cart-label .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.cart-label::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, .22) 0%, transparent 32%);
  mix-blend-mode: screen;
}
.cart-foot { padding: 14px 4px 2px; display: grid; gap: 4px; }
.cart-foot h3 {
  margin: 0; font: 700 1.02rem/1.2 var(--f-display); letter-spacing: -.02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cart-foot p {
  margin: 0; display: flex; justify-content: space-between; gap: 10px;
  color: color-mix(in srgb, var(--c) 30%, var(--mute)); font-size: .86rem; font-weight: 650;
}
.cart-foot p span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-play {
  position: absolute; right: 12px; bottom: 12px;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sunset); color: #1b0f1f;
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, .6);
  opacity: 0; transform: translateY(8px) scale(.9);
  transition: opacity .2s, transform .25s var(--ease);
}
.cart-play svg { width: 22px; height: 22px; margin-left: 3px; }

.cart:hover .cart-shell, .cart:focus-visible .cart-shell {
  transform: translateY(-8px) rotate(-1.2deg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 -3px 0 rgba(0, 0, 0, .25), 0 24px 40px -18px color-mix(in srgb, var(--c) 80%, transparent);
}
.cart:hover .cart-play, .cart:focus-visible .cart-play { opacity: 1; transform: none; }
.cart:hover .cart-label img { transform: scale(1.05); }
.cart:focus-visible { outline: none; }
.cart:focus-visible .cart-shell { outline: 2px solid var(--amber); outline-offset: 4px; }

/* Leere Zustände */
.empty {
  grid-column: 1 / -1;
  padding: 56px 24px; text-align: center;
  border: 1.5px dashed var(--line); border-radius: var(--r-l);
  color: var(--mute);
}
.empty h3 { margin: 0 0 8px; color: var(--ink); font: 700 1.25rem var(--f-display); }
.empty p { margin: 0 auto 20px; max-width: 42ch; }

.skeleton .cart-shell { background: var(--night-2); }
.skeleton .cart-label { background: var(--night-3); animation: blink 1.4s ease-in-out infinite; }
.skeleton .cart-foot h3 { width: 70%; height: 1.1em; background: var(--night-3); border-radius: 4px; }

.foot {
  display: flex; justify-content: space-between; gap: 16px;
  max-width: 1440px; margin: 0 auto;
  padding: 26px clamp(16px, 4vw, 48px) 40px;
  color: var(--faint); font-size: .9rem;
}
.foot a { color: var(--faint); text-decoration: none; }
.foot a:hover { color: var(--ink); }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; text-align: left; }
  .hero-cart { order: -1; width: min(70%, 260px); transform: rotate(3deg); }
  .hero::after { background: linear-gradient(180deg, rgba(23, 18, 46, .5), rgba(23, 18, 46, .95) 55%), repeating-linear-gradient(0deg, rgba(0, 0, 0, .14) 0 1px, transparent 1px 4px); }
  .brand span { display: none; }
  .search { width: 100%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
  .cart-shell { padding: 22px 10px 10px; }
  .cart-foot { padding-right: 44px; }
  .cart-foot h3 { font-size: .9rem; }
  .cart-foot p { flex-direction: column; gap: 0; font-size: .8rem; }
  .cart-play { opacity: 1; transform: none; width: 38px; height: 38px; right: 10px; bottom: 12px; }
  .cart-play svg { width: 17px; height: 17px; }
}
