body { 
    font-family: Arial, sans-serif; 
    background-color: #000000;
    display: flex;
    flex-direction: row;
    gap: 50px;
    width: 100dvw;
    height: 100dvh;
    overflow: hidden;
    margin: 0 !important;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Unbounded", sans-serif;
    font-optical-sizing: auto;
}

/* Запрет масштабирования для всей страницы */
body {
    touch-action: pan-x pan-y;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Дополнительно для iOS Safari */
html {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.rhythm-game-cont{
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 460px;
    height: 100%;
}


.rhythm-game {
    height: 100%;
    width: 100%;
    background: linear-gradient(180deg, #4462e8 0%, #9d4aef 80%);
    overflow: hidden;
    z-index: 1000;
}

.game-ui {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1010;
    color: white;
    font-family: 'Arial', sans-serif;
}










.score-display {
    padding: 10px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
    transition: 0.3s;
    scale: 1;
}
.score-display.hite{
    opacity: 0;
    scale: 0.5;
}

#gameScore{
    font-size: 45px;
}

.scoreAnim{
    animation: pulseAn 0.2s ease-in-out forwards;
}
@keyframes pulseAn {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.scoreAnimRot{
    animation: pulseAn 0.2s ease-in-out forwards;
}
@keyframes pulseAn {
    0% {
        transform: scale(1);
        opacity: 1;
        rotate: 4deg;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.5;
        rotate: -4deg;
    }
    100% {
        transform: scale(1);
        opacity: 1;
        rotate: 4deg;
    }
}






.note {
    position: absolute;
    width: 100%;
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    opacity: 1;
    z-index: 20 !important;
    transform-style: preserve-3d; 
}

.note.pressed {
    opacity: 0.3;
}











.game-name-input {
    font-size: 24px;
    font-weight: bold;
    padding: 8px 12px;
    border: 2px solid black;
    border-radius: 16px;
    background: black;
    width: 300px;
    max-width: 100%;
    transition: border-color 0.3s, box-shadow 0.3s;
    color: white;
}

.game-name-input:focus {
    border-color: #bbbbbb71;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
    outline: none;
}

.game-name-input:hover {
    border-color: #bbbbbb71;
}












/* Стили для блока настроек */
.audio-settings-block {
    position: absolute;
    top: 50%;
    left: calc(100% + 10px);
    transform: translateY(-50%);
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: white;
    width: 400px;
    max-width: 400px;
    padding: 10px;
}

.settings-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.settings-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.setting-item {
    flex: 1;
    min-width: 200px;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}



.setting-tooltip {
    font-size: 11px;
    opacity: 0.8;
    font-weight: normal;
    margin-left: auto;
    text-align: right;
}

.bpm_group{
    display: flex;
    gap: 5px;
}
#analysBpm{
    padding: 10px;
    background: #494949;
    border-radius: 8px;
    cursor: pointer;

    &:hover{
        opacity: 0.5;
    }
}

.setting-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.setting-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.setting-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Стили для полей ввода чисел */
.setting-input[type="number"]::-webkit-inner-spin-button,
.setting-input[type="number"]::-webkit-outer-spin-button {
    opacity: 0.5;
    margin: 0;
}

.setting-input[type="number"]:hover::-webkit-inner-spin-button,
.setting-input[type="number"]:hover::-webkit-outer-spin-button {
    opacity: 1;
}

/* Убираем стрелки у всех числовых инпутов */
.setting-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Для WebKit браузеров (Chrome, Safari, Edge) */
.setting-input[type="number"]::-webkit-inner-spin-button,
.setting-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Для Firefox */
.setting-input[type="number"] {
    -moz-appearance: textfield;
}

/* Для Internet Explorer */
.setting-input[type="number"]::-ms-clear {
    display: none;
}



































/* Эффекты для отображения очков */
.points-effect {
    position: absolute;
    top: 220px;
    font-size: 24px;
    font-weight: bold;
    pointer-events: none;
    z-index: 1020;
    padding: 14px;
    border-radius: 30px;
    transform-origin: center;
}

.points-positive {
    color: #ffffff;
    background: #4de74dc1;
    box-shadow: 0 4px 15px rgba(77, 231, 77, 0.3);
}

.points-negative {
    color: #ffffff;
    background: #f44336bb;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

/* ✅ ДОБАВЛЯЕМ НОВЫЙ КЛАСС ДЛЯ ОРАНЖЕВЫХ ЧАСТИЧНЫХ ПРОМАХОВ */
.points-negative.partial-miss {
    background: #ff9800bb; /* Оранжевый */
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}
/* Базовая анимация (для обратной совместимости) */
@keyframes pointsFloat {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -100%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -150%) scale(1);
    }
}

/* Новая анимация со случайными траекториями */
@keyframes pointsFloatRandom {
    0% {
        opacity: 1;
        transform: 
            translateX(calc(var(--random-offset-x) * 0.3)) 
            translateY(0) 
            scale(0.8) 
            rotate(0deg);
    }
    25% {
        opacity: 1;
        transform: 
            translateX(calc(var(--random-offset-x) * 0.6)) 
            translateY(-40px) 
            scale(1.0) 
            rotate(calc(var(--random-rotation) * 0.3));
    }
    50% {
        opacity: 1;
        transform: 
            translateX(calc(var(--random-offset-x) * 0.8)) 
            translateY(-80px) 
            scale(var(--random-scale)) 
            rotate(calc(var(--random-rotation) * 0.6));
    }
    75% {
        opacity: 0.7;
        transform: 
            translateX(calc(var(--random-offset-x) * 0.9)) 
            translateY(-120px) 
            scale(calc(var(--random-scale) * 0.9)) 
            rotate(var(--random-rotation));
    }
    100% {
        opacity: 0;
        transform: 
            translateX(var(--random-offset-x)) 
            translateY(-180px) 
            scale(calc(var(--random-scale) * 0.8)) 
            rotate(calc(var(--random-rotation) * 1.2));
    }
}

/* Дополнительные эффекты для большей вариативности */
.points-effect:nth-child(odd) {
    animation-timing-function: cubic-bezier(0.4, 0.1, 0.7, 1.0);
}

.points-effect:nth-child(even) {
    animation-timing-function: cubic-bezier(0.1, 0.8, 0.2, 1.0);
}







/* Добавьте в ваш CSS файл или в <style> тег */
.note-selected {
    box-shadow: 
        inset 0 0 0 4px #ffd813; /* Легкая внешняя тень для контраста */
    border-radius: 2px;
    z-index: 1000 !important;
    position: relative; /* Для z-index */
}
/* Стили для визуальной сетки */
.note-grid-container {
    pointer-events: none;
    user-select: none;
}

.offset-block {
    border-left: 3px solid #ff4444;
    border-right: 3px solid #ff4444;
}

.beat-line {
    transition: transform 0.1s linear;
}

.beat-line:nth-child(4n) {
    box-shadow: 0 0 5px rgba(78, 205, 196, 0.5);
}

/* Режим добавления нот */
.game-lane.note-adding-mode {
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(0, 255, 0, 0.05) 50%, 
        transparent 100%);
}

.game-lane.note-adding-mode:hover {
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(0, 255, 0, 0.1) 50%, 
        transparent 100%);
}








.grid-cells-container {
    position: relative;
}

.grid-cell {
    position: relative;
    pointer-events: all;
}

.note {
    position: absolute;
    pointer-events: all;
    transition: top 0.1s ease;
}

.note-block {
    position: relative;
    pointer-events: none; /* События обрабатываются нотами и ячейками */
}

.note-block > .note {
    pointer-events: all;
}





































#gameAnimate{
    pointer-events: none;
}






/* ДЛИННЫЕ НОТЫ - ОБНОВЛЕННЫЕ */
.hold-note {
    background: linear-gradient(135deg, #0792ef 0%, #2be28d 100%) !important;
    overflow: visible;
    position: absolute;
    z-index: 100;
    overflow: hidden;
        touch-action: manipulation; /* Улучшает отзывчивость на тач-устройствах */
    user-select: none; /* Предотвращает выделение текста при касании */

    width: 100%;
    -webkit-tap-highlight-color: transparent;

    opacity: 1;
        /* ✅ ВАЖНО: делаем всю ноту кликабельной */
    pointer-events: auto !important;

}
.hold-note.pressed{
    opacity: 1 ;

}
.hold-note.press{
    opacity: 0.3 !important;
    transition: opacity 0.3s ease;
}

/* Контейнер для элементов холд-ноты */
.hold-note-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
}

/* Белые кружки в начале и конце */
.hold-start-circle {
    position: absolute;
    max-width: 100%;
    min-width: 100%;
    height: 140px;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mini-circle{
    width: 30px;
    height: 30px;
    border: 3px solid white;
    border-radius: 40px;
}


.hold-connection-line {
    position: absolute;
    top: 85px; 
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: auto;
    background: white;
    border-radius: 3px;
    z-index: 2;

}



.hold-wave {
    position: absolute;
    top: 0;
    width: 100%;
    height: 200px; /* Начальная высота */
    max-height: 100%;
    z-index: 20000000 !important;
    transform-origin: bottom;
        /* Убедитесь, что анимации работают плавно */
    will-change: height, transform;
    pointer-events: auto; /* ← РАЗРЕШАЕМ события */
}

/* Анимация заполнения волны */
@keyframes waveFill {
    0% {
        background: linear-gradient(to top, #31f090, #3ec3e8);
        height: 160px;
        border-bottom-left-radius: 100px;
        border-bottom-right-radius: 100px;
    }
    80% {
        background: linear-gradient(to top, #31f090, #3ec3e8);
        border-bottom-left-radius: 100px;
        border-bottom-right-radius: 100px;
    }
    100% {
        background: linear-gradient(to top, #31f090, #3ec3e8);
        opacity: 1;
        height: 100%;
        border-bottom-left-radius: 0px;
        border-bottom-right-radius: 0px;
    }
}






















#settings_bar{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: -90%;
    color: white;
    max-width: 400px;
}










.custom-audio-controls {
    margin-top: 15px;
    padding: 15px;
    background: #2d2d2d;
    border-radius: 23px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    width: 400px;
}

.player-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
}

.player-btn {
    padding: 10px 15px;
    background: #4a4a4a;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    min-width: 50px;
}

.player-btn:hover {
    background: #5a5a5a;
    transform: translateY(-2px);
}

.player-btn:active {
    transform: translateY(0);
}

.time-slider-container {
    margin: 20px 0;
}

.seek-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #4a90e2 0%, #4a90e2 0%, #ddd 0%, #ddd 100%);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.seek-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a90e2;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.seek-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a90e2;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.time-display {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 14px;
    color: #aaa;
    font-family: monospace;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.volume-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: #555;
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #4a90e2;
    cursor: pointer;
}














#btn_add_new_game{
    width: 40px;
    height: 40px;
     border-radius: 100px;
    cursor: pointer;

    &:hover{
        background: #4a4a4a;
    }
}






#audioFileInfo{
            font-size: 12px;
            color: #666;
            margin-top: 5px;
            text-align: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;

}





#name_game_block{
    position: absolute;
    top: 35px;
    left: 85px;
}






/* Стили для блока загрузки аудио */
.upload-container {
    border-radius: 30px;
    margin-top: 20px;
}

.upload-container h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 20px;
}

.upload-info {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 30px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: #4a6cf7;
    background: #f0f4ff25;
}

.upload-area.drag-over {
    border-color: #4a6cf7;
    background: #e6eeff;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.upload-area p {
    margin: 10px 0;
    color: #e2e2e2;
}

.upload-btn {
    display: inline-block;
    background: #4a6cf7;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.upload-btn:hover {
    background: #3a5ce5;
}

.upload-hint {
    font-size: 12px;
    color: #eaeaea;
    margin: 5px 0;
}

/* Прогресс бар */
.upload-progress {
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #4a6cf7;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    color: #c9c9c9;
}

/* Кнопки действий */
.upload-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.cancel-btn, .save-btn {
    flex: 1;
    padding: 12px;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.cancel-btn:hover {
    background: #e9ecef;
}

.save-btn {
    background: #28a745;
    color: white;
}

.save-btn:hover {
    background: #218838;
}

.save-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Сообщения */
.upload-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
}

.upload-message.success {
    color: #38bd57;
}

.upload-message.error {
    color: #cf4553;
}

.upload-message.info {
    color: rgb(51, 79, 189);
}



/* Анимация для иконки загрузки */
@keyframes pulsee {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.upload-icon.loading {
    animation: pulsee 1.5s infinite;
}


















.flexRow{
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#delete_game_btn{
    padding: 10px;
    border-radius: 20px;
    cursor: pointer;
    color: white;

    &:hover{
        background: grey;
    }
}























/* В ваш CSS файл добавьте: */
#game_play_page {
    padding: 20px;
    overflow: hidden;
}

.back_from_game_btn {
    margin-bottom: 20px;
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.back_from_game_btn:hover {
    background: #0056b3;
}

.audio-player-container {

}

#adminAudio {
    width: 100%;
    margin-top: 10px;
}

.game-info-container {
    margin-top: 20px;
}

.audio-missing-message {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    text-align: center;
}










#adminPlaceHoldder{
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
}

#audio_name_play{
    font-size: 16px;
    color: #b9b9b9;
}