/* === Auth Modal - 商业风格注册登录弹窗 === */

.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-overlay.active {
    display: flex;
    opacity: 1;
}

.auth-modal {
    width: 420px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18), 0 4px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

.auth-overlay.active .auth-modal {
    transform: translateY(0) scale(1);
}

/* === 左右分栏（大屏） === */
.auth-modal-inner {
    display: flex;
    border-radius: 20px;
    overflow: hidden;
}

/* 左侧品牌区 */
.auth-brand-side {
    width: 200px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-brand-side::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.auth-brand-side::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.auth-brand-logo {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.auth-brand-tagline {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.auth-brand-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.auth-brand-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
}

.auth-brand-feature svg {
    flex-shrink: 0;
}

/* 右侧表单区 */
.auth-form-side {
    flex: 1;
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
}

/* === 关闭按钮 === */
.auth-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    color: #666;
}

.auth-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

/* === 标题区 === */
.auth-header {
    margin-bottom: 28px;
}

.auth-title {
    font-size: 24px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 14px;
    color: #9ca3af;
}

/* === 输入框 === */
.auth-input-group {
    margin-bottom: 16px;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    color: #9ca3af;
    pointer-events: none;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.auth-input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 44px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    color: #111827;
    background: #f9fafb;
    transition: all 0.2s;
    outline: none;
}

.auth-input:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.auth-input:focus + .auth-input-icon,
.auth-input-wrap:focus-within .auth-input-icon {
    color: #667eea;
}

.auth-input::placeholder {
    color: #c0c4cc;
}

/* 验证码输入框 */
.auth-code-wrap {
    display: flex;
    gap: 10px;
}

.auth-code-wrap .auth-input-wrap {
    flex: 1;
}

.auth-send-btn {
    flex-shrink: 0;
    height: 48px;
    padding: 0 18px;
    border: 2px solid #667eea;
    border-radius: 12px;
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    min-width: 110px;
}

.auth-send-btn:hover:not(:disabled) {
    background: #667eea;
    color: #fff;
}

.auth-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #d1d5db;
    color: #9ca3af;
}

/* === 主按钮 === */
.auth-submit-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.auth-submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4292 100%);
    opacity: 0;
    transition: opacity 0.25s;
}

.auth-submit-btn:hover::before {
    opacity: 1;
}

.auth-submit-btn:active {
    transform: scale(0.98);
}

.auth-submit-btn span {
    position: relative;
    z-index: 1;
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading 动画 */
.auth-btn-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: authSpin 0.6s linear infinite;
}

@keyframes authSpin {
    to { transform: rotate(360deg); }
}

/* === 提示文字 === */
.auth-hint {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    margin-top: 16px;
    line-height: 1.6;
}

.auth-hint a {
    color: #667eea;
    cursor: pointer;
    font-weight: 500;
}

.auth-hint a:hover {
    text-decoration: underline;
}

/* === "记住我"勾选框 === */
.auth-remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
    color: #9ca3af;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.auth-remember-me:hover {
    color: #e5e7eb;
}

.auth-remember-me input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #667eea;
    cursor: pointer;
}

.auth-remember-me span {
    line-height: 1.4;
}

/* === 错误提示 === */
.auth-error {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #ef4444;
    font-size: 13px;
    margin-bottom: 16px;
    animation: authShake 0.4s ease;
}

.auth-error.show {
    display: flex;
}

@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* === 成功提示 === */
.auth-success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    animation: authPop 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes authPop {
    0% { transform: scale(0); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.auth-success-text {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.auth-success-desc {
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
    margin-top: 4px;
}

/* === 分隔线 === */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #d1d5db;
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* === 响应式 === */
@media (max-width: 480px) {
    .auth-brand-side {
        display: none;
    }
    
    .auth-modal {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        min-height: 100vh;
    }
    
    .auth-overlay {
        padding: 0;
    }
    
    .auth-form-side {
        padding: 48px 24px 32px;
        min-height: 100vh;
        justify-content: center;
    }
    
    .auth-close-btn {
        top: 20px;
        right: 20px;
    }
}

@media (max-width: 768px) and (min-width: 481px) {
    .auth-brand-side {
        width: 160px;
        padding: 32px 20px;
    }
    
    .auth-brand-feature {
        font-size: 11px;
    }
}
