* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.game-header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.game-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.game-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.game-info {
    margin-bottom: 30px;
}

.info-panel {
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.score-section, .target-section {
    text-align: center;
}

.score-section h3, .target-section h3 {
    margin-bottom: 10px;
    color: #4a5568;
}

.score-section span, .target-section span {
    color: #2d3748;
    font-weight: bold;
    font-size: 1.2em;
}

.game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.game-board {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    max-width: 600px;
    width: 100%;
}

.cell {
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, #e6e6e6, #ffffff);
    border: 2px solid #d1d5db;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.cell.selected {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    border-color: #4c51bf;
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);
}

.cell.matched {
    background: linear-gradient(145deg, #48bb78, #38a169);
    color: white;
    border-color: #38a169;
    animation: pulse 0.6s ease-in-out;
}

.cell.removed {
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
}

.btn-secondary {
    background: linear-gradient(145deg, #718096, #4a5568);
    color: white;
}

.btn-warning {
    background: linear-gradient(145deg, #ed8936, #dd6b20);
    color: white;
}

.btn-info {
    background: linear-gradient(145deg, #4299e1, #3182ce);
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.instructions {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    margin-top: 30px;
}

.instructions h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.instructions ul {
    list-style: none;
    padding-left: 0;
}

.instructions li {
    padding: 8px 0;
    color: #4a5568;
    position: relative;
    padding-left: 25px;
}

.instructions li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 90%;
}

.modal-content h2 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.modal-content p {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.modal-content span {
    font-weight: bold;
    color: #667eea;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .game-header h1 {
        font-size: 2rem;
    }
    
    .info-panel {
        flex-direction: column;
        gap: 15px;
    }
    
    .game-board {
        grid-template-columns: repeat(6, 1fr);
        gap: 6px;
        padding: 15px;
    }
    
    .cell {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .game-board {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .cell {
        width: 45px;
        height: 45px;
        font-size: 0.9rem;
    }
} 