@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@700&display=swap');

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

body {
    font-family: 'Comic Neue', cursive;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-container {
    width: 100%;
    max-width: 600px;
    padding: 1rem;
    position: relative;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
    aspect-ratio: 1;
    padding: 0.5rem;
}

.card {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card-front {
    background: linear-gradient(45deg, #64B5F6 0%, #2196F3 100%);
    border: 4px solid #1976D2;
}

.card-back {
    background-color: white;
    transform: rotateY(180deg);
    border: 4px solid #90CAF9;
}

.card:hover .card-front {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 20px;
}

.overlay-content {
    text-align: center;
    color: #1976D2;
    padding: 2rem;
    animation: bounce 1s infinite;
}

.game-rules {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: rgba(33, 150, 243, 0.1);
    border-radius: 12px;
    text-align: left;
}

.game-rules p {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: #1976D2;
    text-align: center;
}

.game-rules ul {
    list-style-type: none;
    padding: 0 1rem;
}

.game-rules li {
    font-size: 1.2rem;
    margin: 0.5rem 0;
    color: #2196F3;
    position: relative;
    padding-left: 1.5rem;
}

.game-rules li:before {
    content: "•";
    color: #1976D2;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -0.2rem;
}

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

.overlay h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #1976D2;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

button {
    background: linear-gradient(45deg, #64B5F6 0%, #2196F3 100%);
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    font-size: 1.4rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Comic Neue', cursive;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

button:active {
    transform: translateY(1px);
}

.hidden {
    display: none;
}

/* Add some fun animations for matched cards */
.card.matched {
    animation: celebrate 0.5s ease-in-out;
}

@keyframes celebrate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
} 