:root {
    --page-bg: #f2f4f8;
    --shell-bg: #ffffff;
    --scene-bg: linear-gradient(160deg, #f7f8ec 0%, #eef6ff 100%);
    --ink-strong: #131b2f;
    --ink-muted: #67748e;
    --line-soft: #d9e0ea;
    --accent: #2d5bff;
    --shadow-lg: 0 24px 60px rgba(13, 29, 61, 0.16);
}

* {
    box-sizing: border-box;
}

body.auth-page {
    margin: 0;
    font-family: "Poppins", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink-strong);
    background:
        radial-gradient(circle at 8% 8%, rgba(58, 102, 255, 0.12), transparent 34%),
        radial-gradient(circle at 95% 90%, rgba(0, 182, 255, 0.1), transparent 34%),
        var(--page-bg);
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 14px;
}

.auth-shell {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    background: var(--shell-bg);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.85);
    animation: fadeUp 0.6s ease;
}

.auth-scene {
    position: relative;
    overflow: hidden;
    background: var(--scene-bg);
    padding: 38px 34px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.auth-scene::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    top: -120px;
    left: -90px;
    background: radial-gradient(circle, rgba(45, 91, 255, 0.22), rgba(45, 91, 255, 0));
}

.auth-scene::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    bottom: -140px;
    right: -120px;
    background: radial-gradient(circle, rgba(0, 182, 255, 0.2), rgba(0, 182, 255, 0));
}

.scene-hero {
    position: relative;
    z-index: 2;
    width: min(430px, 92%);
    max-height: 66vh;
    object-fit: contain;
    margin: 8px auto 18px;
    filter: drop-shadow(0 26px 26px rgba(41, 58, 95, 0.18));
}

.scene-title {
    position: relative;
    z-index: 2;
    margin: 4px 0 8px;
    font-size: clamp(1.25rem, 2.1vw, 1.86rem);
    font-weight: 800;
    letter-spacing: 0.01em;
}

.scene-subtitle {
    position: relative;
    z-index: 2;
    margin: 0;
    color: var(--ink-muted);
    font-size: 0.95rem;
    max-width: 420px;
}

.scene-chips {
    position: relative;
    z-index: 2;
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.scene-chips span {
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #183064;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 16px rgba(45, 66, 107, 0.1);
}

.scene-badge {
    position: absolute;
    z-index: 3;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    box-shadow: 0 14px 22px rgba(35, 51, 84, 0.18);
    animation: floatY 3.1s ease-in-out infinite;
}

.scene-badge-one {
    left: 32px;
    top: 30px;
    background: linear-gradient(135deg, #5fa4ff, #2d5bff);
}

.scene-badge-two {
    right: 40px;
    top: 86px;
    background: linear-gradient(135deg, #ff6f85, #ff4f89);
    animation-delay: -1.1s;
}

.scene-badge-three {
    right: 36px;
    bottom: 36px;
    background: linear-gradient(135deg, #ffd860, #ffba42);
    animation-delay: -2s;
}

.auth-panel {
    background: #ffffff;
    display: flex;
    align-items: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    background: #ffffff;
    animation: fadeUp 0.45s ease;
}

.auth-shell .auth-card {
    max-width: 430px;
    margin: 0 auto;
    padding: 16px 8px;
}

.auth-wrapper > .auth-card {
    width: min(470px, 100%);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    padding: 34px 28px 28px;
}

.brand-header {
    text-align: center;
    margin-bottom: 10px;
}

.brand-logo {
    width: 76px;
    height: 76px;
    margin: 0 auto;
    border-radius: 22px;
    background: linear-gradient(145deg, #eef3ff, #ffffff);
    border: 1px solid #edf1f8;
    box-shadow: 0 14px 26px rgba(54, 84, 143, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
}

.auth-kicker {
    margin: 14px 0 6px;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    color: #5473ff;
}

.auth-title {
    margin: 0;
    font-size: 1.68rem;
    line-height: 1.28;
    font-weight: 800;
    color: #101a30;
}

.auth-subtitle {
    margin: 10px 0 18px;
    color: var(--ink-muted);
    font-size: 0.93rem;
}

.form-floating > .form-control,
.form-floating > .form-control-plaintext {
    height: 54px;
    border-radius: 12px;
    border: 1px solid var(--line-soft);
    background: #ffffff;
    color: #1d2840;
    box-shadow: none;
}

.form-floating > label {
    color: #7e8ca7;
}

.form-control:focus {
    border-color: rgba(45, 91, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(45, 91, 255, 0.14);
    background: #ffffff;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.form-check label {
    margin: 0;
    color: #697791;
    font-size: 0.88rem;
    cursor: pointer;
}

.btn-gradient {
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.01em;
    background: linear-gradient(130deg, #0f172a, #1c2745 48%, #2d5bff);
    box-shadow: 0 14px 24px rgba(24, 45, 92, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-gradient:hover {
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 17px 28px rgba(24, 45, 92, 0.34);
    filter: brightness(1.03);
}

.btn-outline-primary {
    border-radius: 11px;
    border-color: rgba(45, 91, 255, 0.45);
    color: #3150be;
    background: rgba(45, 91, 255, 0.05);
    font-size: 0.83rem;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.divider {
    position: relative;
    text-align: center;
    color: #8d9ab4;
    margin: 16px 0;
}

.divider::before,
.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: linear-gradient(90deg, rgba(141, 154, 180, 0), rgba(141, 154, 180, 0.5), rgba(141, 154, 180, 0));
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.auth-cta-note {
    color: #6d7c98;
}

.text-link {
    color: #2f59d9;
    text-decoration: none;
    font-weight: 600;
}

.text-link:hover {
    color: #1f41a9;
    text-decoration: underline;
}

.image-code,
.prompt-image-code {
    width: 100%;
    height: 54px;
    border-radius: 11px;
    border: 1px solid rgba(45, 91, 255, 0.2);
    background: #ffffff;
    cursor: pointer;
}

/* Register page: equal-sized dual cards with distinct backgrounds */
.auth-register-grid .auth-shell {
    width: min(1260px, 100%);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
}

.auth-register-grid .auth-scene,
.auth-register-grid .auth-panel {
    min-height: 760px;
    border-radius: 30px;
    border: 1px solid #e6eaf4;
}

.auth-register-grid .auth-scene {
    background: linear-gradient(165deg, #f8f8ea 0%, #eef5ff 100%);
    padding: 42px 36px;
}

.auth-register-grid .auth-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f6f8ff 100%);
    padding: 34px 34px 30px;
}

.auth-register-grid .auth-card {
    max-width: 470px;
    width: 100%;
    margin: 0 auto;
    padding: 10px 4px;
    background: transparent;
}

.auth-register-grid .scene-hero {
    width: min(480px, 95%);
    max-height: 560px;
    margin-bottom: 20px;
}

@keyframes floatY {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-9px);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 560px;
    }

    .auth-scene {
        display: none;
    }

    .auth-panel {
        padding: 16px;
    }

    .auth-shell .auth-card {
        max-width: none;
        padding: 10px 4px;
    }

    .auth-register-grid .auth-shell {
        gap: 14px;
        background: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.85);
        box-shadow: var(--shadow-lg);
        border-radius: 24px;
    }

    .auth-register-grid .auth-panel {
        border: 0;
        border-radius: 0;
        min-height: auto;
        background: #ffffff;
        padding: 16px;
    }
}

@media (max-width: 576px) {
    .auth-wrapper {
        padding: 16px 10px;
    }

    .auth-shell,
    .auth-wrapper > .auth-card {
        border-radius: 20px;
    }

    .auth-wrapper > .auth-card {
        padding: 26px 18px 22px;
    }

    .auth-title {
        font-size: 1.38rem;
    }
}
