/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(180deg, #87ceeb 0%, #98fb98 100%);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    /* Предотвращаем скролл на мобильных устройствах */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Стили экранов */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.screen.active {
    display: flex;
}

.screen.overlay {
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

/* Приветственный экран */
.welcome-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Обеспечиваем правильное позиционирование для абсолютно позиционированных элементов */
    position: relative;
}

/* Основной фон - газон (удален, теперь наложен на небо) */
.welcome-background {
    display: none;
}

/* Небо сверху */
.welcome-sky {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #87ceeb 0%, #ABD846 100%);
    background-image: url('assets/images/welcome/gazon.png');
    background-size: cover;
    background-position: center calc(100% + 500px);
    background-repeat: no-repeat;
    z-index: 0;
}

/* Облака - базовые стили */
.welcome-cloud {
    position: absolute;
    background-image: url('assets/images/welcome/Cloud.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 2;
    opacity: 0;
    animation-fill-mode: both;
    transition: opacity 0.25s ease-in-out;
    width: 120px;
    height: 80px;
}

/* Плавное появление облаков */
.welcome-cloud.loaded {
    opacity: 0.8;
}

/* Облако 1 - левый верхний угол (маленькое) */
.cloud-1 {
    top: 12%;
    left: 3%;
    width: 80px;
    height: 50px;
    animation: cloudFloat1 8s ease-in-out infinite;
}

/* Облако 2 - правый верхний угол (большое) */
.cloud-2 {
    top: 20%;
    right: 5%;
    width: 220px;
    height: 130px;
    animation: cloudFloat2 6s ease-in-out infinite;
}

/* Облако 3 - центр верхней части (среднее) */
.cloud-3 {
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 110px;
    animation: cloudFloat3 7s ease-in-out infinite;
}

/* Облако 4 - левая сторона, средняя высота (очень маленькое) */
.cloud-4 {
    top: 45%;
    left: 8%;
    width: 60px;
    height: 40px;
    animation: cloudFloat4 9s ease-in-out infinite;
}

/* Облако 5 - правая сторона, средняя высота (среднее) */
.cloud-5 {
    top: 38%;
    right: 15%;
    width: 140px;
    height: 85px;
    animation: cloudFloat5 5s ease-in-out infinite;
}

/* Облако 6 - левый верхний угол (среднее) */
.cloud-6 {
    top: 18%;
    left: 25%;
    width: 100px;
    height: 60px;
    animation: cloudFloat6 6.5s ease-in-out infinite;
}

/* Облако 7 - правый верхний угол (маленькое) */
.cloud-7 {
    top: 30%;
    right: 35%;
    width: 70px;
    height: 45px;
    animation: cloudFloat7 7.5s ease-in-out infinite;
}

/* Облако 8 - левая сторона, верхняя часть (большое) */
.cloud-8 {
    top: 5%;
    left: 60%;
    width: 250px;
    height: 150px;
    animation: cloudFloat8 8.5s ease-in-out infinite;
}

/* Анимации для облаков */
@keyframes cloudFloat1 {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-8px) translateX(3px);
    }
}

@keyframes cloudFloat2 {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-12px) translateX(-4px);
    }
}

@keyframes cloudFloat3 {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes cloudFloat4 {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-6px) translateX(2px);
    }
}

@keyframes cloudFloat5 {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-15px) translateX(-2px);
    }
}

@keyframes cloudFloat6 {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-8px) translateX(4px);
    }
}

@keyframes cloudFloat7 {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-6px) translateX(-3px);
    }
}

@keyframes cloudFloat8 {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-12px) translateX(2px);
    }
}

/* Логотип игры */
.game-logo {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    width: 200px;
    height: 100px;
    margin: 0 auto;
    background-image: url('assets/images/welcome/logo.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 3;
    animation: logoFloat 3s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    animation-fill-mode: both;
}

/* Плавное появление логотипа */
.game-logo.loaded {
    opacity: 1;
    animation: logoFloat 3s ease-in-out infinite, logoFadeIn 0.5s ease-out;
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-logo {
    cursor: pointer;
}

.game-logo:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.02);
    }
}

/* Персонаж */
.welcome-character {
    position: absolute;
    top: 35%;
    left: 15%;
    transform: translate(-50%, -50%);
    width: 1066px;
    height: 1334px;
    background-image: url('assets/images/welcome/persona.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 2;
    animation: characterWave 4s ease-in-out infinite;
    opacity: 0;
    animation-fill-mode: both;
    transition: opacity 0.4s ease-in-out;
}

/* Плавное появление персонажа */
.welcome-character.loaded {
    opacity: 1;
    animation: characterWave 4s ease-in-out infinite, characterSlideIn 0.6s ease-out;
}

@keyframes characterSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes characterWave {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(1deg);
    }
}

/* Звезды */
.welcome-stars {
    position: absolute;
    top: 80px;
    left: 200px;
    width: 300px;
    height: 240px;
    background-image: url('assets/images/welcome/stars.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 2;
    animation: starsTwinkle 2s ease-in-out infinite;
    opacity: 0;
    animation-fill-mode: both;
    transition: opacity 0.3s ease-in-out;
}

/* Плавное появление звезд */
.welcome-stars.loaded {
    opacity: 1;
    animation: starsTwinkle 2s ease-in-out infinite, starsFadeIn 0.5s ease-out 0.25s both;
}

@keyframes starsFadeIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes starsTwinkle {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Контентная область справа */
.welcome-content {
    position: absolute;
    top: 50%;
    left: 50%;
    right: 20px;
    transform: translateY(calc(-50% - 20px));
    z-index: 3;
    text-align: left;
    max-width: 800px;
}

/* Заголовок */
.welcome-main-title {
    font-size: 6em;
    font-weight: bold;
    color: #ff6b35;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
}

/* Описательный текст */
.welcome-description {
    font-size: 1.8em;
    color: #ff8c42;
    margin-bottom: 40px;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Контейнер кнопок */
.welcome-buttons-container {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 10;
    position: relative;
}

/* Кнопка старта */
.welcome-start-button {
    background: linear-gradient(45deg, #ff6b35, #ff8c42);
    color: white;
    border: none;
    padding: 20px 40px;
    font-size: 1.4em;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
        box-shadow: 0 8px 25px rgba(255, 107, 53, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.welcome-start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.3);
    background: linear-gradient(45deg, #ff8c42, #ff6b35);
}

.welcome-start-button:active {
    transform: translateY(-1px);
}

/* Кнопка рекордов */
.welcome-records-button {
    background: white;
    color: #ff6b35;
    border: 2px solid #ff6b35;
    padding: 20px 40px;
    font-size: 1.4em;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-shadow: none;
    margin-left: 20px;
    z-index: 10;
    position: relative;
}

.welcome-records-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
}

.welcome-records-button:active {
    transform: translateY(-1px);
}

/* Подпись разработчика */
.developer-credit {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    text-align: center;
    font-size: 0.9em;
    opacity: 0.8;
}

.developer-credit a {
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

.developer-credit a:hover {
    color: #ff6b35;
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.5);
}

/* Иконка помощи */
.welcome-help-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    z-index: 1000;
    pointer-events: auto;
    user-select: none;
}

.welcome-help-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.welcome-help-icon:active {
    transform: scale(0.95);
}

.game-title {
    font-size: 2.5em;
    color: #4a5568;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-subtitle {
    font-size: 1.2em;
    color: #718096;
    margin-bottom: 20px;
}

.character-preview {
    margin: 20px 0;
    position: relative;
}

.courier-character {
    font-size: 4em;
    animation: bounce 2s infinite;
}

.running-animation {
    position: absolute;
    top: 50%;
    right: -30px;
    font-size: 2em;
    animation: run 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes run {
    0%, 100% {
        transform: translateY(-50%) translateX(0);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-50%) translateX(10px);
        opacity: 1;
    }
}

.game-instructions {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: left;
}

.game-instructions p {
    margin: 8px 0;
    color: #4a5568;
    font-size: 0.95em;
}

/* Кнопки */
.main-button, .result-button {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin: 5px;
}

.main-button:hover, .result-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Кнопки паузы - отдельные стили */
.pause-buttons .pause-button {
    background: linear-gradient(145deg, #ff6b35, #ff8c42);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.15em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 6px 20px rgba(255, 107, 53, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pause-buttons .pause-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.pause-buttons .pause-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(255, 107, 53, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

.pause-buttons .pause-button:hover::before {
    left: 100%;
}

.pause-buttons .pause-button:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 
        0 4px 15px rgba(255, 107, 53, 0.25),
        inset 0 2px 0 rgba(255, 255, 255, 0.1),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3);
}

.main-button {
    font-size: 1.3em;
    padding: 20px 40px;
}


/* Экран выбора локации */
.location-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 90%;
}

.location-container h2 {
    color: #4a5568;
    margin-bottom: 30px;
    font-size: 2em;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.location-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 3px solid transparent;
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: #ff6b6b;
}

.location-preview {
    height: 100px;
    background: #f7fafc;
    border-radius: 10px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.road-preview {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: #4a5568;
    border-top: 2px solid #2d3748;
}

/* Цвета препятствий для разных локаций */
.city-obstacle {
    background: #2d3748; /* Темно-серый для городских препятствий */
}

.restaurant-obstacle {
    background: #ed8936; /* Оранжевый для ресторанных препятствий */
}

.obstacle-preview {
    width: 15px;
    height: 25px;
    border-radius: 3px;
    animation: obstacleFloat 3s ease-in-out infinite;
    position: relative;
    bottom: 20px;
}

.obstacle-preview:nth-child(3) {
    animation-delay: 0.5s;
}

.obstacle-preview:nth-child(4) {
    animation-delay: 1s;
}

@keyframes obstacleFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.location-card h3 {
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.location-card p {
    color: #718096;
    font-size: 0.9em;
}

/* Игровой экран */
.game-header {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 20;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-info {
    display: flex;
    gap: 20px;
    font-weight: 600;
    color: #2d3748;
    align-items: center;
    font-size: 1.3em;
}

.game-info span {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.game-info span:hover {
    background: rgba(255, 107, 53, 0.1);
}

#speed-level {
    color: #ff6b35;
    font-weight: bold;
    animation: speedPulse 2s infinite;
}

@keyframes speedPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes speedBoost {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.lives-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 1.3em;
}

.lives-label {
    font-size: 1.3em;
    font-weight: 600;
}

.lives-display {
    display: flex;
    gap: 4px;
    align-items: center;
}

.life {
    font-size: 1.6em;
    transition: all 0.3s ease;
}

.life.lost {
    opacity: 0.3;
    transform: scale(0.8);
}

/* Кнопка паузы в игровом интерфейсе */
.game-header .pause-button {
    background: linear-gradient(45deg, #ff6b35, #ff8c42);
    color: white;
    border: none;
    padding: 12px 16px;
    font-size: 1.3em;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
    cursor: pointer;
}

.game-header .pause-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.game-header .pause-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3);
}

.game-area {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Универсальная система двигающегося фона */
.game-area {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    /* Предотвращаем скролл и улучшаем обработку касаний */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Стили для городской локации - ТОЛЬКО для игровой области */
.game-area.city {
    background: linear-gradient(180deg, #87ceeb 0%, #98fb98 100%);
    background-image: url('assets/images/game-backgrounds/city/city-day.png');
    background-position: 0px center;
    background-size: auto 100%;
    background-repeat: no-repeat;
    animation: backgroundScroll 1429s linear infinite; /* 7px/сек (снижено на 30%) */
}

/* Стили для ресторанной локации - ТОЛЬКО для игровой области */
.game-area.restaurant {
    background: linear-gradient(180deg, #87ceeb 0%, #98fb98 100%);
    background-image: url('assets/images/game-backgrounds/restaurant/restaurant-interior.png');
    background-position: 0px center;
    background-size: auto 100%;
    background-repeat: no-repeat;
    animation: backgroundScroll 1429s linear infinite; /* 7px/сек (снижено на 30%) */
}


/* Универсальная анимация движения фона - 10px/сек влево */
@keyframes backgroundScroll {
    0% {
        background-position: 0px center;
    }
    100% {
        background-position: -100vw center;
    }
}

/* Анимация для быстрого движения фона */
@keyframes backgroundScrollFast {
    0% {
        background-position: 0px center;
    }
    100% {
        background-position: -100vw center;
    }
}

/* Анимация для медленного движения фона */
@keyframes backgroundScrollSlow {
    0% {
        background-position: 0px center;
    }
    100% {
        background-position: -100vw center;
    }
}

/* Универсальные вариации скорости анимации для всех локаций */
.game-area.speed-1 {
    animation-duration: 43s !important; /* Медленнее (снижено на 30%) */
}

.game-area.speed-2 {
    animation-duration: 21s !important; /* Быстрее (снижено на 30%) */
}

.game-area.speed-3 {
    animation-duration: 14s !important; /* Очень быстро (снижено на 30%) */
}

/* Специальные скорости для разных локаций */
.game-area.city.speed-1 {
    animation-duration: 43s !important;
}

.game-area.city.speed-2 {
    animation-duration: 21s !important;
}

.game-area.city.speed-3 {
    animation-duration: 14s !important;
}

.game-area.restaurant.speed-1 {
    animation-duration: 36s !important;
}

.game-area.restaurant.speed-2 {
    animation-duration: 17s !important;
}

.game-area.restaurant.speed-3 {
    animation-duration: 11s !important;
}

/* Скрываем дорогу в ресторане */
.game-area.restaurant .road {
    display: none !important;
}


/* Дорога */
.road {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(to bottom, #4a5568, #2d3748);
    border-top: 6px solid #1a202c;
}

.road::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 5px;
    background: repeating-linear-gradient(
        to right,
        #f7fafc 0px,
        #f7fafc 45px,
        transparent 45px,
        transparent 90px
    );
    transform: translateY(-50%);
}

/* Земля */
.ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45px;
    background: #2d3748;
}

/* Персонаж */
.courier {
    position: absolute;
    width: 240px;
    height: 240px;
    z-index: 100;
    left: 50px;
    bottom: 180px;
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#character-animation {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.3s ease-in-out;
    transform: scale(1);
    opacity: 1;
    will-change: transform, opacity;
}

/* Плавная смена анимаций */
#character-animation.animating {
    opacity: 0.9;
    transition: opacity 0.15s ease-in-out;
}

#character-animation.animating.loaded {
    opacity: 1;
    transition: opacity 0.25s ease-in-out;
}

/* Специальный класс для плавного возврата от прыжка к бегу */
#character-animation.returning-to-run {
    transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.3s ease-in-out;
}

/* Класс для завершения прыжка - возврат к нормальному размеру */
#character-animation.finishing-jump {
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Анимация тряски при потере жизни */
.courier.life-lost-shake {
    animation: lifeLostShake 0.5s ease-in-out;
}

@keyframes lifeLostShake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}


.courier.jumping {
    animation: jump 0.98s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Убираем увеличение размера GIF анимации прыжка */
.courier.jumping #character-animation {
    transform: scale(1);
    transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

@keyframes jump {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-200px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes slideDown {
    0% { 
        transform: translateX(-50%) translateY(-100%); 
        opacity: 0; 
    }
    100% { 
        transform: translateX(-50%) translateY(0); 
        opacity: 1; 
    }
}

@keyframes slideUp {
    0% { 
        transform: translateX(-50%) translateY(0); 
        opacity: 1; 
    }
    100% { 
        transform: translateX(-50%) translateY(-100%); 
        opacity: 0; 
    }
}

.courier.crashed {
    animation: crash 0.5s ease-in-out;
}

@keyframes crash {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}


/* Препятствия - только изображения */
.obstacle {
    position: absolute;
    width: 180px; /* Исходный размер для десктопа */
    height: 240px; /* Исходный размер для десктопа */
    z-index: 10;
    bottom: 180px; /* По умолчанию на дороге */
    left: 0; /* Базовая позиция */
    top: auto; /* Сброс top для правильного позиционирования */
    /* Убрана анимация появления для плавного движения */
    /* Убран transition для прямого обновления позиции без конфликтов */
    /* Используем transform для более эффективного позиционирования */
    transform: translateX(0);
    opacity: 1 !important;
    pointer-events: none; /* Препятствия не должны перехватывать события мыши */
    object-fit: contain;
}



/* Лаконичный эффект столкновения */
@keyframes collisionFlash {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 0;
        transform: scale(1);
    }
}


/* Цвета препятствий в игре */
/* Убраны фоновые стили для препятствий - теперь только изображения */

/* Позиционирование препятствий - только изображения */
.obstacle.bottom {
    bottom: 80px !important; /* На дороге, смещено на 100px ниже: 180px - 100px = 80px */
}

.obstacle.top {
    bottom: 350px !important; /* Выше дороги */
    z-index: 15; /* Выше других элементов */
}


/* Мобильная адаптация для игрового экрана */
@media (max-width: 768px) {
    /* Увеличиваем размеры препятствий в 2 раза для мобильных */
    .obstacle {
        width: 120px !important; /* 60px * 2 */
        height: 140px !important; /* 70px * 2 */
    }
    
    /* Уменьшаем высоту дороги в 2 раза для мобильных устройств */
    .road {
        height: 90px !important;
        bottom: -20px !important; /* Опускаем дорогу ниже */
    }
    
    /* Обновляем позиции препятствий для уменьшенной дороги */
    .obstacle.bottom {
        bottom: 15px !important; /* Смещаем еще на 10px ниже */
    }
    
    .obstacle.top {
        bottom: 120px !important; /* Опускаем ниже, чтобы не перекрывать консоль */
    }
    
    /* Уменьшаем размер персонажа ТОЛЬКО для мобильных */
    .courier {
        width: 80px !important;
        height: 80px !important;
    }
    
    /* Убираем увеличение размера GIF анимации прыжка для мобильных */
    .courier.jumping #character-animation {
        transform: scale(1);
        transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    }
    
    /* Адаптируем игровую область */
    .game-area {
        height: 100vh;
    }
    
    /* КРИТИЧЕСКИ КОМПАКТНОЕ МЕНЮ для мобильных */
    .game-header {
        padding: 4px 8px !important;
        top: 5px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        right: 5px !important;
        width: calc(100% - 10px) !important;
        font-size: 1.0em !important;
        min-height: 35px !important;
        max-height: 40px !important;
    }
    
    /* СУПЕР КОМПАКТНЫЕ элементы интерфейса на одной линии */
    .game-info {
        gap: 4px !important;
        font-size: 1.0em !important;
        flex-wrap: nowrap !important;
        display: flex !important;
        align-items: center !important;
        white-space: nowrap !important;
    }
    
    .game-info span {
        padding: 1px 3px !important;
        font-size: 0.55em !important;
        line-height: 1.2 !important;
    }
    
    .lives-container {
        gap: 2px !important;
        font-size: 0.6em !important;
    }
    
    .lives-container .lives-label {
        font-size: 0.55em !important;
    }
    
    .life {
        font-size: 0.8em !important;
    }
    
    .game-header .pause-button {
        padding: 3px 6px !important;
        font-size: 0.6em !important;
        min-width: 30px !important;
        min-height: 25px !important;
    }
    
    
    /* Улучшаем touch-интерфейс */
    .game-header .pause-button {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Специальные стили для горизонтальной ориентации мобильных устройств */
@media (max-width: 932px) and (orientation: landscape) {
    /* Применяем мобильные размеры для горизонтальной ориентации */
    .obstacle {
        width: 100px !important; /* Увеличиваем в 2 раза */
        height: 120px !important; /* Увеличиваем в 2 раза */
    }
    
    .courier {
        width: 80px !important;
        height: 80px !important;
        bottom: 40px !important; /* Смещаем персонажа ниже */
    }
    
    /* Убираем увеличение размера GIF анимации прыжка для мобильных в горизонтальной ориентации */
    .courier.jumping #character-animation {
        transform: scale(1);
        transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    }
    
    /* Смещаем препятствия ниже */
    .obstacle.bottom {
        bottom: 10px !important; /* Смещаем еще на 10px ниже */
    }
    
    .obstacle.top {
        bottom: 200px !important; /* Опускаем ниже для горизонтальной ориентации */
    }
    
    /* Убираем принудительную анимацию - препятствия должны появляться как в компьютерной версии */
    
    /* Компактное меню для горизонтальной ориентации - ВСЕ НА ОДНОЙ ЛИНИИ */
    .game-header {
        padding: 2px 4px !important;
        top: 2px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 95% !important;
        max-width: 500px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        font-size: 0.4em !important;
        min-height: 25px !important;
        max-height: 30px !important;
    }
    
    .game-info {
        display: flex !important;
        gap: 2px !important;
        font-size: 0.4em !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        flex: 1 !important;
        justify-content: center !important;
    }
    
    .game-info span {
        padding: 1px 2px !important;
        font-size: 0.4em !important;
        white-space: nowrap !important;
        min-width: fit-content !important;
    }
    
    .lives-container {
        gap: 1px !important;
        font-size: 0.4em !important;
        margin: 0 5px !important;
    }
    
    .game-header .pause-button {
        padding: 1px 3px !important;
        font-size: 0.4em !important;
        min-width: 20px !important;
        min-height: 18px !important;
    }
}

/* Дополнительная адаптация для очень маленьких экранов */
@media (max-width: 480px) {
    /* Увеличиваем препятствия для маленьких экранов */
    .obstacle {
        width: 80px !important; /* Увеличиваем в 2 раза */
        height: 100px !important; /* Увеличиваем в 2 раза */
    }
    
    /* Еще больше уменьшаем персонажа ТОЛЬКО для маленьких экранов */
    .courier {
        width: 70px !important;
        height: 70px !important;
    }
    
    /* Убираем увеличение размера GIF анимации прыжка для маленьких экранов */
    .courier.jumping #character-animation {
        transform: scale(1);
        transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    }
}

/* Дополнительная адаптация для очень маленьких экранов в горизонтальной ориентации */
@media (max-width: 480px) and (orientation: landscape) {
    /* Смещаем персонажа еще ниже для маленьких экранов */
    .courier {
        bottom: 30px !important;
    }
    
    /* Смещаем препятствия еще ниже для маленьких экранов */
    .obstacle.bottom {
        bottom: 5px !important; /* Смещаем еще на 10px ниже для маленьких экранов */
    }
    
    .obstacle.top {
        bottom: 180px !important; /* Опускаем для маленьких экранов */
    }
    
    /* СУПЕР КОМПАКТНОЕ МЕНЮ для маленьких экранов в горизонтальной ориентации */
    .game-header {
        padding: 1px 3px !important;
        top: 1px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 98% !important;
        max-width: 400px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        font-size: 0.3em !important;
        min-height: 20px !important;
        max-height: 25px !important;
    }
    
    .game-info {
        display: flex !important;
        gap: 1px !important;
        font-size: 0.3em !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        flex: 1 !important;
        justify-content: center !important;
    }
    
    .game-info span {
        padding: 0px 1px !important;
        font-size: 0.3em !important;
        white-space: nowrap !important;
        min-width: fit-content !important;
    }
    
    .lives-container {
        gap: 0px !important;
        font-size: 0.3em !important;
        margin: 0 2px !important;
    }
    
    .lives-container .lives-label {
        font-size: 0.3em !important;
    }
    
    .life {
        font-size: 0.5em !important;
    }
    
    .game-header .pause-button {
        padding: 0px 2px !important;
        font-size: 0.3em !important;
        min-width: 16px !important;
        min-height: 14px !important;
    }
}

/* СУПЕР КОМПАКТНЫЙ интерфейс для маленьких экранов */
@media (max-width: 480px) {
    .game-header {
        padding: 2px 4px !important;
        top: 2px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 95% !important;
        max-width: 450px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        font-size: 0.35em !important;
        min-height: 22px !important;
        max-height: 28px !important;
    }
    
    .game-info {
        display: flex !important;
        gap: 1px !important;
        font-size: 0.35em !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        flex: 1 !important;
        justify-content: center !important;
    }
    
    .game-info span {
        padding: 1px 2px !important;
        font-size: 0.35em !important;
        white-space: nowrap !important;
        min-width: fit-content !important;
    }
    
    .lives-container {
        gap: 1px !important;
        font-size: 0.35em !important;
        margin: 0 3px !important;
    }
    
    .lives-container .lives-label {
        font-size: 0.35em !important;
    }
    
    .life {
        font-size: 0.6em !important;
    }
    
    .game-header .pause-button {
        padding: 1px 2px !important;
        font-size: 0.35em !important;
        min-width: 18px !important;
        min-height: 16px !important;
    }
    
    /* Очень компактное окно паузы для маленьких экранов */
    .pause-container {
        padding: 20px 15px !important;
        max-width: 280px !important;
        width: 80% !important;
        margin: 15px !important;
    }
    
    .pause-container h2 {
        font-size: 1.5em !important;
        margin-bottom: 15px !important;
    }
    
    .pause-buttons .pause-button {
        padding: 12px 20px !important;
        font-size: 0.95em !important;
        min-width: 150px !important;
    }
    
    .pause-buttons {
        gap: 12px !important;
    }
    
}

/* Индикатор появления препятствий */
.obstacle-spawn-indicator {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 100px;
    background: linear-gradient(to bottom, transparent, #ff6b35, transparent);
    border-radius: 2px;
    opacity: 0.6;
    animation: spawnIndicator 2s ease-in-out infinite;
    z-index: 5;
}

@keyframes spawnIndicator {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(-50%) scaleY(0.8);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-50%) scaleY(1.2);
    }
}

/* Экран результатов */
.result-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
}

.result-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: celebrate 1s ease-in-out infinite alternate;
}

@keyframes celebrate {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

.result-container h2 {
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 2em;
}

.result-container p {
    color: #718096;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.result-stats {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.stat-label {
    color: #4a5568;
    font-weight: bold;
}

.stat-value {
    color: #2d3748;
}

.result-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-button.primary {
    background: linear-gradient(45deg, #00b894, #00a085);
}

/* Экран окончания игры */
#game-over-screen {
    background-image: url('assets/images/game-over/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: none;
    align-items: center;
    justify-content: center;
}

#game-over-screen.active {
    display: flex;
}

/* Возрастной рейтинг */
.age-rating {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #87ceeb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.game-over-container {
    display: flex;
    background: rgba(255, 255, 255, 0.98);
    padding: 50px 40px;
    border-radius: 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 90%;
    position: relative;
    gap: 40px;
    align-items: flex-start;
}

.game-over-left {
    flex: 1;
    text-align: center;
}

.game-over-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Аватар персонажа */
.game-over-avatar {
    margin-bottom: 40px;
}

.avatar-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #87ceeb;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    overflow: visible;
    position: relative;
}

.avatar-image {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 2;
}

/* Новые кнопки */
/* Контейнер для основных кнопок действий */
.game-over-main-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.game-over-main-buttons .game-over-btn {
    width: 100%;
    max-width: 280px;
    white-space: normal !important;
    line-height: 1.3;
}

.game-over-btn {
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 15px 20px;
    text-transform: none;
}

.primary-btn {
    background: linear-gradient(45deg, #ff6b35, #ff8c42);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.2);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
}

.secondary-btn {
    background: white;
    color: #ff6b35;
    border: 3px solid #ff6b35;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.2);
}

.secondary-btn:hover {
    background: #ff6b35;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.2);
}

/* Дополнительные кнопки */
.bottom-buttons {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.small-btn {
    flex: 1;
    font-size: 0.92em;
    padding: 10px 12px;
    min-width: 85px;
    max-width: 130px;
    white-space: normal;
    line-height: 1.4;
    height: auto;
    min-height: 42px;
}

/* Секция результатов */
.results-section {
    padding: 0;
    background: transparent;
}

.results-title {
    color: #4a5568;
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 25px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.game-over-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: none;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 1);
}

.stat-label {
    color: #4a5568;
    font-weight: bold;
    font-size: 1.1em;
}

.stat-value {
    color: #2d3748;
    font-weight: bold;
    font-size: 1.2em;
    background: linear-gradient(45deg, #ff6b35, #ff8c42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Секция собранных предметов */
.collectibles-section {
    margin-top: 25px;
    padding: 20px;
    background: transparent;
    border-radius: 20px;
    box-shadow: none;
    backdrop-filter: none;
}

.collectibles-title {
    color: #4a5568;
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

/* Компактный горизонтальный список предметов */
.collectibles-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
    padding: 10px;
}

/* Компактный элемент предмета (только иконка + количество) */
.collectible-item-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    min-width: 70px;
}

.collectible-item-compact:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.collectible-icon-compact {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.collectible-count-compact {
    font-size: 1.3em;
    font-weight: bold;
    color: #ff6b35;
    text-align: center;
}

/* Итоговая статистика */
.collectibles-summary {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 15px;
    border-top: 2px solid rgba(74, 85, 104, 0.2);
    flex-wrap: wrap;
}

.collectibles-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.collectibles-stat .stat-label {
    font-size: 0.9em;
    color: #4a5568;
    font-weight: 600;
}

.collectibles-stat .stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #ff6b35;
}

/* Адаптивность для собираемых предметов на мобильных - КОМПАКТНО */
@media (max-width: 768px) {
    /* Размещаем блок предметов ПОСЛЕ статистики игры */
    .collectibles-section {
        padding: 8px !important;
        margin-top: 8px !important;
        margin-bottom: 8px !important;
        border-radius: 12px !important;
        order: 1 !important; /* Показываем ПОСЛЕ статистики игры */
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 107, 53, 0.2) !important;
    }
    
    .collectibles-title {
        font-size: 0.85em !important;
        margin-bottom: 5px !important;
    }
    
    .collectibles-list {
        gap: 4px !important;
        padding: 2px !important;
        margin-bottom: 5px !important;
    }
    
    .collectible-item-compact {
        padding: 3px !important;
        min-width: 44px !important;
        border-radius: 8px !important;
        gap: 3px !important;
    }
    
    .collectible-icon-compact {
        width: 28px !important;
        height: 28px !important;
    }
    
    .collectible-count-compact {
        font-size: 0.85em !important;
    }
    
    .collectibles-summary {
        gap: 4px !important;
        padding-top: 5px !important;
        flex-wrap: nowrap !important;
    }
    
    .collectibles-stat {
        padding: 3px 6px !important;
        min-width: auto !important;
        flex: 1 !important;
        border-radius: 8px !important;
    }
    
    .collectibles-stat .stat-label {
        font-size: 0.6em !important;
    }
    
    .collectibles-stat .stat-value {
        font-size: 0.95em !important;
    }
    
    /* results-section должен поддерживать flex для order */
    .results-section {
        display: flex !important;
        flex-direction: column !important;
    }
}

/* Дополнительная оптимизация для очень маленьких экранов - УЛЬТРА-КОМПАКТНО - ПОРТРЕТНАЯ ОРИЕНТАЦИЯ */
@media (max-width: 480px) and (orientation: portrait) {
    /* Контейнер - максимально компактный с двухколоночным макетом */
    .game-over-container {
        padding: 8px 6px !important;
        gap: 6px !important;
        margin: 3px auto !important;
        max-width: 98% !important;
        width: 98% !important;
        max-height: 98vh !important;
        overflow-y: auto !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    /* Левая часть - аватар и кнопки */
    .game-over-left {
        order: 2 !important;
        width: 100% !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 4px !important;
    }
    
    /* Правая часть - результаты в двух колонках */
    .game-over-right {
        order: 1 !important;
        width: 100% !important;
        margin-bottom: 0 !important;
    }
    
    /* Двухколоночный макет для статистики и собранных предметов - ТОЛЬКО для горизонтальной ориентации */
    .results-section {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        align-items: center !important;
    }
    
    /* Статистика игры - вертикальный layout */
    .game-over-stats {
        gap: 3px !important;
        margin-bottom: 0 !important;
        padding: 4px !important;
        width: 100% !important;
    }
    
    /* Собранные предметы - под статистикой */
    .collectibles-section {
        padding: 4px !important;
        margin-top: 4px !important;
        order: 1 !important;
        width: 100% !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 107, 53, 0.2) !important;
        border-radius: 8px !important;
    }
    
    /* Аватар - еще меньше */
    .avatar-circle {
        width: 50px !important;
        height: 50px !important;
    }
    
    .avatar-image {
        width: 50px !important;
        height: 50px !important;
    }
    
    /* Заголовок - скрываем для экономии места */
    .results-title {
        display: none !important;
    }
    
    /* Статистика - ультра-компактная */
    .stat {
        padding: 3px 4px !important;
        font-size: 0.65em !important;
        margin-bottom: 2px !important;
    }
    
    .stat-label {
        font-size: 0.7em !important;
    }
    
    .stat-value {
        font-size: 0.75em !important;
    }
    
    /* Кнопки - минимальный размер */
    .game-over-main-buttons {
        gap: 5px !important;
    }
    
    .game-over-main-buttons .game-over-btn {
        font-size: 0.75em !important;
        padding: 6px 10px !important;
        min-height: 34px !important;
    }
    
    .game-over-btn.small-btn {
        font-size: 0.65em !important;
        padding: 5px 6px !important;
        min-height: 30px !important;
    }
    
    .bottom-buttons {
        gap: 4px !important;
        margin-top: 6px !important;
    }
    
    /* Собранные предметы - ультра-компактно в правой колонке */
    .collectibles-title {
        font-size: 0.7em !important;
        margin-bottom: 3px !important;
        text-align: center !important;
    }
    
    .collectibles-list {
        gap: 2px !important;
        padding: 1px !important;
        margin-bottom: 3px !important;
        justify-content: center !important;
    }
    
    .collectible-item-compact {
        padding: 2px !important;
        min-width: 35px !important;
        gap: 1px !important;
    }
    
    .collectible-icon-compact {
        width: 20px !important;
        height: 20px !important;
    }
    
    .collectible-count-compact {
        font-size: 0.7em !important;
    }
    
    .collectibles-summary {
        gap: 2px !important;
        padding-top: 3px !important;
        flex-direction: column !important;
    }
    
    .collectibles-stat {
        padding: 2px 4px !important;
        min-width: auto !important;
        font-size: 0.6em !important;
    }
    
    .collectibles-stat .stat-label {
        font-size: 0.55em !important;
    }
    
    .collectibles-stat .stat-value {
        font-size: 0.7em !important;
    }
}

/* СПЕЦИАЛЬНАЯ ОПТИМИЗАЦИЯ для мобильных в горизонтальной ориентации */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
    .game-over-container {
        padding: 6px 8px !important;
        gap: 4px !important;
        margin: 3px auto !important;
        max-height: 96vh !important;
        overflow-y: auto !important;
        flex-direction: row !important;
        align-items: flex-start !important;
    }
    
    /* Левая часть - аватар и кнопки */
    .game-over-left {
        order: 1 !important;
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 100px !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 3px !important;
    }
    
    /* Правая часть - результаты в двух колонках */
    .game-over-right {
        order: 2 !important;
        flex: 1 !important;
        width: auto !important;
        margin-bottom: 0 !important;
    }
    
    /* Двухколоночный макет для статистики и собранных предметов */
    .results-section {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 4px !important;
        align-items: start !important;
    }
    
    /* Левая колонка - статистика игры */
    .game-over-stats {
        grid-column: 1 !important;
        gap: 2px !important;
        margin-bottom: 0 !important;
        padding: 2px !important;
    }
    
    /* Правая колонка - собранные предметы */
    .collectibles-section {
        grid-column: 2 !important;
        padding: 2px !important;
        margin-top: 0 !important;
        order: 0 !important;
    }
    
    .avatar-circle {
        width: 40px !important;
        height: 40px !important;
    }
    
    .avatar-image {
        width: 30px !important;
        height: 30px !important;
    }
    
    /* Заголовок - скрываем для экономии места */
    .results-title {
        display: none !important;
    }
    
    /* Статистика - ультра-компактная */
    .stat {
        padding: 2px 4px !important;
        font-size: 0.6em !important;
        margin-bottom: 1px !important;
    }
    
    .stat-label {
        font-size: 0.65em !important;
    }
    
    .stat-value {
        font-size: 0.7em !important;
    }
    
    /* Собранные предметы - ультра-компактно в правой колонке */
    .collectibles-title {
        font-size: 0.65em !important;
        margin-bottom: 2px !important;
        text-align: center !important;
    }
    
    .collectibles-list {
        gap: 1px !important;
        padding: 1px !important;
        margin-bottom: 2px !important;
        justify-content: center !important;
    }
    
    .collectible-item-compact {
        padding: 1px !important;
        min-width: 30px !important;
    }
    
    .collectible-icon-compact {
        width: 16px !important;
        height: 16px !important;
    }
    
    .collectible-count-compact {
        font-size: 0.65em !important;
    }
    
    .collectibles-summary {
        gap: 1px !important;
        padding-top: 2px !important;
        flex-direction: column !important;
    }
    
    .collectibles-stat {
        padding: 1px 3px !important;
        font-size: 0.55em !important;
    }
    
    .collectibles-stat .stat-label {
        font-size: 0.5em !important;
    }
    
    .collectibles-stat .stat-value {
        font-size: 0.6em !important;
    }
    
    .game-over-main-buttons {
        gap: 3px !important;
    }
    
    .game-over-main-buttons .game-over-btn {
        font-size: 0.65em !important;
        padding: 4px 6px !important;
        min-height: 28px !important;
    }
    
    .game-over-btn.small-btn {
        font-size: 0.55em !important;
        padding: 3px 4px !important;
        min-height: 26px !important;
    }
    
    .bottom-buttons {
        gap: 3px !important;
        margin-top: 5px !important;
    }
}

.game-over-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: shake 0.5s ease-in-out infinite alternate;
}

@keyframes shake {
    from {
        transform: translateX(-5px);
    }
    to {
        transform: translateX(5px);
    }
}

.game-over-container h2 {
    color: #e53e3e;
    margin-bottom: 10px;
    font-size: 2em;
}

.game-over-container p {
    color: #718096;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.game-over-stats {
    background: transparent;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.game-over-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Экран паузы */
.pause-container {
    text-align: center;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    padding: 35px;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 
                0 0 0 1px rgba(255, 255, 255, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.6);
    max-width: 420px;
    width: 90%;
    position: relative;
    overflow: hidden;
}

.pause-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b35, #ff8c42, #ff6b35);
    border-radius: 25px 25px 0 0;
}

.pause-container h2 {
    color: #ff6b35;
    margin-bottom: 30px;
    font-size: 2.2em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    background: linear-gradient(45deg, #ff6b35, #ff8c42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.pause-container h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #ff8c42);
    border-radius: 2px;
}

.pause-buttons {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 20px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .locations-grid {
        grid-template-columns: 1fr;
    }
    
    /* Адаптивные стили для окна паузы */
    .pause-container {
        padding: 25px;
        margin: 20px;
        max-width: 350px;
        width: 85%;
    }
    
    .pause-container h2 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    
    .pause-buttons .pause-button {
        padding: 14px 28px;
        font-size: 1.05em;
        min-width: 180px;
    }
    
    .game-title {
        font-size: 2em;
    }
    
    .welcome-container, .location-container, .result-container, .game-over-container {
        padding: 20px;
    }
    
    .result-buttons, .game-over-buttons {
        flex-direction: column;
    }
    
    /* Адаптивность для game-over - МАКСИМАЛЬНО КОМПАКТНАЯ ВЕРСИЯ */
    .game-over-container {
        flex-direction: column !important;
        padding: 15px 12px !important;
        max-width: 95% !important;
        width: 95% !important;
        gap: 12px !important;
        align-items: center !important;
        margin: 10px auto !important;
    }
    
    .game-over-left {
        order: 2 !important;
        width: 100% !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important; /* Вертикально: аватар сверху, кнопки снизу */
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
    }
    
    .game-over-right {
        order: 1 !important;
        width: 100% !important;
        margin-bottom: 0px !important;
    }
    
    /* Аватар - компактный */
    .game-over-avatar {
        margin-bottom: 6px !important;
        flex-shrink: 0;
        order: 1;
    }
    
    .avatar-circle {
        width: 55px !important;
        height: 55px !important;
        margin: 0 auto !important;
    }
    
    .avatar-image {
        width: 55px !important;
        height: 55px !important;
    }
    
    /* Основные кнопки под аватаром */
    .game-over-main-buttons {
        order: 2;
        width: 100% !important;
        max-width: 200px !important;
    }
    
    /* Заголовок результатов - компактный */
    .results-title {
        font-size: 1em !important;
        margin-bottom: 8px !important;
        padding: 6px 10px !important;
    }
    
    /* Статистика игры - компактная */
    .game-over-stats {
        gap: 5px !important;
        margin-bottom: 0 !important;
    }
    
    .stat {
        padding: 6px 10px !important;
        font-size: 0.8em !important;
    }
    
    .stat-label {
        font-size: 0.85em !important;
    }
    
    .stat-value {
        font-size: 0.95em !important;
    }
    
    /* Основные кнопки - КОМПАКТНЫЕ, вертикально */
    .game-over-main-buttons {
        gap: 5px !important;
        width: 100% !important;
        max-width: 200px !important;
        margin: 0 auto !important;
        flex: none !important;
        display: flex !important;
        flex-direction: column !important;
        flex-shrink: 0 !important;
    }
    
    .game-over-main-buttons .game-over-btn {
        font-size: 0.8em !important;
        padding: 7px 10px !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 34px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
    
    .game-over-btn {
        font-size: 0.85em !important;
        padding: 8px 12px !important;
        margin: 0 !important;
        min-height: 38px !important;
    }
    
    .game-over-btn.small-btn {
        font-size: 0.7em !important;
        padding: 6px 8px !important;
        margin: 0 !important;
        min-width: 70px !important;
        max-width: none !important;
        white-space: nowrap !important;
        line-height: 1.2 !important;
        height: auto !important;
        min-height: 34px !important;
        flex: 1 !important;
    }
    
    .bottom-buttons {
        display: flex !important;
        flex-direction: row !important;
        gap: 5px !important;
        margin-top: 8px !important;
        width: 100% !important;
        max-width: 360px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        justify-content: center !important;
    }
    
    .bottom-buttons .game-over-btn {
        flex: 1 !important;
    }
    
    /* Специальный стиль для кнопки "Поделиться" - делаем её немного шире */
    .bottom-buttons .game-over-btn:last-child {
        flex: 1.2 !important;
        min-width: 0 !important;
    }
    
    .results-title {
        font-size: 1.6em !important;
        margin-bottom: 20px !important;
        padding: 12px 20px !important;
        text-align: center !important;
    }
    
    .game-over-stats {
        gap: 12px !important;
        margin-bottom: 15px !important;
    }
    
    .stat {
        padding: 10px 15px !important;
        font-size: 1em !important;
        text-align: center !important;
    }
    
    .stat-label {
        font-size: 0.9em !important;
        display: block !important;
        margin-bottom: 4px !important;
    }
    
    .stat-value {
        font-size: 1.1em !important;
        font-weight: bold !important;
    }
    
    .age-rating {
        width: 50px !important;
        height: 50px !important;
        font-size: 1em !important;
        top: 15px !important;
        right: 15px !important;
        padding: 0 !important;
    }
    
    .results-title {
        font-size: 1.5em;
        margin-bottom: 20px;
        padding: 12px 15px;
    }
    
    .stat {
        padding: 12px 15px;
    }
    
    .stat-label {
        font-size: 1em;
    }
    
    .stat-value {
        font-size: 1.1em;
    }
    
    .game-info {
        flex-direction: row;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .game-info span {
        padding: 3px 6px;
        font-size: 0.85em;
    }
    
    .game-header {
        padding: 10px 15px;
        top: 15px;
        left: 50%;
        transform: translateX(-50%);
        right: 15px;
    }
    
    .lives-container {
        gap: 6px;
        font-size: 0.85em;
    }
    
    .game-header .pause-button {
        padding: 6px 10px;
        font-size: 0.85em;
    }
    
    /* Адаптивность для нового дизайна приветственного экрана */
    .welcome-container {
        height: 100vh;
    }
    
    .welcome-background {
        display: none;
    }
    
    .welcome-sky {
        height: 100%;
    }
    
    .welcome-cloud {
        width: 60px;
        height: 40px;
    }
    
    .cloud-1 {
        top: 10%;
        left: 2%;
        width: 50px;
        height: 35px;
    }
    
    .cloud-2 {
        top: 15%;
        right: 3%;
        width: 120px;
        height: 70px;
    }
    
    .cloud-3 {
        top: 6%;
        width: 100px;
        height: 60px;
    }
    
    .cloud-4 {
        top: 40%;
        left: 5%;
        width: 40px;
        height: 25px;
    }
    
    .cloud-5 {
        top: 35%;
        right: 10%;
        width: 80px;
        height: 50px;
    }
    
    .cloud-6 {
        top: 15%;
        left: 20%;
        width: 60px;
        height: 40px;
    }
    
    .cloud-7 {
        top: 25%;
        right: 25%;
        width: 45px;
        height: 30px;
    }
    
    .cloud-8 {
        top: 3%;
        left: 55%;
        width: 130px;
        height: 80px;
    }
    
    .game-logo {
        width: 150px;
        height: 75px;
        top: 20px;
        left: 0;
        right: 0;
        margin: 0 auto;
        cursor: pointer;
    }
    
    .game-logo:hover {
        transform: scale(1.05);
        filter: brightness(1.1);
    }
    
    .welcome-character {
        width: 333px;
        height: 427px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .welcome-stars {
        width: 180px;
        height: 150px;
        top: 60px;
        left: 120px;
    }
    
    .welcome-help-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        top: 15px;
        right: 15px;
    }
    
    .welcome-content {
        left: 360px;
        right: 10px;
        max-width: 300px;
        top: 50%;
        transform: translateY(calc(-50% - 20px));
    }
    
    .welcome-main-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }
    
    .welcome-description {
        font-size: 0.9em;
        margin-bottom: 30px;
        line-height: 1.1;
    }
    
    .welcome-buttons-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .welcome-start-button {
        padding: 15px 30px;
        font-size: 1.2em;
    }
    
    .welcome-records-button {
        padding: 15px 25px;
        font-size: 1em;
        margin-left: 0;
    }
    
}

/* Анимации переходов */
.screen {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screen.active {
    opacity: 1;
}

/* Эффекты частиц для успешного завершения */
@keyframes confetti {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff6b6b;
    animation: confetti 3s linear forwards;
}

/* Эффект столкновения */
.crash-effect {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: crashExplosion 0.5s ease-out;
    pointer-events: none;
}

.collision-effect {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255,0,0,0.8) 0%, rgba(255,100,0,0.6) 50%, transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 200;
    animation: collisionExplosion 0.5s ease-out forwards;
}

@keyframes crashExplosion {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes collisionExplosion {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Модальное окно для шаринга */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.share-modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    animation: scaleIn 0.3s ease forwards;
}

@keyframes scaleIn {
    to {
        transform: scale(1);
    }
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.share-modal-header h3 {
    color: #4a5568;
    font-size: 1.5em;
    margin: 0;
}

.close-share-modal {
    background: none;
    border: none;
    font-size: 2em;
    color: #718096;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-share-modal:hover {
    background: #f0f0f0;
    color: #4a5568;
}

.share-text-preview {
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 4px solid #ff6b6b;
}

.share-text-preview p {
    margin: 0;
    color: #4a5568;
    font-size: 1em;
    line-height: 1.4;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.share-option {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.share-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.share-option[data-action="copy"] {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
}

.share-option[data-action="vk"] {
    background: linear-gradient(45deg, #4c75a3, #2a4a6b);
}

.share-option[data-action="telegram"] {
    background: linear-gradient(45deg, #0088cc, #006699);
}

.share-option[data-action="whatsapp"] {
    background: linear-gradient(45deg, #25d366, #128c7e);
}

/* Уведомления */
.share-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, #00b894, #00a085);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 300px;
    font-weight: bold;
}

.share-notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* Адаптивность для модального окна */
@media (max-width: 768px) {
    .share-modal-content {
        padding: 20px;
        margin: 20px;
    }
    
    .share-options {
        grid-template-columns: 1fr;
    }
    
    .share-option {
        padding: 12px;
        font-size: 0.85em;
    }
    
    .share-notification {
        right: 10px;
        left: 50%;
        transform: translateX(-50%);
        max-width: none;
        transform: translateY(-100px);
    }
    
    .share-notification.show {
        transform: translateY(0);
    }
}

/* ===== СТИЛИ ДЛЯ ЭКРАНА ВЫБОРА ЛОКАЦИИ ===== */

/* Фон страницы выбора локации */
.location-sky {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #87ceeb 0%, #98fb98 100%);
    background-image: url('assets/images/locations/gazon.png');
    background-size: cover;
    background-position: center calc(100% + 500px);
    background-repeat: no-repeat;
    z-index: 0;
    filter: blur(5px);
    opacity: 0.8;
}

/* Контейнер логотипа */
.logo-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.logo-image {
    width: 200px;
    height: 100px;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

/* Основной контейнер локации */
.location-main-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

/* Стрелки навигации */
.nav-arrow {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ff4757;
    color: white;
    border: none;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
    z-index: 5;
}

.nav-arrow:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
}

.nav-arrow-left {
    margin-right: 20px;
}

.nav-arrow-right {
    margin-left: 20px;
}

/* Фрейм персонажа */
.character-frame {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    border: 4px solid #ff4757;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

#character-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
}

#character-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.location-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    z-index: 1;
}

.city-background {
    background-image: url('assets/images/locations/city/background.png');
}

.restaurant-background {
    background-image: url('assets/images/locations/restaurant/background.png');
}

/* Контейнер названия локации */
.location-name-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: absolute;
    top: calc(50% + 180px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.location-name {
    background: #ff6b35;
    color: white;
    padding: 8px 20px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 1.1em;
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.3);
}

.location-arrow {
    color: #ff6b35;
    font-size: 1.5em;
    font-weight: bold;
}

/* Заголовок "Выбери игру!" */
.choose-game-text {
    text-align: center;
    position: absolute;
    top: calc(50% - 320px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.choose-game-text h2 {
    font-size: 2.8em;
    color: #ff4757;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
    margin: 0;
}

/* Кнопка выбора города */
/* Контейнер кнопок управления локацией */
.location-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    align-items: center;
    z-index: 5;
}

/* Кнопка настроек (шестеренка) */
.settings-button {
    background: linear-gradient(145deg, #4a5568, #2d3748);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(74, 85, 104, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.settings-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.settings-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 8px 25px rgba(74, 85, 104, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.settings-button:hover::before {
    opacity: 1;
}

.settings-button:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 
        0 4px 15px rgba(74, 85, 104, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.settings-button svg {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.settings-button:hover svg {
    transform: rotate(90deg);
}

/* Кнопка игры */
.play-button {
    background: linear-gradient(145deg, #ff6b35, #ff8c42);
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 30px;
    font-size: 1.2em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 6px 20px rgba(255, 107, 53, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    width: 160px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0;
    outline: none;
    text-decoration: none;
    vertical-align: middle;
}

.play-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.play-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(255, 107, 53, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

.play-button:hover::before {
    left: 100%;
}

.play-button:active {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 
        0 6px 20px rgba(255, 107, 53, 0.25),
        inset 0 2px 0 rgba(255, 255, 255, 0.1),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3);
}

/* Кнопка выбора города (устаревшая, оставлена для совместимости) */
.city-selection-button {
    background: rgba(255, 71, 87, 0.9);
    color: white;
    border: 2px solid #ff4757;
    padding: 12px 30px;
    border-radius: 20px;
    font-size: 1em;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
    letter-spacing: 0.5px;
    position: absolute;
    top: calc(50% + 250px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    backdrop-filter: blur(10px);
    display: none; /* Скрыта, так как заменена новыми кнопками */
}

.city-selection-button:hover {
    transform: translateX(-50%) translateY(-2px);
    background: rgba(255, 71, 87, 1);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
    border-color: #ff3742;
}

/* Кнопка назад */
.back-button {
    background: linear-gradient(145deg, #ff6b35, #ff8c42);
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 30px;
    font-size: 1.2em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 6px 20px rgba(255, 107, 53, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    width: 160px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0;
    outline: none;
    text-decoration: none;
    vertical-align: middle;
}

.back-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.back-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(255, 107, 53, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

.back-button:hover::before {
    left: 100%;
}

.back-button:active {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 
        0 6px 20px rgba(255, 107, 53, 0.25),
        inset 0 2px 0 rgba(255, 255, 255, 0.1),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3);
}

/* ===== МОДАЛЬНЫЕ ОКНА ===== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

/* Специальные стили для модального окна настроек */
#user-settings-modal .modal-content {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.settings-form {
    padding: 20px;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ecf0f1;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: bold;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

.modal-content {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    border-radius: 25px;
    padding: 35px;
    max-width: 520px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 
                0 0 0 1px rgba(255, 255, 255, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: modalSlideIn 0.4s ease;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b35, #ff8c42, #ff6b35);
    border-radius: 25px 25px 0 0;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9) rotateX(-10deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

/* Анимация появления элементов формы */
.form-group {
    animation: formElementSlideIn 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

@keyframes formElementSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Анимация для кнопок */
.form-actions {
    animation: buttonsSlideIn 0.6s ease 0.5s forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes buttonsSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Пульсирующий эффект для важных элементов */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.start-game-btn {
    animation: pulse 2s ease-in-out infinite;
}

/* Эффект свечения для фокуса */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.2);
    }
    50% {
        box-shadow: 0 0 20px 5px rgba(255, 107, 53, 0.2);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 107, 53, 0.2);
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #ff6b35, #ff8c42);
    border-radius: 1px;
}

.modal-header h3 {
    color: #ff6b35;
    font-size: 1.8em;
    margin: 0;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    background: linear-gradient(45deg, #ff6b35, #ff8c42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-btn {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.9));
    border: 2px solid rgba(255, 107, 53, 0.3);
    font-size: 1.5em;
    color: #ff6b35;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.close-btn:hover {
    color: white;
    background: linear-gradient(145deg, #ff6b35, #ff8c42);
    border-color: #ff6b35;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.2);
}

/* Сетка городов */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
    margin-bottom: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.city-btn {
    background: transparent;
    color: #ff6b35;
    border: none;
    padding: 10px 8px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 0 2px #ff6b35;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.city-btn:hover {
    transform: translateY(-3px);
        box-shadow: inset 0 0 0 3px #ff6b35, 0 8px 25px rgba(255, 107, 53, 0.2);
}


.city-btn.selected {
    background: linear-gradient(45deg, #ff6b35, #ff8c42);
    color: white;
    border: none;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.city-btn.selected:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.3);
    background: linear-gradient(45deg, #ff8c42, #ff6b35);
}

/* Форма данных игрока */
.player-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: bold;
    color: #ff6b35;
    font-size: 1.1em;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    display: block;
}

.form-group input {
    padding: 15px 20px;
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-radius: 15px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.9));
    backdrop-filter: blur(10px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #333;
    font-weight: 500;
}

.form-group input:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2),
                inset 0 2px 4px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.form-group input::placeholder {
    color: rgba(255, 107, 53, 0.3);
    font-style: italic;
}

.social-options {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.social-option {
    cursor: pointer;
    padding: 10px 16px;
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(248, 249, 250, 0.8));
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    flex: 1;
    position: relative;
    overflow: hidden;
    height: 48px;
}

.social-content {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
}

.social-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.1), transparent);
    transition: left 0.5s ease;
}

.social-option:hover {
    background: linear-gradient(145deg, rgba(255, 107, 53, 0.08), rgba(255, 140, 66, 0.08));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.15);
}

.social-option:hover .radio-indicator {
    border-color: #ff6b35;
}

.social-option:hover::before {
    left: 100%;
}

.social-option input[type="radio"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #ff6b35;
    cursor: pointer;
}

/* Убираем стили для текста, так как теперь используются только иконки */

/* Стили для иконок социальных сетей */
.social-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: grayscale(0.2) opacity(0.9);
}

/* Стили для индикатора выбора */
.radio-indicator {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-radius: 50%;
    background: transparent;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.radio-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #ff6b35;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
}

.social-option:hover .social-icon-img {
    filter: grayscale(0) opacity(1);
    transform: scale(1.1);
}

.social-option:has(input[type="radio"]:checked) .social-icon-img {
    filter: grayscale(0) opacity(1);
    transform: scale(1.05);
}

/* Fallback для отсутствующих иконок - скрываем кнопку */
.social-icon-img:not([src]), 
.social-icon-img[src=""], 
.social-icon-img[src*="undefined"] {
    display: none;
}

.social-option:has(.social-icon-img:not([src])),
.social-option:has(.social-icon-img[src=""]),
.social-option:has(.social-icon-img[src*="undefined"]) {
    display: none;
}

.social-option:has(input[type="radio"]:checked) {
    background: linear-gradient(145deg, rgba(255, 107, 53, 0.12), rgba(255, 140, 66, 0.12));
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.2);
}

.social-option:has(input[type="radio"]:checked) .radio-indicator {
    border-color: #ff6b35;
    background: rgba(255, 107, 53, 0.1);
}

.social-option:has(input[type="radio"]:checked) .radio-indicator::after {
    transform: translate(-50%, -50%) scale(1);
}

.privacy-notice {
    background: rgba(248, 249, 250, 0.6);
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    margin: 8px 0;
    backdrop-filter: blur(5px);
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.privacy-notice::before {
    display: none;
}

.privacy-notice p {
    margin: 0;
    color: #6b7280;
    font-size: 0.8em;
    line-height: 1.3;
    font-weight: 400;
    padding-left: 0;
}

.form-actions {
    display: flex;
    gap: 20px;
    margin-top: 25px;
}

.save-btn {
    background: linear-gradient(145deg, #00b894, #00a085);
    color: white;
    border: none;
    padding: 16px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    box-shadow: 0 6px 20px rgba(0, 184, 148, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.save-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.save-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.5);
    background: linear-gradient(145deg, #00a085, #00b894);
}

.save-btn:hover::before {
    left: 100%;
}

.save-btn:active {
    transform: translateY(-1px);
}

.start-game-btn {
    background: linear-gradient(145deg, #ff6b35, #ff8c42);
    color: white;
    border: none;
    padding: 16px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.start-game-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.start-game-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
    background: linear-gradient(145deg, #ff8c42, #ff6b35);
}

.start-game-btn:hover::before {
    left: 100%;
}

.start-game-btn:active {
    transform: translateY(-1px);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .location-sky {
        height: 100%;
        filter: blur(1.5px);
    }
    
    .logo-image {
        width: 120px;
        height: 60px;
    }
    
    .location-main-container {
        gap: 15px;
    }
    
    .location-name-container {
        top: calc(50% + 120px);
    }
    
    .choose-game-text {
        top: calc(50% - 140px);
    }
    
    .choose-game-text h2 {
        font-size: 1.6em;
    }
    
    .city-selection-button {
        top: calc(50% + 280px);
        padding: 10px 25px;
        font-size: 0.9em;
    }
    
    .back-button {
        padding: 12px 25px;
        font-size: 1em;
        width: 140px;
        height: 50px;
    }
    
    .nav-arrow {
        width: 45px;
        height: 45px;
        font-size: 1.3em;
    }
    
    .character-frame {
        width: 220px;
        height: 220px;
    }
    
    .location-controls {
        bottom: 20px;
        gap: 15px;
    }

    .settings-button {
        width: 45px;
        height: 45px;
    }

    .settings-button svg {
        width: 20px;
        height: 20px;
    }

    .play-button {
        padding: 12px 25px;
        font-size: 1em;
        width: 140px;
        height: 50px;
    }
    
    .cities-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 6px;
    }
    
    .city-btn {
        padding: 8px 6px;
        font-size: 0.75em;
    }
    
    .social-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    /* Адаптивные стили для модального окна */
    .modal-content {
        padding: 25px;
        margin: 20px;
        max-width: 90%;
    }
    
    .modal-header h3 {
        font-size: 1.5em;
    }
    
    .form-group input {
        padding: 12px 15px;
        font-size: 0.95em;
    }
    
    .social-options {
        flex-direction: column;
        gap: 12px;
    }
    
    .social-option {
        padding: 8px 12px;
        height: 42px;
    }
    
    .social-content {
        gap: 10px;
    }
    
    .social-icon {
        width: 20px;
        height: 20px;
    }
    
    .social-icon-img {
        width: 20px;
        height: 20px;
    }
    
    .radio-indicator {
        width: 16px;
        height: 16px;
    }
    
    .radio-indicator::after {
        width: 5px;
        height: 5px;
    }
    
    .form-actions {
        gap: 15px;
    }
    
    .save-btn, .start-game-btn {
        padding: 14px 25px;
        font-size: 1em;
    }
}

/* Специальное правило для кнопки "Назад" в вертикальной мобильной версии */
@media (max-width: 768px) and (orientation: portrait) {
    .back-button {
        height: 45px;
    }
}

/* Улучшенная мобильная адаптивность для welcome страницы */
@media (max-width: 1024px) and (orientation: portrait) {
    .welcome-character {
        width: 500px;
        height: 620px;
        top: 35%;
        left: 35%;
        transform: translate(-50%, -50%);
        z-index: 5;
    }
    
    .welcome-content {
        left: 450px;
        right: 20px;
        max-width: 400px;
        transform: translateY(calc(-50% - 20px));
    }
    
    .welcome-main-title {
        font-size: 4em;
    }
    
    .welcome-description {
        font-size: 1.4em;
    }
}

/* Стили для горизонтальной ориентации на планшетах и широких экранах */
@media (max-width: 1024px) and (orientation: landscape) {
    .welcome-character {
        width: 400px;
        height: 500px;
        top: 35%;
        left: 15%; /* Перемещаем персонажа еще левее */
        transform: translate(-50%, -50%);
        z-index: 5;
    }
    
    .welcome-content {
        left: 350px;
        right: 20px;
        max-width: 350px;
        transform: translateY(calc(-50% - 20px));
    }
    
    .welcome-main-title {
        font-size: 3.5em;
    }
    
    .welcome-description {
        font-size: 1.2em;
    }
}

@media (max-width: 768px) {
    .welcome-container {
        padding: 10px;
    }
    
    .welcome-character {
        width: 420px;
        height: 520px;
        top: 35%;
        left: 35%;
        transform: translate(-50%, -50%);
        z-index: 5;
    }
    
    .welcome-stars {
        width: 200px;
        height: 160px;
        top: 50px;
        left: 100px;
    }
    
    .welcome-content {
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        transform: none;
        max-width: 100%;
        margin: 20px auto;
        text-align: center;
        padding: 20px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(10px);
    }
    
    .welcome-main-title {
        font-size: 3em;
        margin-bottom: 20px;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .welcome-description {
        font-size: 1.2em;
        margin-bottom: 30px;
        line-height: 1.4;
        color: #4a5568;
    }
    
    .welcome-buttons-container {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .welcome-start-button {
        padding: 18px 35px;
        font-size: 1.3em;
        width: 100%;
        max-width: 280px;
        border-radius: 50px;
        box-shadow: 0 8px 25px rgba(255, 107, 53, 0.2);
    }
    
    .welcome-records-button {
        padding: 15px 30px;
        font-size: 1.1em;
        width: 100%;
        max-width: 280px;
        border-radius: 50px;
        border: 2px solid #ff6b35;
        background: white;
        color: #ff6b35;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .welcome-records-button:hover {
        background: #ff6b35;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        border-color: #ff6b35;
    }
    
    
    .game-logo {
        width: 150px;
        height: 75px;
        top: 30px !important;
        left: 50% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
    }
    
    .welcome-cloud {
        opacity: 0.6;
    }
    
    .welcome-cloud.cloud-1 {
        top: 15%;
        left: 10%;
        width: 80px;
        height: 50px;
    }
    
    .welcome-cloud.cloud-2 {
        top: 25%;
        right: 15%;
        width: 60px;
        height: 40px;
    }
    
    .welcome-cloud.cloud-3 {
        top: 10%;
        left: 50%;
        width: 70px;
        height: 45px;
    }
    
    .welcome-cloud.cloud-4 {
        top: 20%;
        right: 30%;
        width: 50px;
        height: 35px;
    }
    
    .welcome-cloud.cloud-5 {
        top: 35%;
        left: 20%;
        width: 65px;
        height: 42px;
    }
}

@media (max-width: 480px) {
    .welcome-container {
        padding: 5px;
    }
    
    /* Дополнительная оптимизация экрана результатов для маленьких экранов */
    .game-over-container {
        padding: 20px 15px !important;
        max-width: 95% !important;
        width: 95% !important;
        gap: 20px !important;
        margin: 15px auto !important;
    }
    
    .avatar-circle {
        width: 100px !important;
        height: 100px !important;
        margin-bottom: 15px !important;
    }
    
    .avatar-image {
        width: 120px !important;
        height: 120px !important;
    }
    
    .game-over-main-buttons {
        max-width: 280px !important;
    }
    
    .game-over-main-buttons .game-over-btn {
        font-size: 1em !important;
        padding: 12px 18px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .game-over-btn {
        font-size: 1em !important;
        padding: 12px 18px !important;
    }
    
    .game-over-btn.small-btn {
        font-size: 0.88em !important;
        padding: 10px 12px !important;
        min-width: 80px !important;
        max-width: 110px !important;
        white-space: normal !important;
        line-height: 1.4 !important;
        height: auto !important;
        min-height: 40px !important;
    }
    
    .bottom-buttons {
        max-width: 360px !important;
        gap: 8px !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        flex-wrap: nowrap !important;
    }
    
    .bottom-buttons .game-over-btn {
        flex: 1 !important;
        font-size: 0.85em !important;
        padding: 8px 10px !important;
        min-height: 36px !important;
        white-space: nowrap !important;
    }
    
    /* Специальный стиль для кнопки "Поделиться" - делаем её немного шире */
    .bottom-buttons .game-over-btn:last-child {
        flex: 1.2 !important;
        min-width: 0 !important;
    }
    
    .results-title {
        font-size: 1.4em !important;
        margin-bottom: 15px !important;
        padding: 10px 15px !important;
    }
    
    .stat {
        padding: 8px 12px !important;
        font-size: 0.9em !important;
    }
    
    .stat-label {
        font-size: 0.8em !important;
    }
    
    .stat-value {
        font-size: 1em !important;
    }
    
    .age-rating {
        width: 45px !important;
        height: 45px !important;
        font-size: 0.9em !important;
        top: 12px !important;
        right: 12px !important;
        padding: 0 !important;
    }
    
    .welcome-character {
        width: 760px !important;
        height: 960px !important;
        top: 35%;
        left: 35%;
        transform: translate(-50%, -50%);
        z-index: 5;
    }
    
    .welcome-stars {
        width: 150px;
        height: 120px;
        top: 40px;
        left: 80px;
    }
    
    .welcome-content {
        margin: 15px auto;
        padding: 15px;
        border-radius: 15px;
    }
    
    .welcome-main-title {
        font-size: 2.5em;
        margin-bottom: 15px;
    }
    
    .welcome-description {
        font-size: 1em;
        margin-bottom: 25px;
        line-height: 1.3;
    }
    
    .welcome-start-button {
        padding: 15px 30px;
        font-size: 1.2em;
        max-width: 250px;
    }
    
    .welcome-records-button {
        padding: 12px 25px;
        font-size: 1em;
        max-width: 250px;
    }
    
    .game-logo {
        width: 120px;
        height: 60px;
        top: 20px !important;
        left: 50% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
    }
    
    .welcome-cloud {
        opacity: 0.5;
    }
    
    .welcome-cloud.cloud-1 {
        width: 60px;
        height: 40px;
    }
    
    .welcome-cloud.cloud-2 {
        width: 50px;
        height: 35px;
    }
    
    .welcome-cloud.cloud-3 {
        width: 55px;
        height: 38px;
    }
    
    .welcome-cloud.cloud-4 {
        width: 45px;
        height: 30px;
    }
    
    .welcome-cloud.cloud-5 {
        width: 50px;
        height: 35px;
    }
    
    /* Стили для блока собранных предметов в портретной ориентации 480px */
    .collectibles-section {
        padding: 6px !important;
        margin-top: 6px !important;
        margin-bottom: 6px !important;
        border-radius: 10px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 107, 53, 0.2) !important;
    }
    
    .collectibles-title {
        font-size: 0.8em !important;
        margin-bottom: 4px !important;
    }
}

@media (max-width: 360px) {
    .welcome-character {
        width: 600px !important;
        height: 760px !important;
        top: 35%;
        left: 35%;
        transform: translate(-50%, -50%);
        z-index: 5;
    }
    
    .welcome-stars {
        width: 120px;
        height: 100px;
        top: 30px;
        left: 60px;
    }
    
    .welcome-content {
        margin: 10px auto;
        padding: 12px;
    }
    
    .welcome-main-title {
        font-size: 2em;
        margin-bottom: 12px;
    }
    
    .welcome-description {
        font-size: 0.9em;
        margin-bottom: 20px;
    }
    
    .welcome-start-button {
        padding: 12px 25px;
        font-size: 1.1em;
        max-width: 220px;
    }
    
    .welcome-records-button {
        padding: 10px 20px;
        font-size: 0.9em;
        max-width: 220px;
    }
    
    .game-logo {
        width: 100px;
        height: 50px;
        top: 15px;
    }
}

/* Специальные стили для портретной ориентации мобильных устройств */
@media (max-width: 768px) and (orientation: portrait) {
    .welcome-container {
        height: 100vh;
        overflow-y: auto;
    }
    
    .welcome-content {
        position: fixed;
        bottom: 20px;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: 20px 20px 0 0;
        max-height: 50vh;
        overflow-y: auto;
        z-index: 100;
    }
    
    .welcome-character {
        width: 400px;
        height: 500px;
        top: 30%;
        left: 35%;
        transform: translate(-50%, -50%);
        z-index: 5;
    }
    
    .welcome-stars {
        width: 200px;
        height: 160px;
        top: 15vh;
        left: 50%;
        transform: translateX(-50%);
        z-index: 3;
    }
    
    .game-logo {
        width: 160px;
        height: 80px;
        top: 3vh !important;
        left: 50% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 10;
    }
    
    .welcome-cloud {
        opacity: 0.4;
    }
    
    .welcome-cloud.cloud-1 {
        top: 10vh;
        left: 5%;
        width: 70px;
        height: 45px;
    }
    
    .welcome-cloud.cloud-2 {
        top: 15vh;
        right: 10%;
        width: 55px;
        height: 35px;
    }
    
    .welcome-cloud.cloud-3 {
        top: 8vh;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 40px;
    }
    
    .welcome-cloud.cloud-4 {
        top: 12vh;
        right: 25%;
        width: 45px;
        height: 30px;
    }
    
    .welcome-cloud.cloud-5 {
        top: 18vh;
        left: 15%;
        width: 50px;
        height: 35px;
    }
    
    .welcome-main-title {
        font-size: 2.8em;
        margin-bottom: 15px;
    }
    
    .welcome-description {
        font-size: 1.1em;
        margin-bottom: 25px;
    }
    
    .welcome-buttons-container {
        flex-direction: row;
        gap: 12px;
        justify-content: center;
    }
    
    .welcome-start-button {
        padding: 12px 20px;
        font-size: 1em;
        flex: 1;
        max-width: 140px;
    }
    
    .welcome-records-button {
        padding: 12px 20px;
        font-size: 0.9em;
        flex: 1;
        max-width: 140px;
    }
    
    .developer-credit {
        position: fixed;
        bottom: 5px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.65em;
        z-index: 101;
        white-space: nowrap;
        max-width: 90%;
        text-align: center;
    }
    
}

@media (max-width: 480px) and (orientation: portrait) {
    .welcome-character {
        width: 700px !important;
        height: 880px !important;
        top: 30%;
        left: 15%;
        transform: translate(-50%, -50%);
        z-index: 5;
    }
    
    .welcome-stars {
        width: 160px;
        height: 130px;
        top: 15vh;
        left: 50%;
        transform: translateX(-50%);
        z-index: 3;
    }
    
    .game-logo {
        width: 130px;
        height: 65px;
        top: 2vh !important;
        left: 50% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 10;
    }
    
    .welcome-content {
        max-height: 45vh;
    }
    
    .welcome-main-title {
        font-size: 2.2em;
        margin-bottom: 12px;
    }
    
    .welcome-description {
        font-size: 0.95em;
        margin-bottom: 20px;
    }
    
    .welcome-buttons-container {
        flex-direction: row;
        gap: 10px;
        justify-content: center;
    }
    
    .welcome-start-button {
        padding: 10px 16px;
        font-size: 0.9em;
        flex: 1;
        max-width: 120px;
    }
    
    .welcome-records-button {
        padding: 10px 16px;
        font-size: 0.85em;
        flex: 1;
        max-width: 120px;
    }
    
    .developer-credit {
        position: fixed;
        bottom: 3px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.6em;
        z-index: 101;
        white-space: nowrap;
        max-width: 95%;
        text-align: center;
    }
    
}

/* Оптимизация для touch-интерфейса и производительности */
@media (max-width: 768px) {
    .welcome-start-button,
    .welcome-records-button {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }
    
    .welcome-start-button:active,
    .welcome-records-button:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    .welcome-cloud {
        will-change: transform, opacity;
    }
    
    .welcome-character,
    .welcome-stars,
    .game-logo {
        will-change: transform;
    }
}

/* Улучшения для очень маленьких экранов */
@media (max-width: 320px) {
    .welcome-character {
        width: 280px;
        height: 350px;
        top: 35%;
        left: 35%;
        transform: translate(-50%, -50%);
        z-index: 5;
    }
    
    .welcome-stars {
        width: 120px;
        height: 100px;
        top: 12vh;
        left: 50%;
        transform: translateX(-50%);
        z-index: 3;
    }
    
    .game-logo {
        width: 100px;
        height: 50px;
        top: 1vh !important;
        left: 50% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 10;
    }
    
    .welcome-content {
        max-height: 40vh;
        padding: 10px;
    }
    
    .welcome-main-title {
        font-size: 1.8em;
        margin-bottom: 10px;
    }
    
    .welcome-description {
        font-size: 0.85em;
        margin-bottom: 15px;
        line-height: 1.2;
    }
    
    .welcome-start-button {
        padding: 12px 20px;
        font-size: 1em;
        max-width: 200px;
    }
    
    .welcome-records-button {
        padding: 10px 18px;
        font-size: 0.85em;
        max-width: 200px;
    }
    
    .welcome-cloud {
        opacity: 0.3;
    }
    
    .welcome-cloud.cloud-1,
    .welcome-cloud.cloud-2,
    .welcome-cloud.cloud-3,
    .welcome-cloud.cloud-4,
    .welcome-cloud.cloud-5 {
        width: 35px;
        height: 25px;
    }
    
}

/* Стили для landscape ориентации на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .welcome-container {
        display: flex;
        align-items: center;
        padding: 10px;
    }
    
    .welcome-character {
        width: 250px;
        height: 310px;
        position: relative;
        top: auto;
        left: auto;
        bottom: auto;
        transform: none;
        margin-right: 30px;
        margin-left: -10px; /* Перемещаем персонажа еще левее */
    }
    
    .welcome-stars {
        width: 120px;
        height: 100px;
        position: absolute;
        top: 20px;
        right: 20px;
    }
    
    .game-logo {
        width: 100px;
        height: 50px;
        position: absolute;
        top: 10px !important; /* Отступ сверху */
        left: 50% !important; /* Центрируем по горизонтали */
        right: auto !important; /* Убираем автоматическое центрирование */
        margin: 0 !important; /* Убираем автоматические отступы */
        transform: translateX(-50%) !important; /* Центрируем логотип */
        z-index: 10;
    }
    
    .welcome-content {
        position: relative;
        flex: 1;
        margin: 0;
        padding: 15px;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 15px;
        max-height: none;
    }
    
    .welcome-main-title {
        font-size: 2em;
        margin-bottom: 10px;
    }
    
    .welcome-description {
        font-size: 0.9em;
        margin-bottom: 20px;
    }
    
    .welcome-buttons-container {
        flex-direction: row;
        gap: 10px;
        justify-content: center;
    }
    
    .welcome-start-button,
    .welcome-records-button {
        flex: 1;
        max-width: 180px; /* Увеличиваем ширину для лучшего размещения текста */
        padding: 12px 25px; /* Увеличиваем внутренние отступы */
        font-size: 0.9em;
        min-width: 160px; /* Добавляем минимальную ширину */
    }
    
    .welcome-cloud {
        opacity: 0.3;
    }
    
    .welcome-cloud.cloud-1 {
        top: 10px;
        left: 30%;
        width: 40px;
        height: 25px;
    }
    
    .welcome-cloud.cloud-2 {
        top: 15px;
        right: 30%;
        width: 35px;
        height: 22px;
    }
    
    .welcome-cloud.cloud-3 {
        top: 5px;
        left: 50%;
        width: 30px;
        height: 20px;
    }
    
    .welcome-cloud.cloud-4,
    .welcome-cloud.cloud-5 {
        display: none;
    }
    
    /* Стили для блока собранных предметов в портретной ориентации 320px */
    .collectibles-section {
        padding: 4px !important;
        margin-top: 4px !important;
        margin-bottom: 4px !important;
        border-radius: 8px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 107, 53, 0.2) !important;
    }
    
    .collectibles-title {
        font-size: 0.75em !important;
        margin-bottom: 3px !important;
    }
}

/* Специальные стили для горизонтальной ориентации */
@media (max-width: 768px) and (orientation: landscape) {
    .logo-image {
        width: 100px;
        height: 50px;
    }
    
    /* Адаптация экрана результатов для горизонтальной ориентации */
    .game-over-container {
        flex-direction: row !important;
        padding: 15px 12px !important;
        max-width: 75% !important;
        width: 75% !important;
        gap: 15px !important;
        align-items: center !important;
        min-height: auto !important;
        margin: 10px auto !important;
    }
    
    .game-over-left {
        order: 1 !important;
        flex: 0 0 auto !important;
        text-align: center !important;
        min-width: 100px !important;
        max-width: 100px !important;
    }
    
    .game-over-right {
        order: 2 !important;
        flex: 1 !important;
        padding-left: 8px !important;
        max-width: calc(100% - 120px) !important;
    }
    
    .avatar-circle {
        width: 70px !important;
        height: 70px !important;
        margin: 0 auto 10px auto !important;
    }
    
    .avatar-image {
        width: 80px !important;
        height: 80px !important;
    }
    
    .game-over-main-buttons {
        gap: 6px !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .game-over-main-buttons .game-over-btn {
        font-size: 0.7em !important;
        padding: 8px 10px !important;
        min-height: 36px !important;
        white-space: normal !important;
        width: 100% !important;
        max-width: none !important;
        line-height: 1.2 !important;
    }
    
    .game-over-btn {
        font-size: 0.7em !important;
        padding: 6px 10px !important;
        min-height: 32px !important;
        white-space: nowrap !important;
    }
    
    .game-over-btn.small-btn {
        font-size: 0.62em !important;
        padding: 6px 7px !important;
        min-height: 34px !important;
        min-width: 60px !important;
        max-width: 75px !important;
        white-space: normal !important;
        line-height: 1.3 !important;
        height: auto !important;
    }
    
    /* Дополнительные кнопки размещаются внизу блока с результатами */
    .bottom-buttons {
        display: flex !important;
        gap: 5px !important;
        margin-top: 10px !important;
        width: 100% !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
    }
    
    .bottom-buttons .game-over-btn {
        flex: 1 !important;
    }
    
    /* Специальный стиль для кнопки "Поделиться" - делаем её немного шире */
    .bottom-buttons .game-over-btn:last-child {
        flex: 1.2 !important;
        min-width: 0 !important;
    }
    
    .results-title {
        font-size: 1em !important;
        margin-bottom: 10px !important;
        padding: 6px 10px !important;
    }
    
    .game-over-stats {
        gap: 6px !important;
    }
    
    .stat {
        padding: 5px 8px !important;
        font-size: 0.8em !important;
    }
    
    .stat-label {
        font-size: 0.75em !important;
    }
    
    .stat-value {
        font-size: 0.9em !important;
    }
    
    .age-rating {
        width: 40px !important;
        height: 40px !important;
        font-size: 0.85em !important;
        top: 10px !important;
        right: 10px !important;
        padding: 0 !important;
    }
}

@media (max-width: 600px) {
    .character-frame {
        width: 180px;
        height: 180px;
    }
    
    .location-main-container {
        gap: 10px;
    }
    
    .choose-game-text {
        top: calc(50% - 120px);
    }
    
    .choose-game-text h2 {
        font-size: 1.4em;
    }
    
    .location-name-container {
        top: calc(50% + 110px);
    }
    
    .location-controls {
        bottom: 15px;
        gap: 15px;
    }

    .settings-button {
        width: 40px;
        height: 40px;
    }

    .settings-button svg {
        width: 18px;
        height: 18px;
    }

    .play-button {
        padding: 10px 20px;
        font-size: 0.9em;
        width: 120px;
        height: 45px;
    }
    
    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
    
    .back-button {
        padding: 10px 20px;
        font-size: 0.9em;
        width: 120px;
        height: 45px;
    }
}

@media (max-width: 480px) and (orientation: portrait) {
    .location-sky {
        filter: blur(1px);
    }
    
    .logo-image {
        width: 100px;
        height: 50px;
    }
    
    .character-frame {
        width: 180px;
        height: 180px;
    }
    
    .location-main-container {
        gap: 12px;
    }
    
    .location-name-container {
        top: calc(50% + 100px);
    }
    
    .choose-game-text {
        top: calc(50% - 120px);
    }
    
    .choose-game-text h2 {
        font-size: 1.4em;
    }

    /* Адаптивные стили для новых кнопок управления */
    .location-controls {
        bottom: 15px;
        gap: 15px;
    }

    .settings-button {
        width: 40px;
        height: 40px;
    }

    .settings-button svg {
        width: 18px;
        height: 18px;
    }

    .play-button {
        padding: 10px 20px;
        font-size: 0.9em;
        width: 120px;
        height: 45px;
    }
    
    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
    
    .back-button {
        padding: 10px 20px;
        font-size: 0.9em;
        width: 120px;
        height: 45px;
    }

    /* Адаптивные стили для модального окна настроек */
    #user-settings-modal .modal-content {
        max-width: 95%;
        margin: 10px;
    }

    .settings-form {
        padding: 15px;
    }

    .form-section {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .back-button {
        padding: 12px 25px;
        font-size: 1em;
        width: 140px;
        height: 50px;
    }
    
    .nav-arrow {
        width: 45px;
        height: 45px;
        font-size: 1.3em;
    }

    /* Адаптивные стили для новых кнопок на очень маленьких экранах */
    .location-controls {
        top: calc(50% + 180px);
        gap: 12px;
    }

    .settings-button {
        width: 40px;
        height: 40px;
    }

    .settings-button svg {
        width: 18px;
        height: 18px;
    }

    .play-button {
        padding: 10px 20px;
        font-size: 0.9em;
        width: 120px;
        height: 45px;
    }
    }
    
    .modal-content {
        padding: 20px;
        margin: 20px;
    }
    
    .cities-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 4px;
    }
    
    /* Адаптивные стили для модального окна на очень маленьких экранах */
    .modal-content {
        padding: 20px;
        margin: 15px;
        max-width: 95%;
        border-radius: 20px;
    }
    
    .modal-header h3 {
        font-size: 1.3em;
    }
    
    .form-group input {
        padding: 10px 12px;
        font-size: 0.9em;
    }
    
    .social-option {
        padding: 8px 10px;
        height: 38px;
    }
    
    .social-content {
        gap: 8px;
    }
    
    .social-icon {
        width: 18px;
        height: 18px;
    }
    
    .social-icon-img {
        width: 18px;
        height: 18px;
    }
    
    .radio-indicator {
        width: 14px;
        height: 14px;
    }
    
    .radio-indicator::after {
        width: 4px;
        height: 4px;
    }
    
    .save-btn, .start-game-btn {
        padding: 12px 20px;
        font-size: 0.95em;
    }
    
    .privacy-notice {
        padding: 6px 10px;
        margin: 6px 0;
    }
    
    .privacy-notice p {
        font-size: 0.75em;
    }

/* Стили для очень маленьких экранов */
@media (max-width: 360px) {
    .logo-image {
        width: 80px;
        height: 40px;
    }
    
    .character-frame {
        width: 160px;
        height: 160px;
    }
    
    .location-main-container {
        gap: 8px;
    }
    
    .choose-game-text {
        top: calc(50% - 110px);
    }
    
    .choose-game-text h2 {
        font-size: 1.2em;
    }
    
    .location-name-container {
        top: calc(50% + 90px);
    }
    
    .location-controls {
        bottom: 10px;
        gap: 12px;
    }

    .settings-button {
        width: 35px;
        height: 35px;
    }

    .settings-button svg {
        width: 16px;
        height: 16px;
    }

    .play-button {
        padding: 8px 16px;
        font-size: 0.85em;
        width: 100px;
        height: 40px;
    }
    
    .nav-arrow {
        width: 35px;
        height: 35px;
        font-size: 1.1em;
    }
    
    .back-button {
        padding: 8px 16px;
        font-size: 0.85em;
        width: 100px;
        height: 40px;
    }
    
    .location-name {
        padding: 6px 15px;
        font-size: 1em;
    }
    
    .location-arrow {
        font-size: 1.2em;
    }
}

/* КРИТИЧЕСКИ ВАЖНЫЕ СТИЛИ ДЛЯ ЛОГОТИПА НА МОБИЛЬНЫХ УСТРОЙСТВАХ */
/* Принудительное центрирование логотипа для всех мобильных экранов */
@media (max-width: 768px) {
    .game-logo {
        position: absolute !important;
        top: 50px !important; /* Смещаем ниже */
        left: 50% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 100 !important;
        width: 160px !important;
        height: 80px !important;
    }
}

@media (max-width: 480px) {
    .game-logo {
        position: absolute !important;
        top: 40px !important; /* Смещаем ниже */
        left: 50% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 100 !important;
        width: 130px !important;
        height: 65px !important;
    }
}

@media (max-width: 320px) {
    .game-logo {
        position: absolute !important;
        top: 35px !important; /* Смещаем ниже */
        left: 50% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 100 !important;
        width: 100px !important;
        height: 50px !important;
    }
    
    /* Максимальная оптимизация экрана результатов для очень маленьких экранов */
    .game-over-container {
        padding: 15px 12px !important;
        max-width: 98% !important;
        width: 98% !important;
        gap: 15px !important;
        margin: 10px auto !important;
    }
    
    .avatar-circle {
        width: 90px !important;
        height: 90px !important;
        margin-bottom: 12px !important;
    }
    
    .avatar-image {
        width: 110px !important;
        height: 110px !important;
    }
    
    .game-over-btn {
        font-size: 0.9em !important;
        padding: 10px 15px !important;
        max-width: 240px !important;
        margin: 8px auto !important;
        display: block !important;
    }
    
    .game-over-btn.small-btn {
        font-size: 0.8em !important;
        padding: 7px 10px !important;
    }
    
    .bottom-buttons {
        max-width: 280px !important;
        gap: 6px !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        flex-wrap: nowrap !important;
    }
    
    .bottom-buttons .game-over-btn {
        flex: 1 !important;
        font-size: 0.75em !important;
        padding: 6px 8px !important;
        min-height: 32px !important;
        white-space: nowrap !important;
    }
    
    /* Специальный стиль для кнопки "Поделиться" - делаем её немного шире */
    .bottom-buttons .game-over-btn:last-child {
        flex: 1.2 !important;
        min-width: 0 !important;
    }
    
    .results-title {
        font-size: 1.2em !important;
        margin-bottom: 12px !important;
        padding: 8px 12px !important;
    }
    
    .stat {
        padding: 6px 10px !important;
        font-size: 0.85em !important;
    }
    
    .stat-label {
        font-size: 0.75em !important;
    }
    
    .stat-value {
        font-size: 0.9em !important;
    }
    
    .age-rating {
        width: 38px !important;
        height: 38px !important;
        font-size: 0.8em !important;
        top: 10px !important;
        right: 10px !important;
        padding: 0 !important;
    }
}

/* ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ ГАРАНТИРОВАННОГО ЦЕНТРИРОВАНИЯ */
@media (max-width: 768px) and (orientation: portrait) {
    .game-logo {
        position: absolute !important;
        top: 50px !important;
        left: 55% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 100 !important;
        width: 160px !important;
        height: 80px !important;
    }
}

@media (max-width: 480px) and (orientation: portrait) {
    .game-logo {
        position: absolute !important;
        top: 40px !important;
        left: 55% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 100 !important;
        width: 130px !important;
        height: 65px !important;
    }
}

@media (max-width: 320px) and (orientation: portrait) {
    .game-logo {
        position: absolute !important;
        top: 35px !important;
        left: 55% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 100 !important;
        width: 100px !important;
        height: 50px !important;
    }
}

/* МАКСИМАЛЬНО СПЕЦИФИЧНЫЕ СТИЛИ ДЛЯ ЛОГОТИПА */
/* Используем селектор с более высоким приоритетом */
body .game-logo {
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    margin: 0 !important;
    transform: translateX(-50%) !important;
    z-index: 100 !important;
}

@media (max-width: 768px) {
    body .game-logo {
        top: 50px !important;
        width: 160px !important;
        height: 80px !important;
    }
}

@media (max-width: 480px) {
    body .game-logo {
        top: 40px !important;
        width: 130px !important;
        height: 65px !important;
    }
}

@media (max-width: 320px) {
    body .game-logo {
        top: 35px !important;
        width: 100px !important;
        height: 50px !important;
    }
}

/* ФИНАЛЬНЫЕ СТИЛИ ДЛЯ ПРИНУДИТЕЛЬНОГО ЦЕНТРИРОВАНИЯ ЛОГОТИПА */
/* Используем максимально специфичный селектор */
html body .welcome-container .game-logo {
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    margin: 0 !important;
    transform: translateX(-50%) !important;
    z-index: 999 !important;
}

@media (max-width: 768px) {
    html body .welcome-container .game-logo {
        top: 50px !important;
        width: 160px !important;
        height: 80px !important;
    }
}

@media (max-width: 480px) {
    html body .welcome-container .game-logo {
        top: 40px !important;
        width: 130px !important;
        height: 65px !important;
    }
}

@media (max-width: 320px) {
    html body .welcome-container .game-logo {
        top: 35px !important;
        width: 100px !important;
        height: 50px !important;
    }
}

/* ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ ПОРТРЕТНОЙ ОРИЕНТАЦИИ */
@media (max-width: 768px) and (orientation: portrait) {
    html body .welcome-container .game-logo {
        position: absolute !important;
        top: 50px !important;
        left: 55% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 999 !important;
        width: 160px !important;
        height: 80px !important;
    }
}

@media (max-width: 480px) and (orientation: portrait) {
    html body .welcome-container .game-logo {
        position: absolute !important;
        top: 40px !important;
        left: 55% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 999 !important;
        width: 130px !important;
        height: 65px !important;
    }
}

@media (max-width: 320px) and (orientation: portrait) {
    html body .welcome-container .game-logo {
        position: absolute !important;
        top: 35px !important;
        left: 55% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 999 !important;
        width: 100px !important;
        height: 50px !important;
    }
}

/* МАКСИМАЛЬНО СПЕЦИФИЧНЫЕ СТИЛИ С АТРИБУТАМИ */
/* Используем селектор с атрибутом для максимального приоритета */
html body .welcome-container .game-logo[class*="game-logo"] {
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    margin: 0 !important;
    transform: translateX(-50%) !important;
    z-index: 999 !important;
}

@media (max-width: 768px) {
    html body .welcome-container .game-logo[class*="game-logo"] {
        top: 50px !important;
        width: 160px !important;
        height: 80px !important;
    }
}

@media (max-width: 480px) {
    html body .welcome-container .game-logo[class*="game-logo"] {
        top: 40px !important;
        width: 130px !important;
        height: 65px !important;
    }
}

@media (max-width: 320px) {
    html body .welcome-container .game-logo[class*="game-logo"] {
        top: 35px !important;
        width: 100px !important;
        height: 50px !important;
    }
}

/* ИСПРАВЛЕНИЕ ЛОГОТИПА ДЛЯ МОБИЛЬНЫХ ВЕРСИЙ */
/* Вертикальная ориентация - логотип по центру сверху */
@media (max-width: 768px) and (orientation: portrait) {
    .game-logo {
        position: absolute !important;
        top: 20px !important;
        left: 55% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 100 !important;
        width: 140px !important;
        height: 70px !important;
    }
}

@media (max-width: 480px) and (orientation: portrait) {
    .game-logo {
        position: absolute !important;
        top: 15px !important;
        left: 55% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 100 !important;
        width: 120px !important;
        height: 60px !important;
    }
}

@media (max-width: 320px) and (orientation: portrait) {
    .game-logo {
        position: absolute !important;
        top: 10px !important;
        left: 55% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 100 !important;
        width: 100px !important;
        height: 50px !important;
    }
}

/* Горизонтальная ориентация - логотип выше персонажа */
@media (max-width: 768px) and (orientation: landscape) {
    .game-logo {
        position: absolute !important;
        top: 5px !important;
        left: 50% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 100 !important;
        width: 100px !important;
        height: 50px !important;
    }
}

@media (max-width: 480px) and (orientation: landscape) {
    .game-logo {
        position: absolute !important;
        top: 3px !important;
        left: 50% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 100 !important;
        width: 90px !important;
        height: 45px !important;
    }
}

@media (max-width: 320px) and (orientation: landscape) {
    .game-logo {
        position: absolute !important;
        top: 2px !important;
        left: 50% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 100 !important;
        width: 80px !important;
        height: 40px !important;
    }
}

/* ИСПРАВЛЕНИЕ НАСЛОЕНИЯ ПЕРСОНАЖА И ЛОГОТИПА ДЛЯ ГОРИЗОНТАЛЬНОЙ МОБИЛЬНОЙ ВЕРСИИ */
/* Специальные стили для горизонтальной ориентации мобильных устройств */
@media (max-width: 768px) and (orientation: landscape) {
    /* Поднимаем изображение gazon выше для лучшей видимости */
    .welcome-sky {
        background-position: center calc(100% + 200px) !important;
    }
    
    /* Логотип размещаем в верхней части экрана */
    .game-logo {
        position: absolute !important;
        top: 5px !important;
        left: 50% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 100 !important;
        width: 100px !important;
        height: 50px !important;
    }
    
    /* Персонаж размещаем по центру экрана */
    .welcome-character {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 180px !important;
        height: 220px !important;
        z-index: 50 !important;
    }
    
    /* Контент размещаем внизу экрана */
    .welcome-content {
        position: absolute !important;
        bottom: 30px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 90% !important;
        text-align: center !important;
        z-index: 60 !important;
        padding: 10px !important;
    }
    
    /* Заголовок и описание - компактные */
    .welcome-main-title {
        font-size: 1.3em !important;
        margin-bottom: 5px !important;
    }
    
    .welcome-description {
        font-size: 0.8em !important;
        margin-bottom: 10px !important;
        line-height: 1.2 !important;
    }
    
    /* Кнопки размещаем горизонтально */
    .welcome-buttons-container {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        justify-content: center !important;
    }
    
    .welcome-start-button,
    .welcome-records-button {
        flex: 1 !important;
        max-width: 120px !important;
        padding: 8px 12px !important;
        font-size: 0.8em !important;
        min-height: 35px !important;
    }
}

/* Специальные стили для iPhone 15 и современных мобильных устройств в горизонтальной ориентации */
@media (max-width: 844px) and (orientation: landscape) and (max-height: 390px) {
    /* Логотип - компактный в верхней части */
    .game-logo {
        position: absolute !important;
        top: 5px !important;
        left: 50% !important;
    }
    
    /* Адаптация экрана результатов для современных мобильных устройств */
    .game-over-container {
        padding: 12px 10px !important;
        gap: 12px !important;
        max-width: 70% !important;
        width: 70% !important;
        margin: 8px auto !important;
    }
    
    .game-over-left {
        min-width: 95px !important;
        max-width: 95px !important;
    }
    
    .avatar-circle {
        width: 65px !important;
        height: 65px !important;
        margin-bottom: 8px !important;
    }
    
    .avatar-image {
        width: 75px !important;
        height: 75px !important;
    }
    
    .game-over-main-buttons .game-over-btn {
        font-size: 0.65em !important;
        padding: 7px 8px !important;
        min-height: 34px !important;
        white-space: normal !important;
        line-height: 1.2 !important;
    }
    
    .game-over-btn {
        font-size: 0.7em !important;
        padding: 5px 9px !important;
        min-height: 30px !important;
        white-space: nowrap !important;
    }
    
    .game-over-btn.small-btn {
        font-size: 0.6em !important;
        padding: 4px 7px !important;
        min-height: 26px !important;
    }
    
    .results-title {
        font-size: 0.95em !important;
        margin-bottom: 8px !important;
        padding: 5px 9px !important;
    }
    
    .stat {
        padding: 4px 7px !important;
        font-size: 0.75em !important;
    }
    
    .stat-label {
        font-size: 0.7em !important;
    }
    
    .stat-value {
        font-size: 0.8em !important;
    }
    
    .age-rating {
        width: 50px !important;
        height: 50px !important;
        font-size: 0.85em !important;
        top: 8px !important;
        right: 8px !important;
        padding: 0 !important;
        transform: none !important;
        z-index: 100 !important;
    }
    
    /* Персонаж - компактный по центру */
    .welcome-character {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 150px !important;
        height: 180px !important;
        z-index: 50 !important;
    }
    
    /* Контент - внизу экрана */
    .welcome-content {
        position: absolute !important;
        bottom: 25px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 95% !important;
        text-align: center !important;
        z-index: 60 !important;
        padding: 5px !important;
    }
    
    /* Заголовок и описание - компактные */
    .welcome-main-title {
        font-size: 1.1em !important;
        margin-bottom: 3px !important;
    }
    
    .welcome-description {
        font-size: 0.7em !important;
        margin-bottom: 8px !important;
        line-height: 1.2 !important;
    }
    
    /* Кнопки - горизонтально, компактные */
    .welcome-buttons-container {
        display: flex !important;
        justify-content: center !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
    }
    
    .welcome-start-button,
    .welcome-records-button {
        flex: 1 !important;
        max-width: 100px !important;
        padding: 6px 10px !important;
        font-size: 0.7em !important;
        min-height: 30px !important;
    }
    
    .developer-credit {
        position: absolute !important;
        bottom: 3px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        font-size: 0.6em !important;
        z-index: 51 !important;
    }
}

/* Дополнительные стили для очень маленьких горизонтальных экранов */
@media (max-width: 480px) and (orientation: landscape) {
    /* Поднимаем изображение gazon выше */
    .welcome-sky {
        background-position: center calc(100% + 200px) !important;
    }
    
    /* Дополнительная адаптация экрана результатов для маленьких экранов */
    .game-over-container {
        padding: 12px 8px !important;
        gap: 10px !important;
        max-width: 65% !important;
        width: 65% !important;
        margin: 8px auto !important;
    }
    
    .game-over-left {
        min-width: 85px !important;
        max-width: 85px !important;
    }
    
    .avatar-circle {
        width: 60px !important;
        height: 60px !important;
        margin-bottom: 8px !important;
    }
    
    .avatar-image {
        width: 70px !important;
        height: 70px !important;
    }
    
    .game-over-main-buttons .game-over-btn {
        font-size: 0.6em !important;
        padding: 6px 7px !important;
        min-height: 32px !important;
        white-space: normal !important;
        line-height: 1.2 !important;
    }
    
    .game-over-btn {
        font-size: 0.65em !important;
        padding: 5px 8px !important;
        min-height: 28px !important;
        white-space: nowrap !important;
    }
    
    .game-over-btn.small-btn {
        font-size: 0.55em !important;
        padding: 4px 6px !important;
        min-height: 24px !important;
    }
    
    .results-title {
        font-size: 0.9em !important;
        margin-bottom: 8px !important;
        padding: 5px 8px !important;
    }
    
    .stat {
        padding: 4px 6px !important;
        font-size: 0.7em !important;
    }
    
    .stat-label {
        font-size: 0.65em !important;
    }
    
    .stat-value {
        font-size: 0.75em !important;
    }
    
    .age-rating {
        width: 45px !important;
        height: 45px !important;
        font-size: 0.8em !important;
        top: 8px !important;
        right: 8px !important;
        padding: 0 !important;
    }
    
    .game-logo {
        width: 80px !important;
        height: 40px !important;
        top: 3px !important;
    }
    
    /* Персонаж - компактный по центру */
    .welcome-character {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 140px !important;
        height: 170px !important;
        z-index: 50 !important;
    }
    
    /* Контент - внизу экрана */
    .welcome-content {
        position: absolute !important;
        bottom: 25px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 95% !important;
        text-align: center !important;
        z-index: 60 !important;
        padding: 5px !important;
    }
    
    /* Заголовок и описание - компактные */
    .welcome-main-title {
        font-size: 1.1em !important;
        margin-bottom: 3px !important;
    }
    
    .welcome-description {
        font-size: 0.7em !important;
        margin-bottom: 8px !important;
        line-height: 1.2 !important;
    }
    
    /* Кнопки размещаем горизонтально */
    .welcome-buttons-container {
        display: flex !important;
        flex-direction: row !important;
        gap: 6px !important;
        justify-content: center !important;
    }
    
    .welcome-start-button,
    .welcome-records-button {
        flex: 1 !important;
        max-width: 90px !important;
        padding: 6px 8px !important;
        font-size: 0.7em !important;
        min-height: 28px !important;
    }
    
    /* Стили для кнопок в горизонтальной ориентации 480px */
    .bottom-buttons {
        max-width: 360px !important;
        gap: 5px !important;
    }
    
    .bottom-buttons .game-over-btn:last-child {
        flex: 1.2 !important;
        min-width: 0 !important;
    }
}

@media (max-width: 320px) and (orientation: landscape) {
    /* Поднимаем изображение gazon выше */
    .welcome-sky {
        background-position: center calc(100% + 200px) !important;
    }
    
    /* Максимальная адаптация экрана результатов для очень маленьких экранов */
    .game-over-container {
        padding: 10px 6px !important;
        gap: 8px !important;
        max-width: 60% !important;
        width: 60% !important;
        margin: 6px auto !important;
    }
    
    .game-over-left {
        min-width: 75px !important;
        max-width: 75px !important;
    }
    
    .avatar-circle {
        width: 55px !important;
        height: 55px !important;
        margin-bottom: 6px !important;
    }
    
    .avatar-image {
        width: 65px !important;
        height: 65px !important;
    }
    
    .game-over-main-buttons .game-over-btn {
        font-size: 0.52em !important;
        padding: 5px 6px !important;
        min-height: 28px !important;
        white-space: normal !important;
        line-height: 1.15 !important;
    }
    
    .game-over-btn {
        font-size: 0.55em !important;
        padding: 4px 6px !important;
        min-height: 24px !important;
        white-space: nowrap !important;
    }
    
    .game-over-btn.small-btn {
        font-size: 0.5em !important;
        padding: 3px 5px !important;
        min-height: 20px !important;
    }
    
    .results-title {
        font-size: 0.85em !important;
        margin-bottom: 6px !important;
        padding: 4px 6px !important;
    }
    
    .stat {
        padding: 3px 5px !important;
        font-size: 0.65em !important;
    }
    
    .stat-label {
        font-size: 0.6em !important;
    }
    
    .stat-value {
        font-size: 0.65em !important;
    }
    
    .age-rating {
        width: 40px !important;
        height: 40px !important;
        font-size: 0.7em !important;
        top: 5px !important;
        right: 5px !important;
        padding: 0 !important;
    }
    
    .game-logo {
        width: 70px !important;
        height: 35px !important;
        top: 2px !important;
    }
    
    /* Персонаж - компактный по центру */
    .welcome-character {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 120px !important;
        height: 145px !important;
        z-index: 50 !important;
    }
    
    /* Контент - внизу экрана */
    .welcome-content {
        position: absolute !important;
        bottom: 23px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 98% !important;
        text-align: center !important;
        z-index: 60 !important;
        padding: 3px !important;
    }
    
    /* Заголовок и описание - очень компактные */
    .welcome-main-title {
        font-size: 1em !important;
        margin-bottom: 2px !important;
    }
    
    .welcome-description {
        font-size: 0.65em !important;
        margin-bottom: 6px !important;
        line-height: 1.1 !important;
    }
    
    /* Кнопки размещаем горизонтально */
    .welcome-buttons-container {
        display: flex !important;
        flex-direction: row !important;
        gap: 4px !important;
        justify-content: center !important;
    }
    
    .welcome-start-button,
    .welcome-records-button {
        flex: 1 !important;
        max-width: 80px !important;
        padding: 4px 6px !important;
        font-size: 0.65em !important;
        min-height: 24px !important;
    }
    
    .developer-credit {
        position: absolute !important;
        bottom: 1px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        font-size: 0.5em !important;
        z-index: 51 !important;
        white-space: nowrap !important;
        max-width: 99% !important;
        text-align: center !important;
    }
    
    /* Стили для кнопок в горизонтальной ориентации 320px */
    .bottom-buttons {
        max-width: 280px !important;
        gap: 4px !important;
    }
    
    .bottom-buttons .game-over-btn:last-child {
        flex: 1.2 !important;
        min-width: 0 !important;
    }
}

/* КРИТИЧЕСКОЕ ИСПРАВЛЕНИЕ ДЛЯ ВЕРТИКАЛЬНОЙ ОРИЕНТАЦИИ */
/* Принудительное центрирование логотипа ТОЛЬКО для портретной ориентации */
@media (max-width: 768px) and (orientation: portrait) {
    .game-logo {
        position: absolute !important;
        top: 30px !important; /* Возвращаем в верхнюю часть */
        left: 55% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 1000 !important; /* Максимальный z-index */
        width: 180px !important;
        height: 90px !important;
    }
}

@media (max-width: 480px) and (orientation: portrait) {
    .game-logo {
        position: absolute !important;
        top: 25px !important;
        left: 55% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 1000 !important;
        width: 150px !important;
        height: 75px !important;
    }
}

@media (max-width: 320px) and (orientation: portrait) {
    .game-logo {
        position: absolute !important;
        top: 20px !important;
        left: 55% !important;
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 1000 !important;
        width: 120px !important;
        height: 60px !important;
    }
}

/* МАКСИМАЛЬНО СПЕЦИФИЧНОЕ ИСПРАВЛЕНИЕ ДЛЯ ВЕРТИКАЛЬНОЙ ОРИЕНТАЦИИ */
/* Используем селектор с максимальным приоритетом для переопределения всех остальных */
@media (max-width: 768px) and (orientation: portrait) {
    html body .welcome-container .game-logo[class*="game-logo"] {
        position: absolute !important;
        top: 50px !important; /* Перемещаем ниже */
        left: 55% !important; /* Смещаем правее центра */
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 9999 !important;
        width: 180px !important;
        height: 90px !important;
    }
}

@media (max-width: 480px) and (orientation: portrait) {
    html body .welcome-container .game-logo[class*="game-logo"] {
        position: absolute !important;
        top: 40px !important; /* Перемещаем ниже */
        left: 50% !important; /* Смещаем правее центра */
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 9999 !important;
        width: 150px !important;
        height: 75px !important;
    }
}

@media (max-width: 320px) and (orientation: portrait) {
    html body .welcome-container .game-logo[class*="game-logo"] {
        position: absolute !important;
        top: 35px !important; /* Перемещаем ниже */
        left: 55% !important; /* Смещаем правее центра */
        right: auto !important;
        margin: 0 !important;
        transform: translateX(-50%) !important;
        z-index: 9999 !important;
        width: 120px !important;
        height: 60px !important;
    }
}

/* Чистые тени для кнопки "Рекорды" на мобильных устройствах */
@media (max-width: 768px) {
    .welcome-records-button {
        background: white !important;
        color: #ff6b35 !important;
        border: 2px solid #ff6b35 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    .welcome-records-button:hover {
        background: #ff6b35 !important;
        color: white !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
        border-color: #ff6b35 !important;
    }
}

@media (max-width: 480px) {
    /* Изменение цвета нижней части фона для мобильной версии */
    body {
        background: linear-gradient(180deg, #87ceeb 0%, #98fb98 60%, #ABD846 100%) !important;
    }
    
    .welcome-sky {
        background: linear-gradient(180deg, #87ceeb 0%, #98fb98 60%, #ABD846 100%) !important;
        background-image: url('assets/images/welcome/gazon.png') !important;
        background-size: cover !important;
        background-position: center calc(100% + 500px) !important;
        background-repeat: no-repeat !important;
    }
    
    .game-area.city {
        background: linear-gradient(180deg, #87ceeb 0%, #98fb98 60%, #ABD846 100%) !important;
        background-image: url('assets/images/game-backgrounds/city/city-day.png') !important;
        background-position: 0px center !important;
        background-size: cover !important;
        background-repeat: no-repeat !important;
    }
    
    .game-area.restaurant {
        background: linear-gradient(180deg, #87ceeb 0%, #98fb98 60%, #ABD846 100%) !important;
        background-image: url('assets/images/game-backgrounds/restaurant/restaurant-interior.png') !important;
        background-position: 0px center !important;
        background-size: cover !important;
        background-repeat: no-repeat !important;
    }
    
    .welcome-records-button {
        background: white !important;
        color: #ff6b35 !important;
        border: 2px solid #ff6b35 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    .welcome-records-button:hover {
        background: #ff6b35 !important;
        color: white !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
        border-color: #ff6b35 !important;
    }
}

@media (max-width: 320px) {
    .welcome-records-button {
        background: white !important;
        color: #ff6b35 !important;
        border: 2px solid #ff6b35 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    .welcome-records-button:hover {
        background: #ff6b35 !important;
        color: white !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
        border-color: #ff6b35 !important;
    }
    
    .developer-credit {
        position: fixed !important;
        bottom: 2px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        font-size: 0.55em !important;
        z-index: 101 !important;
        white-space: nowrap !important;
        max-width: 98% !important;
        text-align: center !important;
    }
}

/* ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ УЛУЧШЕНИЯ МОБИЛЬНОЙ ГОРИЗОНТАЛЬНОЙ АДАПТАЦИИ */

/* Обеспечиваем правильное отображение на всех мобильных устройствах в горизонтальной ориентации */
@media (orientation: landscape) and (max-height: 500px) {
    /* Убираем лишние отступы */
    .welcome-container {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Обеспечиваем правильное позиционирование элементов */
    .welcome-character {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        z-index: 50 !important;
    }
    
    .game-logo {
        position: absolute !important;
        top: 5px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 100 !important;
    }
    
    .welcome-content {
        position: absolute !important;
        bottom: 25px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 60 !important;
    }
}

/* Специальные стили для предотвращения наезжания элементов */
@media (max-width: 896px) and (orientation: landscape) and (max-height: 414px) {
    /* Уменьшаем размеры персонажа для предотвращения наезжания */
    .welcome-character {
        width: 160px !important;
        height: 200px !important;
    }
    
    /* Уменьшаем размеры логотипа */
    .game-logo {
        width: 90px !important;
        height: 45px !important;
    }
    
    /* Компактные кнопки */
    .welcome-start-button,
    .welcome-records-button {
        padding: 6px 10px !important;
        font-size: 0.75em !important;
        min-height: 32px !important;
    }
    
    /* Компактный текст */
    .welcome-main-title {
        font-size: 1.2em !important;
        margin-bottom: 4px !important;
    }
    
    .welcome-description {
        font-size: 0.75em !important;
        margin-bottom: 8px !important;
        line-height: 1.2 !important;
    }
}

/* Обеспечиваем правильное отображение на iPhone 15 Pro Max и подобных устройствах */
@media (max-width: 932px) and (orientation: landscape) and (max-height: 430px) {
    .welcome-character {
        width: 170px !important;
        height: 210px !important;
    }
    
    .game-logo {
        width: 85px !important;
        height: 42px !important;
    }
    
    .welcome-content {
        width: 92% !important;
        padding: 8px !important;
    }
    
    .welcome-start-button,
    .welcome-records-button {
        max-width: 110px !important;
        padding: 7px 11px !important;
        font-size: 0.75em !important;
    }
}

/* ===== НОВЫЕ ИСПРАВЛЕННЫЕ СТИЛИ ДЛЯ ГОРИЗОНТАЛЬНОЙ ОРИЕНТАЦИИ ===== */

/* Базовые стили для горизонтальной ориентации мобильных устройств */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 1024px) {
    /* Убираем все конфликтующие стили и устанавливаем базовые */
    .welcome-container {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 10px !important;
        height: 100vh !important;
    }
    
    /* Логотип - компактный в верхней части */
    .game-logo {
        position: absolute !important;
        top: 5px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 100 !important;
        width: 80px !important;
        height: 40px !important;
    }
    
    /* Персонаж - слева, компактный */
    .welcome-character {
        position: relative !important;
        width: 150px !important;
        height: 180px !important;
        margin-right: 20px !important;
        flex-shrink: 0 !important;
        z-index: 50 !important;
    }
    
    /* Контент - справа, адаптивный */
    .welcome-content {
        position: relative !important;
        flex: 1 !important;
        max-width: none !important;
        padding: 10px 10px 0 10px !important;
        z-index: 60 !important;
    }
    
    /* Заголовок - компактный */
    .welcome-main-title {
        font-size: 1.8em !important;
        margin-top: 5px !important;
        margin-bottom: 10px !important;
    }
    
    /* Описание - компактное */
    .welcome-description {
        font-size: 0.9em !important;
        margin-bottom: 15px !important;
        line-height: 1.2 !important;
    }
    
    /* Кнопки - горизонтально, компактные */
    .welcome-buttons-container {
        display: flex !important;
        flex-direction: row !important;
        gap: 10px !important;
        justify-content: center !important;
        margin-top: px !important;
    }
    
    .welcome-start-button,
    .welcome-records-button {
        padding: 8px 12px !important;
        font-size: 0.8em !important;
        min-height: 32px !important;
        flex: 1 !important;
        max-width: 120px !important;
    }
}

/* Специальные стили для очень маленьких горизонтальных экранов */
@media (orientation: landscape) and (max-height: 400px) and (max-width: 1024px) {
    .game-logo {
        width: 70px !important;
        height: 35px !important;
        top: 3px !important;
    }
    
    .welcome-character {
        width: 120px !important;
        height: 140px !important;
        margin-right: 15px !important;
    }
    
    .welcome-main-title {
        font-size: 1.5em !important;
    }
    
    .welcome-description {
        font-size: 0.8em !important;
        margin-bottom: 10px !important;
    }
    
    .welcome-start-button,
    .welcome-records-button {
        padding: 6px 10px !important;
        font-size: 0.7em !important;
        min-height: 28px !important;
    }
}

/* Стили для location экрана в горизонтальной ориентации */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 1024px) {
    .location-sky {
        height: 100% !important;
        filter: blur(1px) !important;
    }
    
    .logo-container {
        position: absolute !important;
        top: 5px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 100 !important;
    }
    
    .logo-image {
        width: 80px !important;
        height: 40px !important;
    }
    
    .location-main-container {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 20px !important;
        padding: 10px !important;
        height: calc(100vh - 120px) !important;
    }
    
    .character-frame {
        width: 150px !important;
        height: 150px !important;
        flex-shrink: 0 !important;
    }
    
    .nav-arrow {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2em !important;
    }
    
    .location-name-container {
        position: absolute !important;
        top: 50px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 50 !important;
    }
    
    .location-name {
        padding: 6px 15px !important;
        font-size: 1em !important;
    }
    
    .choose-game-text {
        position: absolute !important;
        top: 90px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 50 !important;
    }
    
    .choose-game-text h2 {
        font-size: 1.2em !important;
        margin: 0 !important;
    }
    
    .location-controls {
        position: absolute !important;
        bottom: 10px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex !important;
        gap: 15px !important;
        z-index: 60 !important;
    }
    
    .back-button,
    .settings-button,
    .play-button {
        padding: 8px 12px !important;
        font-size: 0.8em !important;
        min-height: 32px !important;
    }
    
    .settings-button {
        width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
    }
}

/* Специальные стили для очень маленьких горизонтальных экранов location */
@media (orientation: landscape) and (max-height: 400px) and (max-width: 1024px) {
    .logo-image {
        width: 70px !important;
        height: 35px !important;
    }
    
    .character-frame {
        width: 120px !important;
        height: 120px !important;
    }
    
    .nav-arrow {
        width: 35px !important;
        height: 35px !important;
        font-size: 1em !important;
    }
    
    .location-name {
        padding: 4px 12px !important;
        font-size: 0.9em !important;
    }
    
    .choose-game-text h2 {
        font-size: 1em !important;
    }
    
    .back-button,
    .play-button {
        padding: 6px 10px !important;
        font-size: 0.7em !important;
        min-height: 28px !important;
    }
    
    .settings-button {
        width: 35px !important;
        height: 35px !important;
    }
}

/* Специальные стили для мобильных устройств 480px в горизонтальной ориентации */
@media (max-width: 480px) and (orientation: landscape) {
    .location-sky {
        height: 100% !important;
        filter: blur(1px) !important;
    }
    
    .logo-container {
        position: absolute !important;
        top: 3px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 100 !important;
    }
    
    .logo-image {
        width: 70px !important;
        height: 35px !important;
    }
    
    .location-main-container {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 15px !important;
        padding: 5px !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        z-index: 5 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    .character-frame {
        width: 120px !important;
        height: 120px !important;
        flex-shrink: 0 !important;
    }
    
    .nav-arrow {
        width: 35px !important;
        height: 35px !important;
        font-size: 1em !important;
        margin: 0 !important;
    }
    
    .location-name-container {
        position: absolute !important;
        top: 40px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 10 !important;
    }
    
    .location-name {
        padding: 3px 8px !important;
        font-size: 0.9em !important;
    }
    
    .choose-game-text {
        position: absolute !important;
        top: 60px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 10 !important;
    }
    
    .choose-game-text h2 {
        font-size: 1.1em !important;
        color: #ff4757 !important;
        text-align: center !important;
    }
    
    .location-controls {
        position: absolute !important;
        bottom: 5px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex !important;
        gap: 10px !important;
        z-index: 10 !important;
    }
    
    .back-button,
    .play-button {
        font-size: 0.7em !important;
        padding: 6px 12px !important;
        min-height: 30px !important;
        width: 80px !important;
    }
    
    .settings-button {
        width: 30px !important;
        height: 30px !important;
    }
}

/* КРИТИЧЕСКОЕ ИСПРАВЛЕНИЕ ДЛЯ ГОРИЗОНТАЛЬНОЙ ОРИЕНТАЦИИ 480px */
/* Максимально специфичный селектор для принудительного центрирования */
@media (max-width: 480px) and (orientation: landscape) {
    .location-main-container {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 5px !important;
        gap: 15px !important;
        z-index: 5 !important;
    }
}

/* Дополнительные стили для улучшения совместимости */

/* Стили для iPhone в горизонтальной ориентации */
@media (orientation: landscape) and (max-height: 430px) and (max-width: 932px) {
    .welcome-character {
        width: 140px !important;
        height: 170px !important;
    }
    
    .game-logo {
        width: 75px !important;
        height: 37px !important;
    }
    
    .welcome-main-title {
        font-size: 1.6em !important;
    }
    
    .welcome-description {
        font-size: 0.85em !important;
    }
    
    .character-frame {
        width: 130px !important;
        height: 130px !important;
    }
}

/* Стили для Android устройств в горизонтальной ориентации */
@media (orientation: landscape) and (max-height: 450px) and (min-width: 600px) and (max-width: 1024px) {
    .welcome-container {
        padding: 15px !important;
    }
    
    .welcome-character {
        width: 160px !important;
        height: 190px !important;
        margin-right: 25px !important;
    }
    
    .game-logo {
        width: 85px !important;
        height: 42px !important;
    }
    
    .welcome-main-title {
        font-size: 1.9em !important;
    }
    
    .welcome-description {
        font-size: 0.95em !important;
    }
    
    .character-frame {
        width: 140px !important;
        height: 140px !important;
    }
}

/* Обеспечиваем правильное отображение на всех устройствах */
@media (orientation: landscape) and (max-width: 1024px) {
    /* Убираем возможные конфликты с другими стилями */
    .welcome-container * {
        box-sizing: border-box !important;
    }
    
    .location-main-container * {
        box-sizing: border-box !important;
    }
    
    /* Обеспечиваем правильное позиционирование */
    .welcome-character,
    .game-logo,
    .welcome-content,
    .character-frame {
        position: relative !important;
    }
    
    /* КРИТИЧЕСКОЕ ИСПРАВЛЕНИЕ: Принудительное центрирование location-main-container */
    .location-main-container {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        z-index: 5 !important;
    }
    
    /* Исключение для абсолютно позиционированных элементов */
    .game-logo,
    .location-name-container,
    .choose-game-text,
    .location-controls {
        position: absolute !important;
    }
}

/* ===== СТИЛИ ДЛЯ КОМПЬЮТЕРНОЙ ВЕРСИИ ===== */

/* Обеспечиваем правильное отображение на компьютерах */
@media (min-width: 1025px) {
    /* Восстанавливаем оригинальные стили для компьютерной версии */
    .welcome-container {
        display: block !important;
        position: relative !important;
        height: 100vh !important;
    }
    
    .welcome-character {
        position: absolute !important;
        top: 50% !important;
        left: 25% !important;
        transform: translate(-50%, -50%) !important;
        width: 533px !important;
        height: 667px !important;
        z-index: 5 !important;
    }
    
    .welcome-content {
        position: absolute !important;
        top: 50% !important;
        left: 55% !important;
        right: 20px !important;
        transform: translateY(calc(-50% - 20px)) !important;
        max-width: 600px !important;
        z-index: 10 !important;
    }
    
    .welcome-main-title {
        font-size: 6em !important;
        font-weight: bold !important;
        color: #ff6b35 !important;
        margin-bottom: 20px !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
    }
    
    .welcome-description {
        font-size: 1.8em !important;
        color: #ff8c42 !important;
        margin-bottom: 40px !important;
        line-height: 1.2 !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2) !important;
    }
    
    .welcome-buttons-container {
        display: flex !important;
        align-items: center !important;
        gap: 20px !important;
        z-index: 10 !important;
        position: relative !important;
    }
    
    .welcome-start-button,
    .welcome-records-button {
        padding: 15px 30px !important;
        font-size: 1.2em !important;
        border-radius: 25px !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        z-index: 10 !important;
    }
}

/* Стили для location экрана на компьютерах */
@media (min-width: 1025px) {
    .location-main-container {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 30px !important;
        padding: 20px !important;
        height: calc(100vh - 200px) !important;
    }
    
    .character-frame {
        width: 200px !important;
        height: 200px !important;
        flex-shrink: 0 !important;
    }
    
    .nav-arrow {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.5em !important;
    }
    
    .location-name-container {
        position: absolute !important;
        top: 220px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 50 !important;
    }
    
    .location-name {
        padding: 8px 20px !important;
        font-size: 1.2em !important;
    }
    
    .choose-game-text {
        position: absolute !important;
        top: 100px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 50 !important;
    }
    
    .choose-game-text h2 {
        font-size: 1.5em !important;
        margin: 0 !important;
    }
    
    .location-controls {
        position: absolute !important;
        bottom: 30px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex !important;
        gap: 20px !important;
        z-index: 60 !important;
    }
    
    .back-button,
    .settings-button,
    .play-button {
        padding: 12px 20px !important;
        font-size: 1em !important;
        min-height: 40px !important;
    }
    
    .settings-button {
        width: 50px !important;
        height: 50px !important;
        padding: 0 !important;
    }
}

/* ПРИНУДИТЕЛЬНОЕ ИЗМЕНЕНИЕ РАЗМЕРА ПЕРСОНАЖА ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ */
@media (max-width: 480px) {
    body .welcome-container .welcome-character {
        width: 400px !important;
        height: 500px !important;
        max-width: 400px !important;
        max-height: 500px !important;
    }
}

@media (max-width: 480px) and (orientation: portrait) {
    body .welcome-container .welcome-character {
        width: 400px !important;
        height: 500px !important;
        max-width: 400px !important;
        max-height: 500px !important;
    }
}

/* Стили для компьютерной версии (десктоп) */
@media (min-width: 1024px) {
    /* Увеличиваем логотип для десктопа */
    .game-logo {
        width: 200px !important;
        height: 100px !important;
    }
    
    /* Размещаем контент справа от персонажа (персонаж остается на своем месте) */
    .welcome-content {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        right: 20px !important;
        transform: translateY(calc(-50% - 20px)) !important;
        text-align: left !important;
        max-width: 500px !important;
    }
    
    /* Увеличиваем размеры заголовка и текста для десктопа */
    .welcome-main-title {
        font-size: 4.5em !important;
        margin-bottom: 25px !important;
        white-space: nowrap !important;
        width: 100% !important;
        max-width: none !important;
    }
    
    .welcome-description {
        font-size: 2em !important;
        margin-bottom: 50px !important;
    }
    
    /* Увеличиваем кнопки для лучшего размещения текста */
    .welcome-start-button {
        padding: 25px 50px !important;
        font-size: 1.6em !important;
        min-width: 200px !important;
        border-radius: 50px !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .welcome-records-button {
        padding: 25px 50px !important;
        font-size: 1.6em !important;
        min-width: 200px !important;
        border-radius: 50px !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Улучшаем контейнер кнопок */
    .welcome-buttons-container {
        gap: 30px !important;
        justify-content: flex-start !important;
    }
}
