/* Auth Step Animations & Layout */

.auth-form-container {
    position: relative;
    overflow: hidden; /* 防止动画溢出 */
    min-height: 400px; /* 保持高度稳定，避免跳动 */
    display: flex;
    flex-direction: column;
}

.auth-step {
    display: none;
    flex-direction: column;
    width: 100%;
    animation-duration: 0.5s;
    animation-fill-mode: both;
}

.auth-step.active {
    display: flex;
    animation-name: fadeInRight;
}

.auth-step.exit {
    display: flex; /* 保持显示直到动画结束 */
    position: absolute;
    top: 0;
    left: 0;
    animation-name: fadeOutLeft;
}

/* 步骤标题样式 */
.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.step-desc {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.6;
}

/* 协议文本 */
.legal-text {
    font-size: 0.9rem;
    color: #4b5563;
    background: #f9fafb;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
}

.legal-text a {
    color: var(--primary-accent);
    text-decoration: none;
}

/* 成功状态 */
.success-animation {
    margin: 0 auto 2rem;
    position: relative;
    width: 80px;
    height: 80px;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #10b981;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #10b981;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #10b981;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: #fff; /* 勾勾改为白色 */
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

.success-message {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out 1.2s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

@keyframes scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}

@keyframes fill {
    100% { box-shadow: inset 0px 0px 0px 50px #10b981; }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animations */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate3d(50px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeOutLeft {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    to {
        opacity: 0;
        transform: translate3d(-50px, 0, 0);
    }
}

/* 覆盖默认的 auth-header，因为我们会在每个步骤中自定义标题 */
.auth-form-container .auth-header {
    display: none; /* 默认隐藏公共头，每一步自己带 */
}

/* 进度指示器 (可选) */
.progress-dots {
    display: flex;
    gap: 8px;
    margin-bottom: 2rem;
}

.dot {
    width: 8px;
    height: 8px;
    background: #e5e7eb;
    border-radius: 50%;
    transition: background 0.3s;
}

.dot.active {
    background: var(--primary-accent);
}

.dot.completed {
    background: #10b981;
}
