body {
    font-family:
        Inter,
        system-ui,
        -apple-system,
        Segoe UI,
        Roboto,
        Helvetica,
        Arial,
        "Apple Color Emoji",
        "Segoe UI Emoji";
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    position: relative;
    background:
        radial-gradient(1200px 800px at 10% 0%, rgba(124, 92, 255, 0.35), transparent 60%),
        radial-gradient(1200px 800px at 100% 0%, rgba(25, 195, 125, 0.25), transparent 40%),
        radial-gradient(1200px 800px at 0% 100%, rgba(255, 99, 99, 0.18), transparent 50%),
        linear-gradient(135deg, #cffff1, #438aff);
}

body::before,
body::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: screen;
    opacity: 0.35;
}

body::before {
    top: -11vh;
    left: 2vw;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle at 30% 30%, rgba(240, 248, 255, 0.9), rgba(124, 92, 255, 0.15));
    clip-path: polygon(0 20%, 60% 0, 100% 45%, 85% 100%, 15% 85%);
    filter: blur(1px);
}

body::after {
    bottom: 4vh;
    right: 5vw;
    width: 480px;
    height: 300px;
    background:
        linear-gradient(135deg, rgba(25, 195, 125, 0.6), rgba(67, 138, 255, 0.1)) padding-box;
    border-radius: 20px;
    clip-path: polygon(0 20%, 60% 0, 100% 45%, 85% 100%, 15% 85%);
    filter: blur(2px);
}

/* Logo container and iframe styles */
#logo-container {
    margin-bottom: 40px;
}

#logo-container canvas {
    zoom: 0.5;
    margin-left: auto;
    margin-right: auto;
}

h1 {
    margin-bottom: 20px;
}

.lead {
    color: #666666;
}

.container {
    width: 100%;
    background-color: #f0f7ff96;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.container img {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
}

.container input {
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease;
    outline: none;
    font-size: 1rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding-left: 50px;
    margin: 10px 0;
}

.input-wrapper .input-icon {
    position: absolute;
    padding-left: 15px;
    max-width: 24px;
    max-height: 24px;
    color: #666;
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-wrapper input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: #007bff;
}

.container input:focus {
    border: 1px solid #007bff;
    background-color: #007bff08;
}

.container button {
    font-weight: bold;
    position: relative;
    overflow: hidden;
    transition:
        box-shadow 0.3s,
        transform 0.3s;
    width: 100%;
    padding: 15px;
    margin-top: 15px;
    border: none;
    border-radius: 8px;
    background: transparent; /* gradients move to pseudo-elements */
    color: white;
    font-size: 1rem;
    cursor: pointer;
    outline: none;
    z-index: 0; /* create stacking context for negative z-index layers */
}

/* Base gradient layer (visible by default) */
.container button::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, #00beff, #0067d5);
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: -1;
    pointer-events: none;
}

.container button::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.35) 30%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0.35) 70%, rgba(255, 255, 255, 0) 100%) no-repeat,
        linear-gradient(135deg, #007bff, #0067d5);
    background-size: 90% 100%, 100% 100%;
    background-position: -1000% 0, 0 0;
    opacity: 0;
    transition:
        opacity 0.3s ease,
        background-position 0.3s ease;
    z-index: -1; /* sits behind text/content */
    pointer-events: none;
}

.container button:hover::after,
.container button:focus::after {
    opacity: 1; /* fade in hover gradient */
    background-position: 1000% 0, 0 0;
}

/* Cross-fade out the base layer while hovering/focusing */
.container button:hover::before,
.container button:focus::before {
    opacity: 0;
}

.container button > * {
    position: relative;
    z-index: 1;
}

.container button:focus,
.container button:hover {
    box-shadow: 0 0 15px rgba(79, 71, 229, 0.3);
    transform: translateY(-1px);
}

#message {
    font-size: 14px;
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: left;
    display: none; /* Initially hidden until needed */
}

#message strong {
    font-size: 1rem;
    margin-bottom: 10px;
    display: block;
}

#message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.links {
    margin-top: 15px;
    text-align: center;
}
.links a {
    color: #007bff;
    text-decoration: none;
    margin: 0 10px;
    font-size: 1rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.links a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.links a:hover::after,
.links a:focus::after {
    transform: scaleX(1);
}

.oauth {
    padding: 10px 0 0 0;
}

.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #007bff00;
    border-radius: 5px;
    padding: 3px 20px;
    cursor: pointer;
    transition: box-shadow 0.3s ease;
    text-decoration: none;
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease;
    color: #000;
    outline: none;
}

.oauth-btn img {
    height: 32px;
    width: 32px;
    margin: 0 10px 0 0;
}

.oauth-btn:hover,
.oauth-btn:focus {
    border: 1px solid #007bff;
    background-color: #007bff08;
}

.oauth-btn span {
    font-size: 1rem;
    font-weight: 500;
}

.password-requirements {
    text-align: left;
    font-size: 14px;
    color: #333;
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.password-requirements strong {
    font-size: 1rem;
    color: #007bff;
    margin-bottom: 10px;
    display: block;
}

.password-requirements ul {
    list-style-type: none;
    padding-left: 0;
}

.password-requirements li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.password-requirements li::before {
    content: "✔";
    color: #007bff;
    margin-right: 10px;
    font-weight: bold;
}

.line-container {
    display: flex;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}

.line-container hr {
    flex: 1;
}

.line-container span {
    white-space: nowrap;
    font-size: 0.9rem;
}

@media only screen and (max-width: 550px) {
    .container {
        background: none;
        box-shadow: none;
        border-radius: 0px;
    }

    .container input {
        background-color: #f3f9ff;
    }

    .container input:focus {
        border: 1px solid #007bff;
        background-color: white;
    }

    .links a {
        color: #000000;
    }

    h1 {
        text-shadow: #ffffffaa 1px 0 10px;
    }
}
