:root {
  --primary: #6c5ce7;
  --primary-dark: #5a4bd4;
  --accent: #fdcb6e;
  --pink: #fd79a8;
  --green: #00b894;
  --blue: #0984e3;
  --red: #e84393;
  --bg-grad: linear-gradient(135deg, #a29bfe 0%, #74b9ff 50%, #81ecec 100%);
  --card-bg: #ffffff;
  --text: #2d3436;
  --text-light: #636e72;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(45, 52, 54, 0.15);
  --shadow-hover: 0 16px 40px rgba(45, 52, 54, 0.25);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Baloo 2', 'Comic Sans MS', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg-grad);
  background-attachment: fixed;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin: 16px 20px 0;
  padding: 10px 18px;
  background: var(--card-bg);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-weight: 700;
  font-size: 15px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.back-link:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--shadow-hover);
}

.site-header {
  text-align: center;
  padding: 28px 16px 8px;
}
.site-header h1 {
  font-size: clamp(28px, 5vw, 44px);
  margin: 0 0 6px;
  color: #2d1b69;
  text-shadow: 2px 2px 0 rgba(255,255,255,.4);
}
.site-header p {
  margin: 0;
  color: #2d1b69;
  opacity: .8;
  font-size: 16px;
}

.game-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px 16px 48px;
  text-align: center;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.btn {
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.04); box-shadow: var(--shadow-hover); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn.secondary { background: var(--text-light); }
.btn.accent { background: var(--accent); color: #6c4a00; }
.btn.pink { background: var(--pink); }
.btn.green { background: var(--green); }

.score-badge {
  display: inline-block;
  background: var(--card-bg);
  border-radius: 999px;
  padding: 8px 20px;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.site-footer {
  text-align: center;
  padding: 16px;
  font-size: 13px;
  color: #2d1b69;
  opacity: .7;
}

/* Home grid */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 20px 48px;
}

.game-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.game-card:hover {
  transform: translateY(-6px) rotate(-1deg) scale(1.03);
  box-shadow: var(--shadow-hover);
}
.game-card .emoji {
  font-size: 48px;
  line-height: 1;
}
.game-card h3 {
  margin: 4px 0 0;
  font-size: 19px;
}
.game-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-light);
}
