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

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f0f1a;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 40px 16px;
}

.container {
    width: 100%;
    max-width: 780px;
}

h1 {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 24px;
    color: #fff;
    letter-spacing: 1px;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

.input-row {
    display: flex;
    gap: 10px;
}

.select-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.select-row label {
    font-size: 0.95rem;
    color: #ccc;
    white-space: nowrap;
}

.desc {
    font-size: 0.77rem;
    color: #555;
}

.interval-row {
    display: none;
    align-items: center;
    gap: 10px;
}

.interval-row.visible {
    display: flex;
}

.interval-row label {
    font-size: 0.87rem;
    color: #999;
    white-space: nowrap;
}

.interval-row input[type="number"] {
    width: 105px;
    padding: 7px 10px;
    border: 1px solid #444;
    border-radius: 6px;
    background: #1a1a2e;
    color: #fff;
    font-size: 0.89rem;
    outline: none;
    transition: border-color 0.2s;
}

.interval-row input[type="number"]:focus {
    border-color: #6c63ff;
}

.interval-row .unit {
    font-size: 0.79rem;
    color: #555;
}

select {
    flex: 0 1 218px;
    padding: 10px 13px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #1a1a2e;
    color: #fff;
    font-size: 0.94rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: auto;
}

select:focus {
    border-color: #6c63ff;
}

select option {
    background: #1a1a2e;
    color: #fff;
}

input[type="text"] {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #1a1a2e;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

input[type="text"]:focus {
    border-color: #6c63ff;
}

button {
    padding: 12px 26px;
    border: none;
    border-radius: 8px;
    background: #6c63ff;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.2s,
        opacity 0.2s;
    white-space: nowrap;
}

button:hover:not(:disabled) {
    background: #5a52d5;
}

button:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

/* ---------- 复选框行 ---------- */
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-row input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #6c63ff;
    cursor: pointer;
}

.checkbox-row label {
    font-size: 0.91rem;
    color: #bbb;
    cursor: pointer;
    user-select: none;
}

/* ---------- 进度条区域 ---------- */
.progress-section {
    margin-bottom: 14px;
    position: relative;
    display: none;
}
.progress-section.visible {
    display: block;
}

.progress-bar-wrapper {
    position: relative;
}

.progress-bar-track {
    width: 100%;
    height: 10px;
    background: #22223a;
    border-radius: 99px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6c63ff, #50fa7b);
    border-radius: 99px;
    /* transition: width 0.25s ease; */
}

/* 比例气泡：跟随进度条位置浮动 */
.progress-bubble {
    position: absolute;
    top: -26px;
    left: 0%;
    transform: translateX(-50%);
    background: #2a2a44;
    color: #50fa7b;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: "Cascadia Code", "Fira Code", "Consolas", monospace;
    padding: 2px 8px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    /* transition: left 0.25s ease; */
    border: 1px solid #3a3a55;
}

.progress-bubble::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #2a2a44;
}

/* 右下角最小值/最大值 */
.progress-range {
    text-align: right;
    margin-top: 4px;
    font-size: 0.76rem;
    font-family: "Cascadia Code", "Fira Code", "Consolas", monospace;
    color: #888;
}

.progress-range .range-value {
    color: #bbb;
}

/* ---------- 日志 ---------- */
.log-box {
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 14px;
    min-height: 260px;
    max-height: 380px;
    overflow-y: auto;
    font-family: "Cascadia Code", "Fira Code", "Consolas", monospace;
    font-size: 0.83rem;
    line-height: 1.62;
    white-space: pre-wrap;
    word-break: break-all;
}

.log-entry {
    margin-bottom: 2px;
}

.log-info {
    color: #8be9fd;
}

.log-ok {
    color: #50fa7b;
}

.log-warn {
    color: #ffb86c;
}

.log-err {
    color: #ff5555;
}

.log-step {
    color: #bd93f9;
}

.status-bar {
    margin-top: 10px;
    text-align: center;
    font-size: 0.83rem;
    color: #888;
    min-height: 21px;
}
