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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#ui {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 20px 30px;
    border-radius: 10px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 300px;
}

.health-bar {
    display: grid;
    grid-template-columns: 150px 1fr;
    align-items: center;
    gap: 15px;
    color: white;
    font-weight: bold;
}

.hearts {
    display: flex;
    gap: 5px;
}

.heart {
    width: 20px;
    height: 20px;
    background: red;
    border-radius: 50%;
    display: inline-block;
    animation: heartbeat 1s infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

#gameCanvas {
    border: 3px solid #667eea;
    background: #0f3460;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

#game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 40px 60px;
    border-radius: 20px;
    text-align: center;
    z-index: 100;
    box-shadow: 0 0 50px rgba(233, 69, 96, 0.8);
}

#game-over h2 {
    color: #e94560;
    font-size: 2.5em;
    margin-bottom: 30px;
}

#restart-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#restart-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
}

.hidden {
    display: none !important;
}

#controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 30px;
    border-radius: 10px;
    color: white;
    font-size: 1.1em;
}

#start-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 50px 80px;
    border-radius: 20px;
    text-align: center;
    z-index: 100;
    box-shadow: 0 0 50px rgba(102, 126, 234, 0.8);
}

#start-screen h1 {
    color: #667eea;
    font-size: 3em;
    margin-bottom: 20px;
}

#start-screen p {
    color: white;
    font-size: 1.2em;
    margin-bottom: 30px;
}

#start-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 50px;
    font-size: 1.3em;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#start-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
}
