/* ===== Alpine x-cloak 闪烁防护 ===== */
[x-cloak] { display: none !important; }

/* ===== 步骤指示器 ===== */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
    padding: 0 16px;
}
.step-item {
    display: flex;
    align-items: center;
    gap: 0;
}
.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    border: 2px solid var(--border);
    color: var(--muted);
    background: var(--card);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}
.step-circle.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(16, 163, 127, 0.15);
}
.step-circle.done {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}
.step-label {
    font-size: 12px;
    color: var(--muted);
    margin-left: 8px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.3s ease;
}
.step-label.active { color: var(--accent-dark); font-weight: 600; }
.step-label.done { color: var(--accent-dark); }
.step-line {
    width: 40px;
    height: 2px;
    background: var(--border);
    margin: 0 12px;
    transition: background 0.4s ease;
    flex-shrink: 0;
}
.step-line.done { background: var(--accent); }

/* ===== 阶段过渡动画 ===== */
.stage-enter {
    animation: stageSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes stageSlideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== 骨架屏 Shimmer ===== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}
.skeleton-line {
    height: 16px;
    margin-bottom: 12px;
    border-radius: 4px;
}
.skeleton-line:last-child { width: 60%; }
.skeleton-card {
    padding: 24px;
    background: var(--card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-bottom: 12px;
}
.skeleton-key {
    height: 44px;
    margin-bottom: 16px;
    border-radius: var(--radius-sm);
}
.skeleton-meta {
    display: flex;
    gap: 16px;
}
.skeleton-meta-item {
    height: 14px;
    width: 80px;
    border-radius: 4px;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Ripple 按钮效果 ===== */
.btn-ripple {
    position: relative;
    overflow: hidden;
}
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    animation: rippleAnim 0.6s ease-out;
    pointer-events: none;
}
@keyframes rippleAnim {
    to { transform: scale(4); opacity: 0; }
}

/* ===== Confetti 粒子 ===== */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}
.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confettiFall 3s ease-in forwards;
}
@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg) scale(0.5); opacity: 0; }
}

/* ===== 滚动入场 ===== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}
.reveal-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.reveal-on-scroll:nth-child(3) { transition-delay: 0.2s; }

/* ===== 环形进度条 ===== */
.ring-progress {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ring-progress svg {
    transform: rotate(-90deg);
}
.ring-progress .ring-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 4;
}
.ring-progress .ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}
.ring-progress .ring-text {
    position: absolute;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

/* ===== 输入校验状态 ===== */
.input-wrapper {
    position: relative;
}
.input-wrapper .form-input {
    padding-right: 40px;
}
.input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.form-input.input-valid {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.1);
}
.form-input.input-invalid {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.input-error-msg {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
    min-height: 18px;
}

/* ===== CountUp 数字容器 ===== */
.count-up {
    display: inline-block;
    min-width: 2ch;
}

/* ===== Card 3D Tilt 效果 ===== */
.card-tilt {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}
.card-tilt:hover {
    box-shadow: var(--shadow-lg);
}

/* ===== 渐变文字 ===== */
.gradient-text {
    background: linear-gradient(135deg, #10a37f 0%, #3b82f6 50%, #a855f7 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

/* ===== Toast 进度条 ===== */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    animation: toastProgress linear forwards;
}
@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}
.toast-icon {
    flex-shrink: 0;
    font-size: 16px;
}

/* ===== FAQ x-collapse 过渡增强 ===== */
.faq-item-alpine {
    background: var(--card);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: box-shadow var(--transition);
}
.faq-item-alpine:hover { box-shadow: var(--shadow-sm); }
.faq-q-alpine {
    padding: 20px 24px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    transition: color var(--transition);
    user-select: none;
}
.faq-q-alpine:hover { color: var(--accent-dark); }
.faq-arrow-alpine {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--muted);
    transition: transform 0.3s ease;
}
.faq-arrow-alpine.rotated { transform: rotate(180deg); }
.faq-a-alpine {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

/* ===== 等待时长显示 ===== */
.wait-timer {
    font-size: 13px;
    color: var(--muted);
    margin-top: 8px;
}

/* ===== 响应式适配 ===== */
@media (max-width: 768px) {
    .step-indicator { gap: 0; }
    .step-label { display: none; }
    .step-line { width: 24px; margin: 0 8px; }
}
