/* ===== 登录页样式（还原参考站设计） ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(ellipse at bottom, #001d3d 0%, #000814 100%);
    overflow: hidden;
    position: relative;
    color: #ffffff;
}

/* 主容器 */
.container {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 50%, rgba(51, 65, 85, 0.85) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 0 20px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    width: 900px;
    max-width: 90vw;
    min-height: 540px;
    max-height: 94vh;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
}

/* 容器背景装饰 */
.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(102, 126, 234, 0.03) 0%, transparent 50%),
        linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    background-size: 300px 300px, 250px 250px, 200px 200px, 100% 100%;
    background-position: 0% 0%, 100% 100%, 50% 50%, 0% 0%;
    background-repeat: no-repeat, no-repeat, no-repeat, repeat;
    pointer-events: none;
    z-index: 0;
    animation: background-shift 20s ease-in-out infinite;
}

@keyframes background-shift {
    0%, 100% { background-position: 0% 0%, 100% 100%, 50% 50%, 0% 0%; }
    33%      { background-position: 20% 20%, 80% 80%, 30% 70%, 0% 0%; }
    66%      { background-position: 80% 80%, 20% 20%, 70% 30%, 0% 0%; }
}

/* 登录注册切换容器 */
.auth-container {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 540px;
    max-height: 94vh;
    position: relative;
    background-color: rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.auth-panel {
    flex: 1;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

/* 登录面板背景装饰 */
.auth-panel.login {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(51, 65, 85, 0.8) 100%);
    position: relative;
    color: #ffffff;
    z-index: 2;
}

.auth-panel.login::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 70% 30%, rgba(102, 126, 234, 0.08) 0%, transparent 40%),
        linear-gradient(45deg, transparent 48%, rgba(102, 126, 234, 0.02) 50%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(118, 75, 162, 0.02) 50%, transparent 52%);
    background-size: 200px 200px, 20px 20px, 20px 20px;
    pointer-events: none;
    z-index: 0;
    animation: pattern-move 30s linear infinite;
}

/* 注册面板 */
.auth-panel.register {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(99, 102, 241, 0.9) 100%);
    color: white;
    transform: translateX(100%);
    z-index: 1;
}

.auth-panel.register::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
        linear-gradient(45deg, transparent 48%, rgba(255, 255, 255, 0.03) 50%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(255, 255, 255, 0.03) 50%, transparent 52%);
    background-size: 180px 180px, 15px 15px, 15px 15px;
    pointer-events: none;
    z-index: 0;
    animation: pattern-move 25s linear infinite reverse;
}

@keyframes pattern-move {
    0%   { background-position: 0% 0%, 0% 0%, 0% 0%; }
    100% { background-position: 100% 100%, 20px 20px, -20px -20px; }
}

.auth-panel > * {
    position: relative;
    z-index: 2;
}

/* 面板切换状态 */
.auth-panel.register.active {
    transform: translateX(0);
    z-index: 2;
}

.auth-panel.login.shifted {
    transform: translateX(-100%);
    z-index: 1;
}

/* 装饰元素 */
.decoration-left {
    position: absolute;
    top: 50%;
    left: 25%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.3) 0%, rgba(167, 139, 250, 0.2) 50%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: rgba(96, 165, 250, 0.8);
    font-size: 24px;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
}

.decoration-left::before {
    content: '🚀';
    font-size: 100px;
    margin-bottom: 10px;
    opacity: 1.0;
}

.decoration-right {
    position: absolute;
    top: 50%;
    right: 25%;
    transform: translate(50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, rgba(99, 102, 241, 0.2) 50%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: rgba(59, 130, 246, 0.9);
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
}

.decoration-right::before {
    content: '🔐';
    font-size: 60px;
    margin-bottom: 10px;
    opacity: 0.8;
}

.decoration-text {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-top: 5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    color: #ffffff;
}

/* 标题与副标题 */
.auth-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.auth-panel.register .auth-title {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    font-size: 16px;
    color: #cbd5e1;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.auth-panel.register .auth-subtitle { color: rgba(255, 255, 255, 0.8); }

/* 表单 */
.auth-form { width: 100%; }

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-field {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    color: #ffffff;
    outline: none;
}

.input-field:focus {
    border-color: #60a5fa;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.input-field::placeholder { color: #999; }

.input-field.email-code { padding-right: 100px !important; }

.input-group .buttom-get-code {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 10px;
    width: 80px;
    padding: 3px 0;
    height: auto;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    transition: box-shadow 0.3s ease;
}

.input-group .buttom-get-code:hover { box-shadow: 0 10px 25px rgba(96, 165, 250, 0.4); }
.input-group .buttom-get-code:disabled { filter: grayscale(0.6); cursor: not-allowed; }

.auth-panel.register .input-field {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.auth-panel.register .input-field::placeholder { color: rgba(255, 255, 255, 0.7); }

.auth-panel.register .input-field:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* 提交按钮 */
.auth-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.auth-btn:active { transform: translateY(0); }

.auth-panel.register .auth-btn {
    background: white;
    color: #667eea;
}

.auth-panel.register .auth-btn:hover { box-shadow: 0 10px 20px rgba(255, 255, 255, 0.3); }

/* 第三方登录 */
.social-login { margin-top: 20px; }

.social-title {
    text-align: center;
    font-size: 14px;
    color: #cbd5e1;
    margin-bottom: 15px;
    position: relative;
}

.auth-panel.register .social-title { color: rgba(255, 255, 255, 0.8); }

.social-title::before,
.social-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: #e1e8ed;
}

.auth-panel.register .social-title::before,
.auth-panel.register .social-title::after {
    background: rgba(255, 255, 255, 0.3);
}

.social-title::before { left: 0; }
.social-title::after  { right: 0; }

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    backdrop-filter: blur(10px);
}

.auth-panel.register .social-btn {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(96, 165, 250, 0.4);
    border-color: #60a5fa;
    background-color: rgba(255, 255, 255, 0.15);
}

.social-btn.qq {
    background-image: url("/assets/img/qq.ico") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 30px 30px !important;
}

.social-btn.github {
    background-image: url("/assets/img/github.ico") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 30px 30px !important;
}

/* 切换按钮 */
.switch-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    color: #60a5fa;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.auth-panel.register .switch-btn { color: white; }

.switch-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(96, 165, 250, 0.3);
}

/* 协议复选框 */
.terms-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.terms-checkbox {
    margin-right: 10px;
    margin-top: 2px;
    cursor: pointer;
}

.terms-label {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
    user-select: none;
}

.auth-panel.register .terms-label { color: rgba(255, 255, 255, 0.8); }

.terms-label a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-panel.register .terms-label a { color: white; }

.terms-label a:hover { text-decoration: underline; }

/* 通知 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 20px;
    border-radius: 10px;
    color: #fff;
    font-size: 13.5px;
    z-index: 99999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 320px;
    word-break: break-all;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    body { padding: 20px 0; }

    .container {
        width: 95vw;
        max-width: 400px;
        min-height: 540px;
        border-radius: 16px;
    }

    .auth-container {
        flex-direction: column;
        position: relative;
        height: auto;
        min-height: 540px;
    }

    .auth-panel {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        padding: 35px 25px;
        border-radius: 10px;
        backface-visibility: hidden;
        transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    .auth-panel.register { display: none; }
    .auth-panel.register.active { display: block; transform: rotateY(0deg); z-index: 2; }
    .auth-panel.login { transform: rotateY(0deg); z-index: 2; }
    .auth-panel.login.shifted { display: none; }

    .decoration-left,
    .decoration-right { display: none; }

    .switch-btn {
        position: absolute;
        top: 16px;
        left: 16px;
        right: auto;
        margin: 0;
        display: block;
        background: rgba(255, 255, 255, 0.1);
        border: 2px solid rgba(255, 255, 255, 0.2);
        color: #60a5fa;
        padding: 8px 20px;
        border-radius: 25px;
        font-size: 14px;
    }

    .auth-panel.register .switch-btn {
        background: rgba(255, 255, 255, 0.2);
        color: white;
    }

    .auth-title { font-size: 26px; margin-bottom: 8px; }
    .auth-subtitle { font-size: 13px; margin-bottom: 25px; }
    .input-group { margin-bottom: 20px; }
    .input-field { padding: 14px 16px; font-size: 15px; border-radius: 10px; }
    .auth-btn { padding: 14px; font-size: 15px; border-radius: 10px; margin-bottom: 15px; }
    .terms-container { margin-bottom: 15px; }
    .terms-label { font-size: 11px; line-height: 1.3; }
    .social-login { margin-top: 15px; }
    .social-title { font-size: 12px; margin-bottom: 12px; }
    .social-title::before, .social-title::after { width: 25%; }
    .social-buttons { gap: 12px; }
    .social-btn { width: 42px; height: 42px; border-radius: 50%; }

    .auth-btn, .social-btn, .switch-btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
}

@media (max-width: 480px) {
    body { padding: 15px 0; }

    .container {
        width: 92vw;
        max-width: 350px;
        min-height: 480px;
        border-radius: 12px;
    }

    .auth-panel { padding: 30px 20px; }
    .auth-title { font-size: 24px; margin-bottom: 6px; }
    .auth-subtitle { font-size: 12px; margin-bottom: 20px; }
    .input-group { margin-bottom: 16px; }
    .input-field { padding: 12px 14px; font-size: 14px; border-radius: 8px; }
    .auth-btn { padding: 12px; font-size: 14px; border-radius: 8px; margin-bottom: 12px; }
    .terms-container { margin-bottom: 12px; }
    .terms-label { font-size: 10px; line-height: 1.2; }
    .switch-btn { font-size: 12px; padding: 6px 10px; }
    .social-title { font-size: 11px; margin-bottom: 10px; }
    .social-btn { width: 38px; height: 38px; }
}

/* 防止input自动填充背景颜色（必须用不透明色才能盖住 Chrome 强制填充的白色背景） */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #2d3a52 inset !important;
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff;
    transition: background-color 5000s ease-in-out 0s;
}

/* 注册面板背景为蓝紫渐变，遮盖色需与其输入框视觉底色一致 */
.auth-panel.register input:-webkit-autofill,
.auth-panel.register input:-webkit-autofill:hover,
.auth-panel.register input:-webkit-autofill:focus,
.auth-panel.register input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #5663ef inset !important;
}

input:autofill {
    box-shadow: 0 0 0 1000px #2d3a52 inset !important;
    -webkit-text-fill-color: #fff !important;
}

.auth-panel.register input:autofill {
    box-shadow: 0 0 0 1000px #5663ef inset !important;
}
