* {
    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;
    padding: 20px;
}

.game-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 20px;
    text-align: center;
}

h1 {
    color: #333;
    margin-bottom: 20px;
}

.game-area {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

#tetris {
    border: 2px solid #333;
    background-color: white;
    border-radius: 5px;
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 120px;
}

.next-piece-container, .score-container {
    background-color: #f8f8f8;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

#nextPiece {
    background-color: white;
    border: 1px solid #333;
    border-radius: 3px;
}

.score-container h3 {
    margin: 5px 0;
    color: #333;
}

button {
    padding: 10px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

.instructions {
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

@media (max-width: 768px) {
    .game-area {
        flex-direction: column;
        align-items: center;
    }
    
    .side-panel {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    #tetris {
        width: 240px;
        height: 480px;
    }
    
    #nextPiece {
        width: 100px;
        height: 100px;
    }
}