body {
    font-family: Arial, sans-serif;
    background: linear-gradient(to right, #663573, #225668 );
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    overflow-x: hidden;
    scroll-behavior: smooth;
    background: linear-gradient(45deg, #663573, #225668, #6643a7);
    background-size: 300% 300%;
    animation: gradientAnimation 20s infinite;
  }
  @keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  #otherPageBtn {
    top: 8%;
    left: 50%;
    padding: 11px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background-color: rgba(183, 135, 93, 0.1);
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    margin-top: 2%;
  }
  #otherPageBtn:hover {
    background-color: #d79a48;
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  }
  
  #otherPageBtn:active {
    background-color: #d79a48;
    transform: scale(1);
  }
  h1 {
    font-size: 2.5rem;
    margin: 1rem 0;
    color: #e3ecf6;
  }
  h3 {
    font-size: 1.2rem;
    margin: 1rem 0;
    color: #dfebee;
  }
  .dropdown-btn {
    background-color: rgba(183, 135, 93, 0.01);
    color: white;
    padding: 15px 30px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}
.dropdown-btn:hover {
    background-color: #207e9a;
    transform: scale(1.05);
}
.dropdown-btn:active {
    background-color: #207e9a;
    transform: scale(1.05);
}
.dropdown-content {
    display: none;
    position: absolute;
    background: #a29cdd;
    min-width: 250px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 5px;
    z-index: 1;
    left: -10%;
}
.dropdown-content p {
    margin: 5px 0;
    color: rgb(0, 0, 0);
}
.disabled {
    pointer-events: none;
    opacity: 0.5;
}
.show {
    display: block;
}
#start-btn {
    background-color: rgba(183, 135, 93, 0.01);
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    cursor: pointer;
}
#start-btn:hover {
    background-color: #27a25a; 
    transform: scale(1.05);
}
#reset-btn {
    background: #27a25a;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}
#start-btn:hover, #reset-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}
#end-btn {
    background:  #d16762;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}
#end-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}
.container {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    padding: 40px 50px 80px 50px;
}
.container {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    padding: 40px 50px 80px 50px;
}

button {
    margin: 10px;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(4, 170px);
    gap: 10px;
    justify-content: center;
}

.card {
    width: 170px;
    height: 170px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    font-size: 20px;
}

.card img {
    width: 90%;
    height: 90%;
    display: none;
}

.card.flipped img {
    display: block;
}

.card.matched {
    border: 4px solid green;
    pointer-events: none;
}

.card.flipped {
    background: rgba(255, 255, 255, 0.2);
}
.timer {
    font-size: 20px;
    margin: 10px;
    font-weight: bold;
    color: rgb(223, 203, 222);
}
#player-display {
    color: white;
}

@media (max-width: 1024px) {
    h1 {
        font-size: 2.2rem;
        margin-top: 5%;
    }

    button {
        font-size: 16px;
        padding: 8px 16px;
    }

    #game-board {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* Automatische Spaltenanpassung */
        grid-gap: 10px;
        max-width: 800px; /* Begrenzung der Breite */
    }
    #otherPageBtn {
        font-size: 0.9rem;
        padding: 10px 18px;
    }

    .dropdown-btn {
        font-size: 0.9rem;
        padding: 14px 16px;
    }
    #start-btn{
        font-size: 0.9rem;
        padding: 14px 16px;
    }
    .message {
        text-align: center;
        font-size: 0.5rem;
        left:50%;
    }
    .container {
        text-align: center;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border-radius: 10px;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
        padding: 10px;
    }
}
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
        margin-top: 5%;
    }

    button {
        font-size: 16px;
        padding: 8px 16px;
    }
    .card {
        width: 80px;
        height: 80px;
    }
    #game-board {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); /* Automatische Spaltenanpassung */
        grid-gap: 6px;
        max-width: 590px; /* Begrenzung der Breite */
    }
    #otherPageBtn {
        font-size: 0.9rem;
        padding: 10px 18px;
    }

    .dropdown-btn {
        font-size: 0.9rem;
        padding: 8px 16px;
    }
    .message {
        text-align: center;
        font-size: 0.5rem;
        left:50%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
        margin-top: 5%;
    }
    button {
        font-size: 14px;
        padding: 6px 12px;
    }
    .card {
        width: 70px;
        height: 70px;
    }
    #game-board {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); /* Automatische Spaltenanpassung */
        grid-gap: 5px;
        max-width: 400px; /* Begrenzung der Breite */
    }
    #otherPageBtn {
        font-size: 0.8rem;
        padding: 8px 14px;
    }
    .dropdown-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    #message {
        text-align: center;
        font-size: 1rem;
        left:50%;
    }

}