/* --- RESET & GLOBALS --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Baloo 2', 'Poppins', sans-serif;
  background-color: #f0fdf4; /* رنگ سبز بسیار روشن و آرام‌بخش */
  background-image: radial-gradient(#bbf7d0 2px, transparent 2px);
  background-size: 40px 40px; /* یک پترن نقطه‌ای ملایم و کودکانه */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* --- GAME CONTAINER --- */
.game-container {
  text-align: center;
  width: 90%;
  max-width: 1000px;
  position: relative;
}

/* --- NAVIGATION BUTTONS --- */
.nav-btn {
  position: absolute;
  top: -40px;
  background-color: #ffffff;
  color: #3b82f6;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 18px;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  border: 2px solid #bfdbfe;
  transition: transform 0.2s, background-color 0.2s;
}

.btn-back { left: 0; }
.btn-home { right: 0; }

.nav-btn:hover {
  transform: scale(1.05);
  background-color: #eff6ff;
}

/* --- HEADER --- */
.game-header h1 {
  font-size: 50px;
  color: #16a34a;
  text-shadow: 2px 2px 0px #ffffff;
  margin-bottom: 10px;
}

.game-header p {
  font-size: 24px;
  color: #475569;
  margin-bottom: 40px;
}

/* --- CARDS GRID --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  padding: 20px;
}

/* --- MAGIC CARDS --- */
.magic-card {
  background-color: white;
  border-radius: 20px;
  padding: 20px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  border: 4px solid #e2e8f0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.magic-card:hover {
  transform: translateY(-10px) scale(1.05);
  border-color: #f59e0b;
  box-shadow: 0 15px 30px rgba(245, 158, 11, 0.3);
}

/* افکت درخشش هنگام کلیک */
.magic-card.active-card {
  border-color: #10b981;
  background-color: #ecfdf5;
  transform: scale(0.95);
}

.card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.card-img {
  height: 120px;
  width: auto;
  object-fit: contain;
  margin-bottom: 15px;
  transition: transform 0.3s;
}

.magic-card:hover .card-img {
  transform: scale(1.1) rotate(5deg);
}

.card-title {
  font-size: 24px;
  color: #334155;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
  .nav-btn { top: -60px; font-size: 14px; padding: 8px 15px; }
  .game-header h1 { font-size: 36px; }
  .game-header p { font-size: 18px; }
  .card-img { height: 90px; }
}
/* --- جلوگیری از خطای کلیک روی عکس و متن --- */
.card-inner, .card-title, .card-img {
  pointer-events: none;
}