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

body {
    font-family: 'Georgia', serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow: hidden;
}

.game-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.game-header {
    text-align: center;
    padding: 15px;
    position: relative;
    z-index: 10;
}

.game-header h1 {
    color: #fff;
    font-size: 2.2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game-header p {
    color: #e0e0ff;
    margin-top: 5px;
    font-size: 1rem;
}

.back-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.score-display {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.4rem;
    color: #fff;
    font-weight: bold;
    z-index: 10;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.lives-display {
    position: absolute;
    top: 45px;
    right: 15px;
    font-size: 1.1rem;
    color: #ffcccc;
    z-index: 10;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.game-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    width: 100%;
    padding: 10px;
}

#gameCanvas {
    background: linear-gradient(to bottom, #1a1a2e 0%, #16213e 100%);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    max-width: 100%;
    touch-action: none;
}

.start-screen,
.game-over-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 50px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 100;
    display: none;
}

.start-screen.show,
.game-over-screen.show {
    display: block;
}

.start-screen h2,
.game-over-screen h2 {
    color: #764ba2;
    font-size: 2rem;
    margin-bottom: 15px;
}

.start-screen p,
.game-over-screen p {
    color: #555;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.controls-hint {
    font-size: 0.95rem !important;
    color: #888 !important;
}

.start-btn,
.restart-btn {
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 30px;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    margin-top: 10px;
}

.start-btn:hover,
.restart-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .game-header {
        padding: 10px;
    }

    .game-header h1 {
        font-size: 1.6rem;
    }

    .game-header p {
        font-size: 0.85rem;
    }

    .back-btn {
        position: relative;
        top: auto;
        left: auto;
        margin-top: 8px;
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .score-display {
        top: 10px;
        right: 10px;
        font-size: 1.1rem;
    }

    .lives-display {
        top: 35px;
        right: 10px;
        font-size: 0.9rem;
    }

    .start-screen,
    .game-over-screen {
        padding: 25px 30px;
        width: 90%;
        max-width: 320px;
    }

    .start-screen h2,
    .game-over-screen h2 {
        font-size: 1.5rem;
    }

    .start-screen p,
    .game-over-screen p {
        font-size: 0.95rem;
    }

    .start-btn,
    .restart-btn {
        padding: 12px 30px;
        font-size: 1.1rem;
    }
}
