/* Define custom font */
@font-face {
    font-family: "Alcubierre";
    src: url("assets/fonts/Alcubierre.otf");
}

/* Set body background color */
body {
    background-color: #eccfff;
}

/* Apply font family and text color to all elements */
* {
    font-family: "Alcubierre";
    color: #FFFFFF;
}

/* Style the main container using grid layout */
#main{
    display: grid;
    justify-items: center;
    grid-template-columns: auto auto;
    grid-template-rows: 5vw 8vw 5vw 5vw 5vw;
    width: 30vw;
    height: 30vw;
    background-color: rgb(23, 0, 73);
    border-radius: 3vw;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Style the title element */
#title {
    grid-area: 1 / 1 / 2 / 3;
    font-size: 2.3vw;
    font-weight: 900;
    user-select: none;
    justify-self: center;
    align-self: center;
}

/* Style the display element for generated random numbers */
#display {
    grid-area: 2 / 1 / 3 / 3;
    font-size: 7vw;
    justify-self: center;
    align-self: center;
    overflow: hidden;
}

/* Style the generate button */
#button0{
    width: 25vw;
    height: 4vw;
    font-size: 2.5vw;
    border-radius: 10vw;
    border-width: 0;
    user-select: none;
    background-color: rgb(38, 0, 120);
    grid-area: 5 / 1 / 6 / 3;
    align-self: center;
    justify-self: center;
    transition: box-shadow 0.3s;
}

/* Button hover effect */
#button0:hover {
    box-shadow: #000 0.3vw 0.3vw;
    background-color: rgb(47, 3, 142); 
}

/* Button active state */
#button0:active {
    background-color: rgb(18, 0, 57);
}

/* Style the text elements */
.text{
    font-weight: 900;
    user-select: none;
    align-self: center;
    justify-self: center;
    font-size: 2vw;
}
#text0{
    grid-area: 3 / 1 / 4 / 2;
}
#text1{
    grid-area: 4 / 1 / 5 / 2;
}

/* Style the input fields */
input{
    width: 10vw;
    border-radius: 10vw;
    border-width: 0;
    background-color: #f6e8ff;
    color: #000;
    font-weight: bold;
    align-self: center;
    justify-self: center;
    text-align: center;
    height: 2vw;
    font-size: 1vw;
}
#input0{
    grid-area: 3 / 2 / 4 / 3;
}
#input1{
    grid-area: 4 / 2 / 5 / 3;
}


/* Remove spin buttons in number inputs */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

/* Style placeholder text in input fields */
#input::placeholder {
    opacity: 50%;
    color: rgb(23, 0, 73);
}

/* Style text selection */
#input::selection {
    color: #7b00ff;
    background-color: #7b00ff17;
}

/* Style the GitHub link */
#git {
    text-decoration: none;
    user-select: none;
    cursor: default;
}

/* Style text selection throughout the page */
*::selection {
    color: #AFFF00;
    background-color: #aeff0018;
}

/* Optmizing for mobile */
@media (max-width: 682px){
    #main{
        width: 80vw;
        height: min-content;
        grid-template-rows: 10vw 14vw 7vw 7vw 15vw;
    }
    #title{
        font-size: 6vw;
    }
    #display{
        font-size: 13vw;
    }
    #button0{
        width: 70vw;
        height: 10vw;
        font-size: 5vw;
    }
    #button0:hover{
        box-shadow: #000 1vw 1vw;
    }
    .text{
        font-size: 5vw;
    }
    input{
        width: 30vw;
        height: 4vw;
        font-size: 3vw;
    }
}