@import url('https://fonts.googleapis.com/css2?family=Sriracha&family=Raleway&display=swap');

body {
    font-family: Raleway;
    user-select: none;
}

#game {
    position: absolute;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-color: white;
}

#menu {
    position: absolute;
    margin-top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8));
    overflow-y:scroll;
    background-attachment: fixed;
    background-size: cover;
    overflow-x: hidden;
    /*display: none;*/
}

#menu-heading {
    position: relative;
    margin-top: 0;
    left: 0%;
    height: 50px;
    font-family: Raleway;
    width: 100vw;
    background-color: #40E887;
    font-size: 30px;
    line-height: 50px;
    text-align: center;
    right: 10%;
    font-weight: 900;
}

.lvl {
    position: relative;
    margin-top: 30px;
    left: 10px;
    width: calc(100vw - 20px);
    height: 60px;
    color: white;
    background-color: #00D387;
    text-align: center;
    font-size: 25px;
    font-weight: 600;
    line-height: 60px;
    border-radius: 20px;
}

#level {
    z-index: 1;
    height: 100vh;
    width: 100vw;
    position: absolute;
    top: 0;
    left: 0;
    background-color: white;
    overflow-y: scroll;
    overflow-x: hidden;
    display: none;
}

.lvl:hover {
    background-color: green;
}

.test-tube {
    position: absolute;
    height: 130px;
    width: 40px;
    border: 2px solid rgb(150,150,150);
    border-radius: 2px 2px 20px 20px;
    background-position: 0 10px;
    overflow: hidden;
    transition: 1s linear;
    transform: rotate(0deg);
}

@keyframes glassAnim {
    0%,100% {transform: scale(1);}
    50% {transform: scale(1.05);}
}

.colors {
    position: absolute;
    left: 0;
    height: 30px;
    width: 40px;
}

.water-flow {
    position: absolute;
    width: 5px; /* थोड़ा चौड़ा करें ताकि यह ज्यादा पतला न लगे */
    background-color: red; /* JS में सेट होगा */
    border-radius: 2px 18px 20px 20px; /* ऊपर से हल्का घुमाव और नीचे ज्यादा */
    z-index: 99;
    //box-shadow: inset 0px 0px 5px rgba(0, 0, 0, 0.2); /* हल्का शैडो, जिससे पानी का इफेक्ट आए */
}

#won {
    position: absolute;
    top: 100px;
    left: 0;
    width: 100vw;
    text-align: center;
    font-size: 60px;
    font-weight: 900;
}

const style = document.createElement("style");
style.innerHTML = `
    #won-screen {
            position: absolute;
            top: 100px;
            left: 0;
            width: 100vw;
            font-size: 60px;
            font-weight: 900;


        background: rgba(0, 0, 0, 0.8); /* Dark semi-transparent background */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        color: white;
        font-family: 'Arial', sans-serif;
        z-index: 1000;
    }

    #won-text {
        font-size: 3rem;
        font-weight: bold;
        text-align: center;
        text-transform: uppercase;
        text-shadow: 3px 3px 10px rgba(255, 255, 255, 0.7);
        animation: glow 1.5s infinite alternate;
    }

    @keyframes glow {
        from { text-shadow: 0 0 10px #ffffff, 0 0 20px #ff8c00; }
        to { text-shadow: 0 0 20px #ffffff, 0 0 40px #ff4500; }
    }

#white-bg {
    position: absolute;
    left: 0;
    top: 10px;
    width: 40px;
    height: 10px;
    background-color: white;
    z-index: 1000;
    transition: 1s;
}

#colorful-bg {
    position: absolute;
    width: 100%;
    height: 0;
    z-index: 1000;
    transition: 1s;
}

#restart {
    left: 0;
}

#home {
    left: calc(100vw - 150px);
}

.game-buttons {
    position: fixed;
    top: calc(100vh - 50px);
    height: 50px;
    width: 150px;
    font-size: 25px;
    font-weight: 600;
    text-align: center;
    line-height: 50px;
    background-color: lightgreen;
    border-radius: 10px 10px 0 0;
}

#lvl-heading {
    position: absolute;
    top: 0;
    left: 0;
    height: 50px;
    width: 100vw;
    background-color: yellow;
    border-radius: 0 0 25px 25px;
    font-size: 40px;
    font-weight: 800;
    line-height: 50px;
    text-align: center;
    letter-spacing: 5px;
}

#moves {
    position: fixed;
    top: calc(100vh - 80px);
    width: 150px;
    height: 30px;
    left: 10px;
    font-size: 20px;
}

#rules-btn {
    position: fixed;
    left: calc(100vw - 200px);
    top: calc(100vh - 50px);
    height: 50px;
    width: 200px;
    background-color: lightgreen;
    border-radius: 20px 20px 0 0;
    text-align: center;
    font-size: 25px;
    line-height: 50px;
    font-weight: 500;
}

#rules-page {
    display: none;
    z-index: 1000;
    position: absolute;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-color: rgba(0,0,0,0.5);
    opacity: 0;
    transition: 0.5s linear;
}

#rules {
    position: absolute;
    top: 100px;
    left: 50px;
    height: calc(100vh - 200px);
    width: calc(100vw - 100px);
    background-color: white;
    border-radius: 10px;
}

#rules-heading {
    position: absolute;
    top: 10px;
    left: 0;
    height: 30px;
    width: 100%;
    font-size: 30px;
    font-weight: 800;
    text-align: center;
}

#rules-text {
    position: absolute;
    top: 70px;
    left: 5%;
    width: 90%;
    font-size: 20px;
    height: calc(100vh - 200px - 150px);
    overflow-x: hidden;
}

#back {
    position: absolute;
    top: calc(100% - 120px + 65px + 10px);
    height: 40px;
    width: 100px;
    left: calc(100% - 100px);
    background-color: rgb(100, 255, 100);
    font-size: 20px;
    line-height: 40px;
    text-align: center;
    border-radius: 10px 0 0 10px;
}

#alert-button:hover {
    background-color: rgb(150,255,150);
}

