﻿/*Set Up*/
/* Import Google Fonts for the page */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

/* put the margin for the hole page to 0 for some things to work*/
html, body {
    margin: 0;
}

/* This is a universal selector that centers the tag elements on the page */
.center1 {
    display: grid;
    place-items: center;
    height: 100vh;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.visible {
    opacity: 1;
    transform: scale(1);
}

/*The spinner is by LDRS https://uiball.com/ldrs/ Thank you saved me a lot of time 
see LogIn.js for more info. you are still stupid me form the past tyr to read :D */
/*----------------------------------------------------------------*/
#spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.1); /*transparent */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* YES 9999 WHO CEARS THIS IS MY CSS I WILL DO WHATEVER I WANT*/
    backdrop-filter: blur(6px); /* Blur effect */
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}
/*----------------------------------------------------------------*/
/*self explaing*/
#backgrund {
    z-index: 1;
    margin: 0;
    width: 100%;
    min-height: 100%;
    max-height: 100%;
    background:
    /* Diagonal slices */
    radial-gradient( circle at 100% 50%, #7d1bd3 0% 2%, #de9b18 3% 5%, transparent 6% ),
    /* Offset dots */
    radial-gradient( circle at 0% 50%, #de9b18 0% 2%, #7d1bd3 3% 5%, transparent 6% ),
    /* Wave-like pattern */
    radial-gradient(ellipse at 50% 0%, #9f35fc 0% 3%, transparent 4%) 10px 10px,
    /* Scattered elements */
    radial-gradient( circle at 50% 50%, #00ffcc 0% 1%, #ff00cc 2% 3%, #3300ff 4% 5%, transparent 6% ) 20px 20px,
    /* Background texture */
    repeating-linear-gradient( 45deg, #1a1a1a, #1a1a1a 10px, #242424 10px, #242424 20px );
    background-size: 50px 50px, 50px 50px, 40px 40px, 60px 60px, 100% 100%;
    animation: bkshift 15s linear infinite;
}
/*#7d1bd3 Main / #de9b18 Second*/
@keyframes bkshift {
    0% {
        background-position: 0 0, 0 0, 10px 10px, 20px 20px, 0 0;
    }

    100% {
        background-position: 50px 50px, -50px -50px, 60px 60px, 80px 80px, 0 0;
    }
}
/*----------------------------------------------------------------*/
/*This is all the set up for the glass looking thing it's inisely is not load 
for the good fade in animetion see LogIn.js for more info*/
#logbox {
    z-index: 5;
    width: 400px;
    min-height: 700px;
    max-height: 1000px;
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent white */
    backdrop-filter: blur(6px); /* Blur effect */
    -webkit-backdrop-filter: blur(10px); /* For Safari support */
    border-radius: 15px; /* Rounded corners */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Soft border */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Soft shadow */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff; /* White text */
    font-size: 18px;
    font-weight: bold;
    opacity: 0; /* Initially hidden */
    transform: scale(0.8); /* Slightly smaller */
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    scale: 0.9;
}


.logbox {
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Centers content vertically */
    height: 100%; /* Ensure it fills the container */
}
/*----------------------------------------------------------------*/
/*Set up for the logo img*/
#logo {
    width: 150px;
    height: 150px;
    margin-top: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10%;
}
/*----------------------------------------------------------------*/
/*Set up for all of the text betwen the img and the input*/
#LogInText {
    margin-top: 0px; /* Adjust top margin */
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
}

#LogInInfoText {
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
}
/*----------------------------------------------------------------*/
/*Set up for Email and Password amd more*/
.emailgroup, .passwordgroup, .usernamegroup {
    margin-bottom: 15px;
}
/*Set up for Username input*/
.usernamegroup {
    display: flex;
    line-height: 30px;
    align-items: center;
    position: relative;
    max-width: 300px;
}

.usernameinput {
    color: rgba(255, 255, 255,1);
    width: 100%;
    height: 40px;
    line-height: 30px;
    padding: 0 5rem;
    padding-left: 3rem;
    border: 2px solid;
    border-radius: 10px;
    outline: none;
    background-color: #f8fafc;
    transition: .5s ease;
    background: transparent;
}

    .usernameinput::placeholder {
        color: rgba(255, 255, 255,1);
    }

    .usernameinput:focus, input:hover {
        outline: none;
        border-color: rgba(129, 140, 248);
        background: rgba(129, 140, 248, 0.1);
        box-shadow: 0 0 0 5px rgb(129 140 248 / 30%);
        color: #ffffff;
    }
/*------------------------------------*/
/*Set up for Email input*/
.emailgroup {
    display: flex;
    line-height: 30px;
    align-items: center;
    position: relative;
    max-width: 300px;
}

.emailinput {
    color: rgba(255, 255, 255,1);
    width: 100%;
    height: 40px;
    line-height: 30px;
    padding: 0 5rem;
    padding-left: 3rem;
    border: 2px solid;
    border-radius: 10px;
    outline: none;
    background-color: #f8fafc;
    transition: .5s ease;
    background: transparent;
}

    .emailinput::placeholder {
        color: rgba(255, 255, 255,1);
    }

    .emailinput:focus, input:hover {
        outline: none;
        border-color: rgba(129, 140, 248);
        background: rgba(129, 140, 248, 0.1);
        box-shadow: 0 0 0 5px rgb(129 140 248 / 30%);
        color: #ffffff;
    }
/*------------------------------------*/

/*Set up for Password input*/
.passwordgroup {
    display: flex;
    line-height: 30px;
    align-items: center;
    position: relative;
    max-width: 300px;
}

.passwordinput {
    width: 100%;
    height: 40px;
    line-height: 30px;
    padding: 0 5rem;
    padding-left: 3rem;
    border: 2px solid;
    border-radius: 10px;
    background: transparent;
    outline: none;
    color: rgba(255, 255, 255,1);
    transition: .5s ease;
}

    .passwordinput::placeholder {
        color: rgba(255, 255, 255,1);
    }

    .passwordinput:focus, input:hover {
        outline: none;
        border-color: rgba(129, 140, 248);
        background: transparent;
        box-shadow: 0 0 0 5px rgb(129 140 248 / 30%);
    }


.passwordinput.error {
    border-color: red !important;
    box-shadow: 0 0 5px red !important;
}

.error {
    border: 2px solid red; /* Highlight input box when there's an error */
}
/*----------------------------------------------------------------*/
/* Set up Gender select */

:focus {
    outline: 0;
    border-color: #2260ff;
    box-shadow: 0 0 0 4px #b5c9fc;
}

.mydict div {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
    justify-content: center;
    scale: 0.75;
    background: rgba(255, 255, 255, 0);
    font-family: 'Inter', sans-serif;
}

.mydict input[type="radio"] {
    clip: rect(0 0 0 0);
    clip-path: inset(100%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

    .mydict input[type="radio"]:checked + span {
        box-shadow: 0 0 0 0.0625em #0043ed;
        background-color: rgba(255, 255, 255, 0);
        z-index: 1;
        color: rgba(91, 106, 252);
    }

label span {
    display: block;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0);
    padding: 0.375em .75em;
    position: relative;
    margin-left: .0625em;
    box-shadow: 0 0 0 0.0625em #b5bfd9;
    letter-spacing: .05em;
    color: white;
    text-align: center;
    transition: background-color .5s ease;
}

label:first-child span {
    border-radius: .375em 0 0 .375em;
}

label:last-child span {
    border-radius: 0 .375em .375em 0;
}
/*----------------------------------------------------------------*/
/*butten Set up has some logic in LogIn.js*/
.animated-button {
    margin-top: 15px;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    padding: 12px 24px;
    border: none;
    font-size: 16px;
    background-color: inherit;
    border-radius: 100px;
    font-weight: 600;
    color: rgba(255, 255, 255,1);
    box-shadow: 0 0 0 2px #ffffff20;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

    .animated-button span:last-child {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 20px;
        height: 20px;
        background-color: rgba(141, 149, 242, 1);
        border-radius: 50%;
        opacity: 0;
        transition: all 0.8s cubic-bezier(0.23, 1, 0.320, 1);
    }

    .animated-button span:first-child {
        position: relative;
        z-index: 9999;
    }

    .animated-button:hover {
        box-shadow: 0 0 0 5px rgba(93, 98, 158, 1);
        color: white;
    }

    .animated-button:active {
        scale: 0.95;
    }

    .animated-button:hover span:last-child {
        width: 150px;
        height: 150px;
        opacity: 1;
    }
/*----------------------------------------------------------------*/
/*Set up for the info links*/
.useflinfo {
    display: inline;
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    margin-bottom: 20px;
}

    .useflinfo:hover {
        color: rgba(129, 140, 248);
    }
/*----------------------------------------------------------------*/








#logbox {
    min-height: unset !important;
    max-height: unset !important;
    height: auto !important;
    padding: 30px 20px 24px !important;
    position: relative !important; /* needed for home button positioning */
}

/* ── Form: column layout ── */
.signup-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 0;
}

/* ── Input groups: always 10px gap below, error pushes it further ── */
.usernamegroup,
.emailgroup,
.passwordgroup {
    margin-bottom: 10px !important;
}

/* ── Error messages: hidden and zero-height when not shown ── */
.error-message {
    display: none;
    color: #ff6b6b;
    font-size: 12px;
    margin: -6px 0 0 4px; /* pull up to sit right under the input */
    padding: 0;
    max-width: 300px;
    font-family: 'Inter', sans-serif;
    line-height: 1.3;
}

    /* JS adds .shown — gives the error its real space */
    .error-message.shown {
        display: block !important;
        padding-bottom: 4px;
    }

/* ── Invalid input highlight ── */
.usernameinput.error,
.emailinput.error,
.passwordinput.error {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.25) !important;
}

/* ── Button spacing ── */
.animated-button {
    margin-top: 16px !important;
    margin-bottom: 16px !important;
}

/* ── Server-side "user exists" banner ── */
.server-error-banner {
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid rgba(255, 107, 107, 0.5);
    border-radius: 10px;
    color: #ff9999;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    padding: 10px 16px;
    margin-bottom: 12px;
    max-width: 300px;
    text-align: center;
    line-height: 1.5;
}

.server-error-link {
    display: block;
    margin-top: 4px;
    color: #a78bfa;
    font-weight: 600;
    text-decoration: none;
}

    .server-error-link:hover {
        color: #c4b5fd;
        text-decoration: underline;
    }

/* ── Home button ── */
.home-btn {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

    .home-btn:hover {
        background: rgba(125, 27, 211, 0.35);
        border-color: rgba(125, 27, 211, 0.7);
        color: #ffffff;
        box-shadow: 0 0 0 4px rgba(125, 27, 211, 0.2);
    }

    .home-btn svg {
        width: 16px;
        height: 16px;
        fill: currentColor;
    }