* {
    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;
    color: #333;
}

.game-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 800px;
    width: 100%;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.game-header h1 {
    font-size: 28px;
    color: #333;
}

.score-container {
    display: flex;
    gap: 20px;
}

.score, .level, .lines {
    text-align: center;
    background-color: #f8f8f8;
    padding: 10px 15px;
    border-radius: 5px;
    min-width: 80px;
}

.score p, .level p, .lines p {
    font-size: 14px;
    margin-bottom: 5px;
    color: #666;
}

.score span, .level span, .lines span {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.game-area {
    display: flex;
    gap: 20px;
}

#game-board {
    border: 2px solid #333;
    background-color: #f8f8f8;
}

.game-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.next-piece {
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

.next-piece h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #555;
}

#next-piece {
    background-color: #fff;
    border: 1px solid #ddd;
}

.controls {
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 5px;
}

.controls h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #555;
    text-align: center;
}

.controls ul {
    list-style-type: none;
}

.controls li {
    margin-bottom: 8px;
    font-size: 14px;
}

.buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

#pause-button {
    background-color: #2196F3;
}

#pause-button:hover {
    background-color: #0b7dda;
}

#game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-over-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.game-over-content h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.game-over-content p {
    font-size: 18px;
    margin-bottom: 20px;
    color: #555;
}

#restart-button {
    background-color: #f44336;
}

#restart-button:hover {
    background-color: #d32f2f;
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .game-area {
        flex-direction: column;
    }
    
    .game-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .game-container {
        padding: 15px;
    }
}