@font-face {
    font-family: 'Vazir';
    src: url('../../fonts/Vazir.woff2') format('woff2');
    font-display: swap;
}

* {
      box-sizing: border-box;
      font-family: 'Vazir';
      direction: rtl;
      text-align: center;

    }
    body {
      margin: 0;
      padding: 0;
      background: url('../../images/game/1/b1.jpg') no-repeat center center fixed;
      background-size: cover;
      overflow: hidden;
    }
    .main-box {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: url('../../images/game/1/menu-box-bg.png') no-repeat center center;
      background-size: cover;
      width: 500px;
      height: 700px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 20px;
    }
    .menu-btn {
      width: 180px;
      height: 50px;
      background-size: cover;
      background-repeat: no-repeat;
      background-position: center;
      border: none;
      cursor: pointer;
      font-size: 0;
      border-radius: 15px;
      box-shadow: 0 0 10px rgba(0,0,0,0.3);
    }
    .btn-start    { background-image: url('../../images/game/1/btn-start.png'); }
    .btn-records  { background-image: url('../../images/game/1/btn-records.png'); }
    .btn-settings { background-image: url('../../images/game/1/btn-settings.png'); }
    .btn-guide    { background-image: url('../../images/game/1/btn-guide.png'); }
    .btn-about    { background-image: url('../../images/game/1/btn-about.png'); }
    .btn-exit     { background-image: url('../../images/game/1/btn-exit.png'); }

    .popup, #game, #settings, #about, #records {
      display: none;
      position: absolute;
      top: 20%;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(255,255,255,0.95);
      padding: 30px;
      border-radius: 20px;
      box-shadow: 0 0 20px rgba(0,0,0,0.3);
      z-index: 1000;
    }
    .popup h2 {
      margin-top: 0;
    }
    .close-btn {
      margin-top: 20px;
      padding: 10px 20px;
      background: #dc3545;
      color: white;
      border: none;
      border-radius: 10px;
      cursor: pointer;
    }

    .guide-box {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  padding: 10px 15px;
  max-width: 200px;
  animation: fadeSlideUp 0.6s ease;
  z-index: 9999;
}

#lampCharacter {
  width: 100px;
  height: auto;
  flex-shrink: 0;
  margin-right: 15px;
}

.guide-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#guideText {
  margin: 0;
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  max-width: 70vw;
}

.guide-buttons {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.guide-buttons .close-btn {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.3s;
}

.guide-buttons .close-btn:hover {
  background-color: #2980b9;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

    .music-toggle {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 20px;
    }
    .toggle-switch {
      width: 50px;
      height: 24px;
      background: #ccc;
      border-radius: 20px;
      position: relative;
      cursor: pointer;
    }
    .toggle-circle {
      width: 22px;
      height: 22px;
      background: #fff;
      border-radius: 50%;
      position: absolute;
      top: 1px;
      left: 1px;
      transition: 0.3s;
    }
    .toggle-switch.active {
      background: #4caf50;
    }
    .toggle-switch.active .toggle-circle {
      left: 27px;
    }

    .bg-options img {
      width: 100px;
      cursor: pointer;
      margin: 5px;
      border: 2px solid transparent;
      border-radius: 10px;
    }
    .bg-options img.selected {
      border-color: #28a745;
    }

    .game-version {
  position: fixed;
  bottom: 15px;
  right: 15px;
  font-size: 14px;
  font-weight: bold;
  color: #fff3b0; /* طلایی ملایم */
  background: linear-gradient(145deg, #8b5e3c, #704830); /* گرادیانت چوبی ملایم */
  padding: 6px 12px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  font-family: 'Vazir', sans-serif;
}

/* نسخه موبایل */
@media (max-width: 486px) {
    body {
        background: url('../../images/game/1/b1m.jpg') no-repeat center center fixed;
        background-size: cover;
    }

    .main-box {
        width: 350px;
        /* عرض کمتر برای موبایل */
        height: 450px;
        /* ارتفاع خودکار */
        padding: 20px;
        gap: 15px;
    }

    .menu-btn {
        width: 140px;
        /* دکمه کوچکتر */
        height: 40px;
        border-radius: 12px;
    }

    #guideText {
        font-size: 12px;
        /* متن راهنما کوچکتر */
        max-width: 60vw;
    }

    #lampCharacter {
        width: 60px;
        /* اندازه کاراکتر کوچکتر */
    }

    .guide-buttons .close-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    .bg-options img {
        width: 70px;
        /* تصاویر بک‌گراند کوچکتر */
        margin: 3px;
    }

    .popup,
    #game,
    #settings,
    #about,
    #records {
        width: 90vw;
        padding: 20px;
        top: 15%;
    }

    .game-version {
        font-size: 12px;
        padding: 4px 8px;
    }

         /* حذف هایلایت پیشفرض موبایل */
         * {
             -webkit-tap-highlight-color: transparent;
         }
    
         /* فوکوس حرفه‌ای */
         a,
         button,
         input,
         select,
         textarea {
             transition: all 0.2s ease;
             border-radius: 12px;
         }
    
         /* افکت لمس موبایل */
         a:active,
         button:active {
             transform: scale(0.95);
         }
         
}