/* Main */
    body {
        background-image: url(images/background.png);
        font-family: Arial, sans-serif;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100vh;
        margin: 0;
        background-color: #f4f4f9;
    }

    h1 {
        margin-bottom: 10px;
        color: #000000;
    }
/* Main */

/* Title popup */
    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        display: flex;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(5px);
        z-index: 1000;
    }
    
    .modal {
        background: white;
        padding: 30px;
        border-radius: 10px;
        text-align: center;
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    }
    
    .language-select {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 20px;
    }
    
    .language-select button {
        padding: 10px;
        border: none;
        background: #0077cc;
        color: white;
        font-size: 16px;
        cursor: pointer;
        border-radius: 5px;
    }
    
    .language-select button:hover {
        background: #005fa3;
    }
/* Title popup */

/* Popup */
.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 500px;
  }
  
  .popup img {
    width: 80%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
  }
  
  .english-name {
    font-size: 18px;
    color: #0077cc;
    font-weight: bold;
  }
  
  .selected-language {
    font-size: 16px;
    color: #ff6600;
  }
  
  .latin-name {
    font-size: 14px;
    color: #666;
    font-style: italic;
  }

  .popupclose{
    display: none; 
    height: 100%;
    width: 100%;
    position: absolute;

  }
/* Popup */

/* Scoreboard */
    .scoreboard {
        color: #797979;
        display: flex;
        gap: 20px;
        margin-bottom: 20px;
        font-size: 18px;
    }

    .current-player {
        font-weight: bold;
        color: #49b3ff;
    }
/* Scoreboard */


/* Game */
    .grid {
        display: grid;
        grid-template-columns: repeat(6, 80px);
        grid-template-rows: repeat(6, 80px);
        grid-gap: 10px;
    }

    .card {
        width: 80px;
        height: 80px;
        position: relative;
        cursor: pointer;
        transform-style: preserve-3d;
        transition: transform 0.5s ease;
    }

    .card.flipped {
        transform: rotateY(180deg);
    }

    .card .front, .card .back {
        position: absolute;
        width: 100%;
        height: 100%;
        border-radius: 8px;
        backface-visibility: hidden;
    }

    .card .front {
        background-color: #0077cc;
        visibility: visible
    }

    .card .back {
        background-color: #fff;
        transform: rotateY(180deg);
        display: flex;
        align-items: center;
        justify-content: center;
        visibility: hidden; /* Hide initially */
        transition: visibility 0s linear 0.5s, transform 0.5s;
    }
    
    .card.flipped .back {
        visibility: visible; /* Show when flipped */
        transition: visibility 0s linear, transform 0.5s;
    }

    .card .back img {
        width: 100%;
        height: 100%;
        border-radius: 8px;
    }
/* Game */

/* Win Screen */    
    .win-screen {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        flex-direction: column;
        display: none;
    }

    .win-screen button {
        margin-top: 20px;
        padding: 10px 20px;
        font-size: 18px;
        cursor: pointer;
        background-color: white;
        border: none;
        border-radius: 5px;
    }
/* Win Screen */ 