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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: white;
    padding: 10px;
}

#game-container {
    position: relative;
    background: #0a1929;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    padding: 15px;
    width: 100%;
    max-width: 800px;
}

#game-ui {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: bold;
    color: #4fc3f7;
    gap: 8px;
    flex-wrap: wrap;
}

#game-ui > div {
    flex: 1;
    min-width: 80px;
    text-align: center;
}

#gameCanvas {
    display: block;
    background: #000;
    border: 3px solid #1e88e5;
    border-radius: 8px;
    cursor: crosshair;
    width: 100%;
    height: auto;
    max-width: 800px;
    max-height: 600px;
}

#start-screen, #game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 25, 41, 0.98);
    padding: 30px 40px;
    border-radius: 16px;
    text-align: center;
    border: 3px solid #1e88e5;
    box-shadow: 0 0 40px rgba(30, 136, 229, 0.6);
    z-index: 10;
    width: 90%;
    max-width: 500px;
}

.game-logo {
    font-size: 80px;
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(79, 195, 247, 0.8);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

#start-screen h1 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #4fc3f7;
    text-shadow: 0 0 15px rgba(79, 195, 247, 0.6);
    letter-spacing: 1px;
}

#start-screen p {
    font-size: 14px;
    margin: 8px 0;
    color: #90caf9;
}

#game-over h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #ef5350;
}

#final-score {
    font-size: 20px;
    margin-bottom: 20px;
    color: #4fc3f7;
    font-weight: bold;
}

button {
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(30, 136, 229, 0.5);
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    max-width: 250px;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 136, 229, 0.7);
    background: linear-gradient(135deg, #2196f3 0%, #1e88e5 100%);
}

button:active {
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(30, 136, 229, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.4);
    backdrop-filter: blur(10px);
}

.back-button:hover {
    background: rgba(30, 136, 229, 1);
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.6);
}

@media (min-width: 640px) {
    #game-container {
        padding: 20px;
    }
    
    #game-ui {
        font-size: 18px;
    }
    
    #start-screen, #game-over {
        padding: 40px 60px;
    }
    
    .game-logo {
        font-size: 100px;
    }
    
    #start-screen h1 {
        font-size: 42px;
    }
    
    #start-screen p {
        font-size: 16px;
    }
    
    #game-over h2 {
        font-size: 36px;
    }
    
    #final-score {
        font-size: 24px;
    }
    
    button {
        padding: 15px 40px;
        font-size: 18px;
        width: auto;
    }
}

@media (min-width: 1024px) {
    #game-ui {
        font-size: 20px;
    }
    
    #start-screen, #game-over {
        padding: 50px 70px;
    }
    
    .game-logo {
        font-size: 120px;
    }
    
    #start-screen h1 {
        font-size: 52px;
    }
    
    #start-screen p {
        font-size: 18px;
    }
    
    #game-over h2 {
        font-size: 48px;
    }
    
    #final-score {
        font-size: 28px;
    }
    
    button {
        padding: 18px 45px;
        font-size: 22px;
    }
}

@media (max-width: 640px) {
    .back-button {
        top: 10px;
        left: 10px;
        padding: 8px 16px;
        font-size: 14px;
    }
}
