/**
 * 登录 / 注册 / 找回密码 — 动漫卡通认证页（交互动效）
 */

body.auth-page {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans, 'Noto Sans SC', sans-serif);
    background:
        radial-gradient(ellipse 70% 45% at 0% 0%, rgba(251, 146, 60, 0.18), transparent 50%),
        radial-gradient(ellipse 55% 40% at 100% 100%, rgba(234, 88, 12, 0.12), transparent 45%),
        linear-gradient(180deg, #fff7ed 0%, #fffaf5 55%, #ffedd5 100%);
    color: #3b2a1f;
    overflow-x: hidden;
}

/* 漂浮粒子层 */
.auth-bg-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.auth-particle {
    position: absolute;
    color: rgba(249, 115, 22, 0.35);
    font-family: var(--font-display, 'ZCOOL KuaiLe', sans-serif);
    animation: auth-particle-drift linear infinite;
    will-change: transform;
}

@keyframes auth-particle-drift {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(12deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(300px, 44%) minmax(340px, 56%);
    position: relative;
    z-index: 1;
}

/* —— 左侧情报站 —— */
.auth-hero {
    color: #fff7ed;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(165deg, #9a3412 0%, #c2410c 40%, #ea580c 100%);
    border-right: 4px solid rgba(255, 255, 255, 0.25);
}

.auth-hero-mascot {
    position: absolute;
    top: 24px;
    right: 28px;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 50% 50% 50% 12px;
    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.12);
    animation: auth-mascot-bob 3s ease-in-out infinite;
    z-index: 3;
    pointer-events: none;
}

@keyframes auth-mascot-bob {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50% { transform: translateY(-8px) rotate(4deg); }
}

.auth-hero-deco {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.08);
}

.auth-hero-deco--1 {
    width: 280px;
    height: 280px;
    top: -80px;
    right: -60px;
    animation: auth-deco-pulse 8s ease-in-out infinite;
}

.auth-hero-deco--2 {
    width: 160px;
    height: 160px;
    bottom: 10%;
    left: -40px;
    animation: auth-deco-pulse 6s ease-in-out infinite reverse;
}

@keyframes auth-deco-pulse {
    0%, 100% { transform: scale(1); opacity: 0.08; }
    50% { transform: scale(1.08); opacity: 0.14; }
}

.auth-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    opacity: 0.38;
}

.auth-hero-bg-track {
    display: flex;
    height: 100%;
    width: max-content;
    animation: auth-hero-pan 80s linear infinite;
}

.auth-hero-bg-segment {
    display: flex;
    height: 100%;
    flex-shrink: 0;
}

.auth-hero-bg-cell {
    width: clamp(280px, 38vw, 480px);
    height: 100%;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.15) contrast(1.05) hue-rotate(-5deg);
}

@keyframes auth-hero-pan {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.auth-hero-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        155deg,
        rgba(124, 45, 18, 0.85) 0%,
        rgba(194, 65, 12, 0.72) 45%,
        rgba(249, 115, 22, 0.5) 100%
    );
    pointer-events: none;
}

.auth-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 2.5px dashed rgba(255, 255, 255, 0.5);
    font-family: var(--font-display, 'ZCOOL KuaiLe', sans-serif);
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    animation: auth-badge-wiggle 4s ease-in-out infinite;
}

@keyframes auth-badge-wiggle {
    0%, 92%, 100% { transform: rotate(0deg); }
    94% { transform: rotate(-2deg); }
    96% { transform: rotate(2deg); }
    98% { transform: rotate(-1deg); }
}

.auth-hero-title {
    margin: 0;
    font-family: var(--font-display, 'ZCOOL KuaiLe', sans-serif);
    font-size: 2.1rem;
    font-weight: 400;
    line-height: 1.2;
    color: #fff;
    text-shadow: 4px 4px 0 rgba(124, 45, 18, 0.35);
}

.auth-hero-subtitle {
    margin: 0;
    max-width: 36ch;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #ffedd5;
    opacity: 0.95;
}

/* 左侧大号在线人数 */
.auth-hero .online-widget {
    padding: 20px 22px;
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
    border: 3px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 10px 0 rgba(0, 0, 0, 0.1),
        0 18px 40px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.auth-hero .online-widget:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow:
        0 12px 0 rgba(0, 0, 0, 0.12),
        0 22px 48px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.auth-hero .online-widget-title,
.auth-hero .online-widget-hint {
    color: #fff7ed;
}

.auth-hero .online-widget-num {
    font-size: 3rem;
    color: #fff;
    text-shadow: 3px 3px 0 rgba(124, 45, 18, 0.45);
}

.auth-hero .online-widget-num.is-counting {
    animation: auth-num-pop 0.52s ease;
}

@keyframes auth-num-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.auth-hero .online-widget-max,
.auth-hero .online-widget-unit {
    color: #ffedd5;
}

.auth-hero .online-widget-bar {
    background: rgba(0, 0, 0, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    height: 12px;
}

.auth-hero .online-widget-icon {
    color: #fde68a;
    font-size: 1.2rem;
}

.auth-announcements {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: min(36vh, 320px);
    overflow-y: auto;
    padding-right: 6px;
    scroll-behavior: smooth;
}

.auth-announcements::-webkit-scrollbar {
    width: 6px;
}

.auth-announcements::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 6px;
}

.auth-announcement {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 2.5px solid rgba(255, 255, 255, 0.25);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
    cursor: default;
}

.auth-announcement:hover {
    transform: translateX(6px) scale(1.01);
    background: rgba(255, 255, 255, 0.18);
}

.auth-announcement-title {
    margin: 0 0 8px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 2px dashed rgba(255, 255, 255, 0.2);
    padding-bottom: 6px;
}

.auth-announcement-body {
    font-size: 0.84rem;
    line-height: 1.6;
    color: #ffedd5;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 8px;
}

.auth-announcement-meta {
    font-size: 0.72rem;
    color: rgba(255, 237, 213, 0.75);
}

.auth-hero-empty {
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 2.5px dashed rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
    color: #ffedd5;
    text-align: center;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}

.auth-brand-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.45);
    padding: 6px;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.12);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-brand:hover .auth-brand-logo {
    transform: rotate(-6deg) scale(1.05);
}

.auth-brand-name {
    font-family: var(--font-display, 'ZCOOL KuaiLe', sans-serif);
    font-size: 1.25rem;
    color: #fff;
}

/* —— 右侧登录区 —— */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    position: relative;
}

.auth-container {
    width: 100%;
    max-width: 460px;
}

.auth-card {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    background: linear-gradient(165deg, #ffffff 0%, #fffaf5 100%);
    border: 3px solid rgba(249, 115, 22, 0.4);
    border-radius: 28px;
    padding: 36px 32px 28px;
    box-shadow:
        0 10px 0 rgba(194, 65, 12, 0.12),
        0 20px 48px rgba(249, 115, 22, 0.22);
    position: relative;
    transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
}

.auth-card:hover {
    box-shadow:
        0 12px 0 rgba(194, 65, 12, 0.14),
        0 28px 56px rgba(234, 88, 12, 0.28);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 28px;
    right: 28px;
    height: 6px;
    border-radius: 0 0 10px 10px;
    background: linear-gradient(90deg, #fb923c, #f97316, #ea580c, #fb923c);
    background-size: 200% 100%;
    animation: auth-stripe-flow 3s linear infinite;
}

@keyframes auth-stripe-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.auth-card-corner {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 1.4rem;
    color: rgba(249, 115, 22, 0.35);
    animation: auth-corner-spin 6s linear infinite;
    pointer-events: none;
}

@keyframes auth-corner-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 登录卡顶部在线条 */
.auth-live-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
    padding: 14px 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 50%, #fed7aa 100%);
    border: 2.5px solid rgba(249, 115, 22, 0.35);
    box-shadow: 0 5px 0 rgba(249, 115, 22, 0.15);
}

.auth-live-strip-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.auth-live-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 4px 0 rgba(194, 65, 12, 0.35);
    animation: auth-live-pulse 2s ease-in-out infinite;
}

@keyframes auth-live-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.auth-live-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #a67c5b;
    letter-spacing: 0.04em;
}

.auth-live-count {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-family: var(--font-display, 'ZCOOL KuaiLe', sans-serif);
    line-height: 1.1;
}

.auth-live-count strong {
    font-size: 1.85rem;
    font-weight: 400;
    color: var(--primary-700, #c2410c);
    text-shadow: 2px 2px 0 rgba(255, 237, 213, 0.9);
}

.auth-live-count strong.is-counting {
    animation: auth-num-pop 0.52s ease;
}

.auth-live-count em {
    font-style: normal;
    font-size: 1rem;
    color: #a67c5b;
    margin: 0 2px;
}

.auth-live-count span[data-online-max] {
    font-size: 1.1rem;
    color: #7c5a3f;
}

.auth-live-count small {
    font-size: 0.85rem;
    margin-left: 2px;
    color: #a67c5b;
}

.auth-header {
    text-align: center;
    margin-bottom: 26px;
}

.auth-title {
    margin: 0 0 8px;
    font-family: var(--font-display, 'ZCOOL KuaiLe', sans-serif);
    font-size: 2rem;
    font-weight: 400;
    color: var(--primary-800, #9a3412);
    letter-spacing: 0.04em;
}

.auth-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary, #7c5a3f);
    line-height: 1.55;
}

.auth-page .form-group {
    margin-bottom: 18px;
    position: relative;
    transition: transform 0.2s ease;
}

.auth-page .form-group.is-focused {
    transform: translateX(4px);
}

.auth-page .form-label {
    font-weight: 700;
    color: var(--primary-700, #c2410c);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-page .form-label i {
    opacity: 0.7;
    font-size: 0.85rem;
}

.auth-page .form-input {
    border-width: 2.5px;
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 1rem;
}

.auth-copyright {
    text-align: center;
    margin-top: 18px;
    font-size: 0.78rem;
    color: #a67c5b;
    font-family: var(--font-display, 'ZCOOL KuaiLe', sans-serif);
}

.auth-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.auth-page .btn-primary {
    position: relative;
    overflow: hidden;
    min-width: 140px;
}

.auth-btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    transform: scale(0);
    animation: auth-ripple 0.55s ease-out forwards;
    pointer-events: none;
}

@keyframes auth-ripple {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

.auth-link {
    color: var(--primary-600, #ea580c);
    font-size: 0.875rem;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.auth-link:hover {
    color: var(--primary-700, #c2410c);
    transform: translateX(2px);
}

.auth-register-row {
    text-align: center;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 2px dashed rgba(249, 115, 22, 0.25);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 验证码区块 */
.auth-page .captcha-section {
    background: linear-gradient(135deg, #fff7ed, #ffffff);
    border: 2.5px solid rgba(249, 115, 22, 0.3);
    border-radius: 16px;
    padding: var(--space-md, 16px);
    margin-bottom: var(--space-md, 16px);
    box-shadow: 0 4px 0 rgba(249, 115, 22, 0.1);
}

.auth-page .captcha-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm, 10px);
    flex-wrap: wrap;
    gap: 8px;
}

.auth-page .captcha-text {
    font-size: 0.875rem;
    font-weight: 600;
}

.auth-page .captcha-refresh {
    color: var(--primary-600);
    font-size: 0.75rem;
}

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

    .auth-hero {
        padding: 36px 24px;
        border-right: none;
        border-bottom: 4px solid rgba(255, 255, 255, 0.25);
    }

    .auth-hero-title {
        font-size: 1.65rem;
    }

    .auth-hero-mascot {
        width: 56px;
        height: 56px;
        font-size: 1.8rem;
        top: 16px;
        right: 16px;
    }
}

@media (max-width: 640px) {
    .auth-card {
        padding: 28px 20px 22px;
        border-radius: 22px;
    }

    .auth-live-strip {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .auth-live-strip-left {
        justify-content: center;
    }

    .auth-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-form-actions .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-hero-bg-track,
    .auth-particle,
    .auth-hero-mascot,
    .auth-hero-deco--1,
    .auth-hero-deco--2,
    .auth-hero-badge,
    .auth-live-icon,
    .auth-card-corner,
    .auth-card::before {
        animation: none;
    }

    .auth-card {
        transform: none !important;
    }
}
