/* LessonLab EduGames — umumiy uslub */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sky: #7dd3fc;
  --sky-deep: #0284c7;
  --ink: #0f172a;
  --ink-soft: #475569;
  --bg: #f0f9ff;
  --card: #ffffff;
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  --violet: #8b5cf6;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(2, 132, 199, .12);
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #e0f2fe 0%, var(--bg) 40%, #fff 100%);
  color: var(--ink);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

.wrap { max-width: 980px; margin: 0 auto; padding: 16px 16px 48px; }

/* ── Header ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0 18px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand b { font-size: 19px; font-weight: 800; }
.brand .tag {
  font-size: 11px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--sky-deep));
  padding: 3px 9px; border-radius: 999px; margin-left: 2px;
}
.back-link {
  text-decoration: none; color: var(--sky-deep); font-weight: 700; font-size: 14px;
  background: #fff; border: 2px solid #bae6fd; padding: 8px 14px; border-radius: 12px;
}
.back-link:active { transform: scale(.97); }

/* ── Hub sarlavha ── */
.hub-hero { text-align: center; padding: 14px 0 26px; }
.hub-hero h1 { font-size: clamp(26px, 6vw, 40px); font-weight: 800; letter-spacing: -.5px; }
.hub-hero h1 .grad {
  background: linear-gradient(90deg, var(--sky-deep), var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hub-hero p { color: var(--ink-soft); margin-top: 8px; font-size: 15px; }

/* ── O'yin kartalari ── */
.games-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.game-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 190px; padding: 18px 16px; border-radius: var(--radius);
  text-decoration: none; color: #fff; overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.game-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(2,132,199,.2); }
.game-card:active { transform: scale(.98); }
.game-card .emoji { font-size: 52px; line-height: 1; margin-bottom: auto; filter: drop-shadow(0 4px 8px rgba(0,0,0,.2)); }
.game-card h3 { font-size: 18px; font-weight: 800; margin-top: 14px; }
.game-card p { font-size: 12.5px; opacity: .92; margin-top: 4px; }
.game-card .pill {
  position: absolute; top: 12px; right: 12px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .4px;
  padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.25);
  backdrop-filter: blur(4px);
}
.game-card .pill.free { background: var(--green); }
.game-card.soon { opacity: .68; cursor: default; pointer-events: none; }

.g-blue   { background: linear-gradient(140deg, #38bdf8, #2563eb); }
.g-pink   { background: linear-gradient(140deg, #f472b6, #db2777); }
.g-orange { background: linear-gradient(140deg, #fbbf24, #ea580c); }
.g-green  { background: linear-gradient(140deg, #4ade80, #15803d); }
.g-violet { background: linear-gradient(140deg, #a78bfa, #6d28d9); }
.g-teal   { background: linear-gradient(140deg, #2dd4bf, #0f766e); }

/* ── O'yin sahifasi umumiy ── */
.game-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-bottom: 14px; }
.game-head h1 { font-size: 22px; font-weight: 800; }
.stat-row { display: flex; gap: 10px; flex-wrap: wrap; }
.stat {
  background: var(--card); border: 2px solid #e0f2fe; border-radius: 14px;
  padding: 8px 14px; font-weight: 800; font-size: 15px; color: var(--sky-deep);
  min-width: 76px; text-align: center;
}
.stat small { display: block; font-size: 10.5px; font-weight: 600; color: var(--ink-soft); letter-spacing: .3px; }

.panel {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 18px; text-align: center;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; text-decoration: none;
  font-family: inherit; font-weight: 800; font-size: 16px; color: #fff;
  background: linear-gradient(135deg, var(--sky-deep), #2563eb);
  padding: 14px 26px; border-radius: 16px;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .3);
  transition: transform .12s ease;
}
.btn:active { transform: scale(.96); }
.btn.ghost { background: #fff; color: var(--sky-deep); border: 2px solid #bae6fd; box-shadow: none; }
.btn.big { font-size: 18px; padding: 16px 34px; }

.choice-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }

/* ── Natija oynasi ── */
.result-stars { font-size: 44px; letter-spacing: 6px; margin: 8px 0; }
.result-title { font-size: 24px; font-weight: 800; }
.result-sub { color: var(--ink-soft); margin: 6px 0 18px; }

/* ── Footer ── */
.eg-footer { text-align: center; margin-top: 36px; color: var(--ink-soft); font-size: 13px; }
.eg-footer a { color: var(--sky-deep); font-weight: 700; text-decoration: none; }

@media (max-width: 480px) {
  .games-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .game-card { min-height: 168px; padding: 14px 12px; }
  .game-card .emoji { font-size: 42px; }
  .game-card h3 { font-size: 15.5px; }
  .game-card p { font-size: 11.5px; }
}
