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

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f6fa;
    color: #2d3436;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 10px;
    margin: 0;
    overflow-x: hidden;
}

.game-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    max-height: 95vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Game header */
.game-header {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.score-container {
    display: flex;
    gap: 10px;
}

.score-box {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.score-label {
    font-weight: 600;
    margin-right: 5px;
}

/* Game area */
.game-area {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    display: flex;
    padding: 10px;
    gap: 10px;
    justify-content: center;
}

/* Style for the sidebars */
.game-sidebar {
    flex: 0 0 150px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Center the game board */
.game-board-container {
    position: relative;
    flex: 0 0 300px;
}

#game-board {
    background-color: #f8f9fa;
    border: 2px solid #ddd;
    display: block;
    height: auto;
    max-height: 70vh;
}

.game-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.next-piece-container, .controls-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.next-piece-container h3, .controls-container h3 {
    margin-bottom: 10px;
    color: #6c5ce7;
    font-size: 1.2rem;
}

#next-piece {
    background-color: white;
    border: 1px solid #ddd;
    display: block;
    margin: 0 auto;
}

.controls-list {
    list-style: none;
}

.controls-list li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.key {
    display: inline-block;
    background-color: #ddd;
    border-radius: 4px;
    padding: 2px 8px;
    margin-right: 10px;
    font-family: monospace;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
}

/* Game footer */
.game-footer {
    padding: 10px 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
    border-top: 1px solid #eee;
}

button, .back-button {
    background-color: #6c5ce7;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

button:hover, .back-button:hover {
    background-color: #5649c0;
    transform: translateY(-2px);
}

.sound-on {
    background-color: #00b894;
}

.sound-off {
    background-color: #d63031;
}

.back-button {
    background-color: #2d3436;
}

.back-button:hover {
    background-color: #1e2527;
}

/* Overlays */
#game-over-overlay, #pause-overlay {
    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: 10;
}

.game-over-content, .pause-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    width: 80%;
}

.game-over-content h2, .pause-content h2 {
    margin-bottom: 15px;
    color: #6c5ce7;
}

.game-over-content p {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

/* Style for the scores sidebar */
.scores-sidebar .score-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.scores-sidebar .score-box {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.scores-sidebar .score-label {
    font-weight: 600;
    color: #6c5ce7;
    margin-bottom: 5px;
    font-size: 1rem;
}

.scores-sidebar .score-value {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .game-area {
        flex-direction: column;
        align-items: center;
    }
    
    .game-sidebar {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
    }
    
    .scores-sidebar .score-container {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .scores-sidebar .score-box {
        flex: 1;
    }
    
    .info-sidebar {
        flex-direction: row;
    }
    
    .next-piece-container, .controls-container {
        flex: 1;
    }
}

@media (max-width: 576px) {
    .scores-sidebar .score-container {
        flex-direction: row;
    }
    
    .info-sidebar {
        flex-direction: column;
    }
}

/* Adjust game board size for smaller screens */
@media (max-height: 700px) {
    .game-header {
        padding: 5px 10px;
    }
    
    .game-header h1 {
        font-size: 1.2rem;
    }
    
    .score-box {
        padding: 3px 8px;
        font-size: 0.8rem;
    }
    
    #game-board {
        max-height: 60vh;
    }
    
    .next-piece-container h3, .controls-container h3 {
        margin-bottom: 5px;
        font-size: 1rem;
    }
    
    .controls-list li {
        margin-bottom: 5px;
        font-size: 0.9rem;
    }
    
    button, .back-button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
} 