@font-face {
    font-family: 'DelaGothicOne-Regular';
    src: url('./font/DelaGothicOne-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Bounded-Regular';
    src: url('./font/Bounded-Regular.ttf') format('truetype');
}

* {
    user-select: none; 
}

canvas {
    cursor: pointer;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}
body{
    font-family: 'DelaGothicOne-Regular', monospace;
    font-weight: 100;
    background-color: #636561;
    padding: 0;
    margin: 0;
    user-select: none; /* Запретить выделение текста */
    -webkit-user-select: none; /* Для Safari */
    -moz-user-select: none; /* Для Firefox */
    -ms-user-select: none; /* Для Internet Explorer и Edge */
}

.overlay_img{
    width: 100%;
    height: 100%;
    
}

img {
  pointer-events: none;
  user-select: none;
}

h1 {
    font-family: 'DelaGothicOne-Regular', monospace;
    font-weight: 100;
}

button {
    border: none; /* Убираем обводку */
    background: none; /* Убираем фоновый цвет */
    cursor: pointer; /* Устанавливаем курсор указателя */
}

button:hover {
    outline: none; /* Убираем выделение при наведении */
}

#main{
    overflow: hidden;
    /* background-color: #156da7; */
    /* background: url("./water_overlay.png"); 
    background-size:400px; */
}
.info{
    color: white;
    position: absolute;
}

#continentCanvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#m {
    position: fixed;
    z-index: 2;
}

#menu_content{
    width: 100vw;
    height: 100vh;
    position: fixed;
    display: none;
}

.multiplayer_anons{
    width: 600px;
    height: 270px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background:rgb(24 24 24 / 80%);
    border-radius: 12px;
    position: absolute;
    display: none;
}

#anonsimg {
    width: 200px;
    height: 300px;
    left: 0px;
    bottom: 0px;
    position: absolute;
    z-index: 3;
    display: none;
}

.button_anons{
    width: 90px;
    height: 70px;
}



.fc {
    display: flex;
    justify-content: center;
    gap: 20px;
}

#ok{
    background: url(./img/accept.png);
    background-size: cover;
}

#close {
    background: url(./img/reject.png);
    background-size: cover;
}

.multiplayer_anons h1{
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.centerh1{
    text-align: center;
}

.contecst{
    text-align: center;
    margin-left: 10px;
    margin-right: 10px;
}

.logo{
    background: url(./img/strategy_io.png);
    color: white;
    width: 60%;
    height: calc(46vw * 0.5);
    font-weight: 100;
    font-size: 160px;
    padding: 0;
    margin: 0;
    text-align: center;
    background-size: cover;
    background-position: 0;
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-shadow: 4px 3px 0 #7A7A7A, 4px 4px 5px #000000;
    pointer-events: none;
    user-select: none;
}

.container {
    text-align: center; /* Центрируем текст */
    padding: 20px; /* Отступы внутри контейнера */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: auto;
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.buttons_conteiner{
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100px
}

#user_input {
    font-family: 'DelaGothicOne-Regular', monospace;
    color: rgb(63, 63, 63);
    font-weight: 100;
    text-align: center;
    font-size: 52px;
    border: none;
    border-radius: 10px;
    width: 472px;
    height: 102px;
    padding: 10px; /* Отступы внутри поля ввода */
    margin-bottom: 15px; /* Отступ снизу */
    border: 1px solid #ccc; /* Обводка поля ввода */
    border-color: transparent;
    background: url("./img/input_name.png");
    background-size: cover;
    background-position: 0px;
    outline: 0;
}

#playButton {
    background: url("./img/multiplayer.png");
    background-size: cover; 
    background-position: 0;
    height: 90px;
    width: 240px;
    z-index: 3;
    display: none;
}



#playSolo {
    background: url("./img/play.png");
    background-size: cover; 
    background-position: 0;
    height: 90px;
    width: 240px;
    z-index: 3;
    overflow: visible;
    transition: transform .2s ease;
}

#playSolo:active {
    transform: scale(.95);
}



#game_content {
    display: none;
    width: 100vw;
    height: 100vh;
    position: fixed;
    z-index: 1;
    overflow: hidden;
    background-color: transparent;
}

.vignette-layer {
    width: 100%;
    height: 100%;
    padding: -10px;
    background: rgba(255,255,255,0.01);
    overflow: hidden;
    pointer-events: none;
    position: relative;
    background: radial-gradient(
        circle at center,
        rgba(0, 0, 0, 0) 55%,
        rgba(0, 0, 0, 0.05) 65%,
        rgba(0, 0, 0, 0.15) 75%,
        rgba(0, 0, 0, 0.3) 85%,
        rgba(0, 0, 0, 0.5) 95%,
        rgba(0, 0, 0, 0.7) 100%
    );
}

.vignette-layer::after{
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2N89+7dfwAI1QMLFsZIZwAAAABJRU5ErkJggg==');
    opacity: 0.05;
    pointer-events: none;
}

.vignette-layer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;  /* достаточно большой круг */
    height: 200%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    border-radius: 50%;
    box-shadow:
        inset 0 0 150px 120px rgba(0, 0, 0, 0.20),
        inset 0 0 200px 240px rgba(0, 0, 0, 0.10),
        inset 0 0 300px 400px rgba(0, 0, 0, 0.05);
  
}

#leaveButton{
    background: url("./img/leave_room.png");
    background-size: cover;
    height: 60px;
    width: 110px;
    position: fixed;
    background-position: 0;
    bottom: 0px;
    left: 10px;
    z-index: 3;
}



#ironButton{
    position: fixed;
    right: 10px;
    bottom: 5px;
    z-index: 3;
}

.iron {
    background: url(./img/iron_dissabled.png);
    background-size: cover;
    height: 50px;
    width: 50px;
    border: none;
    cursor: pointer;
  }
  
  .iron-disabled {
    background: url(./img/iron.png);
    background-size: cover;
  }



#waiting_content{
    display: block;
    width: 100vw;
    height: 100vh;
    position: fixed;
    background: url(./img/bg.png);
    background-size: cover;
}

.leaveWaiting{
    background: url(./img/leave_room.png) !important;
    background-size: cover !important;
    height: 165px !important;
    width: 330px !important;
    position: fixed !important;
    z-index: 3 !important;
    top: 70% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}



.waiting_container{
    color: white;
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    position: fixed;
    font-size: 28px;
}

.time {
    background: url("./img/clock.png");
    background-size: cover;
    height: 80px;
    width: 80px;
}

.players{
    background: url("./img/multi_icon.png");
    background-size: cover;
    height: 80px;
    width: 80px;
}

.leaderboard_container {
    cursor: pointer;
    font-size: 14px;
    color: white;
    position: fixed;
    width: 260px;
    height: 330px;
    background-color: rgba(0, 0, 0, 0.411);
    border-radius: 8px;
    right: 10px;
    top: 10px;
    z-index: 3;
}

.leader_img{
    width: 40px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

#top_holder{
    width: 100%;
    height: 78%;
    overflow: auto;
    overflow: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
}

#top_holder::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.top-player-row:hover{
    color: #efac0a;
    font-weight: bold;
}

#countdown{
    width: 60px;
}

#self-rank{
    margin-top: 4px;
    color: #efac0a;
    font-weight: bold;
    margin-left: 10px;
}

.info_container{
    font-size: 14px;
    color: white;
    position: fixed;
    width: 160px;
    height: 160px;
    background-color: rgba(0, 0, 0, 0.411);
    border-radius: 8px;
    left: 10px;
    top: 10px;
    z-index: 3;
    padding: 8px;
}

.world_info{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.info_row{
    text-align: right;
    display: flex;
    width: 100%;
    height: 100%;
}

.info_row h1 {
    font-size: 20px;
    margin-top: 12px;
    margin-bottom: 0;
}

.info_icon{
    width: 50px;
    height: 50px;
}

#info_score {
    color: white;
    text-align: center;
    position: fixed;
    top: 5px;
    font-size: 28px;
    width: 100%;
    margin: 0;
}

.slider-container{
    display: flex;
    position: fixed;
    width: 275px;
    height: 58px;
    bottom: -19px;
    left: 50%;
    transform: translate(-50%, -50%);
    background: url(./img/atack_slider_bg.png);
    background-position: 0;
    background-size: cover;
    color: white;
    text-shadow: 0px 0px 4px #000000;
}

.btn {
    width: 30px;
    height: 100%;
    color: white;
    border: none;
    font-size: 32px;
    cursor: pointer;
    z-index: 2;
    margin-left: 5px;
    margin-right: 5px;
}

.bar {
    position: relative;
    flex-grow: 1;
    height: 70%;
    border-radius: 5px;
    margin-top: 6px;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    z-index: 1;
}

.label {
    position: relative;
    z-index: 2;
    font-weight: bold;
    pointer-events: none;
}

#decrease{
    border-radius: 12px 0px 0px 12px;
}

#increase{
    border-radius: 0px 12px 12px 0px;
}

.global_online_container{
    width: 100px;
    height: 50px;
    position: fixed;
    top: 10px;
    left: 10px;
    display: flex;
}

#global_online_count{
    color: #b39f69;
    margin: 0;
}

.notification-holder {
    position: fixed;
    bottom: 60px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 3;
    max-height: 600px;
    overflow: hidden;
}

.notification {
    padding: 5px 20px;
    background: url(./img/atack_slider_bg.png);
    background-position: 0;
    background-size: cover;
    color: #bbab7f;
    border-radius: 5px;
    width: 200px;
    word-wrap: break-word;
    opacity: 0;
    transform: translateX(100%); /* Начинаем за правым краем */
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    display: flex;
    text-align: center;
    text-shadow: 3px 3px 0px #000000;
    gap: 5px;
}

.notification.visible {
    opacity: 1;
    transform: translateX(0); /* Плавно выезжаем на место */
}

.notification h1 {
    width: 50%;
    font-size: 14px;
}

.notification img {
    width: 20%;
}

.subText{
    text-align: right !important;
    width: 30% !important;
}

.timer-bar {
    width: 0%;
    height: 6%;
    position: absolute;
    background-color: #bbab7f6b;
    transition: width linear;
    left: 53px;
    bottom: 6px;
}

.alliance{
    background: url(./img/alliances_show_dissabled.png);
    background-size: cover;
    height: 50px;
    width: 50px;
    border: none;
    cursor: pointer;
    position: fixed;
    right: 70px;
    bottom: 5px;
    z-index: 3;
}



.alliance-disabled{
    background: url(./img/alliances_show.png);
    background-size: cover;
    height: 50px;
    width: 50px;
}

.regions{
    background: url(./img/regions_show_dissabled.png);
    background-size: cover;
    height: 50px;
    width: 50px;
    border: none;
    cursor: pointer;
    position: fixed;
    right: 130px;
    bottom: 5px;
    z-index: 3;
}


.regions-disabled{
    background: url(./img/regions_show.png);
    background-size: cover;
    height: 50px;
    width: 50px;
}

.container-l {
    position: relative;
    width: 214px;
    height: 214px;
    margin-bottom: 30px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.piece {
    position: absolute;
    width: 128px;
    height: 128px;
    background-image: url(./img/loading_anim.png);
    background-size: 256px 256px;
    opacity: 0;
    transform: scale(0.5);
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.piece1 { background-position: 0 0; }
.piece2 { background-position: -128px 0; left: 128px; }
.piece3 { background-position: 0 -128px; top: 128px; }
.piece4 { background-position: -128px -128px; left: 128px; top: 128px; }

.enter1, .enter2, .enter3, .enter4 {
    transform: translate(0, 0) scale(1);
    opacity: 1;
}

.rotate {
    animation: rotate 0.6s ease forwards;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.explode1 { transform: translate(-300px, -200px) rotate(-45deg); opacity: 0; }
.explode2 { transform: translate(300px, -250px) rotate(60deg); opacity: 0; }
.explode3 { transform: translate(-280px, 280px) rotate(90deg); opacity: 0; }
.explode4 { transform: translate(250px, 300px) rotate(-90deg); opacity: 0; }

.progress-bar-l {
    width: 550px;
    height: 55px;
    overflow: hidden;
    top: 300px;
    left: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
}

.progress-fill-l {
    width: 100%;
    height: 100%;
    background: url(./img/loading_slider_bg.png);
    background-size: 98% 750%;
    background-repeat: no-repeat;
    background-position: left center;
    position: absolute;
    clip-path: inset(0 100% 0 0); /* Сначала всё скрыто */
    animation: revealClip 5s linear forwards;
}

@keyframes revealClip {
    0% {
        clip-path: inset(0 100% 0 0); /* полностью скрыто */
    }
    100% {
        clip-path: inset(0 0% 0 0); /* полностью видно */
    }
}
.loading_anim_container{
    width: 214px;
    height: 214px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    top: 400px;
}

#loadingWorld{
    display: none;
}

.top-player-row{
    padding: 4px 12px;
}

#endgame_block {
    width: 480px;
    height: 570px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 1s ease;
    display: block;
    pointer-events: none;
    z-index: 3;
}

.endgame_container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

#endgame_block_img {
    margin-left: auto;
    margin-right: auto;
    position: relative;
    pointer-events: none;
    user-select: none;
}

#endgame_name {
    margin: 0;
    color: white;
    font-size: 40px;
    text-align: center;
    margin-bottom: 20px
}

#googleLogin {
    background-image: url(./img/betterID.png);
    background-size: cover;
    width: 286px;
    height: 70px;
    position: relative;
    background-position-y: -4px;
}



#betterId {
    width: 300px;
    height: 70px;
    margin-top: 14px;
}

#cups_count {
    color: #b39f69;
    position: absolute;
    right: 92px;
    top: 20px;
    z-index: 1;
}

#leaderboard_menu_button {
    background: url("./img/leaderboard_menu.png");
    height: 80px;
    width: 142px;
    background-size: cover;
    position: absolute;
    top: -8px;
    right: 10px;
}

.leaderboard_popup_overlay {
   width: 100%;
   height: 100%;
   position: absolute;
   z-index: 2;
   filter: blur(8px);
}

.leaderboard_content_popup{
    position: absolute;
    width: 400px;
    height: 570px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: url("./img/leaderboard_bg.png");
    background-size: cover;
    z-index: 3;
}

#leaderboard_popup{
    display: none;
}

.leaderboard_content {
    width: 400px;
    height: 500px;
    position: relative;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    top: 20px;
}

.cups{
    width: 100px;
    height: 64px;
}

.leaderboard_list {
    width: 300px;
    max-height: 400px;
    overflow: auto;
    position: relative;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.leaderboard_list::-webkit-scrollbar{
    display: none;
}

.leaderboard_item {
    width: 90%;
    height: 50px;
    position: relative;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-left: auto;
    margin-right: auto;
    top: 4px;
}

.leaderboard_item_place{
    position: relative;
    color: silver;
    font-size: 16px;
    top: 5px;
}

.leaderboard_item_name{
    position: relative;
    color: silver;
    font-size: 16px;
    top: 5px;
}

.cup_holder{
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;    
}

.leaderboard_item_container{
    width: 100%;
    height: 70px;
    background: url("./img/atack_slider_bg.png");
    background-size: cover;
    background-position-y: -52px;
}

.leaderboard_item_cup_img{
    width: 50px;
    height: 50px;
}

.leaderboard_cups_count{
    position: relative;
    margin: -25px;
    top: -1px;
    color: silver;
    font-size: 10px;
}

#blur_overlay {
    width: 100%;
    height: 100%;
    filter: none;
    background: url(./img/bg.png);
    background-size: cover;
}

.zoom_container{
    width: 50px;
    height: 105px;
    position: absolute;
    left: 10px;
    top: 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#zoom_plus{
    width: 50px;
    height: 50px;
    background: url("./img/zoom_plus.png");
    background-size: cover;
}



#zoom_minus{
    width: 50px;
    height: 50px;
    background: url("./img/zoom_minus.png");
    background-size: cover;
}



* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

button:active {
  background-color: inherit; 
}

button:focus,
button:active {
  outline: none;
  box-shadow: none;
}

#revard_button{
    background: url(./img/ads.png);
    background-size: cover;
    width: 195px;
    height: 118px;
    display: flex;
    background-position-y: -21px;
}

.revard_cup{
    width: 40px;
    height: 40px;
}

.rc{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 55px;
    margin-top: -4px;
}

#revard_cup_count{
    color: #ba8924;
    font-size: 20px;
    text-shadow: 1px 1px 2px #040b0b;
}

.revard_buttons_holder{
    display: flex;
}

#accept_revard_button{
    width: 90px;
    height: 70px;
    background: url(./img/accept.png);
    background-size: cover;
}



#reject_revard_button{
    width: 90px;
    height: 70px;
    background: url(./img/reject.png);
    background-size: cover;
}


#endgame_block_img{
    background: url("img/defeat.png");
    width: 320px;
    height: 320px;
    background-size: cover;
}

button:active {
    transform: scale(.95);
}

button {
    display: inline-block;
    text-decoration: none;
    border: none;
    padding: 0;
    margin: 0;
    overflow: visible;
    transition: transform .2s ease;
}



@media (max-width: 800px) { 

    .multiplayer_anons{
        width: 260px;
        height: 460px;
        font-size: 12px;
    }

    #anonsimg {
        display: none !important;
    }

    #blur_overlay{
        background: url('./img/bg_mobile.png');
        background-size: cover;
    }


    #googleLogin {
        width: 166px;
        height: 40px;
    }

    .nsm7Bb-HzV7m-LgbsSe { 
        width: 200px !important;
        height: 50px !important;
    }

    #betterId {
        width: 200px;
        height: 50px;
        margin-top: -10px;
    }


    .logo {
        width: 90%;
    }

    #user_input {
        font-size: 42px;
        width: 260px;
        height: 46px;
        margin-bottom: 0;
    }

    #playSolo {
        height: 48px;
        width: 130px;
    }



    #playButton {
        height: 48px;
        width: 130px;
    }



    .leaveWaiting {
        height: 140px !important;
        width: 260px !important;
        top: 70% !important;
    }

    .loading_anim_container {
        top: 264px;
    }

    .progress-bar-l {
        width: 300px;
        height: 36px;
    }

    .slider-container {
        width: 230px;
        height: 48px;
        bottom: 32px;
    }

    .info_row h1 {
        font-size: 12px;
    }

    .info_container {
        width: 102px;
        height: 110px
    }

    .info_icon {
        width: 40px;
        height: 40px;
    }

    .leaderboard_container {
        width: 120px;
        height: 171px;
        font-size: 7px;
    }

    .label {
        font-size: 14px;
    }

    #info_score {
        font-size: 14px;
    }

    .top-player-row{
        padding: 1px 4px;
    }

    #self-rank {
        margin-left: 4px;
        margin-top: 0px;
    }

    .notification-holder {
        bottom: 105px;
        gap: 4px;
        max-height: 245px;
    }

    .notification {
        width: 80px;
    }

    .notification h1 {
        font-size: 7px;
    }

    .leader_img {
        width: 24px;
    }

    .timer-bar {
        left: 26px;
        bottom: 6px;
    }

    .players {
        height: 60px;
        width: 60px;
    }

    .time {
        height: 60px;
        width: 60px;
    }

    .leaderboard_content_popup{
        width: 260px;
        height: 372px;
    }

    .leaderboard_content {
        width: 260px;
        height: 302px;
    }

    .leaderboard_item_container{
        width: 228px;
        margin-left: auto;
        margin-right: auto;
        height: 50px;
        background-position-y: -40px;
    }

    .leaderboard_item{
        top: -4px;
    }

    .leaderboard_cups_count{
        top: 10px;
    }

    .leaderboard_item_cup_img{
        width: 35px;
        height: 35px;
        bottom: -10px;
        position: relative;
    }

    #endgame_block{
        width: 260px;
        height: 500px;
    }

    #endgame_block_img{
        width: 250px;
        height: 250px;
    }

}

@media (max-width: 320px) and ( max-height: 430px) {
    .global_online_container {
        display: none;
    }
}

@media (max-height: 400px){
    .logo {
        display: none;
    }

    .multiplayer_anons{
        width: 560px;
        height: 270px;
        font-size: 12px;
    }
}

@media (max-width: 360px) and ( max-height: 900px) {
    .info_container{
        margin-top: 20px;
    }

    .leaderboard_container{
        margin-top: 20px;
    }



    
}