/* تنظیمات کلی */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: 'Vazir', Arial, sans-serif;
}

/* پیام چرخش صفحه */
.rotate-message {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1002;
    font-size: 24px;
}

/* پس‌زمینه صفحه */
.main-bg {
    background-image: url('img/first.jpg'); /* مسیر تصویر پس‌زمینه داخل پوشه img */
    background-size: cover;
    background-position: center;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* باکس متن در وسط صفحه */
.text-box {
    
        background-color: rgba(0, 0, 0, 0.507);
        padding: 20px;
        border-radius: 10px;
        width: 90vw;
        height: 90vh;
        text-align: center;
        color: rgb(233, 3, 3);
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        overflow: auto;
        box-sizing: border-box;
        margin: auto;
  
}

.text-box p {
    margin: 10px 0;
    font-size: 18px;
    color: #ffffff;
}

/* دکمه برای حالت تمام‌صفحه یا خروج از آن */
.fullscreen-toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 24px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 1001;
}

.fullscreen-toggle-btn:hover {
    color: red;
}

/* دکمه ورود به بازی */
#enter-game-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 20px;
}

#enter-game-btn:hover {
    background-color: #45a049;
}

/* چرخش صفحه به حالت افقی */
@media screen and (orientation: portrait) {
    .rotate-message {
        display: flex;
    }

    .main-bg, .fullscreen-toggle-btn {
        display: none;
    }
}

/* تنظیمات برای صفحات کوچک‌تر */

@media screen and (max-width: 768px) {
    .text-box {
        max-width: 90vw; /* حداکثر عرض باکس ۹۰ درصد عرض viewport در صفحات کوچک‌تر */
        max-height: 90vh; /* حداکثر ارتفاع باکس ۹۰ درصد ارتفاع viewport در صفحات کوچک‌تر */
        padding: 15px; /* کاهش padding برای صفحات کوچک‌تر */
        justify-content: none;
    }

    .text-box p {
        font-size: 16px; /* کاهش اندازه فونت برای صفحات کوچک‌تر */
    }
}