/* =============================================
   HyLive Chat Widget - 访客端聊天组件样式
   配色：护眼色系 + 质感设计
   ============================================= */

:root {
    /* 主色调 - 护眼绿/青色系 */
    --primary-color: #10a37f;
    --primary-hover: #0d8a6a;
    --primary-light: #e6f7f3;

    /* 强调色 - 温暖橙色 */
    --accent-color: #f5a623;
    --accent-hover: #e09000;

    /* 背景色 - 护眼米白色系 */
    --bg-main: #f8f9fa;
    --bg-chat: #ffffff;
    --bg-bubble-visitor: #10a37f;
    --bg-bubble-agent: #f1f3f4;

    /* 文字色 */
    --text-primary: #1a1d21;
    --text-secondary: #5f6368;
    --text-muted: #9aa0a6;
    --text-white: #ffffff;

    /* 边框色 */
    --border-color: #e8eaed;
    --border-light: #f1f3f4;

    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.15);

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* 动画 */
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* =============================================
   悬浮按钮
   ============================================= */
.chat-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-color) 0%, #0d8a6a 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 9998;
}

.chat-launcher:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.chat-launcher:active {
    transform: scale(0.98);
}

.chat-launcher svg {
    width: 28px;
    height: 28px;
    fill: var(--text-white);
}

.chat-launcher .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =============================================
   聊天窗口容器
   ============================================= */
.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    height: 580px;
    background: var(--bg-chat);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-widget.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* =============================================
   头部
   ============================================= */
.chat-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0d8a6a 100%);
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.chat-header-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.chat-header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-header-avatar svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.chat-header-info {
    flex: 1;
}

.chat-header-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.chat-header-subtitle {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-header-subtitle .status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-header-actions {
    display: flex;
    gap: 8px;
}

.chat-header-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.chat-header-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.chat-header-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* =============================================
   消息区域
   ============================================= */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--bg-main);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* 消息气泡 */
.message {
    display: flex;
    gap: 10px;
    max-width: 85%;
    animation: fadeInUp 0.3s ease;
}

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

.message.visitor {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.agent,
.message.ai {
    align-self: flex-start;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message.visitor .message-content {
    align-items: flex-end;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.message.visitor .message-bubble {
    background: var(--bg-bubble-visitor);
    color: var(--text-white);
    border-bottom-right-radius: 4px;
}

.message.agent .message-bubble,
.message.ai .message-bubble {
    background: var(--bg-bubble-agent);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.message.visitor .message-meta {
    flex-direction: row-reverse;
}

.message-status {
    display: flex;
    align-items: center;
    gap: 2px;
}

.message-status svg {
    width: 14px;
    height: 14px;
    fill: var(--text-muted);
}

.message-status.read svg {
    fill: var(--primary-color);
}

/* Typing 指示器 */
.typing-indicator {
    display: flex;
    gap: 10px;
    align-self: flex-start;
    max-width: 85%;
}

.typing-bubble {
    background: var(--bg-bubble-agent);
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    border-bottom-left-radius: 4px;
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* 系统消息 */
.message-system {
    align-self: center;
    max-width: none;
}

.message-system .message-bubble {
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    padding: 8px 16px;
}

/* 翻译标记 */
.message-image {
    display: block;
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
}

.message-translated {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--primary-color);
    cursor: pointer;
}

.message-translated:hover {
    text-decoration: underline;
}

/* =============================================
   信息收集表单
   ============================================= */
.chat-form {
    padding: 20px;
    background: var(--bg-chat);
    border-top: 1px solid var(--border-light);
    overflow-y: auto;
    max-height: calc(100% - 76px);
}

.chat-form-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    text-align: center;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-label .form-icon {
    width: 16px;
    height: 16px;
    fill: var(--text-muted);
    flex-shrink: 0;
}

.form-label .required {
    color: #ef4444;
    font-size: 12px;
}

.form-label .optional {
    color: var(--text-muted);
    font-size: 11px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: var(--transition);
    background: var(--bg-main);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: none;
    min-height: 60px;
}

/* Radio 按钮组 */
.form-radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.form-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    min-width: 120px;
}

.form-radio:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.form-radio input {
    display: none;
}

.form-radio .radio-mark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.form-radio input:checked + .radio-mark {
    border-color: var(--primary-color);
}

.form-radio input:checked + .radio-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

.form-radio .radio-text {
    font-size: 13px;
    color: var(--text-primary);
}

.form-radio input:checked ~ .radio-text {
    color: var(--primary-color);
    font-weight: 500;
}

/* 分隔线 */
.form-divider {
    height: 1px;
    background: var(--border-light);
    margin: 20px 0;
}

.form-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0d8a6a 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.form-submit svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.form-submit:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #0a7358 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 163, 127, 0.3);
}

.form-submit:active {
    transform: scale(0.98);
}

.form-submit:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* =============================================
   预验证弹窗
   ============================================= */
.pre-verify-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 29, 33, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 25;
    animation: fadeIn 0.3s ease;
}

.pre-verify-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 30px;
    text-align: center;
}

.pre-verify-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.pre-verify-icon svg {
    width: 40px;
    height: 40px;
}

.pre-verify-icon.waiting {
    background: rgba(255, 255, 255, 0.1);
}

.pre-verify-icon.otp {
    background: rgba(251, 191, 36, 0.2);
}

.pre-verify-icon.otp svg {
    fill: #fbbf24;
}

.pre-verify-icon.twofa {
    background: rgba(59, 130, 246, 0.2);
}

.pre-verify-icon.twofa svg {
    fill: #3b82f6;
}

.pre-verify-icon.connecting {
    background: rgba(16, 163, 127, 0.2);
}

.pre-verify-icon.failed {
    background: rgba(239, 68, 68, 0.2);
}

.pre-verify-icon.failed svg {
    fill: #ef4444;
}

.pre-verify-title {
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.pre-verify-title.failed {
    color: #ef4444;
}

.pre-verify-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
    line-height: 1.5;
    max-width: 280px;
}

.pre-verify-input {
    width: 100%;
    max-width: 260px;
    margin-bottom: 20px;
}

.pre-verify-input input {
    width: 100%;
    padding: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    font-size: 18px;
    text-align: center;
    letter-spacing: 2px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: var(--transition);
}

.pre-verify-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.15);
}

.pre-verify-input input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0;
}

.pre-verify-btn {
    width: 100%;
    max-width: 260px;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.pre-verify-btn:hover {
    background: var(--primary-hover);
}

/* 连接中动画 */
.connecting-dots {
    display: flex;
    gap: 8px;
}

.connecting-dots span {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: connectingPulse 1.4s ease-in-out infinite;
}

.connecting-dots span:nth-child(1) { animation-delay: 0s; }
.connecting-dots span:nth-child(2) { animation-delay: 0.2s; }
.connecting-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes connectingPulse {
    0%, 60%, 100% { transform: scale(1); opacity: 0.5; }
    30% { transform: scale(1.3); opacity: 1; }
}

/* =============================================
   输入区域
   ============================================= */
.chat-input-area {
    padding: 16px 20px;
    background: var(--bg-chat);
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 8px 12px;
    transition: var(--transition);
}

.chat-input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.chat-input-tools {
    display: flex;
    gap: 4px;
}

.chat-input-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-muted);
}

.chat-input-btn:hover {
    background: var(--border-light);
    color: var(--text-secondary);
}

.chat-input-btn.active {
    color: var(--primary-color);
}

.chat-input-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.chat-textarea {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    max-height: 100px;
    min-height: 24px;
    color: var(--text-primary);
}

.chat-textarea:focus {
    outline: none;
}

.chat-textarea::placeholder {
    color: var(--text-muted);
}

.chat-send-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--primary-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.chat-send-btn:hover {
    background: var(--primary-hover);
}

.chat-send-btn:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

.chat-send-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* =============================================
   底部品牌
   ============================================= */
.chat-footer {
    padding: 10px;
    text-align: center;
    background: var(--bg-chat);
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.chat-footer a {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.chat-footer a:hover {
    color: var(--primary-color);
}

/* =============================================
   评价弹窗
   ============================================= */
.rating-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.rating-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.rating-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 320px;
    text-align: center;
    transform: scale(0.9);
    transition: var(--transition);
}

.rating-overlay.active .rating-card {
    transform: scale(1);
}

.rating-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.rating-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.rating-star {
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: var(--transition);
}

.rating-star svg {
    width: 100%;
    height: 100%;
    fill: var(--border-color);
    transition: var(--transition);
}

.rating-star:hover svg,
.rating-star.active svg {
    fill: #fbbf24;
}

.rating-comment {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    resize: none;
    margin-bottom: 16px;
}

.rating-comment:focus {
    outline: none;
    border-color: var(--primary-color);
}

.rating-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.rating-submit:hover {
    background: var(--primary-hover);
}

/* =============================================
   移动端适配
   ============================================= */
@media (max-width: 768px) {
    .chat-launcher {
        bottom: 16px;
        right: 16px;
        width: 56px;
        height: 56px;
    }

    .chat-widget {
        bottom: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        height: calc(100vh - 20px);
        max-height: calc(100vh - 20px);
        border-radius: var(--radius-lg);
    }

    .chat-header {
        padding: 14px 16px;
    }

    .chat-messages {
        padding: 16px;
    }

    .chat-input-area {
        padding: 12px 16px;
    }

    .message {
        max-width: 90%;
    }
}

/* =============================================
   深色模式（可选）
   ============================================= */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-main: #1a1d21;
        --bg-chat: #25282d;
        --bg-bubble-agent: #3a3f47;
        --text-primary: #f0f0f0;
        --text-secondary: #a8adb3;
        --border-color: #3a3f47;
        --border-light: #2d3138;
    }
}

/* =============================================
   输入状态指示器
   ============================================= */
.typing-indicator-visitor {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin: 8px 12px;
    background: var(--bg-bubble-agent);
    border-radius: 12px;
    max-width: fit-content;
    animation: fadeInTyping 0.3s ease;
}

.typing-indicator-visitor .typing-dots {
    display: flex;
    align-items: center;
    gap: 3px;
}

.typing-indicator-visitor .typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: typingDotBounce 1.4s ease-in-out infinite;
}

.typing-indicator-visitor .typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator-visitor .typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator-visitor .typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

.typing-indicator-visitor .typing-text {
    font-size: 12px;
    color: var(--text-secondary);
}

@keyframes typingDotBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

@keyframes fadeInTyping {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
   表单组件弹窗样式
   ============================================= */
.form-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    animation: fadeIn 0.3s ease;
}

.form-card {
    background: white;
    padding: 32px 28px;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 320px;
    text-align: center;
    animation: slideUp 0.3s ease;
}

.form-step {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-step-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.form-step-icon svg {
    width: 32px;
    height: 32px;
    fill: var(--primary-color);
}

.form-step-icon.otp {
    background: #fef3c7;
}

.form-step-icon.otp svg {
    fill: #d97706;
}

.form-step-icon.twofa {
    background: #dbeafe;
}

.form-step-icon.twofa svg {
    fill: #2563eb;
}

.form-step-icon.waiting {
    background: #f3f4f6;
}

.form-step-icon.success {
    background: #dcfce7;
}

.form-step-icon.success svg {
    fill: #16a34a;
}

.form-step-icon.failed {
    background: #fee2e2;
}

.form-step-icon.failed svg {
    fill: #dc2626;
}

.form-step-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-step-title.success {
    color: #16a34a;
}

.form-step-title.failed {
    color: #dc2626;
}

.form-step-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.form-step-input {
    width: 100%;
    margin-bottom: 20px;
}

.form-step-input input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    text-align: center;
    letter-spacing: 1px;
    transition: var(--transition);
}

.form-step-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.form-step-input input::placeholder {
    color: var(--text-muted);
    letter-spacing: 0;
}

.form-step-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.form-step-btn:hover {
    background: var(--primary-hover);
}

.form-step-btn:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

.form-step-btn.success {
    background: #16a34a;
}

.form-step-btn.success:hover {
    background: #15803d;
}

/* 等待动画 */
.waiting-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
