@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, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.game-container {
    position: relative;
    background: #222;
    border: 4px solid #fff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#gameCanvas {
    display: block;
    background: linear-gradient(to bottom, #87CEEB 0%, #87CEEB 70%, #90EE90 70%, #90EE90 100%);
    border-radius: 4px;
}

.game-ui {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    color: white;
    font-size: 12px;
    text-shadow: 2px 2px 0px #000;
    z-index: 10;
}

.start-screen,
.game-over {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    z-index: 20;
}

.start-screen h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #FFD700;
    text-shadow: 2px 2px 0px #000;
}

.start-screen p,
.game-over p {
    font-size: 12px;
    margin-bottom: 30px;
    line-height: 1.5;
}

.game-over h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #FF6B6B;
    text-shadow: 2px 2px 0px #000;
}

button {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    padding: 15px 25px;
    background: #4ECDC4;
    color: white;
    border: 3px solid #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-shadow: 1px 1px 0px #000;
    box-shadow: 0 4px 0px #2C9B92;
}

button:hover {
    background: #45B7B8;
    transform: translateY(1px);
    box-shadow: 0 3px 0px #2C9B92;
}

button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0px #2C9B92;
}

.game-over {
    display: none;
}

/* Retro scanlines effect */
.game-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.1) 2px,
            rgba(0, 0, 0, 0.1) 4px);
    pointer-events: none;
    z-index: 30;
}

/* Responsive design */
@media (max-width: 480px) {
    .game-container {
        border: 2px solid #fff;
    }

    #gameCanvas {
        width: 350px;
        height: 525px;
    }

    .start-screen h1 {
        font-size: 18px;
    }

    .game-ui {
        font-size: 10px;
    }

    button {
        font-size: 10px;
        padding: 12px 20px;
    }
}

.back-home {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
}