/* 认证页面按钮样式 */

/* 提交按钮 */
.submit-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #0f766e 0%, #0d5a52 100%);
    box-shadow: 0 8px 25px rgba(20, 184, 166, 0.4);
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.1);
}

.submit-btn:disabled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.1);
}

/* 在step-actions中的submit-btn特殊样式 */
.step-actions .submit-btn {
    width: auto;
    flex: 1;
    max-width: 200px;
}

/* 按钮加载状态动画 */
.submit-btn.loading {
    position: relative;
    color: transparent;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: buttonSpin 1s linear infinite;
}

@keyframes buttonSpin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 按钮成功状态 */
.submit-btn.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.submit-btn.success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* 按钮错误状态 */
.submit-btn.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.submit-btn.error:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* 步骤操作按钮 */
.step-actions {
    display: flex;
    justify-content: flex-end; /* 默认只有一个按钮时靠右 */
    margin-top: 30px;
    gap: 15px;
}

.step-actions.has-prev-next {
    justify-content: space-between; /* 同时有上一步与下一步/提交时两端对齐 */
}

.prev-step-btn, .next-step-btn {
    padding: 12px 24px;
    border: 2px solid #4a5568;
    border-radius: 10px;
    background: #1a202c;
    color: #e2e8f0;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.prev-step-btn::before, .next-step-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.1), transparent);
    transition: left 0.5s ease;
}

.prev-step-btn:hover, .next-step-btn:hover {
    border-color: #14b8a6;
    color: #14b8a6;
    background: #1a202c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.2);
}

.prev-step-btn:hover::before, .next-step-btn:hover::before {
    left: 100%;
}

.prev-step-btn:active, .next-step-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.3);
}

.prev-step-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #4a5568;
    color: #4a5568;
    transform: none;
    box-shadow: none;
}

.prev-step-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* 按钮焦点状态 */
.prev-step-btn:focus,
.next-step-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.3);
}

.submit-btn:focus {
    outline: none;
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.2), 0 0 0 3px rgba(20, 184, 166, 0.3);
}

/* 按钮点击波纹效果 */
.prev-step-btn, .next-step-btn, .submit-btn {
    position: relative;
    overflow: hidden;
}

.prev-step-btn::after, .next-step-btn::after, .submit-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.prev-step-btn:active::after, .next-step-btn:active::after, .submit-btn:active::after {
    width: 300px;
    height: 300px;
}

/* 按钮图标动画 */
.prev-step-btn i, .next-step-btn i, .submit-btn i {
    transition: transform 0.3s ease;
}

.prev-step-btn:hover i {
    transform: translateX(-2px);
}

.next-step-btn:hover i {
    transform: translateX(2px);
}

.submit-btn:hover i {
    transform: scale(1.1);
}

.submit-btn:active i {
    transform: scale(0.95);
}

/* 完成注册按钮的特殊图标效果 */
.submit-btn::after {
    background: rgba(255, 255, 255, 0.2);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .step-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: 25px;
    }
    
    .step-actions.has-prev-next {
        justify-content: stretch;
    }
    
    .prev-step-btn,
    .next-step-btn,
    .step-actions .submit-btn {
        width: 100%;
        justify-content: center;
        min-width: auto;
        max-width: none;
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .step-actions .submit-btn {
        order: 1; /* 完成注册按钮在上方 */
    }
    
    .prev-step-btn {
        order: 2; /* 上一步按钮在下方 */
    }
}
