:root {
    --bg-main: #f4efe7;
    --bg-panel: rgba(255, 255, 255, 0.68);
    --panel-strong: rgba(255, 255, 255, 0.82);
    --text-main: #13161b;
    --text-muted: #5f6673;
    --border-soft: rgba(19, 22, 27, 0.09);
    --shadow-soft: 0 24px 64px rgba(23, 27, 33, 0.12);
    --accent-long: #0f766e;
    --accent-long-soft: rgba(15, 118, 110, 0.14);
    --accent-short: #c75b12;
    --accent-short-soft: rgba(199, 91, 18, 0.14);
    --success: #166534;
    --success-soft: rgba(22, 101, 52, 0.12);
    --danger: #b42318;
    --danger-soft: rgba(180, 35, 24, 0.12);
    --radius-xl: 32px;
    --radius-lg: 20px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 32%),
        radial-gradient(circle at top right, rgba(199, 91, 18, 0.18), transparent 30%),
        linear-gradient(180deg, #f8f4ec 0%, #efe7dc 100%);
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.24) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.24) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent);
}

.page-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 64px;
}

.hero,
.download-card,
.progress-board {
    overflow: hidden;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(18px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.45));
    box-shadow: var(--shadow-soft);
}

.hero-eyebrow,
.card-tag {
    margin: 0 0 12px;
    font-family: "Outfit", sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.board-header h2,
.card-header h2,
.progress-item h3 {
    margin: 0;
    font-family: "Outfit", sans-serif;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.hero h1 {
    max-width: 720px;
    font-size: clamp(40px, 6vw, 72px);
}

.hero-copy,
.card-header p,
.status-copy,
.board-note,
.progress-subtitle,
.progress-meta {
    color: var(--text-muted);
    line-height: 1.7;
}

.hero-copy {
    max-width: 760px;
    margin: 24px 0 0;
    font-size: 16px;
}

.hero code,
.card-header code {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(19, 22, 27, 0.08);
    font-size: 0.95em;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.download-card {
    position: relative;
}

.card-topline {
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
}

.card-long .card-topline {
    background: linear-gradient(90deg, var(--accent-long), #4fd1c5);
}

.card-short .card-topline {
    background: linear-gradient(90deg, var(--accent-short), #f5a524);
}

.card-long .card-tag {
    color: var(--accent-long);
}

.card-short .card-tag {
    color: var(--accent-short);
}

.download-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.download-form label {
    font-weight: 600;
    font-size: 15px;
}

.download-form textarea {
    width: 100%;
    padding: 20px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-main);
    font: inherit;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: box-shadow 200ms ease-out, border-color 200ms ease-out, transform 200ms ease-out;
}

.download-form textarea:focus {
    border-color: rgba(15, 118, 110, 0.4);
    box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.08);
    transform: translateY(-1px);
}

.download-form button,
.progress-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font-family: "Outfit", sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 200ms ease-out, box-shadow 200ms ease-out, opacity 200ms ease-out;
}

.card-long .download-form button {
    background: linear-gradient(135deg, var(--accent-long), #14b8a6);
    box-shadow: 0 16px 32px rgba(15, 118, 110, 0.24);
}

.card-short .download-form button {
    background: linear-gradient(135deg, var(--accent-short), #f59e0b);
    box-shadow: 0 16px 32px rgba(199, 91, 18, 0.24);
}

.download-form button:hover,
.progress-action:hover {
    transform: translateY(-1px);
}

.download-form button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.status-panel {
    margin-top: 24px;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.58);
}

.status-title {
    margin: 0 0 8px;
    font-family: "Outfit", sans-serif;
    font-size: 18px;
    font-weight: 600;
}

.status-panel.loading {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.72));
}

.status-panel.success {
    background: var(--success-soft);
}

.status-panel.error {
    background: var(--danger-soft);
}

.status-panel.success .status-title {
    color: var(--success);
}

.status-panel.error .status-title {
    color: var(--danger);
}

.progress-board {
    margin-top: 32px;
}

.board-note {
    margin: 16px 0 0;
}

.progress-list {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.progress-item {
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(19, 22, 27, 0.08);
    background: var(--panel-strong);
}

.progress-empty {
    display: grid;
    place-items: center;
    min-height: 152px;
    background: rgba(255, 255, 255, 0.56);
}

.progress-empty p {
    margin: 0;
    color: var(--text-muted);
}

.progress-item.state-running.kind-long {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(255, 255, 255, 0.84));
}

.progress-item.state-running.kind-short {
    background: linear-gradient(135deg, rgba(199, 91, 18, 0.1), rgba(255, 255, 255, 0.84));
}

.progress-item.state-completed {
    background: linear-gradient(135deg, rgba(22, 101, 52, 0.08), rgba(255, 255, 255, 0.84));
}

.progress-item.state-error {
    background: linear-gradient(135deg, rgba(180, 35, 24, 0.1), rgba(255, 255, 255, 0.84));
}

.progress-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.progress-chipline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.progress-chip,
.progress-state {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.progress-chip {
    color: #ffffff;
}

.kind-long .progress-chip {
    background: linear-gradient(135deg, var(--accent-long), #14b8a6);
}

.kind-short .progress-chip {
    background: linear-gradient(135deg, var(--accent-short), #f59e0b);
}

.progress-state {
    background: rgba(19, 22, 27, 0.08);
    color: var(--text-main);
}

.progress-value {
    min-width: 72px;
    text-align: right;
    font-family: "Outfit", sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.progress-subtitle {
    margin: 12px 0 0;
}

.progress-track {
    position: relative;
    height: 16px;
    margin-top: 20px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(19, 22, 27, 0.08);
}

.progress-fill {
    height: 100%;
    border-radius: inherit;
    transition: width 320ms ease-out;
}

.kind-long .progress-fill {
    background: linear-gradient(90deg, var(--accent-long), #5eead4);
}

.kind-short .progress-fill {
    background: linear-gradient(90deg, var(--accent-short), #f8b84b);
}

.state-completed .progress-fill {
    background: linear-gradient(90deg, var(--success), #4ade80);
}

.state-error .progress-fill {
    background: linear-gradient(90deg, var(--danger), #ef6f63);
}

.state-running .progress-fill {
    background-size: 160px 16px;
    animation: pulse-progress 1.4s linear infinite;
}

.progress-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
}

.progress-meta {
    margin: 0;
}

.progress-actions {
    display: flex;
    gap: 12px;
}

.progress-action {
    text-decoration: none;
    background: linear-gradient(135deg, #1f2937, #334155);
    box-shadow: 0 16px 32px rgba(31, 41, 55, 0.18);
}

@keyframes pulse-progress {
    from {
        filter: saturate(1);
    }

    50% {
        filter: saturate(1.2) brightness(1.05);
    }

    to {
        filter: saturate(1);
    }
}

@media (max-width: 900px) {
    .download-grid {
        grid-template-columns: 1fr;
    }

    .page-shell {
        width: min(100% - 24px, 1200px);
        padding-top: 24px;
    }

    .hero,
    .download-card,
    .progress-board {
        padding: 24px;
        border-radius: 24px;
    }

    .progress-head,
    .progress-foot {
        flex-direction: column;
        align-items: flex-start;
    }

    .progress-value {
        min-width: 0;
        text-align: left;
    }
}
