* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #141e30, #243b55);
    color: white;

    display: flex;
    justify-content: center;
    align-items: center;
}

.game-container {
    width: 90%;
    max-width: 600px;
    text-align: center;
}

h1 {
    font-size: 36px;
    margin-bottom: 25px;
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 18px;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

#restartBtn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    background: white;
    color: #243b55;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

#restartBtn:hover {
    transform: scale(1.05);
}

.card {
    height: 100px;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;

    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;

    top: 0;
    left: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    border-radius: 12px;

    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.card-back {
    background: #243b55;
    color: white;
    font-size: 32px;
    font-weight: bold;

    transform: rotateY(0deg);
}

.card-front {
    background: #1f2937;
    font-size: 40px;

    transform: rotateY(180deg);
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card:hover {
    transform: translateY(-5px);
}
#winMessage {
    font-size: 28px;
    font-weight: bold;
    margin: 20px 0;
    min-height: 35px;
}
#gameScreen {
    display: none;
}

#winScreen {
    display: none;
}
#startBtn,
#playAgainBtn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    background: white;
    color: #243b55;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
}

#startBtn:hover,
#playAgainBtn:hover {
    transform: scale(1.05);
}
.welcome-emojis {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 20px;
    font-size: 38px;
}

.welcome-emojis span {
    display: inline-block;
    animation: floatEmoji 2s ease-in-out infinite;
}

.welcome-emojis span:nth-child(2) {
    animation-delay: 0.2s;
}

.welcome-emojis span:nth-child(3) {
    animation-delay: 0.4s;
}

.welcome-emojis span:nth-child(4) {
    animation-delay: 0.6s;
}

@keyframes floatEmoji {

    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}
/* Responsive Design */

@media (max-width: 600px) {

    .game-container {
        width: 95%;
        max-width: 400px;
    }

    h1 {
        font-size: 28px;
        margin-bottom: 20px;
    }

    .game-info {
        font-size: 15px;
        margin-bottom: 15px;
    }

    .game-board {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .card {
        height: 75px;
    }

    .card-front {
        font-size: 30px;
    }

    .card-back {
        font-size: 24px;
    }

    #startScreen p,
    #winScreen p {
        font-size: 16px;
    }

    #startBtn,
    #playAgainBtn {
        padding: 10px 22px;
        font-size: 14px;
    }

    .welcome-emojis {
        font-size: 30px;
        gap: 12px;
    }
}