:root {
  --blue-900: #115bd8;
  --blue-700: #1477ff;
  --blue-500: #20a3ff;
  --blue-100: #eaf7ff;
  --ink: #0c2530;
  --muted: #66818c;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --line: rgba(9, 58, 91, 0.12);
  --shadow: 0 18px 38px rgba(10, 70, 120, 0.16);
  --soft-shadow: 0 10px 24px rgba(10, 70, 120, 0.12);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 6%, rgba(255,255,255,.22), transparent 22%),
    linear-gradient(180deg, #1269f0 0%, #1ea3ff 34%, #8de9ff 100%);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }

.playroom-app {
  width: min(1280px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px clamp(18px, 3vw, 34px) 42px;
}

.playroom-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 8px 0 18px;
  color: white;
}
.playroom-header::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 92px;
  z-index: -1;
  background: linear-gradient(180deg, rgba(17,91,216,.96), rgba(17,91,216,.76) 70%, transparent);
  pointer-events: none;
}
.playroom-header h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(28px, 4.2vw, 48px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1;
}
.icon-button {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 18px;
  display: inline-grid;
  place-items: center;
  background: rgba(255,255,255,.9);
  color: var(--blue-900);
  box-shadow: var(--soft-shadow);
  font-size: 21px;
}
.language-button span {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.playroom-tools {
  display: grid;
  gap: 18px;
  margin: 4px auto 22px;
}
.search-box {
  width: min(640px, 100%);
  height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.48);
  box-shadow: var(--soft-shadow);
}
.search-box i { color: var(--blue-700); font-size: 18px; }
.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 500;
  font-size: 16px;
}
.search-box input::placeholder { color: rgba(63, 91, 104, .72); }

.filter-row {
  display: flex;
  justify-content: center;
  gap: clamp(9px, 1.4vw, 16px);
  overflow-x: auto;
  padding: 3px 4px 8px;
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: 0 0 auto;
  min-width: 74px;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 22px;
  background: rgba(17,91,216,.28);
  color: rgba(255,255,255,.9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}
.filter-chip .filter-icon { font-size: 20px; line-height: 1; }
.filter-chip.is-active {
  background: rgba(255,255,255,.94);
  color: var(--blue-900);
  border-color: rgba(255,255,255,.72);
  box-shadow: var(--soft-shadow);
}

.section-label {
  width: fit-content;
  margin: 0 auto 22px;
  padding: 9px 28px 10px;
  border-radius: 999px;
  color: white;
  background: rgba(17,91,216,.44);
  font-size: clamp(18px, 2.6vw, 28px);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 40px);
}
.game-card {
  min-width: 0;
  display: block;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface-strong);
  border: 1px solid rgba(255,255,255,.42);
  box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.game-card[href]:hover { transform: translateY(-3px); box-shadow: 0 24px 46px rgba(10,70,120,.21); }
.game-card.is-soon { opacity: .88; }
.card-thumb {
  position: relative;
  height: clamp(128px, 15vw, 178px);
  overflow: hidden;
  background: linear-gradient(145deg, #fff0b8, #bdf4ff);
}
.card-thumb::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.54));
  pointer-events: none;
}
.thumb-scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.62), transparent 13%),
    linear-gradient(145deg, var(--thumb-a), var(--thumb-b));
}
.thumb-scene img {
  width: min(62%, 160px);
  max-height: 86%;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgba(15, 58, 91, .2));
}
.thumb-scene .emoji {
  font-size: clamp(58px, 8vw, 96px);
  filter: drop-shadow(0 12px 16px rgba(15, 58, 91, .18));
}
.status-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  color: white;
  background: rgba(18, 46, 76, .48);
  backdrop-filter: blur(7px);
  font-size: 12px;
  font-weight: 600;
}
.card-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 22px 16px 13px;
  color: white;
  font-size: clamp(15px, 1.55vw, 20px);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0,0,0,.28);
}
.empty-state {
  margin: 36px auto 0;
  width: fit-content;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.88);
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 960px) {
  .games-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .playroom-app { padding: 14px 14px 34px; }
  .playroom-header { gap: 10px; padding-bottom: 15px; }
  .playroom-header::before { height: 82px; }
  .icon-button { width: 48px; height: 48px; border-radius: 17px; }
  .search-box { height: 54px; border-radius: 20px; }
  .filter-row { justify-content: flex-start; padding-left: 2px; padding-right: 2px; }
  .filter-chip { min-height: 52px; min-width: 66px; padding: 0 14px; }
  .filter-chip .filter-text:not(.keep-text) { display: none; }
  .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .card-thumb { height: 132px; }
  .section-label { margin-bottom: 18px; }
}
@media (max-width: 390px) {
  .games-grid { gap: 12px; }
  .card-thumb { height: 122px; }
  .card-title { padding: 20px 12px 11px; font-size: 14px; }
}
