/* 注册页面自定义样式 */

/* 表单输入框聚焦效果 */
.form-input-focus:focus {
    @apply ring-2 ring-primary/50 border-primary outline-none;
}

/* 密码强度指示器 */
.password-strength {
    height: 4px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.password-strength.weak {
    background-color: #ef4444;
    width: 33%;
}

.password-strength.medium {
    background-color: #f59e0b;
    width: 66%;
}

.password-strength.strong {
    background-color: #10b981;
    width: 100%;
}

/* 表单验证动画 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-error {
    animation: shake 0.5s ease-in-out;
}

/* 提交按钮加载动画 */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 640px) {
    .register-card {
        @apply p-4;
    }
    
    .register-title {
        @apply text-2xl;
    }
}

/* 表单字段动画 */
.form-field {
    transition: all 0.3s ease;
}

.form-field:focus-within {
    transform: translateY(-2px);
}

/* 提示信息样式 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #1e293b;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}