* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.label {
    margin-left: 5px;
}

.restart-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(238, 90, 36, 0.4);
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 36, 0.6);
}

.game-board {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

.card {
    aspect-ratio: 3/2;
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    border-radius: 15px;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: scale(1.05);
}

.card.flipped {
    transform: rotateY(180deg);
}

.card.matched {
    transform: rotateY(180deg);
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.card-front {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    transform: rotateY(180deg);
}

.card-back {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    color: #667eea;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.card-back-content {
    font-size: 4rem;
    font-weight: bold;
    color: #667eea;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.motorcycle-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.victory-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.victory-modal.show {
    display: flex;
    animation: fadeIn 0.5s ease;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease;
}

.modal-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #667eea;
}

.modal-content p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #666;
}

.final-stats {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.final-stats p {
    margin: 5px 0;
    font-weight: bold;
    color: #333;
}

.play-again-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .game-board {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .game-stats {
        gap: 15px;
    }
    
    .stat {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .container {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .game-board {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .card-face {
        font-size: 1.5rem;
    }
    
    .motorcycle-image {
        border-radius: 10px;
    }
    
    .card-back-content {
        font-size: 3rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
} 