@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #080d1a;
    color: white;
}

.cover {
    min-height: 100vh;
    width: 100%;

    display: flex;
    align-items: center;

    background:
        radial-gradient(
            circle at 25% 50%,
            rgba(124, 58, 237, 0.39),
            transparent 100%
        ),
        radial-gradient(
            circle at 85% 50%,
            rgba(88, 102, 255, 0.158),
            transparent 35%
        );

    overflow: hidden;
}

.branding {
    width: 55%;
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;
}

.branding svg {
    width: 1000px;
    height: auto;

    margin-bottom: 5px;
    filter: drop-shadow(0 0 18px rgba(179, 107, 255, 0.18));
}

.branding .text h1 {
    font-size: 50px;
    font-weight: 600;

    background: linear-gradient(90deg, #b36bff, #5865ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.branding .text p {
    margin-top: 7px;
    font-size: 15px;

    color: #858b9a;
    letter-spacing: 1.5px;
}

.signup-section {
    width: 45%;
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px;
}

.signup-box {
    width: 420px;
    padding: 40px;

    background: rgba(18, 24, 40, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.40), 0 0 40px rgba(124, 58, 237, 0.06);
    backdrop-filter: blur(12px);

    animation: signupAppear 0.6s ease;
}

.signup-box::before {
    content: "";

    display: block;

    width: 55px;
    height: 4px;

    margin-bottom: 24px;

    border-radius: 10px;

    background: linear-gradient(
        90deg,
        #b36bff,
        #5865ff
    );
}

.signup-box h1 {
    font-size: 27px;
    font-weight: 700;

    letter-spacing: 3px;

    background: linear-gradient(
        90deg,
        #b36bff,
        #5865ff
    );

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
}

.signup-box h2 {
    margin-top: 4px;
    margin-bottom: 28px;

    font-size: 17px;
    font-weight: 500;

    color: #d8dbe5;

    letter-spacing: 1px;
}


#signupForm > input {
    display: block;

    width: 100%;
    height: 48px;

    margin-bottom: 13px;

    padding: 0 15px;

    border: 1px solid rgba(255, 255, 255, 0.09);

    border-radius: 9px;

    outline: none;

    background: #0b1120;

    color: white;

    font-family: 'Poppins', sans-serif;
    font-size: 13px;

    transition: 0.25s;
}

#signupForm > input::placeholder {
    color: #707789;
}

#signupForm > input:focus {
    border-color: #8b5cf6;

    box-shadow:
        0 0 0 3px rgba(124, 58, 237, 0.10);
}

.password-field {
    position: relative;
    width: 100%;
}

.password-field input {
    display: block;

    width: 100%;
    height: 48px;

    margin-bottom: 13px;

    padding: 0 45px 0 15px;

    border: 1px solid rgba(255, 255, 255, 0.09);

    border-radius: 9px;

    outline: none;

    background: #0b1120;

    color: white;

    font-family: 'Poppins', sans-serif;
    font-size: 13px;

    transition: 0.25s;
}

.password-field input::placeholder {
    color: #707789;
}

.password-field input:focus {
    border-color: #8b5cf6;

    box-shadow:
        0 0 0 3px rgba(124, 58, 237, 0.10);
}

.toggle-password {
    position: absolute;

    right: 15px;
    top: 16px;

    color: #707789;

    font-size: 14px;

    cursor: pointer;

    transition: 0.2s;
}

.toggle-password:hover {
    color: #b36bff;
}


/* Password validation message */
.password-validation-message {
    display: none;
    align-items: center;
    gap: 8px;
    margin: 8px 0 12px;
    color: #a855f7;
    font-size: 12px;
    line-height: 1.5;
}

.password-validation-message i {
    font-size: 13px;
    flex-shrink: 0;
}

/* Show the message when the password is too short */
.password-validation-message.show {
    display: flex;
}


.button-design {
    width: 100%;
}

.Register-button {
    width: 100%;
    height: 48px;

    margin-top: 4px;

    border: none;
    border-radius: 9px;

    background: linear-gradient(
        90deg,
        #b36bff,
        #5865ff
    );

    color: white;

    font-family: 'Poppins', sans-serif;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition: 0.25s;
}

.Register-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 8px 25px rgba(124, 58, 237, 0.35);
}

.Register-button:active {
    transform: translateY(0);
}

.link-sign-in {
    margin-top: 21px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 5px;
}

.link-sign-in h4 {
    margin: 0;

    color: #73798a;

    font-size: 12px;
    font-weight: 400;
}

.link-sign-in h5 {
    margin: 0;

    font-size: 12px;
    font-weight: 600;
}

.link-sign-in a {
    color: #b36bff;

    text-decoration: none;

    transition: 0.2s;
}

.link-sign-in a:hover {
    color: #5865ff;
}

.fade-in {
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes signupAppear {
    from {
        opacity: 0;
        transform: translateX(25px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}


@media (max-width: 900px) {

    .cover {
        flex-direction: column;
        overflow-y: auto;
    }

    .branding {
        width: 100%;
        min-height: 380px;
    }

    .branding svg {
        width: 230px;
    }

    .branding .text h1 {
        font-size: 25px;
    }

    .signup-section {
        width: 100%;
        min-height: auto;

        padding: 20px;
        padding-bottom: 50px;
    }

    .Login-box {
        width: 100%;
        max-width: 420px;
    }
}

.success-message {
    position: fixed;
    top: 30px;
    right: 30px;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 15px 22px;

    background: #171323;
     background: linear-gradient(90deg, #b36bff, #5865FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    border: 1px solid #7c3aed;
    border-radius: 12px;

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);

    font-size: 15px;
    font-weight: 500;

    opacity: 0;
    transform: translateX(120%);

    pointer-events: none;

    transition: 
        opacity 0.4s ease,
        transform 0.4s ease;

    z-index: 9999;
}

.success-message i {
    font-size: 20px;
}

.success-message.show {
    opacity: 1;
    transform: translateX(0);
}

/* Email verification popup */
.verification-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(12, 15, 35, 0.7);
    backdrop-filter: blur(5px);
}

.verification-overlay.show {
    display: flex;
}

.verification-box {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 32px 26px;
    border-radius: 20px;
    background: #fff;
    color: #20213a;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: verificationAppear 0.2s ease-out;
}

.verification-close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 28px;
    cursor: pointer;
}

.verification-icon {
    margin-bottom: 12px;
    color: #7655e8;
    font-size: 42px;
}

.verification-box h2 {
    margin: 8px 0;
    font-size: 24px;
}

.verification-box p {
    line-height: 1.5;
}

.verification-email {
    overflow-wrap: anywhere;
    color: #6546d8;
    font-weight: 600;
}

.verification-box label {
    display: block;
    margin: 18px 0 8px;
    text-align: left;
    font-weight: 600;
}

.verification-box input {
    box-sizing: border-box;
    width: 100%;
    padding: 13px;
    border: 1px solid #d5d5e2;
    border-radius: 10px;
    outline: none;
    font-size: 20px;
    letter-spacing: 5px;
    text-align: center;
}

.verification-box input:focus {
    border-color: #7655e8;
    box-shadow: 0 0 0 3px rgba(118, 85, 232, 0.13);
}

.verification-feedback {
    min-height: 20px;
    margin: 10px 0;
    font-size: 13px;
}

.verification-feedback.error {
    color: #c62828;
}

.verification-feedback.success {
    color: #218838;
}

.verification-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.verification-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

#cancelVerificationButton {
    background: #ececf3;
    color: #333;
}

#confirmVerification {
    background: #7655e8;
    color: #fff;
}

.verification-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes verificationAppear {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* Signup error messages */
.signup-feedback {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: 10px;
    background: rgba(168, 85, 247, 0.09);
    color: #a855f7;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    animation: feedbackFadeIn 0.2s ease;
}

.signup-feedback[hidden] {
    display: none;
}

.signup-feedback.error {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

.signup-feedback.success {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.08);
    color: #16a34a;
}

@keyframes feedbackFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .signup-feedback {
        animation: none;
    }
}


/* Verification popup feedback */
#verificationFeedback {
    box-sizing: border-box;
    width: 100%;
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    animation: verificationFeedbackFade 0.2s ease;
}

/* Hide the message when it is empty */
#verificationFeedback:empty {
    display: none;
}

/* Error messages */
#verificationFeedback.error {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Success messages */
#verificationFeedback.success {
    color: #16a34a;
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.3);
}

/* Message animation */
@keyframes verificationFeedbackFade {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    #verificationFeedback {
        animation: none;
    }
}
