* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

body {
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    display: flex;
    gap: 30px;
    max-width: 900px;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.game-info {
    width: 250px;
}

h1 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.score-container {
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.score-container p {
    margin: 8px 0;
    font-size: 16px;
    color: #333;
}

.next-piece {
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.next-piece p {
    margin-bottom: 10px;
    font-weight: bold;
}

#next-piece-display {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 2px;
}

.controls {
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.controls p {
    margin-bottom: 10px;
    font-weight: bold;
}

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

.controls li {
    margin: 8px 0;
    font-size: 14px;
}

button {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

#restart-button {
    background-color: #f44336;
}

#restart-button:hover {
    background-color: #d32f2f;
}

.game-board-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

#game-board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(20, 1fr);
    gap: 1px;
    width: 300px;
    height: 600px;
    background-color: #eee;
    border: 2px solid #333;
}

.cell {
    width: 100%;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.cell.filled {
    border: 1px solid rgba(0, 0, 0, 0.3);
}

.cell.ghost {
    opacity: 0.3;
    z-index: 1;
}

.cell.filled:not(.ghost) {
    z-index: 2;
}

.I {
    background-color: #00f0f0;
}

.J {
    background-color: #0000f0;
}

.L {
    background-color: #f0a000;
}

.O {
    background-color: #f0f000;
}

.S {
    background-color: #00f000;
}

.T {
    background-color: #a000f0;
}

.Z {
    background-color: #f00000;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    width: 300px;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

.modal-content p {
    margin-bottom: 20px;
    font-size: 18px;
}

#play-again-button {
    background-color: #4CAF50;
}

#play-again-button:hover {
    background-color: #45a049;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        align-items: center;
    }
    
    .game-info {
        width: 100%;
        max-width: 300px;
        margin-bottom: 20px;
    }
    
    #game-board {
        width: 250px;
        height: 500px;
    }
} 