* {
    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: #fff;
}

.game-container {
    text-align: center;
}

.game-container h1 {
    margin-bottom: 20px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.game-wrapper {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
}

.canvas-wrapper {
    border: 4px solid #fff;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: #000;
}

.canvas-wrapper canvas {
    display: block;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 150px;
}

.score-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.score-box h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.score-box p {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffd700;
}

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

.next-piece-box h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.next-piece-box canvas {
    background: #000;
    border: 2px solid #fff;
    border-radius: 4px;
    margin: 0 auto;
}

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

.controls-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.controls-info ul {
    list-style: none;
    padding-left: 0;
}

.controls-info li {
    padding: 5px 0;
    font-size: 0.9rem;
}

.controls-info li:first-child {
    color: #ffd700;
    font-weight: bold;
}

#startBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: bold;
}

#startBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#startBtn:active {
    transform: translateY(0);
}

#startBtn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

.game-over-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-over-content {
    background: #fff;
    color: #333;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.game-over-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #e74c3c;
}

.game-over-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.game-over-content button {
    background: #27ae60;
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.game-over-content button:hover {
    background: #2ecc71;
}