:root{
  --bg-1:#fff8fc;
  --bg-2:#f6f4ff;
  --card:rgba(255,255,255,.92);
  --text:#2f2440;
  --muted:#786d8a;
  --pink:#ff78b2;
  --pink-dark:#e05597;
  --purple:#9f7dff;
  --blue:#79d0ff;
  --shadow:0 18px 46px rgba(86,53,116,.14);
  --shadow-soft:0 10px 24px rgba(86,53,116,.10);
}

*{box-sizing:border-box}

html{direction:rtl}

body{
  margin:0;
  min-height:100vh;
  font-family:Tahoma, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top right, rgba(255,203,227,.55), transparent 28%),
    radial-gradient(circle at bottom left, rgba(215,223,255,.72), transparent 34%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
}

a{
  color:inherit;
  text-decoration:none;
}

.game-page{
  min-height:100vh;
  padding:20px 14px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.game-shell{
  width:min(100%, 1080px);
}

.game-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.back-link,
.brand-badge{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 16px;
  border-radius:999px;
  background:rgba(255,255,255,.85);
  box-shadow:var(--shadow-soft);
  font-weight:700;
}

.back-link{
  color:var(--muted);
}

.brand-badge{
  background:linear-gradient(135deg,var(--pink),var(--purple));
  color:#fff;
}

.game-card{
  background:var(--card);
  box-shadow:var(--shadow);
  border-radius:32px;
  padding:24px;
  text-align:center;
}

.game-kicker{
  margin:0 0 8px;
  color:var(--pink-dark);
  font-size:14px;
  font-weight:800;
}

h1{
  margin:0 0 10px;
  font-size:clamp(30px, 5vw, 52px);
  line-height:1.1;
}

.game-desc{
  margin:0 auto 22px;
  color:var(--muted);
  line-height:1.9;
  font-size:15px;
  max-width:650px;
}

.scores-container{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:18px;
}

.score-box{
  min-width:180px;
  text-align:center;
  background:linear-gradient(180deg,#eef3ff,#dde7ff);
  padding:18px;
  color:#3d3651;
  border-radius:22px;
  box-shadow:var(--shadow-soft);
}

.score-box h2{
  margin:0;
}

.score-box h2:first-child{
  font-size:16px;
  margin-bottom:8px;
}

.score-box h2:last-child{
  font-size:34px;
}

.grid-container{
  display:flex;
  justify-content:center;
  align-items:center;
}

.grid{
  width:100%;
  max-width:960px;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(140px, 1fr));
  gap:14px;
  justify-content:center;
  align-items:center;
  background:rgba(255,255,255,.55);
  margin-top:1rem;
  padding:18px;
  border-radius:28px;
}

.square{
  aspect-ratio:1 / 1;
  background:linear-gradient(135deg,#5b536c,#3e384c);
  border-radius:20px;
  box-shadow:inset 0 2px 10px rgba(255,255,255,.05);
  cursor:pointer;
  transition:transform .15s ease, box-shadow .2s ease;
}

.square:hover{
  transform:scale(1.03);
}

.emoji{
  background-image:url("https://i.guim.co.uk/img/media/a1b7129c950433c9919f5670c92ef83aa1c682d9/55_344_1971_1183/master/1971.jpg?width=1200&height=900&quality=85&auto=format&fit=crop&s=88ba2531f114b9b58b9cb2d8e723abe1");
  background-position:center;
  background-size:cover;
}

@media (max-width: 640px){
  .game-page{
    padding:14px 10px;
    align-items:flex-start;
  }

  .game-card{
    padding:16px;
    border-radius:24px;
  }

  .score-box{
    min-width:140px;
    padding:14px;
    border-radius:18px;
  }

  .score-box h2:last-child{
    font-size:28px;
  }

  .grid{
    grid-template-columns:repeat(2, 1fr);
    gap:10px;
    padding:12px;
    border-radius:20px;
  }

  .square{
    border-radius:14px;
  }

  .game-desc{
    font-size:14px;
  }
}