/* Каталог игр — тёмная неоновая тема */
:root {
  --bg: #0d0f1a;
  --card: #171a2b;
  --card2: #1e2238;
  --line: #2b3050;
  --text: #eef0ff;
  --muted: #9aa2c7;
  --accent: #7c5cff;
  --gold: #ffd60a;
  --green: #3ddc97;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.bg { position: fixed; border-radius: 50%; filter: blur(110px); opacity: .35; z-index: 0; pointer-events: none; }
.bg--1 { width: 460px; height: 460px; background: #7c5cff; top: -140px; left: -120px; animation: float1 14s ease-in-out infinite; }
.bg--2 { width: 420px; height: 420px; background: #ff5d73; bottom: -160px; right: -120px; animation: float2 17s ease-in-out infinite; }
@keyframes float1 { 50% { transform: translate(60px, 40px) scale(1.1); } }
@keyframes float2 { 50% { transform: translate(-50px, -40px) scale(1.08); } }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  background: rgba(13, 15, 26, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; color: var(--text); text-decoration: none; }
.logo span { background: linear-gradient(90deg, #9d8cff, #4cc9f0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar__actions { display: flex; gap: 10px; align-items: center; }
.stat {
  font-family: "Courier New", monospace; font-weight: 700; font-size: 14px;
  background: var(--card2); border: 1px solid var(--line); padding: 8px 12px; border-radius: 999px;
}
.pillbtn {
  cursor: pointer; font: inherit; font-weight: 700; font-size: 14px; color: var(--text);
  background: var(--card2); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px;
  transition: transform .15s, border-color .15s;
}
.pillbtn:hover { transform: translateY(-2px); border-color: var(--accent); }
.pillbtn.is-on { background: var(--gold); color: #17120a; border-color: var(--gold); }
.pillbtn b { color: var(--gold); }
.pillbtn.is-on b { color: #17120a; }

main { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 34px 20px 60px; }

.hero { text-align: center; padding: 26px 0 10px; }
h1 { font-size: clamp(32px, 6vw, 54px); margin: 0 0 12px; line-height: 1.08; letter-spacing: -1px; }
.accent { background: linear-gradient(90deg, #ffd60a, #ff5d73, #7c5cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); max-width: 640px; margin: 0 auto 22px; font-size: 17px; line-height: 1.55; }

.chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin: 14px 0; }
.chip {
  cursor: pointer; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--muted); background: var(--card); border: 1px solid var(--line);
  padding: 8px 15px; border-radius: 999px; transition: all .15s;
}
.chip:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }

.spin {
  cursor: pointer; font: inherit; font-size: 20px; font-weight: 800; color: #17120a;
  background: linear-gradient(135deg, var(--gold), #ff9f1c);
  border: none; padding: 16px 34px; border-radius: 999px; margin: 8px 0 26px;
  box-shadow: 0 10px 30px rgba(255, 214, 10, .28);
  transition: transform .15s, box-shadow .15s;
}
.spin:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 14px 38px rgba(255, 214, 10, .42); }
.spin:active { transform: scale(.97); }
.spin__icon { display: inline-block; margin-right: 8px; }
.spin.is-rolling .spin__icon { animation: shake .28s linear infinite; }
@keyframes shake { 25% { transform: rotate(-18deg); } 75% { transform: rotate(18deg); } }

.slot { max-width: 640px; margin: 0 auto; }
.slot__card {
  display: flex; gap: 18px; align-items: center; text-align: left;
  background: var(--card); border: 2px solid var(--line); border-radius: 22px;
  padding: 20px 22px; min-height: 128px;
  transition: border-color .3s, transform .3s;
}
.slot__card.is-win { border-color: var(--green); transform: scale(1.02); box-shadow: 0 12px 40px rgba(61, 220, 151, .18); }
.slot__emoji { font-size: 56px; line-height: 1; flex-shrink: 0; width: 72px; text-align: center; filter: drop-shadow(0 6px 12px rgba(0,0,0,.5)); }
.slot__title { font-size: 22px; font-weight: 800; margin-bottom: 5px; }
.slot__desc { color: var(--muted); font-size: 15px; line-height: 1.5; }
.slot__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.tag {
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--card2); border: 1px solid var(--line); color: var(--muted);
}
.tag--genre { color: #cbbdff; border-color: #4a3f8f; }
.tag--year { color: var(--gold); border-color: #6b5a12; }

.slot-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.btn {
  cursor: pointer; font: inherit; font-size: 15px; font-weight: 700;
  padding: 11px 18px; border-radius: 12px; text-decoration: none; display: inline-block;
  transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn--ghost { background: var(--card2); color: var(--text); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--accent); }
.btn--gold { background: var(--gold); color: #17120a; border: 1px solid var(--gold); }
.btn--link { background: transparent; color: #7fd0ff; border: 1px solid #265f80; }

.catalog { margin-top: 52px; }
.catalog__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.catalog h2 { font-size: 26px; margin: 0; }
.toolbar { flex: 1; display: flex; justify-content: flex-end; min-width: 240px; }
.search {
  width: 100%; max-width: 340px; font: inherit; font-size: 15px; color: var(--text);
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 11px 18px;
  outline: none; transition: border-color .15s;
}
.search:focus { border-color: var(--accent); }

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px; margin-top: 12px;
}
.card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 9px;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  animation: pop .35s ease both;
}
@keyframes pop { from { opacity: 0; transform: translateY(14px); } }
.card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 14px 34px rgba(0, 0, 0, .4); }
.card.is-fav { border-color: var(--gold); }
.card__emoji { font-size: 40px; line-height: 1; }
.card__title { font-size: 17px; font-weight: 800; line-height: 1.25; }
.card__dev { font-size: 13px; color: var(--muted); }
.card__desc { font-size: 14px; color: var(--muted); line-height: 1.45; flex: 1; }
.card__row { display: flex; flex-wrap: wrap; gap: 6px; }
.card__links { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.card__wiki {
  font-size: 13px; font-weight: 700; color: #7fd0ff; text-decoration: none;
  border-bottom: 1px dashed #265f80;
}
.card__wiki:hover { color: #b8e6ff; }
.fav {
  cursor: pointer; font-size: 18px; line-height: 1; background: none;
  border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px;
  color: var(--muted); transition: all .15s;
}
.fav:hover { border-color: var(--gold); transform: scale(1.1); }
.fav.is-on { color: var(--gold); border-color: var(--gold); background: rgba(255, 214, 10, .1); }

.empty { text-align: center; color: var(--muted); font-size: 17px; padding: 30px 0; }

.footer {
  position: relative; z-index: 1; text-align: center; color: var(--muted);
  font-size: 14px; padding: 26px 16px 34px; border-top: 1px solid var(--line);
}

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(90px);
  background: var(--card2); border: 1px solid var(--accent); color: var(--text);
  padding: 12px 20px; border-radius: 999px; font-size: 15px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all .3s; z-index: 50;
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

.is-hidden { display: none !important; }

@media (max-width: 640px) {
  .slot__card { flex-direction: column; text-align: center; }
  .slot__tags { justify-content: center; }
  .catalog__head { flex-direction: column; align-items: stretch; }
  .toolbar { justify-content: stretch; }
  .search { max-width: none; }
}
