@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');


/* Variables */
:root {
  --bg-color: #14141f;
  --card-color: #2c2c3e;
  --accent: #7f5af0;
  --text: #ffffff;
  --success: #2cb67d;
  --danger: #ff6b6b;
  --stars: rgba(255, 255, 255, 1);
}

* {
  margin: 0;
  padding: 0;
  background-color: rgba(255, 0, 0, 0);
}

/* Global Styles */
body {
  margin: 0;
font-family: 'Montserrat', sans-serif;
  background: var(--bg-color);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  /* justify-content: start; */
  min-height: 100vh;
  padding: 1rem;
    width: 100%;
  /* min-height: 100vh; */
  overflow-x: hidden;
}

h1 {
  margin-bottom: 0.5rem;
  font-size: 2.5rem;
  margin-top: 5vh;
  font-weight: 400;
}

.stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 5vh;
}

/* Game Board Container */
.game-board {
  display: grid;
  max-width: 560px;
  /* width: 100%; */
  grid-gap: 10px;
  justify-content: center;
  margin: 0 auto;
  perspective: 1000px;
}

/* Card Container */
.card {
  width: 80px;
  height: 80px;
  /* border: 0.2px solid #fff; */
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

/* Inner Wrapper for 3D Flip */
.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

/* Flip on .flipped */
.card.flipped .card-inner {
  transform: rotateY(180deg);
}

/* Faces of the Card */
.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: background 0.3s, color 0.3s;
}

/* Front Face (Hidden) */
.card-front {
  background: var(--card-color);
  color: transparent;
}

/* Back Face (Visible on Flip) */
.card-back {
  background: var(--accent);
  color: var(--text);
  transform: rotateY(180deg);
}

/* Matched State Styling */
.card.matched .card-back {
  background: var(--success);
}

/* Responsive Adjustments */
@media (max-width: 600px) {
  .game-board {
    max-width: 420px;
  }
  .card {
    width: 60px;
    height: 60px;
  }
  .card-face {
    font-size: 1.5rem;
  }
}


@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.1;
  }
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background-color: white;
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.35) !important;
  opacity: 0;
  transition: opacity 1s;
  z-index: -1;
}