* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #e0f7ff 0%, #f0f8ff 50%, #e6e9ff 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    text-align: center;
    padding: 20px;
    max-width: 800px;
    width: 100%;
}

h1 {
    color: #8b4513;
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.game-info {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.game-info p {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
}

.score {
    font-size: 1.8em;
    color: #8b4513;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 20px auto;
    max-width: 800px;
    perspective: 1000px;
}

.card {
    aspect-ratio: 1;
    background-image: url('./images/card-back.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 15px;
}

.card.flipped {
    background-image: none;
    background-color: white;
    transform: rotateY(180deg);
}

.card.flipped img {
    opacity: 1;
}

.card.matched {
    background-image: none;
    background-color: #90ee90;
    cursor: default;
    animation: celebrate 0.5s ease;
}

@keyframes celebrate {
    0% { transform: scale(1) rotate(0); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0); }
}

.card.matched img {
    opacity: 1;
}

#startGame {
    background: linear-gradient(45deg, #8b4513, #a0522d);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.3em;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 20px;
}

#startGame:hover {
    background: linear-gradient(45deg, #a0522d, #8b4513);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#startGame:active {
    transform: translateY(1px);
}

@media (max-width: 600px) {
    .game-board {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
        padding: 0 10px;
        gap: 10px;
    }
    
    .card img {
        width: 70%;
        height: 70%;
    }
    
    h1 {
        font-size: 2em;
    }
} 