body {
    margin: 0;
    padding: 0;
    background-color: #222;
    color: aliceblue;
}

.header {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    gap: 30px;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #333;
}

.header h1 {
    margin: 0;
    font-weight: 900;
    color: aliceblue;
}

.header .info {
    display: flex;
    gap: 20px;
}

.header .score, .header .timer {
    font-size: 18px;
    font-weight: 700;
    color: aliceblue;
}

.buttons {
    display: flex;
    gap: 10px;
    width: 50%;
    margin: 20px auto;
}

.buttons button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    width: calc(100% / 5);
    font-weight: 700;
    color: aliceblue;
    background-color: #555;
    border: none;
    border-radius: 15px;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 50%;
    margin: 0 auto;
}


.game-board .card {
  width: 100%;
  height: 150px;
  perspective: 1000px;
  cursor: pointer;
  display: none;
}

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

.card.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;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.card-front {
  background-color: #2c3e50;
  color: white;
}

.card-back {
  background-color: #ecf0f1;
  color: #2c3e50;
  font-size: 30px;
  font-weight: 700;
  transform: rotateY(180deg);
}

.card.matched .card-front {
  background-color: #27ae60;
}

.card.matched .card-back {
  background-color: #27ae60;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        height: auto;
        gap: 10px;
        padding: 20px;
    }
    .header h1 {
        font-size: 24px;
    }
    .header .info {
        flex-direction: column;
        gap: 5px;
    }
    .header .score, .header .timer {
        font-size: 16px;
    }
    .game-board {
        width: 90%;
    }
    .buttons {
        width: 90%;
        margin: 10px auto;
        gap: 5px;
        flex-wrap: wrap;
        justify-content: center;
        flex-direction: column;
    }
    .buttons button {
        width: 100%;
        font-size: 14px;
    }
}
