/* *{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root{
    --bg-main:#464646;
    --bg-card:#2D2727;
    --border-color:#efc745;
}
body{
    background-color: var(--bg-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5rem;
    justify-content: center;
    height: 100vh;
}
#card-section{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}
.card{
    width: 150px;
    height: 150px;
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 2rem;
} */
 /* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

/* Body */
body {
  min-height: 100vh;
  background: #86BBD8;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
}

/* Heading */
h1 {
  color: white;
  margin-bottom: 30px;
  font-size: 40px;
  letter-spacing: 2px;
}

h1 span {
  color: #F6AE2D;
}

#card-section {
  max-width: 1200px;   
  display: grid;
  grid-template-columns: repeat(8, 1fr);   
  gap: 10px;
  justify-items: center;
}

.card {
  background: #33658A;
  border-radius: 15px;
  height: 80px;
  width: 70px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}
/* Hide image initially */
.card img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  visibility: hidden;
}
.card_selected{
    background-color: #F6AE2D;
    transform: scale(1.1);
}

/* Hover Effect */
.card:hover {
  transform: scale(1.00);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
}

.matched {
  background-color: #4CAF50;
  pointer-events: none;
}

 .card {
  transition: transform 0.4s;
}

.card.card_selected {
  transform: rotateY(180deg);
} 
.card.card_selected img {
  visibility: visible;
}

#restart {
  margin-top: 30px;
  padding: 10px 25px;
  background: #F6AE2D;
  color: black;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

#restart:hover {
  background: #f4a300;
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 900px) {
  #card-section {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  #card-section {
    grid-template-columns: repeat(2, 1fr);
  }
}

