/**
 * Tetris Corner Master - Styles
 * Version: 1.0.1
 */

/* Fixed Corner Button */
.tcm-corner-master-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9998;
    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: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
}

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

.tcm-corner-master-btn:active {
    transform: translateY(0) scale(0.98);
}

.tcm-corner-master-btn .tcm-cm-icon {
    font-size: 18px;
    line-height: 1;
}

.tcm-corner-master-btn .tcm-cm-text {
    line-height: 1;
}

/* Responsive: hide text on small screens */
@media (max-width: 480px) {
    .tcm-corner-master-btn {
        padding: 10px 14px;
    }
    .tcm-corner-master-btn .tcm-cm-text {
        display: none;
    }
}

/* Modal Overlay */
.tcm-corner-master-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tcm-corner-master-modal.tcm-cm-active {
    opacity: 1;
    visibility: visible;
}

.tcm-corner-master-content {
    background: linear-gradient(145deg, #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;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.tcm-corner-master-modal.tcm-cm-active .tcm-corner-master-content {
    transform: scale(1);
}

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

.tcm-corner-master-title {
    margin: 0;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.tcm-corner-master-close:hover {
    background: rgba(239, 68, 68, 0.8);
    transform: rotate(90deg);
}

.tcm-corner-master-close-icon {
    line-height: 1;
    margin-top: -2px;
}

/* Modal Body */
.tcm-corner-master-body {
    padding: 20px 24px 24px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Game Canvas */
#tcm-corner-master-canvas {
    background: #0f0f23;
    border: 3px solid #667eea;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

/* Controls Panel */
.tcm-corner-master-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 200px;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.tcm-corner-master-score-board {
    background: rgba(0, 0, 0, 0.4);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tcm-corner-master-score-board > div {
    margin-bottom: 8px;
    font-size: 14px;
    color: #a0aec0;
}

.tcm-corner-master-score-board > div:last-child {
    margin-bottom: 0;
}

.tcm-corner-master-score-board span {
    color: #fff;
    font-weight: 600;
    font-size: 16px;
}

.tcm-corner-master-keyboard-hint {
    background: rgba(0, 0, 0, 0.4);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    line-height: 1.6;
}

.tcm-corner-master-keyboard-hint p {
    margin: 0 0 8px;
}

.tcm-corner-master-keyboard-hint p:last-child {
    margin-bottom: 0;
    color: #a0aec0;
}

/* Responsive Layout */
@media (max-width: 768px) {
    .tcm-corner-master-body {
        flex-direction: column;
        align-items: center;
    }
    
    .tcm-corner-master-controls {
        width: 100%;
        max-width: 300px;
    }
    
    #tcm-corner-master-canvas {
        max-width: 100%;
        height: auto;
    }
}

/* Animation for button attention */
@keyframes tcm-cm-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);
    }
}

.tcm-corner-master-btn.tcm-cm-attention {
    animation: tcm-cm-pulse 2s ease-in-out infinite;
}