/* The landing look shared by the login page and the reset page (moved out of Index.cshtml) */

html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 30%, #2b2f36 0%, #14161a 70%);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #f2f2f2;
}

.landing {
    text-align: center;
}

.wordmark {
    font-size: 4rem;
    letter-spacing: 0.15em;
    font-weight: 300;
    margin-bottom: 2.5rem;
}

.btn-login {
    padding: 0.6rem 2.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    color: #f2f2f2;
    font-size: 1rem;
    letter-spacing: 0.05em;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn-login:hover {
    background: #f2f2f2;
    color: #14161a;
}

.modal-content {
    background: #1c1f24;
    color: #f2f2f2;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.modal-content .form-control {
    background: #14161a;
    color: #f2f2f2;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-content .form-control:focus {
    background: #14161a;
    color: #f2f2f2;
    border-color: #f2f2f2;
    box-shadow: none;
}

/* The reset page's form box, and the quiet "Forgot password?" / "Back to login" links */
.landing-card {
    width: min(420px, calc(100vw - 32px));
    margin: 0 auto;
    text-align: left;
}

.link-quiet {
    color: rgba(242, 242, 242, 0.7);
    font-size: 0.875rem;
}

.link-quiet:hover {
    color: #f2f2f2;
}

/* The blocked page: Nedry's wagging finger, shown until a Giphy clip is configured */
.nedry-finger {
    display: inline-block;
    font-size: 4rem;
    transform-origin: 50% 90%;
    animation: nedry-wag 0.6s ease-in-out infinite alternate;
}

@keyframes nedry-wag {
    from { transform: rotate(-20deg); }
    to { transform: rotate(20deg); }
}

@media (prefers-reduced-motion: reduce) {
    .nedry-finger {
        animation: none;
    }
}


/* The error pages' emoji: a gentle bob, still when reduced motion is asked for */
.status-emoji {
    display: inline-block;
    font-size: 4rem;
    animation: status-bob 1.6s ease-in-out infinite alternate;
}

@keyframes status-bob {
    from { transform: translateY(0); }
    to { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
    .status-emoji {
        animation: none;
    }
}

/* Cards with a movie clip get more room, so the clip can be big */
.landing-card-wide {
    width: min(560px, calc(100vw - 32px));
}

/* Movie clips (Giphy embeds): the card's full width, in the GIF's own proportions (an inline aspect-ratio).
   A block, since the card is a flex column, where text-align wouldn't centre it */
.status-clip {
    display: block;
    width: 100%;
    height: auto;
    border: 0;
}

/* 418: an ASCII teapot with steam rising from it. Centred as the card's flex item and only as wide as the art,
   so the steam's positions are measured against the teapot and rise from its lid */
.teapot {
    align-self: center;
    color: #f2f2f2;
}

.teapot pre {
    margin: 0;
    color: inherit;
    font-family: "Courier New", monospace;
    font-size: 1.1rem;
    line-height: 1.15;
    text-align: left;
}

.teapot-steam {
    position: relative;
    height: 2.2rem;
}

.teapot-steam span {
    position: absolute;
    bottom: 0;
    font-size: 1.8rem;
    opacity: 0;
    animation: teapot-steam 2.4s ease-out infinite;
}

.teapot-steam span:nth-child(1) { left: 44%; }
.teapot-steam span:nth-child(2) { left: 52%; animation-delay: 0.8s; }
.teapot-steam span:nth-child(3) { left: 60%; animation-delay: 1.6s; }

@keyframes teapot-steam {
    0% { transform: translateY(0); opacity: 0; }
    25% { opacity: 0.8; }
    100% { transform: translateY(-1.8rem); opacity: 0; }
}

/* 500: an old-school blue screen. Any key or click goes home */
body.bsod {
    background: #0000aa;
    color: #ffffff;
    font-family: "Lucida Console", "Courier New", monospace;
}

.bsod-screen {
    max-width: 640px;
    padding: 16px;
    line-height: 1.6;
    cursor: pointer;
}

.bsod-title {
    text-align: center;
}

.bsod-title span {
    background: #aaaaaa;
    color: #0000aa;
    padding: 0 8px;
}

.bsod-center {
    text-align: center;
}

.bsod-link {
    color: #ffffff;
}

.bsod-cursor {
    animation: bsod-blink 1s steps(1) infinite;
}

@keyframes bsod-blink {
    50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .teapot-steam span {
        animation: none;
        opacity: 0.6;
    }

    .teapot-steam span:nth-child(1) { bottom: 0.2rem; }
    .teapot-steam span:nth-child(3) { bottom: 0.6rem; }

    .bsod-cursor {
        animation: none;
    }
}
