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

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

.game-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 20px;
    max-width: 800px;
    width: 100%;
    text-align: center;
}

h1 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    flex-wrap: wrap;
    gap: 10px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.info-item span:first-child {
    color: #718096;
}

.info-item span:last-child {
    color: #2d3748;
    font-weight: bold;
}

.game-main {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

#gameCanvas {
    border: 3px solid #2d3748;
    border-radius: 10px;
    background: #1a202c;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.game-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.next-piece {
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    width: 100%;
}

.next-piece h3 {
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

#nextCanvas {
    border: 2px solid #2d3748;
    border-radius: 8px;
    background: #1a202c;
    display: block;
    margin: 0 auto;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.control-btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #4299e1;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#pauseBtn {
    background: #ed8936;
}

#resetBtn {
    background: #f56565;
}

.instructions {
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
}

.instructions h3 {
    color: #4a5568;
    margin-bottom: 10px;
}

.instructions p {
    color: #718096;
    margin: 5px 0;
    font-size: 0.95rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-container {
        margin: 10px;
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .game-info {
        flex-direction: column;
        align-items: center;
    }
    
    .info-item {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .game-main {
        flex-direction: column;
        align-items: center;
    }
    
    #gameCanvas {
        width: 100%;
        max-width: 300px;
        height: auto;
    }
    
    .game-sidebar {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    #gameCanvas {
        max-width: 250px;
    }
    
    #nextCanvas {
        width: 100px;
        height: 100px;
    }
}