/*!
 * ============================================================================
 *  happiness-agent.css —— 幸福宝「Ai Agent 智能返利」页
 *  深色科技霓虹风（本页特色保留）；宽度/左右留白由 .hx-page-wrap 统一。
 * ============================================================================
 */

/* ============ 页面容器（左右留白 = 首页） ============ */
.hx-page-wrap { max-width: var(--container); margin: 24px auto 56px; padding: 0 20px; }

.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 20px; border: none; border-radius: var(--radius-md);
    font-weight: 600; font-size: 14px; cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease;
}
.btn-primary { background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff; box-shadow: 0 4px 16px rgba(99,102,241,.3); }
.btn-outline { background: transparent; border: 2px solid #6366f1; color: #a78bfa; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99,102,241,.4); }

/* ============ 面包屑（深） ============ */
.breadcrumb {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 18px; margin-bottom: 18px; font-size: 13.5px; color: #94a3b8;
    background: rgba(30,41,59,.85); border: 1px solid rgba(99,102,241,.2);
    border-radius: var(--radius-lg);
}
.breadcrumb a { color: #94a3b8; }
.breadcrumb a:hover { color: #a78bfa; }
.breadcrumb .current { color: #e2e8f0; font-weight: 600; }

/* ============ Agent Banner ============ */
.agent-banner {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg,#1e1b4b 0%,#312e81 32%,#3730a3 62%,#1e1b4b 100%);
    border: 1px solid rgba(99,102,241,.3); border-radius: 20px;
    padding: 46px 42px; margin-bottom: 22px;
}
.agent-banner::before { content: ''; position: absolute; top: -50%; right: -20%; width: 500px; height: 500px;
    background: radial-gradient(circle,rgba(99,102,241,.18) 0%,transparent 70%); border-radius: 50%; }
.agent-banner::after { content: ''; position: absolute; bottom: -30%; left: -10%; width: 400px; height: 400px;
    background: radial-gradient(circle,rgba(139,92,246,.12) 0%,transparent 70%); border-radius: 50%; }
.banner-content { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 32px; }
.banner-text { flex: 1; min-width: 300px; }
.banner-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(99,102,241,.3); border: 1px solid rgba(99,102,241,.5);
    padding: 6px 16px; border-radius: var(--radius-pill); font-size: 13px; color: #c7d2fe; margin-bottom: 18px;
}
.banner-badge .pulse { width: 8px; height: 8px; background: #a78bfa; border-radius: 50%; animation: hxPulse 2s infinite; }
@keyframes hxPulse { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:.5;transform:scale(1.5);} }
.banner-text h1 { font-size: 36px; font-weight: 800; color: #fff; margin-bottom: 12px; line-height: 1.2; }
.banner-text h1 span { background: linear-gradient(135deg,#818cf8,#c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.banner-text p { font-size: 15px; color: #a5b4fc; margin-bottom: 20px; max-width: 600px; line-height: 1.8; }
.banner-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.banner-stat { text-align: left; }
.banner-stat .value { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg,#818cf8,#c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.banner-stat .label { font-size: 13px; color: #94a3b8; margin-top: 4px; }
.banner-robot { font-size: 118px; color: rgba(139,92,246,.25); animation: hxFloat 3s ease-in-out infinite; }
@keyframes hxFloat { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-15px);} }

/* ============ 区块标题 / 能力卡 / 流程 ============ */
.features-section, .how-section { margin-bottom: 24px; }
.section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.section-title .icon {
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(135deg,#6366f1,#8b5cf6);
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px;
}
.section-title h2 { font-size: 20px; font-weight: 800; color: var(--text-title); }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature-card {
    background: rgba(30,41,59,.92); border: 1px solid rgba(99,102,241,.18);
    border-radius: 16px; padding: 28px 24px; text-align: center;
    transition: all .3s ease;
}
.feature-card:hover { border-color: rgba(99,102,241,.45); transform: translateY(-4px); box-shadow: 0 10px 32px rgba(99,102,241,.18); }
.feature-card .f-icon {
    width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 16px;
    background: linear-gradient(135deg,rgba(99,102,241,.25),rgba(139,92,246,.25));
    display: flex; align-items: center; justify-content: center; font-size: 24px; color: #a78bfa;
}
.feature-card h3 { font-size: 16px; font-weight: 700; color: #e2e8f0; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: #94a3b8; line-height: 1.7; }

.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.how-wrapper { display: flex; gap: 0; align-items: stretch; }
.how-card {
    flex: 1; min-width: 200px; position: relative;
    background: rgba(30,41,59,.92); border: 1px solid rgba(99,102,241,.18);
    border-radius: 16px; padding: 34px 24px 30px; text-align: center;
}
.how-card .step-num {
    position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
    box-shadow: 0 4px 12px rgba(99,102,241,.4);
}
.how-card .h-icon { font-size: 36px; color: #a78bfa; margin: 10px 0 16px; }
.how-card h3 { font-size: 16px; font-weight: 700; color: #e2e8f0; margin-bottom: 8px; }
.how-card p { font-size: 13px; color: #94a3b8; line-height: 1.7; }
.how-arrow { display: flex; align-items: center; justify-content: center; padding: 0 6px; color: rgba(139,92,246,.5); font-size: 24px; }

/* ============ 筛选区（深） ============ */
.filter-section { background: rgba(30,41,59,.92); border: 1px solid rgba(99,102,241,.18); border-radius: 16px; padding: 22px 24px; margin-bottom: 22px; }
.filter-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-label { font-size: 14px; color: #94a3b8; font-weight: 500; }
.filter-select, .filter-input {
    padding: 9px 15px; border: 1px solid rgba(99,102,241,.25); border-radius: var(--radius-md);
    font-size: 14px; cursor: pointer; background: rgba(15,23,42,.6); color: #e2e8f0;
}
.filter-select { min-width: 140px; }
.filter-input { width: 220px; }
.filter-input::placeholder { color: #64748b; }
.filter-select:focus, .filter-input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.18); }
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-tab {
    padding: 7px 18px; border: 1px solid rgba(99,102,241,.25); border-radius: var(--radius-pill);
    font-size: 13.5px; cursor: pointer; background: transparent; color: #94a3b8; transition: all .25s ease;
}
.filter-tab:hover { border-color: #6366f1; color: #c7d2fe; }
.filter-tab.active { background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff; border-color: transparent; }
.search-btn { padding: 9px 20px; }
.result-info { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(99,102,241,.12); }
.result-count { font-size: 14px; color: #94a3b8; }
.result-count strong { color: #a78bfa; font-variant-numeric: tabular-nums; }
.sort-group { display: flex; gap: 8px; align-items: center; }
.sort-btn { padding: 6px 14px; border: none; background: rgba(99,102,241,.12); color: #94a3b8; border-radius: var(--radius); font-size: 13px; cursor: pointer; transition: all .25s ease; }
.sort-btn:hover { background: rgba(99,102,241,.25); }
.sort-btn.active { background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff; }

/* ============ 项目卡（深） ============ */
.project-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { background: transparent; border: none; box-shadow: none; padding: 0; margin-bottom: 0; }
.project-card {
    position: relative; background: rgba(30,41,59,.92);
    border: 1px solid rgba(99,102,241,.14); border-radius: 16px; overflow: hidden;
    display: flex; flex-direction: column; cursor: pointer;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.project-card:hover { transform: translateY(-5px); box-shadow: 0 14px 40px rgba(99,102,241,.28); border-color: rgba(99,102,241,.35); }
.project-card .agent-ribbon {
    position: absolute; top: 14px; right: -4px; z-index: 2;
    background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff;
    padding: 5px 14px 5px 12px; font-size: 11px; font-weight: 700;
    border-radius: 20px 0 0 20px; box-shadow: 0 2px 12px rgba(99,102,241,.45);
    display: flex; align-items: center; gap: 4px;
}
.project-cover { width: 100%; height: 190px; object-fit: cover; }
.project-body { flex: 1; display: flex; flex-direction: column; padding: 18px 20px 20px; }
.project-tags { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.project-tag { padding: 3px 11px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600;
    background: linear-gradient(135deg,rgba(99,102,241,.3),rgba(139,92,246,.3)); color: #c7d2fe; border: 1px solid rgba(99,102,241,.2); }
.project-tag.ongoing { background: rgba(99,102,241,.35); color: #a5b4fc; }
.project-tag.pending { background: rgba(245,158,11,.25); color: #fcd34d; }
.project-tag.completed { background: rgba(16,185,129,.25); color: #6ee7b7; }
.project-tag.agent { background: rgba(236,72,153,.25); color: #f9a8d4; border-color: rgba(236,72,153,.3); }
.project-title { font-size: 15.5px; font-weight: 700; color: #e2e8f0; margin-bottom: 8px; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-desc { font-size: 13px; color: #94a3b8; margin-bottom: 12px; line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.progress-section { margin-bottom: 12px; margin-top: auto; }
.progress-bar { height: 8px; background: rgba(99,102,241,.18); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { height: 100%; background: linear-gradient(90deg,#6366f1,#8b5cf6,#a78bfa); border-radius: 4px; transition: width .5s ease; box-shadow: 0 0 10px rgba(99,102,241,.4); }
.progress-info { display: flex; justify-content: space-between; font-size: 12px; color: #94a3b8; font-variant-numeric: tabular-nums; }
.progress-amount { color: #c084fc; font-weight: 700; }
.project-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: #64748b; padding-top: 12px; margin-top: 4px; border-top: 1px solid rgba(99,102,241,.12); }
.project-meta span { display: inline-flex; align-items: center; gap: 4px; }
.project-meta .author-badge { color: #a78bfa; font-weight: 600; }

/* ============ 空状态（深） ============ */
.empty-state {
    grid-column: 1 / -1; text-align: center; padding: 72px 20px;
    background: rgba(30,41,59,.6); border: 1px dashed rgba(99,102,241,.3); border-radius: 16px;
}
.empty-state i { font-size: 64px; color: rgba(99,102,241,.3); margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; color: #94a3b8; margin-bottom: 8px; }
.empty-state p { color: #64748b; margin-bottom: 20px; font-size: 14px; line-height: 1.8; }
.empty-state .agent-tips { max-width: 500px; margin: 0 auto; text-align: left; background: rgba(99,102,241,.06); border: 1px solid rgba(99,102,241,.14); border-radius: 12px; padding: 20px; }
.empty-state .agent-tips h4 { color: #a78bfa; margin-bottom: 10px; font-size: 14px; }
.empty-state .agent-tips li { color: #94a3b8; font-size: 13px; margin-bottom: 6px; padding-left: 16px; position: relative; list-style: none; }
.empty-state .agent-tips li::before { content: '▸'; position: absolute; left: 0; color: #6366f1; }

/* ============ 分页（深） ============ */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 32px; }
.page-btn {
    min-width: 40px; height: 40px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(99,102,241,.25); border-radius: var(--radius-md);
    background: rgba(30,41,59,.6); color: #94a3b8; font-size: 14px; cursor: pointer; transition: all .25s ease;
}
.page-btn:hover { border-color: #6366f1; color: #c7d2fe; }
.page-btn.active { background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff; border-color: transparent; }
.page-btn.disabled { opacity: .4; cursor: not-allowed; }

/* ============ 响应式 ============ */
@media (max-width: 1200px) { .project-grid, .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1024px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
    .hx-page-wrap { margin-top: 16px; padding: 0 12px; }
    .agent-banner { padding: 30px 22px; }
    .banner-text h1 { font-size: 26px; }
    .banner-robot { display: none; }
    .banner-stats { gap: 20px; }
    .features-grid { grid-template-columns: 1fr; }
    .how-grid { grid-template-columns: 1fr; }
    .how-arrow { transform: rotate(90deg); padding: 8px 0; }
    .filter-input { width: 100%; }
    .project-grid { grid-template-columns: 1fr; }
    .result-info { flex-direction: column; align-items: flex-start; gap: 10px; }
}
