/* Стилі для міні-гри Tetris */
.tetris-game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    color: white;
    font-family: 'Arial', sans-serif;
}

.tetris-header {
    text-align: center;
    margin-bottom: 20px;
}

.tetris-header h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #00FF00;
}

.tetris-info {
    font-size: 14px;
    margin-bottom: 10px;
}

.tetris-controls {
    font-size: 12px;
    color: #CCCCCC;
    margin-top: 5px;
}

#tetris-canvas {
    border: 2px solid #FFFFFF;
    background-color: #000000;
    margin-bottom: 15px;
}

/* Панель кнопок керування */
.tetris-controls-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.tetris-btn-row {
    display: flex;
    gap: 15px;
    align-items: center;
}

.tetris-control-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.tetris-control-btn:active {
    background-color: #45a049;
    transform: translateY(2px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.tetris-rotate-btn {
    background-color: #FF9800;
}

.tetris-rotate-btn:active {
    background-color: #F57C00;
}

.tetris-left-btn:active,
.tetris-right-btn:active {
    background-color: #45a049;
}

.tetris-down-btn {
    background-color: #2196F3;
}

.tetris-down-btn:active {
    background-color: #1976D2;
}

.tetris-touch-zone {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    touch-action: none;
    pointer-events: none;
}

/* Повідомлення про перемогу */
.tetris-win-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 100, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tetris-win-content {
    background-color: #ffffff;
    color: #000000;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.tetris-win-content h2 {
    margin-top: 0;
    color: #00AA00;
}

/* Повідомлення про програш */
.tetris-game-over-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(100, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tetris-game-over-content {
    background-color: #ffffff;
    color: #000000;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.tetris-game-over-content h2 {
    margin-top: 0;
    color: #AA0000;
}

/* Кнопки */
.tetris-close-btn,
.tetris-restart-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.tetris-close-btn:hover,
.tetris-restart-btn:hover {
    background-color: #45a049;
}

.tetris-restart-btn {
    background-color: #2196F3;
}

.tetris-restart-btn:hover {
    background-color: #1976D2;
}

/* Адаптивність для мобільних пристроїв */
@media (max-width: 768px) {
    .tetris-header h3 {
        font-size: 20px;
    }
    
    .tetris-info {
        font-size: 12px;
    }
    
    #tetris-canvas {
        transform: scale(0.9);
        margin-bottom: 10px;
    }
    
    .tetris-controls-panel {
        margin-bottom: 15px;
    }
    
    .tetris-control-btn {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
    
    .tetris-btn-row {
        gap: 20px;
    }
    
    .tetris-win-content,
    .tetris-game-over-content {
        padding: 20px;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    #tetris-canvas {
        transform: scale(0.8);
    }
    
    .tetris-control-btn {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .tetris-btn-row {
        gap: 25px;
    }
}
