html {
    background-color: #f0f2f5;
}

body {
    max-width: 1440px;
    margin: 0 auto;
    background-color: #f0f2f5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 50px;
}

.logo {
    width: 96px;
    height: 96px;
    margin-left: 80px;
}



.logo-intro {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 250px;
    height: 275px;
    transform: translate(-50%, -50%);
    z-index: 1000;
    pointer-events: none;
    animation: logoFly 1400ms cubic-bezier(0.65, 0, 0.35, 1) 200ms forwards, logoHide 0s linear 1650ms forwards;
}



body.intro-active>*:not(.logo-intro) {
    opacity: 0;
    visibility: hidden;
}



body:not(.intro-active)>*:not(.logo-intro) {
    animation: contentFadeIn 350ms ease-out both;
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

header .logo {
    opacity: 0;
    animation: logoReveal 0s linear 1600ms forwards;
}

@keyframes logoFly {
    to {
        top: 50px;
        left: 180px;
        width: 100px;
        height: 110px;
        transform: translate(0, 0);
    }
}

@keyframes logoReveal {
    to {
        opacity: 1;
    }
}

@keyframes logoHide {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@media (prefers-reduced-motion: reduce) {
    .logo-intro {
        display: none;
    }
    header .logo {
        opacity: 1;
        animation: none;
    }
    body.intro-active>*:not(.logo-intro) {
        opacity: 1;
        visibility: visible;
    }
}


.header__right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-right: 80px;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 500px;
    padding: 32px 32px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

.container__headline {
    margin-left: 5px;
    font-weight: 700;
}

.title__row {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.title__row aside,
.title__row a {
    position: absolute;
    left: 0;
}

.container h1 {
    margin: 0;
    font-weight: 700;
    color: #1a1a2e;
}

.title__underline {
    width: 120px;
    height: 3px;
    background-color: var(--color-brand-accent);
    border-radius: 2px;
    margin: 12px 0 32px;
}

.login__form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.input__wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input__wrapper input {
    width: 100%;
    padding: 14px 48px 14px 18px;
    border: 1.5px solid var(--color-neutral-400);
    border-radius: 10px;
    font-size: 15px;
    color: #1a1a2e;
    background-color: white;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.input__wrapper input:focus {
    border-color: var(--color-brand-accent);
}

.input__wrapper input::placeholder {
    color: var(--color-neutral-700);
}

.input__icon {
    position: absolute;
    right: 16px;
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.input__icon-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-neutral-700, #555);
}

.input__icon-btn .input__icon {
    position: static;
    right: auto;
    pointer-events: none;
}

.input__icon-btn .input__icon--eye,
.input__icon-btn .input__icon--eye-off {
    display: none;
}

.input__wrapper.has-value .input__icon-btn .input__icon--lock {
    display: none;
}

.input__wrapper.has-value .input__icon-btn .input__icon--eye-off {
    display: block;
}

.input__wrapper.has-value.is-visible .input__icon-btn .input__icon--eye-off {
    display: none;
}

.input__wrapper.has-value.is-visible .input__icon-btn .input__icon--eye {
    display: block;
}

.input__wrapper:not(.has-value) .input__icon-btn {
    cursor: default;
}

.button__row {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 8px;
}

footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
}

.footer__Link {
    color: var(--color-neutral-700);
    margin-left: 20px;
    display: inline-block;
    width: 110px;
}

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 40px));
    background-color: #2d3a4a;
    color: white;
    padding: 20px 48px;
    border-radius: 20px;
    font-size: 20px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    text-align: center;
    white-space: nowrap;
}

.toast.toast--visible {
    opacity: 1;
    transform: translate(-50%, -50%);
}

@media (max-width: 600px) {
    .toast {
        width: 80%;
        white-space: normal;
        font-size: 16px;
        padding: 16px 24px;
    }
}

.input__field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.input__wrapper.input--error input {
    border-color: #ff3d00;
}

.error__text {
    font-size: 12px;
    color: #ff3d00;
    padding-left: 4px;
    visibility: visible;
}

.error__text:empty {
    visibility: hidden;
}

.privacy__error {
    text-align: center;
}

.checkbox__row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
    gap: 12px;
}

.checkbox__row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-brand-primary);
    border-radius: 4px;
    flex-shrink: 0;
}

.checkbox__row input[type="checkbox"]:checked {
    background-color: var(--color-brand-primary);
    background-image: url("../assets/add-task/check.svg");
    background-size: 14px;
    background-repeat: no-repeat;
    background-position: center;
}

.checkbox__row label {
    font-size: 15px;
    color: var(--color-neutral-700);
}

.checkbox__row label a {
    color: var(--color-brand-accent);
}

.checkbox__row label a:hover {
    text-decoration: underline;
}

@media (min-width: 1440px) {
    @keyframes logoFly {
        to {
            top: 50px;
            left: 310px;
            width: 100px;
            height: 110px;
            transform: translate(0, 0);
        }
    }
}

@media (max-width: 1440px) {
    @keyframes logoFly {
        to {
            top: 50px;
            left: 80px;
            width: 100px;
            height: 110px;
            transform: translate(0, 0);
        }
    }
}

@media (max-width: 1024px) {
    @keyframes logoFly {
        to {
            top: 50px;
            left: 80px;
            width: 100px;
            height: 110px;
            transform: translate(0, 0);
        }
    }
}

@media (max-width: 600px) {
    .container {
        width: 80%;
        padding: 32px 20px;
    }
    .container__headline {
        font-size: 30px;
        margin-left: 5px;
    }
    .title__underline {
        width: 250px;
    }
    .input__wrapper input {
        padding: 12px 40px 12px 16px;
    }
    .input__icon {
        width: 16px;
        height: 16px;
    }
    .button__row {
        flex-direction: column;
        gap: 12px;
    }
    .login__btn,
    .guestLogin__btn {
        width: 100%;
        padding: 12px;
    }
    .header__right {
        margin-right: 20px;
    }
    .logo {
        width: 80px;
        height: 88px;
        margin-left: 20px;
    }
    @keyframes logoFly {
        to {
            top: 50px;
            left: 20px;
            width: 80px;
            height: 88px;
            transform: translate(0, 0);
        }
    }
}

.mobile-signup {
    display: none;
}

@media (max-width: 450px) {
    main {
        justify-content: flex-start;
    }
    header {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin-top: 32px;
    }
    .header__right {
        display: none;
    }
    .logo {
        width: 55px;
        height: 60px;
        margin-left: 0;
    }
    @keyframes logoFly {
        to {
            top: 12px;
            left: 50%;
            width: 55px;
            height: 60px;
            transform: translate(-50%, 0);
        }
    }
    .container {
        margin-top: 40px;
        padding: 20px;
    }
    .login__form {
        gap: 4px;
    }
    .input__field {
        gap: 0;
    }
    .input__wrapper input {
        padding: 10px 40px 10px 16px;
    }
    .error__text {
        min-height: 0;
        font-size: 11px;
        line-height: 1;
    }
    .error__text:empty {
        height: 0;
        overflow: hidden;
    }
    .checkbox__row {
        margin-top: 2px;
    }
    .button__row {
        margin-top: 4px;
    }
    .mobile-signup {
        display: flex;
        align-items: center;
        gap: 16px;
        margin-top: 12px;
        justify-content: center;
    }
    .container__headline,
    .container h1 {
        font-size: 30px;
        margin-left: 10px;
    }
    .title__underline {
        width: 200px;
        margin: 6px 0 12px;
    }
}