* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    overflow-x: hidden;
}

body {
    position: relative;
    margin: 0;
    box-sizing: border-box;
}

body::before {
    content: '';
    position: absolute;
    background-position: center;
    background-size: cover;
    background-attachment: scroll;
    inset: 0;
    background: url(img/cosmo_bckgrnd.png) center -310px/cover, no-repeat;
    z-index: -1;
}

body::after {
    content: '';
    position:absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), transparent);
    z-index: -1;
}

:root {
    --background-color-transparent: rgba(255, 255, 255, 0.103);
    --outline-color-transparent:  rgba(255, 255, 255, 0.199);
    --google-font:'Zen Dots', sans-serif;
    --accent:#2f48e8; 
}

input:focus-visible,button:focus-visible {
    outline:none;
    box-shadow: 0 0 0 3px var(--accent);
}

.containerMain {
    position: relative;
    display: flex;
    min-height: 100vh;
    box-sizing: border-box;
}

#rightContainer {
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: auto;
    width: 50%;
    border: 1px solid rgba(255, 255, 255, 0.158);
    border-radius: 16px;
    backdrop-filter: blur(5px);
    background-color: transparent, rgba(255, 255, 255, 0.103);
    box-shadow: 0 2px 8px var(--outline-color-transparent),
    inset 0 0 4px rgba(255, 255, 255, 0.158);
    animation: slideInLeft 2s ease-in-out forwards;
    background-image: linear-gradient(
        120deg, transparent,
        #ff4de723,
        #ffffff23, transparent);
}

#hero {
    color: rgb(8, 125, 215);
    font-family: "Zen Dots";
    line-height: 3em;
    text-align: center;
    text-shadow: 4px 4px 10px orange;
    margin-bottom: 2em;
    margin-top: -2em;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    animation: slideInLeft 2s ease-in-out forwards;
    opacity: 0; 
}

#hero h1 {
    font-size: 2.5em;
    font-weight: 500;
}

form {
    width: 80%;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 0px 20px rgba(0, 0, 0, .3);
    border: 1px var(--outline-color-transparent);
    padding: 25px 25px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    background-color: transparent, rgba(255, 255, 255, 0.61);
    animation: fadeIn 2s ease-in 1s forwards;
    animation: slideInLeft 2s ease-in-out forwards;
}

form fieldset {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, auto);
    gap: 1.5em;
    padding: 0;
    width: 100%;
    min-width: 0;
    border: none;
    padding: 0;
    margin: 0;
    column-gap: 4em;
    font-family: var(--google-font);
}

.formDetails {
    display: flex;
    flex-direction: column;
    min-width: 0; 
}

/* Removes the background-color when using Autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    transition: background-color 60000s 0s, color 60000s 0s;
}

/* Fixes autofill changing Text's colour to red instead of black */
input:-webkit-autofill {
    box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.103) inset !important;
    -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.1) inset !important;
    -webkit-text-fill-color: rgb(0, 0, 0) !important
}

/* Changes Input fields' sizes and fonts */
.formDetails input {
    width: 100%;
    padding: 0.5em;
    font-size: 1em;
    border-radius: 5px;
    border: 1px var(--outline-color-transparent);
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.534);
    margin-bottom: 0.5em;
    font-family: var(--google-font);
    
}

label {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3)
}

input:invalid{
    color: rgba(119, 3, 3, 0.384);
}

input:hover {
    transform: scale(1.03);
    box-shadow: 0 0 10px #5207d580;
}

#passwordMatchMessage {
    background-color: rgba(255, 255, 255, 0.199);
    border-radius: 16px;
    backdrop-filter: blur(6px);
    text-align: center;
    width: fit-content;
    padding:  6px 12px;
    max-width: 100%;
    transition: all 0.2s ease;
}

#accountCreation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin-top: 3em;
    font-family: "Zen Dots";
    color: white;
}

#leftContainer {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 50%;
    animation: slideInLeft 2s ease-in-out forwards;
}

#leftContainer h1 {
    font-size: 3em;
    color: #fff;
    text-shadow: 0 0 8px rgba(66, 8, 190, 0.5);   
}

#logo {
    position: absolute;
    width: 40%;
    height: auto;
    border-radius: 20%;
    box-shadow: 0 0 10px rgb(90, 24, 151);
    visibility: visible;
}

button {
    background: var(--background-color-transparent);
    background-color: var(--background-color-transparent);
    border-radius: 16px;
    height: 4em;
    width: 15em;
    font-family: var(--google-font);
    font-weight: bold;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

button:hover {
    transform: scale(1.03);
    box-shadow: 0 0 10px #a44fff;
    cursor: pointer;
}

/* Containers flow from right to left side when loading page */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-200px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hero's fade in animation */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@media (max-width: 768px) {
  .containerMain {
    flex-direction: column;
  }

  #leftContainer,
  #rightContainer {
    width: 100%;
    height: auto;
    padding: 1em;
    animation: slideInLeft 1.5s ease-in-out forwards;
  }

  #hero h1 {
    font-size: 1.8em;
  }

  form {
    width: 95%;
    padding: 15px;
  }

  fieldset {
    grid-template-columns: 1fr;
    gap: 1em;
  }

  button {
    width: 100%;
  }

  #logo {
    width: 60%;
    position: static;
    margin: 1em auto;
  }
}

