header {
    padding: 0;
    position: relative;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2px 5px;
    box-sizing: border-box;
    position: relative; /* Чтобы абсолютное позиционирование дочерних элементов было относительно этого контейнера */
}

.stats-panel {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 4px 15px;
    z-index: 1;
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
}

.stat-icon {
    font-size: 14px;
}

.stat-values {
    font-size: 16px;
    color: white;
}

#score-container {
    background-color: #1a1a4a;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    border-radius: 24px;
    min-width: 60px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(80, 100, 255, 0.25);
    border: 2px solid #5050ff;
}

#stars-container {
    background-color: rgba(255, 255, 255, 0.1);
    font-weight: lighter;
    
}

#stars-count {
    font-size: 14px;
}

/* Кнопки */
#share-button {
    position: absolute;
    left: 10px; /* Отступ слева */
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #1a1a4a;
    border: 2px solid #5050ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#auto-drop-button {
    position: absolute;
    left: 56px; /* Отступ слева после share-button */
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #1a1a4a;
    border: 2px solid #5050ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#next-figure {
    position: absolute;
    right: 10px; /* Отступ справа */
    top: 50%;
    transform: translateY(-50%);
}

/* Прогрессбар */
.level-progress-container {
    display: flex;
    justify-content: center;
    width: 100%;
    /* margin-bottom: 4px;     */
}

/* Увеличим высоту прогрессбара для текста */
.level-progress {
    width: 100%;
    height: 20px;
    background-color: #34349299;
    overflow: hidden;
    position: relative;
    margin-left: 10px;
    margin-right: 10px;
    margin-top: 4px;
    margin-bottom: 6px;
    border-radius: 6px;
}

#level-progress-bar {
    height: 100%;
    background: linear-gradient(to right, #4040d0, #7070ff);
    width: 0%;
    transition: width 0.5s ease-out;
    border-radius: 0;
    position: relative;
    box-shadow: 0 0 8px rgba(80, 80, 255, 0.6);
}

/* Добавляем полоски на прогрессбаре для лучшего визуального эффекта */
#level-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%
    );
    background-size: 20px 20px;
    z-index: 1;
}

#game-title {
 margin-bottom: -10px;
}

/* Анимация для получения новых звезд */
@keyframes star-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.star-received {
    animation: star-pulse 0.6s ease-out;
}

/* Анимация для перехода на новый уровень */
@keyframes level-up {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.level-up-animation {
    animation: level-up 0.8s ease-out;
}

/* Стили для всплывающего уведомления о новом уровне */
.level-up-notification {
    position: fixed;
    top: 40%;
    left: 50%;
    min-width: 200px;
    transform: translate(-50%, -50%);
    background-color: rgba(20, 20, 60, 0.9);
    color: #fff;
    padding: 15px 25px;
    border-radius: 10px;
    z-index: 1000;
    text-align: center;
    box-shadow: 0 0 20px rgba(80, 100, 255, 0.8);
    border: 2px solid #5050ff;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.level-up-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.level-up-notification.hide {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
}

.level-up-notification h3 {
    margin: 0 0 10px 0;
    font-size: 22px;
    color: #FFCB00;
}

.level-up-notification .reward {
    font-size: 28px;
    margin: 10px 0;
}

/* Текст слева на прогрессбаре */
#level-progress-left {
    position: absolute;
    left: 12px;
    top: 0;
    height: 100%;
    color: white;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    text-shadow: 0px 0px 3px #000;
    z-index: 3;
}

/* Текст справа на прогрессбаре */
#level-progress-right {
    position: absolute;
    right: 12px;
    top: 0;
    height: 100%;
    color: white;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    text-shadow: 0px 0px 3px #000;
    z-index: 3;
}