* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --neon-blue: #00f3ff;
    --neon-pink: #ff00ff;
    --neon-purple: #9d00ff;
    --neon-green: #00ff41;
    --neon-orange: #ff6b00;
    --dark-bg: #0a0e27;
    --darker-bg: #050816;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
    color: white;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

#game-container {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Menu Background Canvas */
#menu-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

#menu-background canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Canvas */
#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #0f1535 0%, #050816 100%);
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Main Menu - Pink & Black Retro Style */
#main-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #ff69b4;
    z-index: 10;
}

.cyber-week-header {
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #000000;
    text-shadow: none;
    margin-bottom: 15px;
    letter-spacing: 8px;
    animation: none;
}

.game-title {
    font-size: 5rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #000000;
    text-shadow: none;
    margin-bottom: 10px;
    animation: none;
}

.tagline {
    font-size: 1.8rem;
    color: #000000;
    margin-bottom: 40px;
    letter-spacing: 4px;
    max-width: 600px;
    text-align: center;
    line-height: 1.6;
    font-weight: 700;
    text-transform: uppercase;
}

.menu-btn {
    padding: 25px 70px;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #ffffff;
    border: 4px solid #000000;
    border-radius: 0;
    color: #000000;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.15s ease;
    box-shadow: none;
}

.menu-btn:hover {
    transform: translate(-3px, -3px);
    box-shadow: 6px 6px 0 #000000;
}

.menu-btn:active {
    transform: translate(3px, 3px);
    box-shadow: none;
}

.stats {
    position: absolute;
    bottom: 40px;
    display: flex;
    gap: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--neon-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
}

.yborg-link {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff; /* БЕЛЫЙ! */
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.yborg-link:hover {
    color: #ff69b4; /* При наведении розовый */
    text-shadow: 0 0 20px rgba(255, 105, 180, 0.8);
    transform: scale(1.05);
}

/* Game UI */
#game-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* ВЕРХНИЙ ПРАВЫЙ УГОЛ - ВСЁ В ОДНОМ БЛОКЕ */
.top-right-ui {
    position: absolute;
    top: 20px;
    right: 20px;
    text-align: right;
    pointer-events: none;
}

.top-right-ui div {
    margin: 0;
    padding: 0;
    line-height: 1;
}

#cart-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    text-shadow:
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000,
        2px 2px 0 #000;
    margin-bottom: 5px;
}

#items-count {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-shadow:
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000,
        2px 2px 0 #000;
    margin-bottom: 10px;
}

#total-purchased {
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    text-shadow:
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000,
        2px 2px 0 #000;
    margin-bottom: 10px;
}

#total-savings {
    font-size: 2.5rem;
    font-weight: 900;
    color: #ff69b4;
    text-shadow:
        0 0 30px #ff69b4,
        0 0 60px #ff1493,
        0 0 90px #ff69b4,
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000,
        2px 2px 0 #000;
    margin-bottom: 5px;
}

/* Winner Screen */
#winner-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85); /* ЧЁРНЫЙ ПРОЗРАЧНЫЙ! */
    backdrop-filter: blur(20px); /* GLASSMORPHISM! */
    -webkit-backdrop-filter: blur(20px);
    padding: 60px 80px;
    border-radius: 20px;
    border: 2px solid rgba(255, 105, 180, 0.3); /* РОЗОВАЯ РАМКА! */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 60px rgba(255, 105, 180, 0.2); /* РОЗОВОЕ СВЕЧЕНИЕ! */
    text-align: center;
    pointer-events: all;
    max-width: 600px;
}

/* Winner screen заголовки используют те же классы что и главное меню */
#winner-screen .cyber-week-header {
    margin-bottom: 10px;
}

#winner-screen .game-title {
    margin-bottom: 40px;
}

#results-list {
    margin-bottom: 40px;
    text-align: left;
}

.result-item {
    padding: 15px 20px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid #ffffff; /* БЕЛЫЙ ВМЕСТО СИНЕГО! */
}

.result-item.winner {
    border-left: 4px solid #ff69b4; /* РОЗОВЫЙ! */
    background: rgba(255, 105, 180, 0.1);
}

.result-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff; /* БЕЛЫЙ! */
    margin-bottom: 5px;
}

.result-stats {
    font-size: 1.2rem;
    color: #ffffff; /* БЕЛЫЙ ВМЕСТО СИНЕГО! */
}

.result-stats span {
    color: #ff69b4; /* РОЗОВЫЙ! */
    font-weight: 700;
}

.winner-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.winner-buttons a {
    text-decoration: none;
}

.restart-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #e0e0e0 50%, #c0c0c0);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3), inset 0 -5px 15px rgba(0, 0, 0, 0.2), inset 0 5px 15px rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    color: #000000;
}

.restart-btn svg {
    width: 28px;
    height: 28px;
}

.restart-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.4), inset 0 -5px 15px rgba(0, 0, 0, 0.2), inset 0 5px 15px rgba(255, 255, 255, 0.5);
}

.restart-btn:active {
    transform: scale(1.05) translateY(0px);
}

.shop-now-btn {
    padding: 20px 50px;
    font-size: 1.3rem;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 20px var(--neon-blue), 0 0 40px var(--neon-blue);
    }
    50% {
        text-shadow: 0 0 30px var(--neon-pink), 0 0 60px var(--neon-pink);
    }
}

@keyframes glow-pink {
    0%, 100% {
        text-shadow: 0 0 40px #ff69b4, 0 0 80px #ff1493, 0 0 120px #ff69b4;
    }
    50% {
        text-shadow: 0 0 60px #ff1493, 0 0 100px #ff69b4, 0 0 140px #ff1493;
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Utility */
.hidden {
    display: none !important;
}

/* MOBILE RESPONSIVE */
@media screen and (max-width: 768px) {
    /* Main Menu */
    .cyber-week-header {
        font-size: 1.8rem;
        letter-spacing: 4px;
        margin-bottom: 10px;
    }

    .game-title {
        font-size: 3rem;
        margin-bottom: 5px;
    }

    .tagline {
        font-size: 1rem;
        margin-bottom: 30px;
        padding: 0 20px;
        max-width: 90%;
        letter-spacing: 1px;
    }

    .menu-btn {
        padding: 18px 50px;
        font-size: 1.2rem;
    }

    .yborg-link {
        font-size: 1rem;
    }

    .stats {
        bottom: 20px;
    }

    /* Game UI */
    .top-right-ui {
        top: 10px;
        right: 10px;
    }

    #total-savings {
        font-size: 1.8rem;
        margin-bottom: 3px;
    }

    #total-purchased {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    #cart-value {
        font-size: 1.8rem;
        margin-bottom: 3px;
    }

    #items-count {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }

    /* Winner Screen */
    #winner-screen {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        max-width: 100%;
        padding: 20px;
        border-radius: 0;
        border: none;
        transform: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
        overflow-y: auto;
    }

    #winner-screen .cyber-week-header {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }

    #winner-screen .game-title {
        font-size: 2.5rem;
        margin-bottom: 20px;
    }

    #results-list {
        margin-bottom: 20px;
        max-height: 50vh;
        overflow-y: auto;
    }

    .result-item {
        padding: 12px 15px;
        margin: 8px 0;
    }

    .result-name {
        font-size: 1.2rem;
    }

    .result-stats {
        font-size: 1rem;
    }

    .winner-buttons {
        flex-direction: column-reverse;
        gap: 15px;
        margin-top: auto;
        padding-top: 20px;
    }

    .shop-now-btn {
        padding: 18px 40px;
        font-size: 1.2rem;
        width: 100%;
    }

    .restart-btn {
        width: 55px;
        height: 55px;
        align-self: center;
    }

    .restart-btn svg {
        width: 24px;
        height: 24px;
    }
}

@media screen and (max-width: 480px) {
    /* Extra small phones */
    .cyber-week-header {
        font-size: 1.5rem;
        letter-spacing: 3px;
    }

    .game-title {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 0.9rem;
        padding: 0 15px;
    }

    .menu-btn {
        padding: 15px 40px;
        font-size: 1.1rem;
    }

    #timer-value {
        font-size: 1.5rem;
    }

    #total-savings,
    #total-purchased,
    #cart-value {
        font-size: 1.5rem;
    }

    #items-count {
        font-size: 1.1rem;
    }

    #winner-screen {
        padding: 15px;
    }

    #winner-screen .cyber-week-header {
        font-size: 1.2rem;
        margin-bottom: 3px;
    }

    #winner-screen .game-title {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    #results-list {
        max-height: 45vh;
    }

    .result-item {
        padding: 10px 12px;
        margin: 6px 0;
    }

    .result-name {
        font-size: 1.1rem;
    }

    .result-stats {
        font-size: 0.9rem;
    }

    .winner-buttons {
        gap: 12px;
        padding-top: 15px;
    }

    .shop-now-btn {
        padding: 15px 35px;
        font-size: 1.1rem;
    }

    .restart-btn {
        width: 50px;
        height: 50px;
    }

    .restart-btn svg {
        width: 22px;
        height: 22px;
    }
}


/* Level Up Menu - Pink & Black Retro Style */
#level-up-menu {
    pointer-events: auto;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#level-up-menu .menu-content {
    background: #ff69b4;
    border: 4px solid #000000;
    border-radius: 0;
    padding: 30px;
    text-align: center;
    box-shadow: 8px 8px 0 #000000;
}

#level-up-menu h2 {
    font-size: 2.5rem;
    color: #000000;
    text-shadow: none;
    margin-bottom: 20px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.upgrade-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.upgrade-option {
    background: #ffffff;
    border: 3px solid #000000;
    border-radius: 0;
    padding: 15px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: none;
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.upgrade-option .icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.upgrade-option .icon img {
    width: 100%;
    height: 100%;
}

.upgrade-option .upgrade-info {
    flex: 1;
}

.upgrade-option:hover {
    background: #ffffff;
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 #000000;
}

.upgrade-option:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.upgrade-option .upgrade-info h3 {
    color: #000000;
    font-size: 1.1rem;
    margin: 0 0 6px 0;
    font-weight: 700;
    text-transform: uppercase;
}

.upgrade-option .upgrade-info .stats {
    position: static;
    display: block;
    color: #ff69b4;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.upgrade-option .upgrade-info p {
    color: #666666;
    font-size: 0.8rem;
    line-height: 1.3;
    margin: 0;
}

.upgrade-option .level-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff69b4;
    color: #000000;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    box-shadow: 2px 2px 0 #000000;
}


/* GAME OVER SCREEN - Pink & Black Retro Style */
#game-over {
    pointer-events: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ff69b4;
    border: 4px solid #000000;
    border-radius: 0;
    padding: 40px;
    z-index: 1000;
    text-align: center;
    box-shadow: 8px 8px 0 #000000;
    min-width: 400px;
}

#game-over h1 {
    font-size: 3rem;
    color: #000000;
    text-shadow: none;
    margin-bottom: 20px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
}

#game-over p {
    color: #000000;
    font-size: 1.1rem;
    margin: 10px 0;
    font-weight: 600;
}

#final-stats {
    margin: 20px 0;
    background: #ffffff;
    border: 3px solid #000000;
    padding: 20px;
}

#final-stats p {
    color: #000000;
    font-size: 1.2rem;
    margin: 8px 0;
}

#game-over .buttons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

#game-over .menu-btn {
    min-width: 200px;
    background: #ffffff;
    color: #000000;
    border: 3px solid #000000;
    border-radius: 0;
    box-shadow: none;
    font-weight: 700;
    text-transform: uppercase;
}

#game-over .menu-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 #000000;
}

#game-over .menu-btn:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}


/* BOTTOM UI - HP & XP BARS + WEAPON SLOTS */
.bottom-ui {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    pointer-events: auto;
    z-index: 100;
}

.bottom-ui-row {
    display: flex;
    align-items: flex-end;
    width: 100%;
}

.bars-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bar-container {
    display: flex;
    align-items: center;
    width: 100%;
}

.bar-label {
    display: none; /* Убираем надписи HP/XP */
}

/* Weapon Slots */
.weapon-slots {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.6);
}

.weapon-slot {
    width: 40px;
    height: 40px;
    background: #1a1a1a;
    border: 2px solid #000000;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.weapon-slot img {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1); /* White icons */
}

.weapon-slot .weapon-level {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #ff00ff;
    color: #000;
    font-size: 0.6rem;
    font-weight: bold;
    padding: 1px 3px;
    border-radius: 2px;
    line-height: 1;
}

.bar {
    position: relative;
    width: 100%;
    height: 24px;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 0;
    overflow: hidden;
}

.bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 0;
}

.hp-fill {
    background: linear-gradient(90deg, #ff0000 0%, #ff6b6b 100%);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
}

.xp-fill {
    background: linear-gradient(90deg, #00ff00 0%, #00ff88 100%);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
}

.bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 0.7rem;
    color: #fff;
    text-shadow: 0 0 5px rgba(0, 0, 0, 1),
                 0 0 10px rgba(0, 0, 0, 0.8);
    z-index: 10;
    pointer-events: none;
}

/* ============================================
   MOBILE STYLES
   ============================================ */

/* Mobile Media Queries */
@media (max-width: 768px) {
    /* Smaller UI elements */
    .top-right-ui {
        font-size: 0.9rem;
        padding: 8px;
        top: 10px;
        right: 10px;
    }

    /* HP/XP bars stay at bottom */
    .bottom-ui {
        bottom: 0;
        left: 0;
        right: 0;
        gap: 0;
    }

    .bar {
        height: 12px;
    }

    .bar-text {
        font-size: 0.6rem;
    }

    /* Smaller level-up menu */
    #level-up-menu {
        width: 95%;
        max-width: none;
        padding: 15px;
        box-shadow: 6px 6px 0 #0f0f1a;
    }

    #level-up-menu h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
        text-shadow: 2px 2px 0 #000000;
    }

    .upgrade-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .upgrade-option {
        padding: 12px;
        box-shadow: 3px 3px 0 #0a0a14;
    }

    .upgrade-option .icon {
        width: 36px;
        height: 36px;
        margin-bottom: 8px;
    }

    .upgrade-option h3 {
        font-size: 1rem;
    }

    .upgrade-option p {
        font-size: 0.8rem;
    }

    /* Game over screen */
    #game-over {
        min-width: auto;
        width: 90%;
        padding: 25px 15px;
        box-shadow: 6px 6px 0 #000000;
    }

    #game-over h1 {
        font-size: 2rem;
    }

    #game-over p {
        font-size: 0.9rem;
    }

    #final-stats {
        padding: 15px;
    }

    #final-stats p {
        font-size: 1rem;
    }

    #game-over .menu-btn {
        min-width: 150px;
        padding: 15px 30px;
    }

    /* Menu buttons */
    .menu-btn {
        font-size: 1rem;
        padding: 12px 30px;
    }

    .game-title {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .top-right-ui {
        font-size: 0.8rem;
        padding: 6px;
    }

    .bar {
        height: 10px;
    }

    .bar-text {
        font-size: 0.55rem;
    }

    #level-up-menu h2 {
        font-size: 1.2rem;
    }

    .game-title {
        font-size: 2rem;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .top-right-ui {
        font-size: 0.75rem;
    }

    .bottom-ui {
        bottom: 0;
    }

    .bar {
        height: 10px;
    }

    .bar-text {
        font-size: 0.5rem;
    }
}

/* ============================================
   MOBILE JOYSTICK
   ============================================ */

#joystick-container {
    display: none; /* Hidden by default on desktop */
    position: fixed;
    bottom: 80px;
    right: 30px;
    z-index: 1000;
    pointer-events: auto;
}

/* Show joystick on small screens (mobile) */
@media (max-width: 1024px) {
    #joystick-container {
        display: block !important;
    }
}

#joystick-base {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid rgba(255, 105, 180, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(255, 105, 180, 0.3),
                inset 0 0 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

#joystick-stick {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at 30% 30%, #ffb3d9, #ff69b4 50%, #ff1493);
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4),
                inset 0 -3px 10px rgba(0, 0, 0, 0.2),
                inset 0 3px 10px rgba(255, 255, 255, 0.3);
    transition: transform 0.05s ease-out;
    cursor: pointer;
}

#joystick-stick.active {
    box-shadow: 0 5px 20px rgba(255, 105, 180, 0.6),
                inset 0 -3px 10px rgba(0, 0, 0, 0.2),
                inset 0 3px 10px rgba(255, 255, 255, 0.3);
}

/* Show joystick only on touch devices */
@media (hover: none) and (pointer: coarse) {
    #joystick-container {
        display: block;
    }
}

/* Mobile adjustments for joystick */
@media (max-width: 768px) {
    #joystick-container {
        bottom: 60px;
        right: 20px;
    }

    #joystick-base {
        width: 100px;
        height: 100px;
    }

    #joystick-stick {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    #joystick-container {
        bottom: 50px;
        right: 15px;
    }

    #joystick-base {
        width: 90px;
        height: 90px;
    }

    #joystick-stick {
        width: 35px;
        height: 35px;
    }
}

/* Landscape mode - move joystick higher */
@media (max-height: 500px) and (orientation: landscape) {
    #joystick-container {
        bottom: 40px;
        right: 20px;
    }

    #joystick-base {
        width: 80px;
        height: 80px;
    }

    #joystick-stick {
        width: 32px;
        height: 32px;
    }
}

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */

#cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #000;
    color: #fff;
    padding: 15px;
    z-index: 10000;
    display: none;
    border-top: 3px solid #ff69b4;
}

#cookie-consent.show {
    display: block;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.5;
    font-weight: 600;
}

.cookie-text a {
    color: #ff69b4;
    text-decoration: underline;
    font-weight: 700;
}

.cookie-btn {
    padding: 10px 25px;
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
    background: #fff;
    border: none;
    color: #000;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cookie-btn:hover {
    background: #ff69b4;
    color: #000;
}

@media (max-width: 768px) {
    #cookie-consent {
        padding: 12px;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .cookie-text {
        font-size: 0.75rem;
    }

    .cookie-btn {
        padding: 8px 20px;
        font-size: 0.8rem;
    }
}

/* ========================================
   HAMBURGER MENU BUTTON (Pink like level-up)
   ======================================== */
.hamburger-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: #ff69b4;
    border: 4px solid #000000;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    z-index: 1000;
    transition: all 0.15s ease;
    box-shadow: 6px 6px 0 #000000;
}

.hamburger-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 #000000;
}

.hamburger-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 #000000;
}

.hamburger-btn span {
    display: block;
    width: 28px;
    height: 4px;
    background: #000000;
    border-radius: 0;
    transition: all 0.15s ease;
}

/* ========================================
   PAUSE MENU (Pink like level-up)
   ======================================== */
#pause-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    pointer-events: auto;
}

#pause-menu .menu-content {
    background: #ff69b4;
    padding: 40px 60px;
    border-radius: 0;
    text-align: center;
    box-shadow: 8px 8px 0 #000000;
    border: 4px solid #000000;
}

#pause-menu h2 {
    font-size: 3rem;
    color: #000000;
    margin: 0 0 30px 0;
    text-shadow: none;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
}

#pause-menu .buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#pause-menu .menu-btn {
    min-width: 200px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .hamburger-btn {
        top: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
    }
    
    .hamburger-btn span {
        width: 25px;
    }
    
    #pause-menu h2 {
        font-size: 2rem;
    }
}

/* ========================================
   MAP SELECTION MENU
   ======================================== */
#map-selection-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ff69b4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    pointer-events: auto;
}

#map-selection-menu h2 {
    font-size: 3rem;
    color: #000000;
    margin: 0 0 40px 0;
    text-shadow: none;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 5px;
}

.map-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    padding: 0 20px;
}

.map-card {
    background: #000000;
    border: 4px solid #000000;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.map-card:hover {
    background: #ffffff;
    transform: translateY(-5px);
}

.map-name {
    font-size: 1.2rem;
    font-weight: 900;
    color: #ff69b4;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.map-card:hover .map-name {
    color: #000000;
}

.map-info {
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 600;
}

.map-card:hover .map-info {
    color: #666666;
}

@media (max-width: 768px) {
    .map-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    #map-selection-menu h2 {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .map-card {
        padding: 20px 15px;
    }

    .map-name {
        font-size: 1rem;
    }

    .map-info {
        font-size: 0.8rem;
    }
}

/* ========================================
   SETTINGS MENU
   ======================================== */
#settings-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    pointer-events: auto;
}

#settings-menu .menu-content {
    background: #ff69b4;
    padding: 40px 60px;
    border-radius: 0;
    text-align: center;
    box-shadow: 8px 8px 0 #000000;
    border: 4px solid #000000;
    min-width: 400px;
}

#settings-menu h2 {
    font-size: 3rem;
    color: #000000;
    margin: 0 0 30px 0;
    text-shadow: none;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.settings-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.setting-item label {
    font-size: 1.2rem;
    font-weight: 900;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.setting-item input[type="range"] {
    width: 100%;
    height: 8px;
    background: #000000;
    border: none;
    outline: none;
    border-radius: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.setting-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #000000;
    cursor: pointer;
    border: 3px solid #ffffff;
    border-radius: 0;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.setting-item input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #000000;
    cursor: pointer;
    border: 3px solid #ffffff;
    border-radius: 0;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.setting-item input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: #000000;
    border-radius: 0;
}

.setting-item input[type="range"]::-moz-range-track {
    width: 100%;
    height: 8px;
    background: #000000;
    border-radius: 0;
}

.setting-item span {
    font-size: 1.2rem;
    font-weight: 900;
    color: #000000;
    align-self: flex-end;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    #settings-menu .menu-content {
        min-width: 300px;
        padding: 30px 40px;
    }
    
    #settings-menu h2 {
        font-size: 2rem;
    }
    
    .setting-item label {
        font-size: 1rem;
    }
}

/* Menu Loading (показывается на главном меню) */
#menu-loading {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#menu-loading .loading-text {
    font-size: 1rem;
    color: #000000;
    margin-bottom: 1rem;
    font-weight: bold;
}

.loading-bar {
    width: 400px;
    height: 20px;
    background: transparent;
    border: 2px solid #000000;
    overflow: hidden;
}

.loading-fill {
    height: 100%;
    background: #000000;
    width: 0%;
    transition: width 0.3s ease;
}

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