/* ============================================
   创建市场向导系统 - Wizard Styles
   猫哥创作 | 2026-01-17
   ============================================ */

/* 代币余额检查卡片 */
.balance-check-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    margin-bottom: 2rem;
}

.balance-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
}

.balance-info {
    flex: 1;
}

.balance-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.balance-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.balance-status {
    font-size: 0.875rem;
    font-weight: 600;
}

.balance-status.sufficient {
    color: var(--success);
}

.balance-status.insufficient {
    color: var(--danger);
}

.recharge-btn {
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.recharge-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

/* 进度条 */
.wizard-progress {
    margin-bottom: 3rem;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #3b82f6);
    transition: width 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.progress-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.step-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.progress-step.active .step-circle {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    border-color: #8b5cf6;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

.progress-step.completed .step-circle {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
}

.progress-step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

/* 向导内容 */
.wizard-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    min-height: 500px;
}

.wizard-step {
    animation: fadeSlideIn 0.5s ease;
}

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

.step-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.step-header h2 {
    font-size: 1.75rem;
    color: var(--text);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.step-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* 表单元素 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.form-group label.required::after {
    content: '*';
    color: var(--danger);
    margin-left: 0.25rem;
}

.help-tip {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.2);
    color: var(--primary);
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    font-weight: 700;
}

.optional {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.char-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* AI建议 */
.ai-suggestion {
    margin-top: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border-left: 3px solid var(--primary);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text);
    display: none;
}

.ai-suggestion.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

/* 选项类型选择器 */
.option-type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.option-type-selector label {
    margin: 0;
    cursor: pointer;
}

.option-type-selector input[type="radio"] {
    display: none;
}

.option-card {
    padding: 1.5rem;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.option-type-selector input[type="radio"]:checked + .option-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.option-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.option-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.option-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* 选项配置 */
.options-container {
    margin-bottom: 2rem;
}

.option-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
}

.option-item {
    padding: 1.5rem;
    background: var(--bg);
    border-radius: 12px;
    border: 2px solid var(--border);
}

.option-item.yes-option {
    border-color: rgba(34, 197, 94, 0.3);
}

.option-item.no-option {
    border-color: rgba(239, 68, 68, 0.3);
}

.option-item label {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.option-inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.input-group .form-input {
    padding: 0.625rem 0.875rem;
}

.input-suffix {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-weight: 600;
}

.option-divider {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* 资金池滑块 */
.input-with-slider {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pool-slider {
    width: 100%;
    height: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
}

.pool-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.pool-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    cursor: pointer;
    border: none;
}

.pool-display {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.pool-display small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 0.5rem;
}

.pool-warning {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid #f59e0b;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #f59e0b;
}

/* 结算方式描述 */
.settlement-desc {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

/* 高级设置 */
.advanced-settings {
    margin-top: 2rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.settings-header {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    transition: all 0.3s ease;
}

.settings-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.settings-header i.fa-chevron-down {
    transition: transform 0.3s ease;
}

.advanced-settings.expanded .settings-header i.fa-chevron-down {
    transform: rotate(180deg);
}

.settings-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.advanced-settings.expanded .settings-content {
    max-height: 500px;
    padding: 1.5rem;
}

/* 预览卡片 */
.preview-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(59, 130, 246, 0.05));
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.preview-category {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

.preview-badge {
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.preview-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

.preview-desc {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.preview-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
}

.preview-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.option-preview {
    padding: 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
}

.option-preview.yes {
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.option-preview.no {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

/* 费用明细 */
.cost-summary {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.cost-summary h4 {
    font-size: 1.125rem;
    color: var(--text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cost-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cost-row:last-child {
    border-bottom: none;
}

.cost-row.total {
    font-weight: 700;
    font-size: 1.125rem;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid var(--border);
}

.cost-row.balance {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.cost-value {
    font-weight: 600;
    color: var(--text);
}

.cost-value.insufficient {
    color: var(--danger);
}

/* 协议同意 */
.terms-agreement {
    padding: 1rem;
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 10px;
}

.terms-agreement label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9375rem;
}

.terms-agreement input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.terms-agreement a {
    color: var(--primary);
    text-decoration: underline;
}

/* 提示框 */
.step-tips {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.1));
    border-left: 4px solid #f59e0b;
    border-radius: 10px;
    margin-top: 2rem;
}

.tip-icon {
    font-size: 1.5rem;
    color: #f59e0b;
    flex-shrink: 0;
}

.tip-content {
    flex: 1;
}

.tip-content strong {
    color: var(--text);
    display: block;
    margin-bottom: 0.5rem;
}

.tip-content ul {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* 导航按钮 */
.wizard-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.wizard-btn {
    padding: 0.875rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wizard-btn.primary {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    color: white;
}

.wizard-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

.wizard-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.wizard-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.wizard-btn.success {
    background: linear-gradient(135deg, #22c55e, #10b981);
    color: white;
}

.wizard-btn.success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
}

/* Toast提示 */
.wizard-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.wizard-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.wizard-toast.error {
    border-color: var(--danger);
}

.wizard-toast.success {
    border-color: var(--success);
}

.wizard-toast i {
    font-size: 1.25rem;
}

.wizard-toast.error i {
    color: var(--danger);
}

.wizard-toast.success i {
    color: var(--success);
}

/* Loading动画 */
.wizard-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 64px;
    height: 64px;
    border: 6px solid rgba(139, 92, 246, 0.2);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    margin-top: 1.5rem;
    font-size: 1.125rem;
    color: var(--text);
    font-weight: 600;
}

/* 充值弹窗 */
.recharge-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.recharge-modal .modal-content {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.recharge-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.recharge-modal .modal-header h3 {
    font-size: 1.25rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 2rem;
}

.recharge-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.recharge-option {
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.recharge-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

.recharge-option .amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.recharge-option .price {
    font-size: 1rem;
    color: var(--text-muted);
}

.recharge-option .discount {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.125rem 0.5rem;
    background: var(--danger);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .balance-check-card {
        flex-direction: column;
        text-align: center;
    }
    
    .progress-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wizard-content {
        padding: 1.5rem;
    }
    
    .form-row,
    .option-row,
    .preview-stats,
    .preview-options,
    .recharge-options {
        grid-template-columns: 1fr;
    }
    
    .option-divider {
        transform: rotate(90deg);
    }
    
    .wizard-navigation {
        flex-direction: column-reverse;
    }
    
    .wizard-btn {
        width: 100%;
        justify-content: center;
    }
}
