* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Tahoma, "Segoe UI", sans-serif;
  background: #0f1020;
  color: #e8e8f0;
  min-height: 100vh;
}

header {
  text-align: center;
  padding: 30px 20px 10px;
}

header h1 {
  font-size: 2rem;
  color: #7c8cff;
}

header p {
  color: #9a9ab0;
  margin-top: 8px;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.filters {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 20px 0 30px;
}

.filter-btn {
  background: #1c1e35;
  color: #c8c8e0;
  border: 1px solid #2e3050;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: #7c8cff;
  color: #0f1020;
  border-color: #7c8cff;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.game-card {
  background: #1c1e35;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(124, 140, 255, 0.25);
}

.game-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #2e3050;
}

.game-card h3 {
  padding: 12px 14px 4px;
  font-size: 1.1rem;
}

.game-card p {
  padding: 0 14px 12px;
  color: #9a9ab0;
  font-size: 0.9rem;
  flex-grow: 1;
}

.play-btn {
  display: block;
  text-align: center;
  background: #7c8cff;
  color: #0f1020;
  font-weight: bold;
  padding: 10px;
  text-decoration: none;
  transition: 0.2s;
}

.play-btn:hover {
  background: #9aa6ff;
}

/* صفحه اجرای بازی */
.back-link {
  display: inline-block;
  margin-bottom: 10px;
  color: #7c8cff;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

#game-title {
  color: #e8e8f0;
  margin-bottom: 20px;
}

.game-container {
  width: 100%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(124, 140, 255, 0.15);
}

.game-container iframe {
  display: block;
  width: 100%;
  height: 70vh;
  border: none;
}