/* ---- 1. 全局基础样式重置与字体设置 ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
    overflow: hidden;
}

/* ---- 2. 主容器（多步表单向导） ---- */
.wizard-container {
    width: 95%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.wizard-header {
    text-align: center;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ---- 3. 顶部进度条（步骤指示） ---- */
.progressbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    counter-reset: step;
    position: relative;
}

.progressbar::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50px;
    right: 50px;
    transform: translateY(-50%);
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.progress-step {
    position: relative;
    z-index: 2;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    font-weight: bold;
    color: #555;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.progress-step.active {
    background: linear-gradient(135deg, #7f53ac, #647dee);
    color: #fff;
    transform: scale(1.1);
}

/* ---- 4. 多步内容的容器 ---- */
.form-steps {
    transition: margin-left 0.5s ease;
    display: flex;
    width: 400%;
}

.step {
    width: 25%;
    padding: 0 15px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.question {
    margin-bottom: 8px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    font-size: 1rem;
    font-weight: 600;
}

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

.input-control {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.5;
    box-shadow: 0 4px 12px rgba(31, 38, 135, 0.15);
    transition: all 0.3s ease;
}

.input-control:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 16px rgba(31, 38, 135, 0.2);
}

select.input-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

textarea.input-control {
    resize: vertical;
    min-height: 100px;
    max-height: 300px;
}

.input-control::placeholder {
    color: #666;
    opacity: 0.8;
}

/* ---- 5. 按钮区域 ---- */
.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
}

.wizard-btn {
    padding: 14px 24px;
    font-size: 16px;
    cursor: pointer;
    background: linear-gradient(135deg, #7f53ac, #647dee);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.wizard-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #5b3793, #4f46e5);
}

.wizard-btn:active {
    transform: translateY(1px);
    box-shadow: 0 3px 8px rgba(99, 102, 241, 0.2);
}

.wizard-btn.off {
    opacity: 0.6;
    pointer-events: none;
    animation: btnoff 1.5s ease-in-out infinite;
}

@keyframes btnoff {
    0% {
        background: linear-gradient(135deg, #7f53ac, #647dee);
    }

    50% {
        background: linear-gradient(135deg, #647dee, #7f53ac);
    }

    100% {
        background: linear-gradient(135deg, #7f53ac, #647dee);
    }
}

.hidden {
    display: none;
}

/* 6. 响应式 */
@media (max-width: 480px) {
    .progressbar::before {
        left: 20px;
        right: 20px;
    }

    .progress-step {
        width: 32px;
        height: 32px;
        line-height: 32px;
        font-size: 0.9rem;
    }

    .wizard-container {
        padding: 20px;
        width: 98%;
    }

    .input-control {
        font-size: 14px;
    }

    .step {
        padding: 0 10px;
    }
}

/* highlight overlay */
.highlight-container {
    position: relative;
}

.highlight-overlay {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
    padding: 14px;
    color: transparent;
    background: transparent;
    overflow: hidden;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.highlight-overlay .highlight {
    background-color: rgba(255, 255, 0, 0.3);
    border-radius: 4px;
}

/* ---- 状态提示框 (Modal) ---- */
.status-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.status-modal.hidden {
    display: none;
}

.status-content {
    width: 500px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    text-align: left;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    position: relative;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 头部：标题 + 图标 */
.status-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.status-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.rotating-gradient {
    background: conic-gradient(#3498db 0%, #f3f3f3 90%);
    animation: spin 1s linear infinite;
    border: 2px solid #fff;
    box-shadow: 0 0 4px rgba(52, 152, 219, 0.5);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#statusTitle {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

/* 中间：状态日志容器 */
.status-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

.status-item {
    margin-bottom: 12px;
    position: relative;
    padding-left: 24px;
    line-height: 1.4;
    font-size: 0.95rem;
    color: #555;
    border-radius: 6px;
    padding: 8px 16px 8px 24px;
}

.status-item::before {
    content: "";
    width: 10px;
    height: 10px;
    background: #ccc;
    border-radius: 50%;
    position: absolute;
    left: 6px;
    top: 16px;
}

/* 信息、成功、错误三种类型不同颜色 */
.status-item.info {
    background: #ecf8ff;
    border-left: 2px solid #3498db;
}

.status-item.info::before {
    background-color: #3498db;
}

.status-item.success {
    background: #e8f9f0;
    border-left: 2px solid #27ae60;
}

.status-item.success::before {
    background-color: #27ae60;
}

.status-item.error {
    background: #ffefeb;
    border-left: 2px solid #e74c3c;
}

.status-item.error::before {
    background-color: #e74c3c;
}

/* 底部：关闭按钮 */
.status-footer {
    text-align: right;
    margin-top: 10px;
}

.close-btn {
    background: #999;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.close-btn:hover {
    background: #777;
}

.close-btn.hidden {
    display: none;
}