* {
    padding: 0;
    margin: 0;
    font-family: "Poppins", sans-serif;
}
  
body {
    height: 100vh;
    animation: gradientMove 30s ease infinite;
    background: linear-gradient(45deg, #00ccff, #00ff40, #00b3ff, #00e76c);
    background-size: 300% 300%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}
  
.container {
    background: linear-gradient(45deg, #00ccff, #00ff40, #00b3ff, #00e76c); /* Same gradient */
    background-size: 500% 500%; /* Same background size */
    animation: gradientMove 20s ease infinite; /* Apply the same animation */
    width: 100vw;
    max-width: 50em;
    height: 30vw;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 3em;
    box-shadow: 0 1.2em 2.4em rgba(111, 85, 0, 0.25);
}
  
#options-container {
    text-align: center;
    margin-top: 10%;
    margin-right: 445px;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
}
  
#options-container div {
    width: 75%;
    display: inline-grid;
    justify-content: space-between;
    margin: 0.6em 0 1.2em 37%;
}
  
#options-container button {
    padding: 0.6em 1.2em;
    border: 3px solid #ffffff;
    background-color: #ffffff;
    color: #000000;
    border-radius: 0.3em;
    text-transform: capitalize;
    cursor: pointer;
    margin: 0.3em 0;
}
  
#options-container button:disabled {
    border: 3px solid #808080;
    color: #808080;
    background-color: #efefef;
}

#letter-container button:disabled {
    background-color: #888888;  /* Darker grey */
    color: #ffffff;             /* White text */
    border: 2px solid #555555;  /* Optional: Darker border */
}

  
#options-container button.active {
    background-color: lightblue;
    border: 3px solid #ffffff;
    color: #000000;
}
  
.letter-container {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6em;
}
  
#letter-container button {
    position: initial;
    height: 2.4em;
    width: 2.4em;
    border-radius: 0.3em;
    background-color: #ffffff;
    cursor: pointer;
    line-height: 1.2;
    margin: 0.3em;
    box-sizing: border-box;
}
  
.new-game-popup {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 0.6em;
    background: transparent;
}
  
#user-input-section {
    display: flex;
    position: absolute;
    justify-content: right;
    font-size: 1.8em;
    margin: 0.6em 0 1.2em 0;
    margin-right: 20px;
    transform: translate(-50%, -50%);
    max-width: calc(100% - 300px);
    left: 75%;
    top: 65%;
    right: auto;
}
  
canvas {
    display: flex;
    position: absolute;
    right: 5%;
    top: 30%;
    margin-right: 20px;
    border: 10px solid #1923e6;
    border-radius: 10px;
}
  
.hide {
    display: none;
}
  
#result-text h2 {
    font-size: 1.8em;
    text-align: center;
}
  
#result-text p {
    font-size: 1.25em;
    margin: 1em 0 2em 0;
}
  
#result-text span {
    font-weight: 600;
}
  
#new-game-button {
    font-size: 1.25em;
    padding: 0.5em 1em;
    background-color: #4e86b7;
    border: 3px solid #4e86b7;
    color: #fff;
    border-radius: 0.2em;
    cursor: pointer;
}
  
.win-msg {
    color: #05703e;
}
  
.lose-msg {
    color: #b61212;
}
  
.dashes.space {
    display: inline-block;
    width: 20px;
    text-align: center;
}
  
/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .container {
        width: 90vw;
        height: auto;
        padding: 2em;
        position: relative;
        transform: none;
        top: auto;
        left: auto;
        box-sizing: border-box;
    }

    #options-container {
        margin: 1em auto;
        margin-right: 0;
        font-size: 1em;
        width: 100%;
    }

    #options-container div {
        margin: 0 auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #letter-container {
        gap: 0.4em;
        justify-content: center;
    }

    #letter-container button {
        width: 2em;
        height: 2em;
        font-size: 1em;
    }

    #user-input-section {
        position: static;
        transform: none;
        margin: 1em auto;
        font-size: 1.5em;
        max-width: 100%;
        text-align: center;
    }

    canvas {
        position: static;
        margin: 1em auto;
        display: block;
        max-width: 100%;
        height: auto;
    }

    #new-game-container {
        padding: 1em;
    }

    #result-text h2 {
        font-size: 1.5em;
    }

    #result-text p {
        font-size: 1em;
    }

    #new-game-button {
        font-size: 1.3em;
        padding: 0.65em 1.25em;
    }

    .new-game-popup:not(.hide) {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        height: 25vh;
        padding: 2em;
        box-sizing: border-box;
      }
    
      #result-text {
        text-align: center;
      }
    
      #new-game-button {
        margin-top: 1em;
      }
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}