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

* {
      font-family: 'Vazir';
    }

/* =========================
   BASE
========================= */
body {
    margin: 0;
    font-family: 'Vazir';
    direction: rtl;
    background: url('/assets/images/game/2/b1.webp') no-repeat center center fixed;
    overflow-x: hidden;
    background-size: cover;
}

.game-error-box {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);

    min-width: 260px;
    max-width: 420px;

    background: rgba(239, 68, 68, 0.95);
    color: white;

    padding: 12px 16px;
    border-radius: 14px;

    font-size: 14px;
    font-weight: bold;

    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
    backdrop-filter: blur(10px);

    opacity: 0;
    visibility: hidden;

    transition: all 0.25s ease;

    z-index: 9999;
    text-align: center;
}

/* show state */
.game-error-box.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* =========================
   MAIN MENU
========================= */
.main-box {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 14px;

    backdrop-filter: blur(2px);
}

.menu-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;

    padding: 25px 20px;
    border-radius: 28px;

    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);

    box-shadow:
        0 20px 60px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255,255,255,0.3);

    border: 1px solid rgba(255,255,255,0.2);

    position: relative;
}

/* =========================
   BUTTONS (CORE STYLE)
========================= */
.menu-btn {
    width: 240px;
    padding: 14px 18px;

    border: none;
    border-radius: 18px;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;

    background: rgba(255,255,255,0.9);
    color: #1e293b;

    box-shadow:
        0 10px 20px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.6);

    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

/* hover effect */
.menu-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 18px 30px rgba(0,0,0,0.15);
}

/* click effect */
.menu-btn:active {
    transform: scale(0.97);
}

/* =========================
   START BUTTON (MAIN CTA)
========================= */
.btn-start {
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: white;
    font-size: 18px;

    box-shadow:
        0 20px 40px rgba(79,70,229,0.35);
}

/* glow animation */
.btn-start::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: -100%;

    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.6s;
}

.btn-start:hover::before {
    left: 100%;
}

/* =========================
   EXIT BUTTON
========================= */
.btn-exit {
    background: #ef4444;
    color: white;
}

/* =========================
   POPUPS (ALL MODALS)
========================= */
.popup,
.guide-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);

    width: 92%;
    max-width: 420px;

    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);

    border-radius: 22px;

    padding: 20px;

    box-shadow: 0 25px 60px rgba(0,0,0,0.25);

    opacity: 0;
    visibility: hidden;

    transition: all 0.25s ease;
    z-index: 1000;
}

/* ACTIVE STATE */
.popup.active,
.guide-box.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* =========================
   GUIDE IMAGE
========================= */
#lampCharacter {
    width: 120px;
    display: block;
    margin: 0 auto 10px;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.15));
}

/* =========================
   GUIDE TEXT
========================= */
.guide-content {
    text-align: center;
    font-size: 15px;
    color: #334155;
}

/* =========================
   GUIDE BUTTONS
========================= */
.guide-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

/* =========================
   CLOSE BUTTON
========================= */
.close-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 12px;

    background: #334155;
    color: white;

    cursor: pointer;

    transition: 0.2s;
}

.close-btn:hover {
    background: #1e293b;
    transform: scale(1.05);
}

/* =========================
   MUSIC TOGGLE
========================= */
.music-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.toggle-switch {
    width: 52px;
    height: 26px;

    background: #cbd5e1;
    border-radius: 999px;

    position: relative;
    cursor: pointer;

    transition: 0.3s;
}

.toggle-circle {
    width: 22px;
    height: 22px;

    background: white;
    border-radius: 50%;

    position: absolute;
    top: 2px;
    left: 3px;

    transition: 0.3s;
}

.toggle-switch.active {
    background: #4f46e5;
}

.toggle-switch.active .toggle-circle {
    left: 27px;
}

/* =========================
   BACKGROUND OPTIONS
========================= */
.bg-options {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.bg-options img {
    width: 72px;
    height: 50px;

    border-radius: 10px;
    cursor: pointer;

    border: 2px solid transparent;

    transition: 0.2s;
}

.bg-options img:hover {
    transform: scale(1.08);
}

.bg-options img.selected {
    border-color: #4f46e5;
}

/* =========================
   RECORD LIST
========================= */
#recordsList {
    padding: 0;
    list-style: none;
    text-align: center;
    color: #475569;
}

/* =========================
   VERSION
========================= */
.game-version {
    position: fixed;
    bottom: 10px;
    left: 10px;

    font-size: 12px;
    color: #000000;

    background: rgba(255,255,255,0.5);
    padding: 4px 10px;
    border-radius: 10px;
}
/* =========================
   RESPONSIVE (MAX 486px)
   SMALL MOBILE
========================= */
@media (max-width: 486px) {

   body {
    overflow: hidden;
    background: url('/assets/images/game/2/b1m.webp') no-repeat center center fixed;
    background-size: cover;
}

    .main-box {
        gap: 10px;
        padding: 12px;
    }


    .popup,
    .guide-box {
        width: 94%;
        max-width: 340px;
        padding: 16px;
        border-radius: 18px;
    }

    #lampCharacter {
        width: 100px;
    }

    .guide-content {
        font-size: 13px;
        line-height: 1.6;
    }

    .guide-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .bg-options img {
        width: 70px;
        height: 100px;
    }


    .game-version {
        font-size: 11px;
    }

  /* حذف هایلایت پیشفرض موبایل */
         * {
             -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);
         }

}