:root {
    color-scheme: light only;
    --colour-black: #131314;
    --colour-pink: #f23b66;
    --colour-magenta: #c116a0;
    --colour-cream: #fff5e9;
    --colour-pastel: #fcebf1;
    --colour-soft-yellow: #fffde6;
    --card-border: rgba(19, 19, 20, 0.12);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: "degular", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: radial-gradient(circle at top left, var(--colour-pastel) 0%, var(--colour-soft-yellow) 55%, #ffffff 100%);
    color: var(--colour-black);
    display: grid;
    place-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 32px 20px;
}

.card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--card-border);
    box-shadow: 0 22px 50px rgba(19, 19, 20, 0.16);
    border-radius: 28px;
    padding: 44px 42px;
    max-width: 440px;
    width: min(100%, 440px);
    backdrop-filter: blur(18px);
}

.header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}

.brand-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: #131314;
    border: 1px solid rgba(19, 19, 20, 0.12);
    overflow: hidden;
}

.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 34px);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.subtitle {
    color: var(--colour-pink);
    margin: 8px 0 0;
    font-size: 16px;
    font-weight: 500;
}

.field {
    margin-top: 20px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--colour-pink);
    font-weight: 600;
}

input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(19, 19, 20, 0.12);
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(19, 19, 20, 0.04);
    font-size: 16px;
    color: var(--colour-black);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    min-height: 56px;
}

input:focus {
    outline: none;
    border-color: var(--colour-pink);
    box-shadow: 0 0 0 4px rgba(242, 59, 102, 0.18);
    transform: translateY(-1px);
}

button[type="submit"] {
    margin-top: 32px;
    width: 100%;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    background: rgba(19, 19, 20, 0.95);
    color: #ffffff;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.24s ease;
    min-height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    background: linear-gradient(
        45deg,
        #f23b66,
        #ff783e,
        #f9c900,
        #0ec156,
        #14c1ac,
        #2062e2,
        #1313b7,
        #530bb2,
        #c116a0,
        #f23b66
    );
    background-size: 400%;
    animation: glowing 50s linear infinite;
    filter: blur(2px);
    opacity: 1;
    border-radius: 999px;
    z-index: -1;
}

button[type="submit"]::after {
    content: '→';
    margin-left: 12px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    color: rgba(255, 255, 255, 0.85);
    transition: transform 0.18s ease, opacity 0.24s ease;
    position: relative;
    z-index: 1;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(19, 19, 20, 0.25);
}

button[type="submit"]:hover::after {
    transform: translateX(4px);
    opacity: 1;
}

button[type="submit"]:active {
    transform: translateY(0);
}

button[type="submit"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.error {
    background: rgba(242, 59, 102, 0.08);
    border: 1px solid rgba(242, 59, 102, 0.3);
    color: var(--colour-pink);
    padding: 16px 18px;
    border-radius: 16px;
    margin-bottom: 18px;
    font-size: 15px;
    font-weight: 600;
}

footer {
    margin-top: 36px;
    font-size: 13px;
    color: rgba(19, 19, 20, 0.7);
    text-align: center;
    line-height: 1.5;
}

a {
    color: var(--colour-pink);
    text-decoration: none;
    font-weight: 600;
}

a:hover {
    text-decoration: underline;
}

@media (max-width: 520px) {
    .card {
        padding: 34px 26px;
        border-radius: 24px;
    }

    .header {
        gap: 14px;
    }

    .brand-icon {
        width: 56px;
        height: 56px;
    }
}

@keyframes glowing {
    0% {
        background-position: 0 0;
    }
    50% {
        background-position: -400% 0;
    }
    100% {
        background-position: 0 0;
    }
}
