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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #2d5016, #4a7c59, #6b8e23);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}

.game-container {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 900px;
    width: 100%;
}

.game-header {
    text-align: center;
    margin-bottom: 20px;
}

.game-header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    background: linear-gradient(45deg, #90EE90, #32CD32, #228B22);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-info {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
}

.game-info div {
    font-weight: bold;
    font-size: 1.1em;
}

#gameCanvas {
    border: 3px solid #4a7c59;
    border-radius: 10px;
    background: linear-gradient(to bottom, #87CEEB 0%, #87CEEB 30%, #90EE90 30%, #228B22 100%);
    display: block;
    margin: 0 auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.game-controls {
    margin-top: 20px;
}

.instructions {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
}

.instructions h3 {
    margin-bottom: 10px;
    color: #90EE90;
}

.instructions p {
    margin: 5px 0;
    font-size: 0.9em;
}

.control-key {
    display: inline-block;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    padding: 4px 8px;
    margin: 0 2px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1.1em;
    border: 2px solid #2E7D32;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    min-width: 24px;
    text-align: center;
    animation: keyGlow 2s ease-in-out infinite alternate;
}

@keyframes keyGlow {
    from {
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3), 0 0 8px rgba(76, 175, 80, 0.4);
    }
    to {
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3), 0 0 15px rgba(76, 175, 80, 0.8);
    }
}

.game-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-start {
    background: linear-gradient(45deg, #32CD32, #228B22);
    color: white;
}

.btn-start:hover {
    background: linear-gradient(45deg, #228B22, #006400);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(50, 205, 50, 0.4);
}

.btn-pause {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #333;
}

.btn-pause:hover {
    background: linear-gradient(45deg, #FFA500, #FF8C00);
    transform: translateY(-2px);
}

.btn-restart {
    background: linear-gradient(45deg, #FF6347, #DC143C);
    color: white;
}

.btn-restart:hover {
    background: linear-gradient(45deg, #DC143C, #B22222);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-over-content {
    background: linear-gradient(135deg, #2d5016, #4a7c59);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 3px solid #90EE90;
}

.game-over-content h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #FF6347;
}

.game-over-content p {
    font-size: 1.3em;
    margin: 10px 0;
}

.new-record {
    color: #FFD700;
    font-weight: bold;
    animation: glow 1s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px #FFD700, 0 0 10px #FFD700, 0 0 15px #FFD700;
    }
    to {
        text-shadow: 0 0 10px #FFD700, 0 0 20px #FFD700, 0 0 30px #FFD700;
    }
}

.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        padding: 15px;
        margin: 10px;
    }
    
    .game-header h1 {
        font-size: 2em;
    }
    
    #gameCanvas {
        width: 100%;
        height: auto;
    }
    
    .game-info {
        flex-direction: column;
        gap: 5px;
    }
    
    .game-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
    }
    
    .instructions p {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .game-header h1 {
        font-size: 1.5em;
    }
    
    .game-over-content {
        padding: 20px;
        margin: 20px;
    }
    
    .game-over-content h2 {
        font-size: 2em;
    }
}