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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    background-size: 400% 400%;
}

.game-container {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 30px;
    text-align: center;
    animation: fadeIn 0.8s ease-in-out;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.game-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.score, .high-score {
    background-color: #f8f9fa;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.music-control {
    display: flex;
    align-items: center;
}

.music-btn {
    background-color: #f8f9fa;
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.music-btn:hover {
    background-color: #d0d0d0;
    transform: translateY(-2px);
}

.music-btn.muted {
    background-color: #ff6b6b;
    color: white;
}

.game-canvas {
    position: relative;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#gameCanvas {
    background-color: #87ceeb;
    border-radius: 5px;
    display: block;
    margin: 0 auto;
}

.game-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.game-controls span {
    margin: 0 10px;
    padding: 8px 15px;
    background-color: #e0e0e0;
    border-radius: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.game-controls span:hover {
    background-color: #d0d0d0;
    transform: translateY(-2px);
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 40px;
    border-radius: 15px;
    display: none;
    animation: zoomIn 0.3s ease-in-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@keyframes zoomIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.game-over h2 {
    margin-bottom: 20px;
    font-size: 32px;
    color: #ff6b6b;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.game-over p {
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: bold;
}

#restartBtn {
    padding: 12px 24px;
    font-size: 18px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

#restartBtn:hover {
    background-color: #45a049;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(76, 175, 80, 0.4);
}

.game-start {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 60px;
    border-radius: 15px;
    animation: slideIn 0.5s ease-in-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@keyframes slideIn {
    from { opacity: 0; transform: translate(-50%, -50%) translateY(-50px); }
    to { opacity: 1; transform: translate(-50%, -50%) translateY(0); }
}

.game-start h2 {
    margin-bottom: 30px;
    font-size: 56px;
    color: #ff6b6b;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    animation: pulse 2s infinite;
    font-family: 'Arial', sans-serif;
    letter-spacing: 2px;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.game-start p {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: bold;
    color: #f8f9fa;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.game-start p::after {
    content: '▶';
    margin-left: 15px;
    animation: blink 1s infinite;
    font-size: 28px;
}

@keyframes blink {
    0%, 100% { opacity: 1; transform: translateX(0); }
    50% { opacity: 0; transform: translateX(10px); }
}

.game-over h2 {
    margin-bottom: 20px;
    font-size: 40px;
    color: #ff6b6b;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    animation: bounceIn 0.5s ease-out;
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); opacity: 1; }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.game-over p {
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: bold;
    animation: fadeInUp 0.5s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

#restartBtn {
    padding: 15px 30px;
    font-size: 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(76, 175, 80, 0.4);
    animation: fadeInUp 0.5s ease-out 0.4s both;
}

#restartBtn:hover {
    background-color: #45a049;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.5);
}