body { 
    margin: 0; 
    background: #333;
    overflow: hidden;
    font-family: 'Arial', sans-serif;
}

canvas { 
    display: block; 
}

#titleScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 300;
}

#titleScreen h1 {
    font-size: 72px;
    margin: 0;
    color: #4CAF50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    letter-spacing: 2px;
}

#titleScreen p {
    font-size: 24px;
    margin: 20px 0 40px;
    color: #ccc;
}

.title-buttons {
    display: flex;
    gap: 20px;
}

.title-button {
    padding: 15px 40px;
    font-size: 24px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.title-button:hover {
    background: #45a049;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
}

#instructionsModal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 400;
}

#instructionsContent {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

#instructionsContent h2 {
    color: #4CAF50;
    margin-top: 0;
    text-align: center;
}

.instructions-section {
    margin-bottom: 20px;
}

.instructions-section h3 {
    color: #4CAF50;
    margin-bottom: 10px;
}

.control-item {
    display: flex;
    margin-bottom: 8px;
}

.control-key {
    background: #333;
    padding: 5px 10px;
    border-radius: 4px;
    margin-right: 10px;
    min-width: 100px;
    text-align: center;
}

#closeInstructions {
    margin-top: 20px;
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

#closeInstructions:hover {
    background: #45a049;
}

#restart {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    font-size: 16px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 100;
}

#score {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 20px;
    font-family: Arial;
    z-index: 100;
}

#gameOverScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: Arial;
    z-index: 200;
}

#gameOverScreen h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ff4444;
}

#gameOverScreen .stats {
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
}

#gameOverScreen .stats div {
    margin: 10px 0;
}

#gameOverScreen button {
    padding: 15px 30px;
    font-size: 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

#gameOverScreen button:hover {
    background: #45a049;
} 