html {
    height: 100%;
    overflow: hidden;
    /* Дополнительная защита от скроллбаров */
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

body {
    margin: 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.87);
    background-color: #0f0f0f;
    /* Предотвращаем выделение текста и контекстное меню */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    /* Предотвращаем зум при двойном тапе */
    touch-action: manipulation;
    /* Убираем полосы прокрутки */
    overflow: hidden;
    height: 100%;
}

/* Скрываем скроллбары для WebKit браузеров */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

#app {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Safe area vars for CrazyGames banners; updated dynamically */
    --safe-top: 0px;
    --safe-right: 0px;
    --safe-bottom: 0px;
    --safe-left: 0px;
    /* Дополнительная защита от выделения */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    /* Блокируем контекстное меню */
    -webkit-context-menu: none;
    -moz-context-menu: none;
    -ms-context-menu: none;
}

/* Make Phaser container consume the area between banners */
#game-container {
    position: absolute;
    top: var(--safe-top);
    bottom: var(--safe-bottom);
    left: var(--safe-left);
    right: var(--safe-right);
    /* Let Phaser scale handle internal fit; container defines the available box */
    overflow: hidden;
}

/* Дополнительные стили для iframe контекста */
* {
    box-sizing: border-box;
}

/* Убираем скроллбары для всех элементов */
*::-webkit-scrollbar {
    display: none;
}

/* Для Firefox */
* {
    scrollbar-width: none;
}

/* Для IE/Edge */
* {
    -ms-overflow-style: none;
}

/* CrazyGames Banner Styles */
#banner-landscape {
    width: 160px;
    height: 600px;
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 9999;
    display: none;
}

#banner-portrait {
    width: 728px;
    height: 90px;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: none;
}

/* Responsive behavior for game container when banners are shown */
body.banner-landscape #app {
    /* No safe area needed for landscape - game container stays centered */
}

body.banner-portrait #app {
    --safe-bottom: 90px;
}
