
/* Button Styling */
button {
    margin-top: 2px;
    margin-right: 2px;
    min-width: 30px;
    padding: 15px;
    border: 1px solid #555;
    border-radius: 15%;
    background-color: transparent;
    color: #333;
    font-size: 22px;
    transition: background-color 0.3s, transform 0.2s;
}
button:hover {
    background-color: rgba(155, 155, 155, 0.3);
    transform: scale(1.05);
}

/* General Styling */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
}

h1 {
    margin-top: 10px;
    margin-bottom: 10px;
    color: #444;
    font-size: 2.5em;
    text-align: center;
}

.game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px;
}

.memory-board {
    display: grid;
    grid-template-columns: repeat(6, 80px);
    grid-gap: 12px;
    margin-top: 20px;
}

.card {
    width: 80px;
    height: 80px;
    background-color: #3a3a3a;
    color: white;
    font-size: 2em;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 10px;
    user-select: none;
    transition: transform 0.2s ease, background-color 0.3s;
}
.card:hover {
    background-color: #666;
    transform: scale(1.05);
}

.card.flipped,
.card.matched {
    background-color: #4CAF50;
    color: white;
    cursor: default;
    transform: rotateY(180deg);
}

/* Popup Styling */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s;
}

.popup-content {
    background-color: #fff;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 320px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.popup-title {
    color: #333;
}

.popup-content h2 {
    margin-top: 0;
    font-size: 1.6em;
    color: #444;
}

.popup-content p {
    margin: 10px 0;
    font-size: 1em;
    color: #666;
}

.popup-content ul {
    padding: 0px 20px;
}

.popup-content li {
    padding-top: 4px;
    text-align: left;
}

.game-ended {
    background-color: #fff;
    padding: 10px;
    position: absolute;
    top: 360px;
    border-radius: 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.close {
    position: relative;
    top: -15px;
    right: -165px;
    font-size: 24px;
    cursor: pointer;
    color: #555;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    h1 {
        font-size: 1.7em;
    }

    .memory-board {
        grid-template-columns: repeat(6, 55px);
    }

    .card {
        width: 55px;
        height: 55px;
        font-size: 1.5em;
    }

    button {
        padding: 8px 16px;
        font-size: 0.9em;
    }

    .popup-content h2 {
        font-size: 1.3em;
    }

    .popup-content p {
        font-size: 0.9em;
    }

    .game-ended {
      top: 275px;
    }
}

@media (max-width: 400px) {
    .memory-board {
        grid-template-columns: repeat(6, 50px);
    }

    .card {
        width: 50px;
        height: 50px;
        font-size: 1.2em;
    }

    button {
        padding: 6px 12px;
        font-size: 0.8em;
    }

    .popup-content h2 {
        font-size: 1.1em;
    }

    .popup-content p {
        font-size: 0.85em;
    }

    .game-ended {
      top: 256px;
    }
}

@keyframes bounceAnimation {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  70% {
    transform: scale(1.15);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

#gameEndedMessage {
    animation: bounceAnimation 0.7s ease-out;
}

.techpals-link {
  padding-left: 5px;
}

/* ---- Heartbeat copyright ---- */
@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

.copyright {
  display: inline-flex;
  align-items: center;
  font-size: 16px; /* Adjust as needed */
}

.heart {
  color: red;
  animation: heartbeat 1s infinite;
  display: inline-block;
  margin: 0 5px;
}

