/* ===== 基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --blue: #0066ff;
    --blue-deep: #0052d9;
    --cyan: #00ccff;
    --ink: #0a1a2f;
    --text: #3d4e62;
    --muted: #6b7a8f;
    --line: #d0d9e8;
    --chip: #f0f3f8;
    --card-line: rgba(208, 217, 232, 0.3);
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #f5f7fc;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
    background-image: radial-gradient(circle at 10% 20%, rgba(0, 102, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(0, 200, 255, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    color: var(--text);
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===== 容器 ===== */
.container {
    max-width: 520px;
    width: 100%;
    margin: auto;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 36px;
    padding: 32px 24px 36px;
    box-shadow: 0 20px 60px rgba(0, 20, 40, 0.10), 0 8px 24px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ===== 头部 ===== */
.header {
    text-align: center;
    margin-bottom: 26px;
    position: relative;
}

.header .badge {
    display: inline-block;
    background: linear-gradient(135deg, #0066ff, #00ccff);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 4px 16px;
    border-radius: 30px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.25);
    text-decoration: none;
    white-space: nowrap;
}

.header h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.5px;
    line-height: 1.25;
}

.header h1 span {
    background: linear-gradient(135deg, #0066ff, #00ccff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header .domain {
    font-size: 17px;
    font-weight: 600;
    color: var(--blue);
    letter-spacing: 1px;
    margin-top: 4px;
    opacity: 0.8;
    word-break: break-all;
}

.header .sub {
    font-size: 14px;
    color: var(--muted);
    margin-top: 4px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* ===== 分隔线 ===== */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 20px;
}

.divider .line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #d0d9e8, transparent);
}

.divider .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d0d9e8;
    flex-shrink: 0;
}

/* ===== 项目卡片 ===== */
.project-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 22px 20px 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--card-line);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 18px;
}

.project-card:last-child {
    margin-bottom: 0;
}

@media (hover: hover) {
    .project-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 30px rgba(0, 20, 40, 0.08);
    }
}

.project-card .card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.project-card .card-header .logo-wrap {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #0066ff, #00ccff);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(208, 217, 232, 0.2);
}

.project-card .card-header .logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #f0f3f8;
}

.project-card .card-header .logo-wrap .initial {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.project-card .card-header .info {
    flex: 1;
    min-width: 0;
}

.project-card .card-header .info .name {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
    word-break: break-word;
}

.project-card .card-header .info .tag {
    font-size: 12px;
    color: var(--muted);
    background: var(--chip);
    padding: 2px 12px;
    border-radius: 30px;
    display: inline-block;
    margin-top: 4px;
    font-weight: 500;
}

.project-card .desc {
    font-size: 14px;
    color: var(--text);
    line-height: 1.65;
    margin-bottom: 14px;
    padding-left: 2px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== 按钮 ===== */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 60px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    width: 100%;
    background: var(--chip);
    color: var(--ink);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    font-family: inherit;
    line-height: 1.4;
    text-align: center;
}

.btn + .btn,
.btn + .collapse-wrapper,
.collapse-wrapper + .btn,
.btn + .note,
.collapse-wrapper + .note {
    margin-top: 10px;
}

.btn:hover {
    text-decoration: none;
}

.btn .arrow {
    transition: transform 0.2s ease;
}

@media (hover: hover) {
    .btn:hover .arrow {
        transform: translateX(4px);
    }
}

.btn-primary {
    background: linear-gradient(135deg, #0066ff, #0052d9);
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.30);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 102, 255, 0.35);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, #00c853, #00a86b);
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 200, 80, 0.30);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 200, 80, 0.35);
    color: #fff;
}

.btn-video {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.30);
}

.btn-video:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.35);
    color: #fff;
}

.btn-ql {
    background: linear-gradient(135deg, #00b894, #00997a);
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 184, 148, 0.30);
}

.btn-ql:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 184, 148, 0.35);
    color: #fff;
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ===== 折叠区 ===== */
.collapse-wrapper {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(208, 217, 232, 0.35);
    background: #f8faff;
}

.collapse-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 13px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    gap: 12px;
    font-family: inherit;
    text-align: left;
    transition: background 0.2s ease;
}

.collapse-toggle:hover {
    background: rgba(0, 102, 255, 0.04);
}

.collapse-toggle .toggle-icon {
    flex-shrink: 0;
    font-size: 16px;
    transition: transform 0.3s ease;
    color: var(--muted);
    display: inline-block;
}

.collapse-toggle.open .toggle-icon {
    transform: rotate(180deg);
}

.collapse-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.collapse-inner {
    padding: 2px 16px 16px;
}

/* ===== 任务步骤 ===== */
.steps {
    list-style: none;
    counter-reset: step;
}

.steps li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 12px;
    counter-increment: step;
}

.steps li:last-child {
    margin-bottom: 0;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 1px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066ff, #00ccff);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.steps .step-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.5;
    word-break: break-word;
}

.steps .step-body {
    font-size: 13px;
    color: var(--text);
    line-height: 1.65;
    margin-top: 2px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== 备注 ===== */
.note {
    background: #fff9ec;
    border: 1px solid #ffe6b3;
    border-radius: 14px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.65;
    color: #8a5b00;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== 底部 / 空态 ===== */
.footer {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    margin-top: 26px;
    line-height: 1.7;
    word-break: break-word;
}

.empty,
.loading {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    padding: 40px 12px;
    line-height: 1.8;
}

.empty .empty-icon {
    display: block;
    font-size: 28px;
    margin-bottom: 8px;
    opacity: 0.7;
}

/* ===== 移动端 ===== */
@media (max-width: 420px) {
    body {
        padding: 12px;
    }

    .container {
        border-radius: 28px;
        padding: 26px 16px 28px;
    }

    .header h1 {
        font-size: 24px;
    }

    .project-card {
        padding: 18px 16px 20px;
        border-radius: 20px;
    }

    .project-card .card-header .logo-wrap {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }
}
