/* Tetris Corner Game - Fixed Button */
.tetris-corner-button {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tetris-corner-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.tetris-corner-button:active {
    transform: scale(0.95);
}

.tetris-icon {
    font-size: 28px;
    line-height: 1;
}

/* Tetris Modal */
.tetris-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.tetris-modal.active {
    display: flex;
}

.tetris-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
}

.tetris-modal-content {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    animation: tetris-modal-in 0.3s ease;
}

@keyframes tetris-modal-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tetris-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tetris-modal-header h2 {
    color: #fff;
    margin: 0;
    font-size: 24px;
    font-family: 'Courier New', monospace;
}

.tetris-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.tetris-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tetris-modal-body {
    display: flex;
    gap: 20px;
    padding: 20px;
}

#tetris-canvas {
    background: #0a0a0a;
    border: 2px solid #333;
    border-radius: 4px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.tetris-info {
    color: #fff;
    font-family: 'Courier New', monospace;
    min-width: 150px;
}

.tetris-score, .tetris-level {
    font-size: 18px;
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.tetris-score span, .tetris-level span {
    color: #4ade80;
    font-weight: bold;
}

.tetris-controls {
    margin-top: 20px;
    font-size: 12px;
    opacity: 0.8;
}

.tetris-controls p {
    margin: 5px 0;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .tetris-modal-body {
        flex-direction: column;
        align-items: center;
    }
    
    #tetris-canvas {
        width: 250px;
        height: 500px;
    }
    
    .tetris-info {
        text-align: center;
    }
    
    .tetris-corner-button {
        width: 50px;
        height: 50px;
    }
    
    .tetris-icon {
        font-size: 22px;
    }
}