/* Tetris Corner Classic - Fixed Button & Modal Styles */

/* Fixed Button - Top Right Corner */
.tetris-fixed-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    animation: tetris-pulse 2s infinite;
}

.tetris-fixed-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.tetris-fixed-btn:active {
    transform: scale(0.98);
}

.tetris-icon {
    font-size: 20px;
}

.tetris-label {
    display: inline-block;
}

@keyframes tetris-pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(102, 126, 234, 0.7);
    }
}

/* Modal Overlay */
.tetris-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
}

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

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

.tetris-modal-content {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    box-shadow: 0 20px 60px 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) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Modal Header */
.tetris-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.tetris-title {
    margin: 0;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
}

.tetris-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tetris-close-btn:hover {
    background: rgba(231, 76, 60, 0.8);
    transform: rotate(90deg);
}

.tetris-close-btn:active {
    transform: rotate(90deg) scale(0.9);
}

/* Modal Body & Game */
.tetris-modal-body {
    padding: 24px;
}

.tetris-game-container {
    display: flex;
    gap: 24px;
}

#tetris-canvas {
    background: #0a0a0a;
    border: 3px solid rgba(102, 126, 234, 0.5);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}

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

.tetris-score-box {
    background: rgba(0, 0, 0, 0.4);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tetris-score-box .tetris-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

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

.tetris-next-box {
    background: rgba(0, 0, 0, 0.4);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tetris-next-box .tetris-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

#tetris-next {
    background: #0a0a0a;
    border-radius: 4px;
}

.tetris-controls-info {
    background: rgba(0, 0, 0, 0.4);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    line-height: 1.6;
}

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

.tetris-controls-info strong {
    color: #667eea;
    display: block;
    margin-bottom: 8px;
}

.tetris-start-btn {
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin-top: auto;
}

.tetris-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

/* Responsive */
@media (max-width: 768px) {
    .tetris-fixed-btn {
        top: 10px;
        right: 10px;
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .tetris-icon {
        font-size: 16px;
    }
    
    .tetris-game-container {
        flex-direction: column;
        align-items: center;
    }
    
    #tetris-canvas {
        max-width: 100%;
        height: auto;
    }
    
    .tetris-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    .tetris-controls-info {
        display: none;
    }
}
