@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@400;600;800&family=Manrope:wght@300;500;700&display=swap');

header {
    text-align: center;
    font-family: 'Unbounded', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: #FF4D4D;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 0px;
    margin-bottom: 2px; 
}

#timerDisplay {
    font-size: 3rem;
    font-weight: 700;
    color: #D81B60;
    text-shadow: 0px 0px 10px rgba(194, 24, 91, 0.7);
    margin-top: 3px;
    margin-bottom: 3px;
}

#message {
    font-size: 1rem;
    font-weight: 500;
    color: #D6D6D6;
    margin-top: 5px;
    text-transform: uppercase;
}

body { 
    min-height: 100vh; 
    min-width: 90vw; 
    background: linear-gradient(135deg, #0D0D0D, #1A1A1A, #3D003D);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Manrope', sans-serif;
    color: #E1E1E1;
}

.board {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 12px;
    width: 600px;
    margin: auto;
    justify-content: center;
}

.card {
    width: 100px;
    height: 140px;
    cursor: pointer;
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}

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

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


.card-front {
    background: linear-gradient(135deg, rgba(214, 0, 214, 0.9), rgba(20, 0, 20, 0.9));
    color: #FF4D4D;
}


.card-back {
    background: linear-gradient(135deg, #B14BDD, #6276D0);
    transform: rotateY(180deg);
}

#reset {
    display: block;
    margin: 25px auto;
    padding: 14px 28px;
    background: linear-gradient(to right, #7B1FA2, #E63946);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Unbounded', sans-serif;
    text-transform: uppercase;
    transition: transform 0.2s ease, box-shadow 0.3s ease-in-out;
    text-shadow: 0px 0px 10px rgba(255, 0, 255, 0.6);
}

#reset:hover {
    transform: scale(1.05);
    box-shadow: 0px 0px 12px rgba(255, 0, 255, 0.8);
}

.button-container {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

@media (max-width:500px) {
    header
}
@media (max-width: 500px) {
    header {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    .board {
        grid-template-columns: repeat(3, 1fr);
        width: 90%;
    }
    .card {
        width: 80px;
        height: 120px;
    }
}
}