/* =============================================
   Auth 模块样式 - 极受好评的深色玻璃拟态
   ============================================= */

/* 背景粒子画布 */
.nebula-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at center, #010409, #000000);
}

body.loading-state {
    overflow: hidden;
    margin: 0;
}

.auth-section {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    background: transparent;
}

@media (min-width: 1024px) {
    .auth-section { grid-template-columns: 1fr 1fr; }
}

/* ── 左侧 Banner ── */
.auth-banner {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: 64px;
    background: linear-gradient(135deg, #1d9bf0 0%, #7c3aed 50%, #f91880 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .auth-banner { display: flex; }
}

.banner-bg-blur {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    pointer-events: none;
}
.banner-bg-blur:nth-child(1) { width: 300px; height: 300px; background: #fff1f2; top: -50px; left: -50px; }
.banner-bg-blur:nth-child(2) { width: 400px; height: 400px; background: #818cf8; bottom: -100px; right: -50px; }

.banner-logo {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 26px;
    font-weight: 900;
}
.banner-logo .logo-icon {
    width: 54px; height: 54px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
}

.monster-stage {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 440px;
    padding-bottom: 20px;
}
.monster-scene {
    position: relative;
    width: 420px;
    height: 440px;
}
.monster {
    position: absolute;
    bottom: 0;
    transform-origin: bottom center;
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), height 0.6s ease;
}
.m-purple { left: 50px; width: 150px; height: 360px; background: #6C3FF5; border-radius: 10px 10px 0 0; z-index: 1; }
.m-black { left: 210px; width: 110px; height: 290px; background: #2D2D2D; border-radius: 8px 8px 0 0; z-index: 2; }
.m-orange { left: -20px; width: 220px; height: 180px; background: #FF9B6B; border-radius: 110px 110px 0 0; z-index: 3; }
.m-yellow { left: 260px; width: 130px; height: 210px; background: #E8D754; border-radius: 65px 65px 0 0; z-index: 4; }

/* 浅色模式怪兽配色修正 */
.light-mode .m-purple { background: #818cf8; }
.light-mode .m-black { background: #4b5563; }
.light-mode .m-orange { background: #fb923c; }
.light-mode .m-yellow { background: #fbbf24; }
.light-mode .pupil, .light-mode .mouth-yellow { background: #1f2937; }

.eyes { position: absolute; display: flex; transition: all 0.4s ease; }
.eyes-purple { top: 40px; left: 40px; gap: 24px; }
.eyes-black { top: 25px; left: 22px; gap: 20px; }
.eyes-orange { top: 80px; left: 70px; gap: 26px; }
.eyes-yellow { top: 40px; left: 45px; gap: 24px; }

.eyeball {
    background: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    overflow: hidden;
    transition: height 0.15s;
}
.eyes-purple .eyeball { width: 18px; height: 18px; }
.eyes-black .eyeball { width: 16px; height: 16px; }
.eyeball.no-white { background: transparent !important; }

.pupil {
    background: #2D2D2D;
    border-radius: 50%;
    position: absolute;
    transition: transform 0.1s ease-out;
}
.eyes-purple .pupil { width: 8px; height: 8px; }
.eyes-black .pupil { width: 6px; height: 6px; }
.eyes-orange .pupil, .eyes-yellow .pupil { width: 12px; height: 12px; background: #2D2D2D; }

.eyeball.blink { height: 2px; }

.mouth-yellow {
    position: absolute;
    top: 85px; left: 35px;
    width: 60px; height: 4px;
    background: #2D2D2D;
    border-radius: 4px;
    transition: all 0.4s ease;
}

/* ── 右侧表单区 ── */
.auth-form-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-inner {
    width: 100%;
    max-width: 440px;
    padding: 48px;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.6);
}

.auth-icon-box {
    width: 64px; height: 64px;
    background: #1d9bf0;
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
}
.auth-icon-box i { width: 30px; height: 30px; color: #fff; }

.auth-header { text-align: center; margin-bottom: 32px; }
.auth-header h1 { font-size: 32px; font-weight: 950; color: #fff; margin: 0; }
.auth-header p { color: rgba(255,255,255,0.5); margin-top: 8px; font-weight: 500; }

/* 表单输入框 - 彻底解决白底问题 */
.auth-form { display: flex; flex-direction: column; gap: 20px; }

.input-wrap {
    position: relative;
    width: 100%;
}
.input-wrap i {
    position: absolute;
    left: 18px; top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.4);
    pointer-events: none;
    z-index: 2;
}

/* 强制重置浏览器默认背景颜色 */
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 16px 20px 16px 52px;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    font-size: 16px;
    font-weight: 500;
    color: #fff !important;
    outline: none;
    transition: all 0.2s;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.input-wrap.no-icon input { padding-left: 20px; }

.auth-form input:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: #1d9bf0 !important;
    box-shadow: 0 0 0 4px rgba(29, 155, 240, 0.2) !important;
}

/* 解决浏览器自动填充背景色问题 */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-text-fill-color: #fff !important;
    -webkit-box-shadow: 0 0 0 1000px #0f172a inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

.auth-submit {
    width: 100%;
    padding: 18px;
    background: #1d9bf0;
    color: #fff;
    border: none;
    border-radius: 18px;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(29, 155, 240, 0.4);
    margin-top: 10px;
}
.auth-submit:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(29, 155, 240, 0.6); background: #1a8cd8; }
.auth-submit:active { transform: translateY(0); }

.switch-btn {
    width: 100%;
    margin-top: 24px;
    background: none;
    border: none;
    color: #1d9bf0;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}
.switch-btn:hover { text-decoration: underline; }

.auth-msg {
    margin-bottom: 20px;
    padding: 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border: 1px solid transparent;
}
.auth-msg.error { background: rgba(244, 63, 94, 0.1); color: #fb7185; border-color: rgba(244, 63, 94, 0.2); }
.auth-msg.success { background: rgba(16, 185, 129, 0.1); color: #34d399; border-color: rgba(16, 185, 129, 0.2); }
.auth-msg.hidden { display: none; }
