 * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Arial', sans-serif;
            user-select: none;
	       -webkit-touch-callout: none;
           -webkit-user-select: none;
		   -khtml-user-select: none;
           -moz-user-select: none;
           -ms-user-select: none;
            user-select: none;
        }
        
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            background: linear-gradient(135deg, #6e8efb, #a777e3);
            touch-action: manipulation;
            overflow: hidden;
        }
        
        .game-container {
            width: 95%;
            max-width: 550px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
            padding: 20px;
            background-color: rgba(255, 255, 255, 0.9);
            border-radius: 15px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
            position: relative;
            overflow: hidden;
			display: none;
        }
        
        .header {
            display: flex;
            justify-content: space-between;
            width: 100%;
        }
        
        .score-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            background: linear-gradient(135deg, #4facfe, #00f2fe);
            padding: 10px 20px;
            border-radius: 10px;
            color: white;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        
        .score-label {
            font-size: 14px;
            font-weight: bold;
        }
        
        .score-value {
            font-size: 24px;
            font-weight: bold;
        }
        
        .grid {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: 8px;
            width: 100%;
            aspect-ratio: 1/1;
        }
        
        .cell {
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: #f0f0f0;
            border-radius: 8px;
            font-size: 0; /* Сначала скрываем текст */
            font-weight: bold;
            color: #333;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            position: relative;
            overflow: hidden;
        }
        
        
        
        .cell-content {
            position: absolute;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 20px;
        }
        
        .cell.hidden .cell-content {
            visibility: hidden;
        }
        
        .cell.hidden {
            background: linear-gradient(135deg, #ff758c, #ff7eb3);
        }
        
        .cell.matched {
            background: linear-gradient(135deg, #56ab2f, #a8e063);
            color: white;
        }
        
        .controls {
            display: flex;
            gap: 15px;
            width: 100%;
        }
        
        button {
            flex: 1;
            padding: 12px;
            border: none;
            border-radius: 8px;
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
			font-size: 18px;
        }
        
        .win-message {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(255, 255, 255, 0.95);
            padding: 30px;
            border-radius: 15px;
            text-align: center;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
            z-index: 100;
            display: none;
            max-width: 90%;
        }
        
        .confetti {
            position: absolute;
            width: 10px;
            height: 10px;
            background-color: #f00;
            border-radius: 50%;
            pointer-events: none;
            z-index: 10;
        }
        
		.cell {
    transition: all 0.3s ease;
    will-change: transform, opacity;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
    
}

.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-height: 660px) {
    .game-container {
        max-width: 350px;
    }
    .cell-content {
        font-size: 12px;
    }
	button {
        font-size: 12px;
    }
	.score-value {
            font-size: 14px;
            font-weight: bold;
        }
		.score-label {
            font-size: 12px;
            font-weight: bold;
        }
}

@media (max-height: 560px) {
    .game-container {
        max-width: 300px;
    }
    .cell-content {
        font-size: 12px;
    }
	button {
        font-size: 12px;
    }
	.score-value {
            font-size: 14px;
            font-weight: bold;
        }
		.score-label {
            font-size: 12px;
            font-weight: bold;
        }
}

@media (max-height: 450px) {
    .game-container {
        max-width: 250px;
    }
    .cell-content {
        font-size: 10px;
    }
	button {
        font-size: 10px;
    }
	.score-value {
            font-size: 10px;
            font-weight: bold;
        }
		.score-label {
            font-size: 8px;
            font-weight: bold;
        }
}

@media (max-height: 350px) {
    .game-container {
        max-width: 200px;
    }
    .cell-content {
        font-size: 10px;
    }
	button {
        font-size: 8px;
    }
	.score-value {
            font-size: 8px;
            font-weight: bold;
        }
		.score-label {
            font-size: 6px;
            font-weight: bold;
        }
}

