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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.game-container {
    display: flex;
    gap: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 200px;
}

.game-info h1 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-board {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.score-board > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.label {
    font-weight: bold;
    color: #f0f0f0;
}

.score-board span:not(.label) {
    font-size: 18px;
    font-weight: bold;
    color: #4ecdc4;
}

.next-piece {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.next-piece h3 {
    margin-bottom: 10px;
    color: #f0f0f0;
}

#nextCanvas {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
}

.controls {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
}

.controls h3 {
    margin-bottom: 10px;
    color: #f0f0f0;
    text-align: center;
}

.controls p {
    margin: 5px 0;
    font-size: 14px;
    color: #e0e0e0;
    text-align: center;
}

.game-status {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.status-indicator.active {
    background: rgba(78, 205, 196, 0.2);
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.3);
}

.status-indicator .label {
    font-weight: bold;
    color: #f0f0f0;
}

#gravityText {
    color: #4ecdc4;
    font-weight: bold;
}

#gravityText.falling {
    color: #ff6b6b;
    animation: pulse 0.5s infinite alternate;
}

#comboCount {
    color: #ffa500;
    font-weight: bold;
    font-size: 18px;
}

@keyframes pulse {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

.game-board {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease;
}

#gameCanvas.gravity-active {
    box-shadow: 0 4px 20px rgba(78, 205, 196, 0.4);
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid #ff6b6b;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.game-over h2 {
    color: #ff6b6b;
    margin-bottom: 15px;
    font-size: 28px;
}

.game-over p {
    margin-bottom: 20px;
    font-size: 18px;
}

.game-over button {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-over button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.4);
}

.game-over button:active {
    transform: translateY(0);
}

.hidden {
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
        align-items: center;
        padding: 15px;
    }
    
    .game-info {
        order: 2;
        min-width: auto;
        width: 100%;
    }
    
    .game-board {
        order: 1;
    }
    
    #gameCanvas {
        width: 250px;
        height: 500px;
    }
    
    .controls {
        display: none;
    }
}

/* 添加一些动画效果 */
.score-board > div {
    transition: background-color 0.3s ease;
}

.score-board > div:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 5px;
}