* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    background-color: #000;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#game-canvas {
    display: block;
    background-color: #87CEEB;
    width: 100%;
    height: 100%;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    z-index: 10;
}

.screen.hidden {
    display: none;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #4CAF50;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #FF5722;
}

p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.instructions {
    font-size: 1rem;
    margin: 1rem 2rem;
    line-height: 1.5;
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    margin: 0.5rem;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #45a049;
}

button:active {
    transform: scale(0.98);
}

#countdown-text {
    font-size: 8rem;
    font-weight: bold;
    color: #FFEB3B;
}

#ui {
    position: absolute;
    top: 1rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    z-index: 5;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

#score {
    flex: 1;
    text-align: left;
}

#diamonds-left {
    flex: 1;
    text-align: center;
}

#pause-btn {
    background-color: #2196F3;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    flex: 0 0 auto;
}

#pause-btn:hover {
    background-color: #0b7dda;
}

@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    p {
        font-size: 1rem;
    }
    
    .instructions {
        font-size: 0.9rem;
        margin: 1rem;
    }
    
    button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    #countdown-text {
        font-size: 6rem;
    }
    
    #ui {
        font-size: 1rem;
        padding: 0 0.5rem;
    }
    
    #pause-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}