#tetris .game-container {
    padding: 20px;
    text-align: center;
    max-width: 90vw;
}

#tetris .game-header {
    margin-bottom: 20px;
}

#tetris .game-header h1 {
    font-size: 2.5rem;
    color: #3080d0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 15px;
}

#tetris .game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

#tetris .score-display {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 1.1rem;
    font-weight: bold;
}

#tetris .next-piece {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

#tetris .next-piece div:first-child {
    font-weight: bold;
    font-size: 1.1rem;
}

#tetris #next-canvas {
    border: 2px solid #444;
    background: #111;
}

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

#tetris #game-canvas {
    border: 3px solid #3080d0;
    background: #000;
    box-shadow: 0 5px 15px rgba(48, 128, 208, 0.3);
}

#tetris .mobile-controls {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

#tetris .control-row {
    display: flex;
    justify-content: center;
    gap: 10px;
}

#tetris .control-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(145deg, #4a4a4a, #2d2d2d);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.1s ease;
    user-select: none;
    touch-action: manipulation;
}

#tetris .control-btn:active {
    transform: scale(0.95);
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    background: linear-gradient(145deg, #2d2d2d, #4a4a4a);
}

#tetris #drop-btn {
    width: 130px;
    font-size: 1rem;
}

#tetris .game-controls {
    margin: 20px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

#tetris .game-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(145deg, #3080d0, #2563eb);
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(48, 128, 208, 0.3);
}

#tetris .game-btn:hover {
    background: linear-gradient(145deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(48, 128, 208, 0.4);
}

#tetris .game-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(48, 128, 208, 0.3);
}

#tetris .game-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#tetris .instructions {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.9rem;
}

#tetris .instructions h3 {
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1rem;
}

#tetris .instructions p {
    margin-bottom: 5px;
}

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

#tetris .game-over.hidden {
    display: none;
}

#tetris .game-over-content {
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    border: 3px solid #3080d0;
    box-shadow: 0 10px 30px rgba(48, 128, 208, 0.3);
    color: white;
}

#tetris .game-over-content h2 {
    font-size: 2rem;
    color: #ff4444;
    margin-bottom: 20px;
}

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

#tetris #final-score {
    color: #3080d0;
    font-weight: bold;
}

@media (max-width: 768px) {
    #tetris .game-container {
        padding: 15px;
        margin: 5px;
    }
    
    #tetris .game-header h1 {
        font-size: 2rem;
    }
    
    #tetris .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    #tetris #game-canvas {
        width: 250px;
        height: 500px;
    }
    
    #tetris .mobile-controls {
        display: flex;
    }
    
    #tetris .instructions {
        font-size: 0.8rem;
    }
    
    #tetris .control-btn {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    #tetris #drop-btn {
        width: 110px;
    }
}

@media (max-width: 480px) {
    #tetris .game-container {
        padding: 10px;
    }
    
    #tetris .game-header h1 {
        font-size: 1.8rem;
    }
    
    #tetris #game-canvas {
        width: 200px;
        height: 400px;
    }
    
    #tetris .control-btn {
        width: 45px;
        height: 45px;
        font-size: 0.9rem;
    }
    
    #tetris #drop-btn {
        width: 95px;
        font-size: 0.9rem;
    }
    
    #tetris .game-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

@media (min-width: 769px) {
    #tetris .mobile-controls {
        display: none !important;
    }
}
