/* Login + signup pages. Loaded alongside base.css. */

.card {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 60px rgba(59, 130, 246, 0.08);
    backdrop-filter: blur(8px);
}

.brand {
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #93c5fd 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

.subtitle {
    text-align: center;
    font-size: 14px;
    color: #8a8a8a;
    margin-bottom: 32px;
}

.error {
    display: none;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.16) 0%, rgba(239, 68, 68, 0.07) 100%);
    border: 1px solid rgba(239, 68, 68, 0.28);
    border-left: 3px solid #ef4444;
    color: #fecaca;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    padding: 13px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.14);
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.error.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.error-icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    color: #f87171;
}

form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-size: 13px;
    font-weight: 600;
    color: #a0a0a0;
    padding-left: 2px;
}

input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    color: #f0f0f0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder {
    color: #6a6a6a;
}

input:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.6);
    background: rgba(96, 165, 250, 0.06);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.input-wrap {
    position: relative;
}

/* Leave room for the eye button so text doesn't slide under it. */
.input-wrap input {
    padding-right: 46px;
}

/* Icon-only button — override the generic gradient button styles below. */
.toggle-password {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 44px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 0 10px 10px 0;
    box-shadow: none;
    color: #8a8a8a;
    cursor: pointer;
    transition: color 0.2s ease;
    touch-action: manipulation;
}

.toggle-password:hover {
    color: #cfcfcf;
    background: none;
    box-shadow: none;
    transform: none;
}

.toggle-password:active {
    transform: none;
}

.toggle-password svg {
    width: 18px;
    height: 18px;
}

.toggle-password .icon-hide {
    display: none;
}

.toggle-password.showing .icon-eye {
    display: none;
}

.toggle-password.showing .icon-hide {
    display: block;
}

button {
    margin-top: 8px;
    padding: 15px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    touch-action: manipulation;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 100%);
}

button:active {
    transform: translateY(0);
}

.footer {
    text-align: center;
    font-size: 13px;
    color: #8a8a8a;
    margin-top: 24px;
}

.footer a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

@media (hover: none) {
    button:hover {
        transform: none;
    }
}

/* ======================================================================
   Cinematic authentication screens
   ====================================================================== */

:root {
    --auth-ink: #0d0e0c;
    --auth-cream: #f4f0e8;
    --auth-dim: #b1aca4;
    --auth-faint: #7e7a73;
    --auth-line: rgba(238, 232, 220, 0.34);
    --auth-amber: #f1bd68;
    --auth-amber-strong: #ffd486;
    --auth-serif: 'Playfair Display', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
    --auth-pad: clamp(24px, 8.8vw, 82px);
}

body.auth-page {
    position: relative;
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0;
    overflow-x: hidden;
    color: var(--auth-cream);
    background-color: var(--auth-ink);
    background-image:
        linear-gradient(to right,
            rgba(13, 14, 12, 0.99) 0%,
            rgba(13, 14, 12, 0.94) 42%,
            rgba(13, 14, 12, 0.73) 70%,
            rgba(13, 14, 12, 0.24) 100%),
        linear-gradient(to bottom,
            rgba(13, 14, 12, 0.06) 0%,
            rgba(13, 14, 12, 0.04) 48%,
            rgba(13, 14, 12, 0.52) 78%,
            rgba(13, 14, 12, 0.96) 100%);
    background-repeat: no-repeat;
    background-size: cover, cover;
    background-position: center, center;
    background-attachment: fixed;
}

body.auth-page::before {
    content: '';
    position: fixed;
    right: 0;
    bottom: 0;
    z-index: 0;
    width: 100%;
    height: 46vh;
    height: 46dvh;
    pointer-events: none;
    background: url('/static/img/hero-cinema.webp') right bottom / auto 70% no-repeat;
    -webkit-mask-image: linear-gradient(to bottom, transparent 12%, #000 47%);
    mask-image: linear-gradient(to bottom, transparent 12%, #000 47%);
    opacity: 0.94;
}

body.auth-page::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(to bottom,
            var(--auth-ink) 0%,
            var(--auth-ink) 61%,
            rgba(13, 14, 12, 0.82) 68%,
            transparent 77%),
        radial-gradient(circle at 8% 5%, rgba(76, 61, 39, 0.07), transparent 31%),
        linear-gradient(to right, transparent 0 58%, rgba(0, 0, 0, 0.05));
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1600px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 0 var(--auth-pad) 48px;
}

.auth-header {
    display: flex;
    align-items: center;
    width: 100%;
    height: clamp(78px, 9.9vh, 94px);
    border-bottom: 1px solid var(--auth-line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    font-family: var(--auth-serif);
    font-size: clamp(28px, 3.55vw, 36px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.025em;
    text-align: left;
    color: var(--auth-cream);
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: currentColor;
    text-decoration: none;
}

.brand-play {
    width: 31px;
    height: 31px;
    flex: 0 0 auto;
    color: var(--auth-amber);
    filter: drop-shadow(0 0 12px rgba(241, 189, 104, 0.16));
}

.auth-page .card {
    width: 100%;
    max-width: 478px;
    margin-top: clamp(43px, 5.7vh, 54px);
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.auth-page .eyebrow {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.29em;
    text-transform: uppercase;
    color: var(--auth-amber);
}

.auth-page h1 {
    margin: 0;
    font-family: var(--auth-serif);
    font-size: clamp(46px, 6.95vw, 60px);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.045em;
    color: var(--auth-cream);
}

.auth-page .subtitle {
    margin: 10px 0 0;
    font-size: clamp(19px, 2.7vw, 23px);
    line-height: 1.4;
    text-align: left;
    color: var(--auth-cream);
}

.auth-page form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 50px;
}

.auth-page .field {
    gap: 8px;
}

.auth-page label {
    padding: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--auth-cream);
}

.auth-page input {
    height: 62px;
    padding: 0 20px;
    font-family: inherit;
    font-size: 17px;
    color: var(--auth-cream);
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(238, 232, 220, 0.4);
    border-radius: 9px;
    box-shadow: none;
}

.auth-page input::placeholder {
    color: #85817b;
}

.auth-page input:focus {
    outline: none;
    color: var(--auth-cream);
    background: rgba(241, 189, 104, 0.04);
    border-color: var(--auth-amber);
    box-shadow: 0 0 0 3px rgba(241, 189, 104, 0.1);
}

.auth-page .input-wrap input {
    padding-right: 56px;
}

.auth-page .toggle-password {
    top: 0;
    right: 4px;
    width: 52px;
    height: 62px;
    margin: 0;
    padding: 0;
    color: #b8b3ab;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-transform: none;
}

.auth-page .toggle-password:hover {
    color: var(--auth-cream);
    background: none;
    box-shadow: none;
    transform: none;
}

.auth-page .toggle-password svg {
    width: 22px;
    height: 22px;
}

.field-help {
    margin: 1px 0 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--auth-dim);
}

.auth-page .submit-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 61px;
    margin: 5px 0 0;
    padding: 0 54px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: #21170c;
    background: var(--auth-amber);
    border: 1px solid var(--auth-amber);
    border-radius: 8px;
    box-shadow: 0 12px 34px rgba(121, 72, 18, 0.17);
}

.auth-page .submit-btn svg {
    position: absolute;
    right: 21px;
    width: 23px;
    height: 23px;
}

.auth-page .submit-btn:hover {
    color: #21170c;
    background: var(--auth-amber-strong);
    border-color: var(--auth-amber-strong);
    box-shadow: 0 16px 42px rgba(121, 72, 18, 0.24);
    transform: translateY(-1px);
}

.auth-page .footer {
    margin-top: 27px;
    font-size: 15px;
    line-height: 1.5;
    text-align: left;
    color: var(--auth-dim);
}

.auth-page .footer a {
    font-weight: 500;
    color: var(--auth-amber);
}

.auth-page .footer a:hover {
    color: var(--auth-amber-strong);
    text-decoration: none;
}

.auth-page .error {
    position: fixed;
    top: 110px;
    right: max(24px, var(--auth-pad));
    z-index: 20;
    width: min(390px, calc(100vw - 48px));
    margin: 0;
    padding: 13px 15px;
    color: #f0c3ba;
    background: rgba(36, 23, 21, 0.97);
    border: 1px solid rgba(180, 87, 76, 0.45);
    border-left: 2px solid #b4574c;
    border-radius: 8px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(12px);
}

.auth-page :focus-visible {
    outline: 2px solid var(--auth-amber);
    outline-offset: 2px;
}

@media (min-width: 621px) and (min-height: 700px) {
    body.auth-page {
        height: 100vh;
        height: 100dvh;
        overflow-y: hidden;
    }
}

@media (max-height: 820px) and (min-width: 621px) {
    .auth-header {
        height: 72px;
    }

    .auth-page .card {
        margin-top: 28px;
    }

    .auth-page .eyebrow {
        margin-bottom: 8px;
        font-size: 11px;
    }

    .auth-page h1 {
        font-size: 45px;
    }

    .auth-page .subtitle {
        margin-top: 6px;
        font-size: 18px;
    }

    .auth-page form {
        gap: 13px;
        margin-top: 21px;
    }

    .auth-page .field {
        gap: 5px;
    }

    .auth-page label {
        font-size: 13px;
    }

    .auth-page input,
    .auth-page .toggle-password {
        height: 52px;
    }

    .auth-page input {
        font-size: 15px;
    }

    .field-help {
        font-size: 12px;
    }

    .auth-page .submit-btn {
        height: 53px;
        margin-top: 2px;
        font-size: 16px;
    }

    .auth-page .footer {
        margin-top: 18px;
        font-size: 13px;
    }
}

@media (max-width: 620px) {
    :root {
        --auth-pad: 22px;
    }

    body.auth-page {
        min-height: 100dvh;
        background-size: cover, cover;
        background-position: center, center;
        background-attachment: scroll;
    }

    body.auth-page::before {
        height: 50dvh;
        background-size: auto 72%;
    }

    .auth-shell {
        min-height: 100dvh;
        padding-bottom: 44px;
    }

    .auth-header {
        height: 72px;
    }

    .brand {
        gap: 10px;
        font-size: 27px;
    }

    .brand-play {
        width: 27px;
        height: 27px;
    }

    .auth-page .card {
        max-width: none;
        margin-top: 34px;
    }

    .auth-page .eyebrow {
        font-size: 11px;
    }

    .auth-page h1 {
        font-size: clamp(41px, 13vw, 54px);
    }

    .auth-page .subtitle {
        font-size: 18px;
    }

    .auth-page form {
        gap: 17px;
        margin-top: 32px;
    }

    .auth-page input,
    .auth-page .toggle-password {
        height: 56px;
    }

    .auth-page input {
        padding-right: 16px;
        padding-left: 16px;
        font-size: 16px;
    }

    .auth-page .input-wrap input {
        padding-right: 52px;
    }

    .auth-page .submit-btn {
        height: 57px;
        font-size: 17px;
    }

    .auth-page .error {
        position: static;
        width: 100%;
        margin: 20px 0 0;
    }
}

@media (hover: none) {
    .auth-page .submit-btn:hover {
        transform: none;
    }
}
