* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #bf2727;
    font-family: Arial, sans-serif;
    color: white;
    overflow: hidden;
}

#gameContainer {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

#startScreen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
}

#startButton {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 20px;
}

#startButton:hover {
    transform: scale(1.05);
}

#gameScreen {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameStatus {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 18px;
    color: #FFF;
    background-color: rgba(106, 211, 7, 0.2);
    padding: 10px;
    border-radius: 5px;
    z-index: 10;
}

#gameStatus div {
    margin-bottom: 5px;
}

#gameCanvas {
    border: 2px solid #333;
    background-color: rgba(177, 21, 198, 0.1);
}

#nextPiece {
    position: absolute;
    top: 150px;
    right: 20px;
    background-color: rgba(16, 179, 108, 0.3);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

#nextPiece h4 {
    margin-bottom: 10px;
    color: white;
}

#nextCanvas {
    border: 1px solid #555;
    background-color: rgba(255, 255, 255, 0.1);
}

#mobileJoystick {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 100px;
    height: 100px;
}

#joystickBase {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

#joystickKnob {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.1s ease;
}

#mobileButtons {
    position: absolute;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#mobileButtons button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

#mobileButtons button:active {
    background-color: rgba(255, 255, 255, 0.4);
}

#gameOverPopup {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#gameOverContent {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#gameOverContent h2 {
    margin-bottom: 20px;
    font-size: 24px;
}

#gameOverContent div {
    margin-bottom: 10px;
    font-size: 16px;
}

#playAgainBtn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.2s;
}

#playAgainBtn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    #gameStatus {
        font-size: 14px;
        padding: 8px;
    }
    
    #nextPiece {
        right: 10px;
        top: 120px;
        padding: 10px;
    }
    
    #gameOverContent {
        padding: 20px;
        margin: 20px;
    }
}