:root {
    --primary-color: #0066FF;
    --success-color: #28a745;
    --error-color: #dc3545;
    --text-main: #1d1d1f;
    --text-sec: #6e6e73;
    --bg-color: #f5f5f7;
    --card-bg: #ffffff;
    --border-color: #d2d2d7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Myriad Set Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 440px;
    background: var(--card-bg);
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    padding: 40px;
    transition: all 0.3s ease;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.header p {
    font-size: 14px;
    color: var(--text-sec);
}

/* 进度条 */
.progress-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all 0.3s;
}

.dot.active {
    background: var(--primary-color);
    width: 24px;
    border-radius: 4px;
}

/* 步骤内容切换 */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
    will-change: opacity, transform; /* 优化动画性能 */
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.form-group {
    margin-bottom: 24px;
}

.label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-sec);
}

.input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s;
    background: #fafafa;
}

.input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

.input-textarea {
    min-height: 120px;
    resize: none;
    font-family: monospace;
    font-size: 13px;
}

/* 按钮样式 */
.btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #0055d4;
}

.btn-primary:disabled {
    background: #b2d1ff;
    cursor: not-allowed;
}

.btn-outline {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: #f9f9fb;
    border-color: #c2c2c7;
}

/* 虚线引导按钮 */
.btn-dashed {
    border-style: dashed;
    border-width: 2px;
    background: #f0f7ff;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.btn-dashed:hover {
    background: #e0efff;
    border-color: var(--primary-color);
}

.btn-link {
    background: none;
    color: var(--text-sec);
    font-size: 14px;
    margin-top: 16px;
    border: none;
    cursor: pointer;
    width: 100%;
    display: block;
    text-align: center;
}

/* 提示卡片 */
.info-card {
    background: #f9f9fb;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.info-row:last-child { margin-bottom: 0; }
.info-label { color: var(--text-sec); }
.info-value { font-weight: 500; color: var(--text-main); }

.tip {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: var(--text-sec);
    margin-bottom: 24px;
    line-height: 1.5;
    padding: 12px;
    background: #f0f7ff;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

/* 错误/警告提示 */
.tip-error {
    background: #fef2f2;
    border-left-color: #ef4444;
    color: #b91c1c;
}

/* 加载动画 */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    will-change: transform; /* 优化旋转动画 */
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 弹窗样式 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: modalFade 0.3s ease;
    will-change: opacity; /* 优化淡入动画 */
}

@keyframes modalFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: white;
    width: 90%;
    max-width: 380px;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity; /* 优化滑入动画 */
}

@keyframes modalSlide {
    from { 
        transform: scale(0.9) translateY(20px); 
        opacity: 0; 
    }
    to { 
        transform: scale(1) translateY(0); 
        opacity: 1; 
    }
}

.modal-title {
    font-size: 19px;
    font-weight: 600;
    color: var(--success-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-steps {
    text-align: left;
    margin-bottom: 32px;
}

.modal-step-item {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-sec);
}

.modal-step-num {
    width: 20px;
    height: 20px;
    background: #f0f0f5;
    color: var(--text-sec);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 1px;
}

.modal-footer {
    display: flex;
    gap: 12px;
}

/* 结果展示样式 */
.result-view {
    text-align: center;
}

.icon-box {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}

.icon-success { background: #e7f6ed; color: var(--success-color); }
.icon-error { background: #fdf2f2; color: var(--error-color); }

.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #acacb7;
    margin-top: 30px;
}
