@import url('https://fonts.googleapis.com/css2?family=Changa:wght@400;500;600;700;800&display=swap');

root { 
    display: block;
}

html,
body{
    width: 100%;
    height: 100%;
    min-height: var(--app-height, 100dvh);
    margin: 0;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: none;
}

body{
    font-family: 'Changa', Arial, Tahoma, sans-serif;
    background-color: #000;
    background-image:
        radial-gradient(circle at 50% 35%, rgba(246,197,66,0.18), rgba(246,197,66,0) 22%),
        radial-gradient(circle at 20% 70%, rgba(47,143,47,0.24), rgba(47,143,47,0) 28%),
        linear-gradient(155deg, #080a10 0%, #210b10 42%, #7b1118 68%, #07080d 100%);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    overflow: hidden;
}

body:before{
    content: "";
    position: fixed;
    left: -20px;
    top: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    background: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(8px);
    transform: scale(1.03);
    z-index: -2;
}

body:after{
    content: "";
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.28);
    z-index: -1;
}

*, *:before, *:after {
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
     
input, input:before, input:after {
    -webkit-user-select: initial;
    -khtml-user-select: initial;
    -moz-user-select: initial;
    -ms-user-select: initial;
    user-select: initial;
}

::selection { background: transparent;color:inherit; }
::-moz-selection { background: transparent;color:inherit; }

#canvas{
    position: fixed;
    max-width: none;
    max-height: none;
    touch-action: none;
}

#game-rotate-wrapper{
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    width: var(--app-width, 100vw);
    height: 100vh;
    height: 100dvh;
    height: var(--app-height, 100dvh);
    overflow: hidden;
    background: transparent var(--bg-game-image, url("../sprites/bg_game.jpg")) center center / cover no-repeat;
    transform-origin: center center;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

#game-rotate-wrapper:before{
    content: "";
    position: absolute;
    inset: -14px;
    background: transparent var(--bg-game-image, url("../sprites/bg_game.jpg")) center center / cover no-repeat;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

body.menu-blur-bg #game-rotate-wrapper{
    background: #06070b;
}

body.menu-blur-bg #game-rotate-wrapper:before{
    opacity: 1;
    filter: blur(5px);
    transform: scale(1.03);
}

body.loading-game #game-rotate-wrapper,
body.loading-game.menu-blur-bg #game-rotate-wrapper{
    background: #07080d;
}

body.loading-game #game-rotate-wrapper:before,
body.loading-game.menu-blur-bg #game-rotate-wrapper:before{
    opacity: 0;
}

body.mobile-landscape-fixed #game-rotate-wrapper{
    width: var(--fake-landscape-width, 100vw);
    height: var(--fake-landscape-height, 100vh);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

body.mobile-landscape-fixed #canvas{
    position: absolute;
    left: 0;
    top: 0;
    background: transparent !important;
}

body.mobile-landscape-fixed #game-rotate-wrapper .three-render-container,
body.mobile-landscape-fixed #game-rotate-wrapper .three-render-container canvas{
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

body.fake-landscape-mobile #game-rotate-wrapper{
    width: var(--fake-landscape-width, 100vh);
    height: var(--fake-landscape-height, 100vw);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
}

body.fake-landscape-mobile #canvas{
    position: absolute;
    left: 0;
    top: 0;
    background: transparent !important;
}

#game-rotate-wrapper .three-render-container{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

#game-rotate-wrapper .three-render-container canvas{
    position: absolute !important;
    display: block;
}

#game-rotate-wrapper #canvas{
    z-index: 1;
}

@media (pointer: coarse){
    html,
    body{
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        min-height: var(--app-height, 100dvh);
        overflow: hidden;
        touch-action: none;
    }

}

canvas {
    image-rendering: auto;
    -ms-interpolation-mode: bicubic;
    -ms-touch-action: none;
}

.ani_hack{
    -webkit-perspective: 1000;
    -webkit-backface-visibility: hidden;
    
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent; /* mobile webkit */
}

/***************FONTS*******************/

.check-fonts{
        position: fixed;
        opacity:0;
}

.check-font-1{
        font-family: 'Changa', Arial, Tahoma, sans-serif;
}



@font-face {
    font-family: 'TradeGothic';
    src: url('TradeGothic-Bold.woff2') format('woff2'),
        url('TradeGothic-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
}
