body {
    font-family:Arial;
    margin: 0;
    padding: 0;
    background-color: rgba(1, 1, 1, 0.7);
    background-image: url("../images/pencil-background.jpg");
    background-blend-mode: overlay;
    background-size: 100%;
    background-position-y: top;
    background-repeat: repeat;
    color: #000000;
}

@media (prefers-color-scheme: dark) {
    body {
        background-image: url('../images/pencil-backgroundDARK.jpg');
    }
}
@media (max-width: 650px) {
    body {
        background-image: url("");
      
    }
}

@media (max-width: 650px) and (prefers-color-scheme: dark) {
    body {
        background-image: url("");
        background-color: #363636;
    }
}

.topbar {
    z-index: 1;
    background-color: #353636;
    overflow: hidden;
    display: flex;
    justify-content: center;
    position: relative;
    width: 100%;
    top: 0;
    font-family: "Kanit", sans-serif;
    font-size: 30px;
    font-weight: 700;
    font-style: normal;
    border-bottom: rgb(0, 47, 255) 5px solid;
}
.topbar a {
    display: flex;
    color: rgb(255, 255, 255);
    text-align: center;
    padding: 4px 20px;
    text-decoration: none;
    border-top-right-radius: 20px;    
    border-top-left-radius: 20px;  
    transition: background-color 0.3s ease;
}
.topbar-middle{
    position: relative;  
    margin-left: 0px; 
   
 }
 @media (max-width: 650px) {
     .topbar-middle {
         margin-left: 0px; 
     }
 }
 .topbar-right{
     position: absolute;
     right: 0;
     top: 0;
     background-color:  rgba(0, 47, 255);
 }
 @media (max-width: 650px) {
     .topbar-right {
         position: relative;
         right: 0;
         top: 0;
     }
 }

.topbar a:hover {
    background-color: rgba(0, 47, 255, 0.5);
    
}

.box{
    width: 60%;
    height: 70%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    left: 50%;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px 0px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    background-color: #f1f1f1;
    border: #fff 15px solid;
}
@media (max-width: 750px){
    .box, input, form{
        width: 100%;
    }

}

.buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    
}
.buttons a{
    padding: 10px;
    text-decoration: none; 
    color: black;
}
button:hover{
    box-shadow: 0 0 20px 0px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    
}

button{
    font-size: 30px;
    color: white;
    padding: 5px;
    background-color: rgb(0, 47, 255, 0.5);
    border-radius: 10px;
    border: #000000 1px solid;
    transition: box-shadow 0.4s ease;
    margin: 2px; 
}
h2{
    font-size: 30px;
    color: black;
    text-align: center;
}
.inputs{
    text-align: center;
    width: 150%;
    justify-content: center;
    padding: 10px;
}
input {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}
label{
    padding: 10px;    
}
form {
    position: absolute;
    top: 50%;
    left: 50%;
    transform:translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 70%;
}
.alt{
    text-decoration: none;
    color: black;
    background-color: rgb(120,144,248);
    border-radius: 10px;
    border: #000000 1px solid;
    font-size: 20px;
    transition: box-shadow 0.4s ease;
    transition: color 0.4s ease;
}
.alt:hover {
    color: rgb(254, 254, 254);
    box-shadow: 0 0 20px 0px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    
}

.toast-container{
    bottom: 10px;
    right:  10px;
    z-index: 100;
}

.password-container {
    position: relative;
}
.toggle-password {
    position: absolute;
    right: 10px;
    transform: translateY(40%);
    cursor: pointer;
}

/* server loading spinner */

#loading-popup{
    display: flex; /* Use flexbox for centering */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    position: fixed; /* Cover the entire viewport */
    top: 0; 
    right: 0; 
    bottom: 0; 
    left: 0;

    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none; /* Block pointer events */
}

.loading-content{
    position: absolute;
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%); 
    /* background: #ff0000; */
    border-radius: 10px;
    box-shadow: 0 0 20px 0px rgba(0, 0, 0, 0.1);
    background-color: #f1f1f1;
    border: #fff 15px solid;
    transition: transform 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden; 
    pointer-events: auto;
}
@media (max-width: 650px) {
    .loading-content{
        width: 90%; 
        padding: 10px; 
        font-size: 0.8em; 
        transform: translate(-50%, -50%);
    }
}

#spinner2 {
    animation: rotate 2s linear infinite;
    z-index: 4;
    position: relative; /* Change to relative for proper centering within flexbox */
    display: block;
    width: 100px; 
    height: 100px; 
    stroke: #ffffff;
    top: 2%; 
    width: 200px;
    height: 200px;
}
#spinner2 .path {
      stroke: hsl(212, 100%, 50%);
      stroke-linecap: round;
      animation: dash 1.5s ease-in-out infinite;
  }
  #spinner2 .outline {
    stroke: rgb(0, 0, 0);
    stroke-width: 4; 
  }

    
  @keyframes rotate {
    100% {
      transform: rotate(360deg);
    }
  }
  
  @keyframes dash {
    0% {
      stroke-dasharray: 1, 150;
      stroke-dashoffset: 0;
    }
    50% {
      stroke-dasharray: 90, 150;
      stroke-dashoffset: -35;
    }
    100% {
      stroke-dasharray: 90, 150;
      stroke-dashoffset: -124;
    }
  }

