/* General Styles */
body {
    background: #121212;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    text-align: center;
    background: #1e1e1e;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 600px;
}

h1 {
    margin-bottom: 30px;
    color: #ffffff;
    font-size: 3em;
    font-weight: bold;
}

/* Buttons */
button {
    padding: 12px 25px;
    font-size: 16px;
    background: #444;
    color: #e0e0e0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin: 10px 5px;
    width: auto;
}

button:hover {
    background: #555;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button:disabled:hover {
    transform: none;
}

/* Game Area */
.game-area {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
    align-items: flex-start;
}

#board {
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: #1e1e1e;
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.next-piece {
    background: #1e1e1e;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    width: 120px;
    height: 120px;
}

.next-piece h3 {
    margin: 0 0 10px 0;
    color: #e0e0e0;
    font-size: 14px;
}

.score-board {
    background: #1e1e1e;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    width: 120px;
}

.score-board div {
    margin-bottom: 10px;
    color: #e0e0e0;
}

.controls {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.game-over {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    display: none;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.game-over h2 {
    color: #ffffff;
    margin-bottom: 15px;
}

.game-over p {
    color: #e0e0e0;
    margin-bottom: 20px;
}

.back-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    background: #666;
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s, transform 0.2s;
}

.back-btn:hover {
    background: #777;
    transform: translateY(-2px);
    text-decoration: none;
    color: #e0e0e0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        width: 95%;
    }
    
    .game-area {
        flex-direction: column;
        align-items: center;
    }
    
    h1 {
        font-size: 2em;
    }
}