/* Tetris Top Right Modal V6 Styles */

/* Fixed Launch Button */
#tetris-v6-launcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

#tetris-v6-launcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.tetris-v6-icon {
    font-size: 18px;
}

/* Modal Base */
#tetris-v6-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

#tetris-v6-modal.tetris-v6-active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Backdrop - clickable for closing */
.tetris-v6-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

/* Modal Container */
.tetris-v6-container {
    position: relative;
    background: #1a1a2e;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.tetris-v6-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    border-bottom: 2px solid #e94560;
}

.tetris-v6-title {
    margin: 0;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Close Button */
.tetris-v6-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(233, 69, 96, 0.2);
    color: #e94560;
    border: 2px solid #e94560;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tetris-v6-close:hover {
    background: #e94560;
    color: #fff;
    transform: rotate(90deg);
}

/* Game Area */
.tetris-v6-game-area {
    display: flex;
    padding: 20px;
    gap: 20px;
    flex: 1;
    overflow: auto;
}

/* Main Canvas */
#tetris-v6-canvas {
    background: #0f0f23;
    border-radius: 8px;
    border: 3px solid #533483;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Sidebar */
.tetris-v6-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 120px;
}

.tetris-v6-score-box {
    background: #16213e;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    border: 2px solid #533483;
}

.tetris-v6-label {
    color: #a0a0a0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.tetris-v6-value {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.tetris-v6-next {
    background: #16213e;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    border: 2px solid #533483;
}

#tetris-v6-next {
    background: #0f0f23;
    border-radius: 4px;
    margin-top: 8px;
}

/* Controls Info */
.tetris-v6-controls {
    background: #16213e;
    padding: 12px 24px;
    border-top: 1px solid #533483;
}

.tetris-v6-instruction {
    color: #a0a0a0;
    font-size: 12px;
    text-align: center;
}

.tetris-v6-instruction span {
    display: inline-block;
    background: #533483;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    margin: 0 4px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 600px) {
    #tetris-v6-launcher {
        top: 10px;
        right: 10px;
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .tetris-v6-text {
        display: none;
    }
    
    .tetris-v6-game-area {
        flex-direction: column;
        align-items: center;
    }
    
    .tetris-v6-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .tetris-v6-score-box,
    .tetris-v6-next {
        flex: 1;
        min-width: 100px;
    }
}

/* Animation for modal opening */
@keyframes tetris-v6-fade-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#tetris-v6-modal.tetris-v6-active .tetris-v6-container {
    animation: tetris-v6-fade-in 0.3s ease;
}
