@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Press Start 2P', cursive;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 25%, #C1666B 60%, #4A5899 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 70vw;
    height: 70vh;
    max-width: 1400px;
    max-height: 980px;
    background: #000;
    border: 8px solid #fff;
    box-shadow: 0 0 0 4px #000, 0 20px 60px rgba(0, 0, 0, 0.5);
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #1a1a2e;
    padding: 40px;
}

.screen.active {
    display: flex;
}

.pixel-title {
    font-size: 48px;
    color: #00ff00;
    text-shadow: 4px 4px 0 #006600;
    margin-bottom: 40px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.pixel-text {
    font-size: 16px;
    color: #fff;
    margin: 10px 0;
    text-align: center;
    line-height: 1.8;
}

.pixel-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 20px;
    color: #fff;
    background: #ff6b6b;
    border: 4px solid #fff;
    padding: 20px 40px;
    margin-top: 30px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 0 #c92a2a;
}

.pixel-btn:hover {
    background: #ff8787;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #c92a2a;
}

.pixel-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #c92a2a;
}

.credits {
    margin-top: 40px;
}

.credits p {
    color: #00ffff;
    text-shadow: 2px 2px 0 #006666;
}

#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: center;
    z-index: 10;
    font-size: 14px;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
}

.hud-item {
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border: 2px solid #fff;
}

.label {
    color: #ffd700;
    margin-right: 10px;
}

#game-canvas {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

@media (max-width: 1050px) {
    #game-container {
        width: 95vw;
        height: 95vh;
        border: none;
    }

    .pixel-title {
        font-size: 32px;
    }

    .pixel-text {
        font-size: 12px;
    }

    .pixel-btn {
        font-size: 16px;
        padding: 15px 30px;
    }

    #hud {
        font-size: 10px;
    }

    .hud-item {
        padding: 8px 12px;
    }
}