@font-face {
    font-family: "Audiowide";
    src: url("fonts/Orbitron-Medium.ttf") format("truetype");
}

*{
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background-color: black;
}

::-webkit-scrollbar-thumb {
    background: rgb(84, 224, 217);
    box-shadow: inset 0 0 6px rgb(84, 224, 217);
}
body {
    margin: 0;
    overflow: hidden;
    background-color: #000000;
    font-family: 'Audiowide', sans-serif;
    /*filter: brightness(0%);*/
}
/*body:hover{*/
/*    filter: brightness(1);*/
/*}*/

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.loading-text {
    animation: pulse 2s infinite;
}


p {
    font-size: 42px;
}

/* HUD */
.hud {
    z-index: 30;
    position: absolute;
    transition: opacity 0.2s ease; /* Немедленный переход при наведении */
}

.hud_left_top:hover {
    opacity: 1; /* Максимальная видимость при наведении */
}

.hud_left_top:not(:hover) {
    transition: opacity 1s ease 1s; /* Задержка 1 секунда перед началом перехода обратно + 1 секунда анимации */
}
.hud_left_top{
    left:1%;
    top: 1%;
    opacity: 0.5; /* Начальная прозрачность */
    /* display: flex; */
}
.hud_right_top{
    right: 5%;
    top: 20%;
    color: #Fff;
    font-size: 12px;
    backdrop-filter: blur(5px);
}

.hud_center_top{
    bottom: 0%;
    left: 0%;
    color: #Fff;
    backdrop-filter: blur(5px);
}
.hud_center_top p{
    font-size: 15px;
}

.neon-button {
    z-index: 10;
    padding: 10px 20px;
    font-size: 16px;
    font-family: 'Audiowide', sans-serif;
    color: #ffffff;
    background-color: transparent;
    background-color: #000000;
    border-radius: 1px;
    border: 3px solid #21dbdb;
    transition: all 0.3s ease;
    cursor: pointer;
}
.neon-button:hover {
    background-color: #00ffea;
    color: #000;
    box-shadow: 0 0 20px #00ffea, 0 0 40px #00ffea, 0 0 80px #00ffea;
    transform: scale(1.05);
}
.neon-button:active {
    transform: scale(0.95);
    box-shadow: 0 0 10px #00ffea, 0 0 20px #00ffea, 0 0 40px #00ffea;
}
#play-music{
    position: relative;
}
.volume {
    max-width: 300px;
}
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    margin: 15px 0;
}

input[type="range"]:focus {
    outline: none;
}

/* Трек (основа ползунка) */
input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    cursor: pointer;
}

input[type="range"]::-moz-range-track {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    cursor: pointer;
}

/* Ползунок (thumb) */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #4a4a4a;
    margin-top: -6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #4a4a4a;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Эффект при наведении и активации */
input[type="range"]:hover::-webkit-slider-thumb {
    border-color: #000000;
    transform: scale(1.1);
}

input[type="range"]:hover::-moz-range-thumb {
    border-color: #000000;
    transform: scale(1.1);
}

/* Заполненная часть трека */
@supports (--css: variables) {
    input[type="range"] {
        --track-fill: #4a4a4a;
    }

    input[type="range"]::-webkit-slider-runnable-track {
        background: linear-gradient(
                to right,
                var(--track-fill) 0%,
                var(--track-fill) calc(100% * var(--value)),
                #e0e0e0 calc(100% * var(--value)),
                #e0e0e0 100%
        );
    }
}
/* /HUD */
.hideCursor{
    cursor: none;
}
#canvas_main_game {
    /* display: none; Основной канвас скрыт */
    z-index: 1;
}

#canvas_blood {
    display: none; /* Основной канвас скрыт */
    z-index: 0;
}

body.hide-cursor {
    cursor: none;
}
.scaling{
    /*scale: 0.8;*/
    transition: all 1s ease;
}
#gameLayer {
    z-index: 1;
    position: absolute;
    background: rgba(0, 0, 0, 0); /* Черные полосы, если соотношение сторон не совпадает */
    overflow: hidden; /* Скрываем всё, что выходит за пределы канваса */
    margin-bottom: auto;
    margin-top: auto;
    transition: all .5s ease;

}

#canvas_3d
{  
    display: none;
    position: absolute;
    margin-bottom: auto;
    margin-top: auto;
}

#canvas_3d_glass
{  
    display: none;
    position: absolute;
    margin-bottom: auto;
    margin-top: auto;
}
#hudCanvas{
    z-index: 10;
}
#miniMapCanvas {
    position: absolute;
    top: 20px; /* Положение мини-карты на экране */
    right: 20px;
    width: 200px; /* Размер мини-карты */
    height: 120px;
    border: 2px solid white;
    background-color: rgb(0, 0, 0); /* Полупрозрачный фон */
    z-index: 10;
    transition: all .5s ease;
}
#miniMapCanvas:hover {
    opacity: 0.3;
}
.player_auth_container{
    position: fixed;
    z-index: 30;
    backdrop-filter: blur(10px);
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
.player_auth{
    border-radius: 15px;
    border: 1px solid #00ffff;
    width: 300px;
    height: 200px;
    padding: 20px;
    background: black;
}
.player_auth form{
    display: flex;
    flex-direction: column;
    color: #fff;
    text-align: center;
    gap: 10px;
}
.player_auth form p{
    font-size: 20px;
    font-weight: bold;
}
.input_text{
    height: 50px;
    background: transparent;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    border: 1px solid #00ffff;
    text-align: center;
}
.blureBackground{
    z-index: 100;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: ease-in 2s;
}
.respawnPopup {
    z-index: 100;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: auto;
}
.respawnPopup .modal,
.blureBackground .modal{
    width: 300px;
    height: 150px;
    display: flex;
    align-items: center;
    flex-direction: column;
    color: #fff;
    border-radius: 15px;
    border: 1px solid #00ffff;
    padding: 20px;
    justify-content: center;
    gap: 30px;

}
.audio-visualizer {
    display: flex;
    align-items: flex-end;
    height: 30px;
    gap: 4px;
    position: absolute;
    bottom: 0;
    filter: blur(3px);
}

.audio-visualizer span {
    width: 6px;
    height: 0;
    background: #00ffff;
    display: inline-block;
    transition: height 0.3s ease-in-out;
}

.audio-visualizer.on span {
    animation: audioWave 1s infinite ease-in-out;
}

.audio-visualizer.on span:nth-child(1) { animation-delay: 0s; }
.audio-visualizer.on span:nth-child(2) { animation-delay: 0.1s; }
.audio-visualizer.on span:nth-child(3) { animation-delay: 0.2s; }
.audio-visualizer.on span:nth-child(4) { animation-delay: 0.3s; }
.audio-visualizer.on span:nth-child(5) { animation-delay: 0.4s; }
.audio-visualizer.on span:nth-child(6) { animation-delay: 0.5s; }
.audio-visualizer.on span:nth-child(7) { animation-delay: 0.6s; }
.audio-visualizer.on span:nth-child(8) { animation-delay: 0.7s; }
.audio-visualizer.on span:nth-child(9) { animation-delay: 0.8s; }
.audio-visualizer.on span:nth-child(10) { animation-delay: 0.9s; }
.audio-visualizer.on span:nth-child(11) { animation-delay: 1s; }

@keyframes audioWave {
    0%, 100% { height: 5px; }
    50% { height: 20px; }
}



.deathscreen{
    background: url("../files/animation/deathscreen_v2.gif") !important;
    background-position: 0px 290px !important;
}

/* Таблица игроков */

/* Общие стили для контейнера и таблицы */
.liderBoard_container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    z-index: 35;
    align-items: center;
    justify-content: center;
}

.liderBoard_container {
    display: none;
    flex-direction: column;
    gap: 16px;
    padding: 16px 0;
    justify-content: flex-start !important;
}

.weaponsTable {
    width: 70%;
    max-width: 900px;
    border: 1px solid #00ffff;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    padding: 12px 16px;
    font-family: 'Arial', sans-serif;
    font-size: 13px;
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.25);
}

.weaponsTable h3 {
    text-align: center;
    margin: 0 0 10px;
    color: #00ffff;
    font-size: 16px;
    letter-spacing: 2px;
    text-shadow: 0 0 8px #00ffff;
}

.weaponsTable .weaponHeader,
.weaponsTable .weaponRow {
    display: grid;
    grid-template-columns: 100px 1.1fr 36px 50px 50px 60px 90px 40px 60px;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
}

.weaponsTable .weaponHeader {
    border-bottom: 1px solid rgba(0, 255, 255, 0.4);
    color: #00ffff;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
}

.weaponsTable .weaponRow {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.weaponsTable .weaponRow:nth-child(odd) {
    background: rgba(255, 255, 255, 0.03);
}

.weaponsTable canvas {
    width: 100px;
    height: 36px;
    display: block;
}

.weaponsTable .weaponName {
    color: #fff;
    text-shadow: 0 0 6px currentColor;
}

.weaponsTable .weaponKey {
    text-align: center;
    color: #00ffff;
    font-weight: bold;
    border: 1px solid #00ffff;
    border-radius: 3px;
    padding: 1px 0;
    font-size: 11px;
}

.table { display: table; }
.tableRow { display: table-row; }
.tableHeading { display: table-header-group; }
.tableCell, .tableHead { display: table-cell; }
.tableFoot { display: table-footer-group; }
.tableBody { display: table-row-group; }

/* Настройки ширины колонок */
.tableHead:nth-child(1), .tableCell:nth-child(1) { /* Player */
    width: 70%; /* 50% ширины таблицы */
}
.tableHead:nth-child(2), .tableCell:nth-child(2) { /* Kills */
    width: 10%; /* Уменьшаем ширину */
    text-align: center; /* Центрируем текст */
}
.tableHead:nth-child(3), .tableCell:nth-child(3) { /* Deaths */
    width: 10%; /* Уменьшаем ширину */
    text-align: center; /* Центрируем текст */
}
.tableHead:nth-child(4), .tableCell:nth-child(4) { /* Ping */
    width: 10%; /* Минимальная ширина для Ping */
    text-align: center; /* Центрируем текст */
    white-space: nowrap; /* Предотвращаем перенос текста */
}

/* Сокращение текста в заголовках и ячейках */
.tableCell:nth-child(2) { /* Kills в теле таблицы */
    text-align: center;
}
.tableCell:nth-child(3) { /* Deaths в теле таблицы */
    text-align: center;
}

.liderBoardActive { display: flex !important; }
.liderBoard {
    min-width: 300px;
    min-height: 300px;
    max-height: 80%;
    width: 60%;
    border: 1px solid #fff;
    color: #fff;
    background: rgba(0, 0, 0, 0.8); /* Добавляем фон для читаемости */
}

/* Опционально: стили для текста в ячейках */
.tableCell, .tableHead {
    padding: 5px; /* Добавляем отступы для удобства чтения */
    border: 1px solid #ccc; /* Границы для разделения ячеек */
    vertical-align: middle;
}

/* Основные стили для контейнера переключателя */
.switch {
    position: relative;
    display: inline-block;
    width: 30px;
    height: 17px;
  }
  .setting_div
  {
    display: flex;
    justify-content:center;
    align-items: center;
    gap:5px
  }
  .settings span
  {
    color:white;
  }

  /* Скрываем стандартный чекбокс */
  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  /* Стили для ползунка */
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
  }
  
  /* Стили для ползунка в активном состоянии */
  .slider:before {
    position: absolute;
    content: "";
    height: 13px;
    width: 13px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
  }
  
  /* Изменение фона и позиции ползунка при активации */
  input:checked + .slider {
    background-color: #2196F3;
  }
  
  input:checked + .slider:before {
    transform: translateX(12px);
  }

  .settings
  {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: start;
    margin-left: 10px;
    gap:10px;
  }

.lobbies-container_show {
    opacity: 1 !important;
    right: 0 !important;
}
#lobbies-container {
    position: absolute;
    right: -350px;
    bottom: 50;
    z-index: 30;
    padding: 20px 20px 20px 40px;
    background: #2c3e50;
    border-radius: 10px;
    color: white;
    max-width: 400px;
    margin: 20px auto;
    max-height: 60vh;
    overflow-y: auto;
    transition: all 0.3s ease;
    opacity: 0;
}

.lobby_stic {
    position: fixed;
    right: 25px;
    bottom: 0;
    font-size: 24px;
    padding: 10px;
    background: #2c3e50;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 10px 10px 0 0 ;
}
.lobby_stic:hover {
    box-shadow: 0 0 5px #00ffea, 0 0 1px #00ffea, 0 0 20px #00ffea;
    padding-bottom: 20px;

}
.lobby_stic_active{
    color: #54e0d9;
    padding-bottom: 25px !important;
    box-shadow: 0 0 20px #00ffea, 0 0 40px #00ffea, 0 0 80px #00ffea !important;

}
    .lobby-item {
    padding: 10px;
    margin: 5px 0;
    background: #34495e;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.lobby-item:hover {
    background: #3d566e;
}

.lobby-item.join-button {
    background: rgb(0, 114, 190);
    text-align: center;
}

.lobby-item.join-button:hover {
    background: #2ecc71;
}

#health-arc {
    pointer-events: none;
    z-index: 100;
    position: fixed;
    bottom: calc(5% - 60px);
    left: calc(50% + 90px);
    width: 360px;
    height: 220px;
}

#energy-bar {
    pointer-events: none;
    z-index: 100;
    position: fixed;
    bottom: calc(5% - 60px);
    right: calc(50% + 90px);
    width: 360px;
    height: 220px;
}

.timer-container {
    /* position: absolute; */
    pointer-events: none;
    z-index: 100;
    position: fixed;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Arial Black', sans-serif;
    font-size: 2rem;
    font-weight: bold;
    color: #0ff; /* Неоновый голубой */
    text-shadow: 
        0 0 5px #0ff,
        0 0 10px #0ff,
        0 0 20px #0ff,
        0 0 40px #0ff;
    padding: 10px 30px;
    border: 2px solid #0ff;
    border-radius: 10px;
    background-color: rgba(0, 20, 30, 0.7);
    box-shadow: 
        0 0 5px #0ff,
        0 0 10px #0ff,
        inset 0 0 5px #0ff;
    animation: pulse 5s infinite alternate;
}

@keyframes pulse {
    from {
        text-shadow: 
            0 0 5px #0ff,
            0 0 10px #0ff,
            0 0 20px #0ff;
        box-shadow: 
            0 0 5px #0ff,
            0 0 10px #0ff,
            inset 0 0 5px #0ff;
    }
    to {
        text-shadow: 
            0 0 10px #0ff,
            0 0 20px #0ff,
            0 0 30px #0ff,
            0 0 40px #0ff;
        box-shadow: 
            0 0 10px #0ff,
            0 0 20px #0ff,
            inset 0 0 10px #0ff;
    }
}

.end-screen {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(5px);
    background: rgba(0, 0, 20, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
    overflow: hidden;
    font-family: 'Audiowide', sans-serif;
    font-size: 30;
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lobbyCreat_menu{
    z-index: 9999999999;
    position: fixed;
    top: 40%;
    left: 10%;
    background: #Fff;
}


.lobbyCreat_menu{
    background-color: #0000006e;
    width: 300px;
    height: 400px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    color: #fff;
    cursor: default;
}

.lobbyCreat_menu label{
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.lobbies_types{
    display: flex;
    gap: 10px;
    justify-content: space-between;
}
.lobbies_types div{
    width: 50%;
    text-align: center;
    cursor: pointer;
    padding: 5px;
}
.lobbyCreat_menu input{
    border-radius: 1px;
    border: 2px solid #21dbdb;
    background-color: #000000;
    color: #fff;
}
.selected{
    border-radius: 1px;
    border: 3px solid #21dbdb;
}
.lobbyType{
    color: #ff5252;
}

