* {
  box-sizing: border-box;
}

:root {
  --green-dark: #cf7c00;
  --green-mid: #ffaa29;
  --green-light: #ffb84d;
  --tan: #f1e3bc;
  --brown: #5d4037;
  --paper: #fdf6e3;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Vazirmatn', sans-serif;
  padding: 40px 20px 60px;
  background:
    radial-gradient(circle at 15% 20%, #b8ffa6 0 140px, transparent 141px),
    radial-gradient(circle at 85% 25%, #ffe8d3 0 160px, transparent 161px),
    radial-gradient(circle at 25% 85%, #ffc7e9 0 180px, transparent 181px),
    linear-gradient(180deg, #b7ecff 0%, #d8fff0 60%, #fff5d6 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.back-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  color: #333;
  font-weight: bold;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 10;
}

.back-btn:hover {
  background: #e8f5e9;
  transform: translateX(-3px);
}

h1 {
  margin: 10px 0 20px;
  font-size: 2.2rem;
  color: var(--green-dark);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
  text-align: center;
}

.game-container {
  display: flex;
  gap: 24px;
  width: 100%;
  max-width: 1300px;
  flex-wrap: wrap;
  justify-content: center;
}

.game-frame {
  background: #fff;
  border: 4px solid var(--green-mid);
  border-radius: 20px;
  padding: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  flex: 1;
  min-width: 320px;
  max-width: 800px;
}

.game-frame iframe {
  width: 100%;
  height: 600px;
  border: none;
  border-radius: 14px;
  display: block;
}

.lore-box {
  background: var(--paper);
  border: 2px dashed var(--green-dark);
  border-radius: 18px;
  padding: 20px;
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  max-height: 600px;
  display: flex;
  flex-direction: column;
}

.lore-box h2 {
  margin-top: 0;
  color: var(--green-dark);
  font-size: 1.6rem;
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 2px dotted var(--green-mid);
}

.scroll-content {
  overflow-y: auto;
  flex: 1;
  padding-right: 8px;
  line-height: 1.7;
  font-size: 1.05rem;
}

.enemy {
  color: #d32f2f;
  font-weight: bold;
}

.lore-box ul {
  padding-right: 20px;
  margin: 12px 0;
}

.lore-box li {
  margin-bottom: 8px;
}

.scroll-content::-webkit-scrollbar {
  width: 10px;
}
.scroll-content::-webkit-scrollbar-track {
  background: #f5f0e0;
  border-radius: 10px;
}
.scroll-content::-webkit-scrollbar-thumb {
  background: var(--green-light);
  border-radius: 10px;
  border: 2px solid #e0d6b7;
}
.scroll-content::-webkit-scrollbar-thumb:hover {
  background: var(--green-mid);
}

/* رسانه‌های پاسخگو */
@media (max-width: 1000px) {
  .game-container {
    flex-direction: column;
    align-items: center;
  }
  .game-frame,
  .lore-box {
    width: 95vw;
    max-width: 95vw;
  }
  .game-frame iframe {
    height: 520px;
  }
  .lore-box {
    max-height: 420px;
  }
}

@media (max-width: 500px) {
  h1 {
    font-size: 1.8rem;
  }
  .game-frame iframe {
    height: 440px;
  }
  .lore-box {
    max-height: 360px;
  }
}