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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    overflow: hidden;
    background: #e0e5ec;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-container {
    width: 100%;
    height: 100%;
    max-width: 1200px;
    max-height: 800px;
    position: relative;
    background: #e0e5ec;
    border-radius: 30px;
    box-shadow: 20px 20px 60px #bec3c9,
                -20px -20px 60px #ffffff;
    padding: 20px;
}

.game-screen,
.menu-screen,
.shop-screen,
.game-over-screen {
    position: absolute;
    width: calc(100% - 40px);
    height: calc(100% - 40px);
    display: none;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    background: #e0e5ec;
}

.game-screen.active,
.menu-screen.active,
.shop-screen.active,
.game-over-screen.active {
    display: flex;
}

/* Neumorphism Top Bar */
.top-bar {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 80px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 30px;
    z-index: 10;
    background: #e0e5ec;
    border-radius: 20px;
    box-shadow: inset 8px 8px 16px #bec3c9,
                inset -8px -8px 16px #ffffff;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 15px;
    background: #e0e5ec;
    box-shadow: 6px 6px 12px #bec3c9,
                -6px -6px 12px #ffffff;
    transition: all 0.3s ease;
}

.info-item:hover {
    box-shadow: inset 4px 4px 8px #bec3c9,
                inset -4px -4px 8px #ffffff;
}

.info-item .icon {
    width: 28px;
    height: 28px;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
}

.info-item.gold .icon {
    color: #FFD700;
}

.info-item.timer .icon {
    color: #4CAF50;
}

.info-item.target .icon {
    color: #FF6B6B;
}

.info-item span {
    color: #4a5568;
    font-weight: 600;
    font-size: 20px;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

/* Game Canvas with Neumorphism */
#gameCanvas {
    width: calc(100% - 40px);
    height: calc(100% - 200px);
    margin: 110px 20px 20px 20px;
    cursor: crosshair;
    border-radius: 20px;
    background: #e0e5ec;
    box-shadow: inset 10px 10px 20px #bec3c9,
                inset -10px -10px 20px #ffffff;
}

/* Neumorphism Controls */
.controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 10;
    padding: 15px;
    background: #e0e5ec;
    border-radius: 25px;
    box-shadow: 10px 10px 30px #bec3c9,
                -10px -10px 30px #ffffff;
}

.control-btn {
    width: 65px;
    height: 65px;
    border-radius: 20px;
    border: none;
    background: #e0e5ec;
    box-shadow: 8px 8px 16px #bec3c9,
                -8px -8px 16px #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.control-btn:hover {
    box-shadow: 10px 10px 20px #bec3c9,
                -10px -10px 20px #ffffff;
}

.control-btn:active {
    box-shadow: inset 5px 5px 10px #bec3c9,
                inset -5px -5px 10px #ffffff;
}

.control-btn.main-action {
    width: 85px;
    height: 85px;
    background: linear-gradient(145deg, #f0f5fd, #d0d5dd);
    box-shadow: 10px 10px 25px #a8acb2,
                -10px -10px 25px #ffffff;
}

.control-btn svg {
    width: 32px;
    height: 32px;
    fill: #4a5568;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
}

.control-btn.main-action svg {
    width: 42px;
    height: 42px;
    fill: #FFD700;
}

/* Neumorphism Menu Screen */
.menu-screen {
    justify-content: center;
    align-items: center;
    background: #e0e5ec;
}

.logo {
    margin-bottom: 60px;
    padding: 40px;
    border-radius: 30px;
    background: #e0e5ec;
    box-shadow: 15px 15px 30px #bec3c9,
                -15px -15px 30px #ffffff;
    animation: float 3s ease-in-out infinite;
}

.logo-icon {
    width: 300px;
    height: 150px;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.2));
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 15px 15px 30px #bec3c9,
                    -15px -15px 30px #ffffff;
    }
    50% {
        transform: translateY(-15px);
        box-shadow: 20px 20px 40px #bec3c9,
                    -20px -20px 40px #ffffff;
    }
}

.menu-buttons {
    display: flex;
    gap: 40px;
}

.menu-btn {
    width: 90px;
    height: 90px;
    border-radius: 25px;
    border: none;
    background: #e0e5ec;
    box-shadow: 12px 12px 24px #bec3c9,
                -12px -12px 24px #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-btn:hover {
    box-shadow: 15px 15px 30px #bec3c9,
                -15px -15px 30px #ffffff;
}

.menu-btn:active {
    box-shadow: inset 6px 6px 12px #bec3c9,
                inset -6px -6px 12px #ffffff;
}

.menu-btn svg {
    width: 45px;
    height: 45px;
    fill: #4a5568;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
}

/* Neumorphism Shop Screen */
.shop-screen {
    background: #e0e5ec;
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: #e0e5ec;
    border-radius: 20px;
    margin: 20px;
    box-shadow: inset 8px 8px 16px #bec3c9,
                inset -8px -8px 16px #ffffff;
}

.back-btn {
    width: 55px;
    height: 55px;
    border-radius: 15px;
    border: none;
    background: #e0e5ec;
    box-shadow: 6px 6px 12px #bec3c9,
                -6px -6px 12px #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-btn:hover {
    box-shadow: 8px 8px 16px #bec3c9,
                -8px -8px 16px #ffffff;
}

.back-btn:active {
    box-shadow: inset 3px 3px 6px #bec3c9,
                inset -3px -3px 6px #ffffff;
}

.back-btn svg {
    width: 30px;
    height: 30px;
    fill: #4a5568;
}

.shop-gold {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-radius: 20px;
    background: #e0e5ec;
    box-shadow: 6px 6px 12px #bec3c9,
                -6px -6px 12px #ffffff;
}

.shop-gold .icon {
    width: 32px;
    height: 32px;
}

.shop-gold span {
    color: #FFD700;
    font-size: 26px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.8);
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 35px;
    padding: 40px;
    overflow-y: auto;
    max-height: calc(100% - 120px);
}

.shop-item {
    background: #e0e5ec;
    border-radius: 25px;
    padding: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 10px 10px 20px #bec3c9,
                -10px -10px 20px #ffffff;
}

.shop-item:hover {
    transform: translateY(-3px);
    box-shadow: 12px 12px 24px #bec3c9,
                -12px -12px 24px #ffffff;
}

.shop-item:active {
    box-shadow: inset 5px 5px 10px #bec3c9,
                inset -5px -5px 10px #ffffff;
}

.shop-item.purchased {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: inset 4px 4px 8px #bec3c9,
                inset -4px -4px 8px #ffffff;
}

.shop-item svg {
    width: 65px;
    height: 65px;
    fill: #4a5568;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
}

.item-price {
    padding: 10px 20px;
    border-radius: 15px;
    color: #FFD700;
    font-weight: bold;
    font-size: 20px;
    background: #e0e5ec;
    box-shadow: inset 3px 3px 6px #bec3c9,
                inset -3px -3px 6px #ffffff;
}

/* Neumorphism Game Over Screen */
.game-over-screen {
    justify-content: center;
    align-items: center;
    background: #e0e5ec;
}

.game-over-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 45px;
    padding: 50px;
    border-radius: 30px;
    background: #e0e5ec;
    box-shadow: 20px 20px 40px #bec3c9,
                -20px -20px 40px #ffffff;
    animation: fadeInScale 0.5s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result-icon {
    width: 130px;
    height: 130px;
    fill: #FFD700;
    filter: drop-shadow(0 10px 30px rgba(255, 215, 0, 0.3));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 10px 30px rgba(255, 215, 0, 0.3));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 15px 40px rgba(255, 215, 0, 0.5));
    }
}

.final-score {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 25px 45px;
    border-radius: 25px;
    background: #e0e5ec;
    box-shadow: inset 8px 8px 16px #bec3c9,
                inset -8px -8px 16px #ffffff;
}

.final-score .icon {
    width: 55px;
    height: 55px;
}

.final-score span {
    color: #FFD700;
    font-size: 52px;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(255,255,255,0.8);
}

.game-over-buttons {
    display: flex;
    gap: 35px;
}

.game-over-btn {
    width: 75px;
    height: 75px;
    border-radius: 20px;
    border: none;
    background: #e0e5ec;
    box-shadow: 10px 10px 20px #bec3c9,
                -10px -10px 20px #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-over-btn:hover {
    box-shadow: 12px 12px 24px #bec3c9,
                -12px -12px 24px #ffffff;
}

.game-over-btn:active {
    box-shadow: inset 5px 5px 10px #bec3c9,
                inset -5px -5px 10px #ffffff;
}

.game-over-btn svg {
    width: 38px;
    height: 38px;
    fill: #4a5568;
}

/* Responsive Design */
@media (max-width: 768px) {
    .shop-items {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 20px;
        padding: 25px;
    }

    .shop-item {
        padding: 25px;
    }

    .shop-item svg {
        width: 45px;
        height: 45px;
    }

    .control-btn {
        width: 55px;
        height: 55px;
    }

    .control-btn.main-action {
        width: 70px;
        height: 70px;
    }

    .menu-btn {
        width: 70px;
        height: 70px;
    }

    .menu-btn svg {
        width: 35px;
        height: 35px;
    }
}