/* ============================================================
   首页配色工具区（2026-10-29 重构）
   结构：1 主推 + 4 常用 + 3 组胶囊
   ============================================================ */

.home-tools-section {
    position: relative;
    background: linear-gradient(135deg, #16224a 0%, #1c2b5c 45%, #2d3f7a 100%);
    padding: 52px 0 56px;
    overflow: hidden;
}
.home-tools-section::before {
    content: '';
    position: absolute;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    right: -160px;
    top: -220px;
    background: radial-gradient(circle, rgba(142, 197, 200, .20) 0%, rgba(142, 197, 200, 0) 70%);
    pointer-events: none;
}
.home-tools-section::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    left: -140px;
    bottom: -200px;
    background: radial-gradient(circle, rgba(232, 115, 12, .18) 0%, rgba(232, 115, 12, 0) 70%);
    pointer-events: none;
}
.home-tools-section .container {
    position: relative;
    z-index: 1;
}

/* 头部 */
.ht-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
}
.ht-head h2 {
    font-size: 26px;
    color: #fff;
    margin: 0 0 8px;
    font-weight: 700;
    letter-spacing: .5px;
}
.ht-head p {
    margin: 0;
    font-size: 13.5px;
    color: rgba(255, 255, 255, .62);
}
.ht-more {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, .28);
    color: rgba(255, 255, 255, .88);
    font-size: 13px;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}
.ht-more:hover {
    background: rgba(255, 255, 255, .14);
    color: #fff;
    text-decoration: none;
}

/* 卡片网格：hero 占 2×2 */
.ht-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(112px, auto);
    gap: 14px;
}

.ht-hero {
    grid-column: span 2;
    grid-row: span 2;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 26px 26px 22px;
    border-radius: 18px;
    background: linear-gradient(140deg, #f2ae5c 0%, #e8730c 52%, #c3272b 100%);
    color: #fff;
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .26);
    transition: transform .25s, box-shadow .25s;
}
.ht-hero::after {
    content: '';
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    right: -70px;
    top: -80px;
    background: rgba(255, 255, 255, .14);
    pointer-events: none;
}
.ht-hero:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 46px rgba(0, 0, 0, .32);
    text-decoration: none;
    color: #fff;
}
.ht-tag {
    align-self: flex-start;
    padding: 3px 11px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .22);
    border: 1px solid rgba(255, 255, 255, .3);
    font-size: 11.5px;
    font-weight: 600;
    margin-bottom: 16px;
}
.ht-hero-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background: rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 14px;
}
.ht-hero b {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: .5px;
}
.ht-hero small {
    font-size: 13.5px;
    color: rgba(255, 255, 255, .9);
    line-height: 1.7;
    margin-bottom: auto;
}
.ht-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 30px;
    background: #fff;
    color: #c3272b;
    align-self: flex-start;
    transition: gap .2s;
}
.ht-hero:hover .ht-cta {
    gap: 12px;
}

/* 常用工具卡 */
.ht-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 18px 18px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .97);
    text-decoration: none;
    color: inherit;
    transition: transform .2s, box-shadow .2s, background .2s;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .14);
}
.ht-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .22);
    text-decoration: none;
    color: inherit;
}
.ht-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 12px;
}
.ht-card b {
    font-size: 15px;
    color: #1c2b5c;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: .2px;
}
.ht-card small {
    font-size: 12.5px;
    color: #7a839c;
    line-height: 1.6;
}
.ht-card .ht-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 10.5px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}
.ht-badge.free {
    background: #e8f6ee;
    color: #1f9254;
}
.ht-badge.point {
    background: #fff5e0;
    color: #b7791f;
}

/* 图标底色 */
.icon-blue   { background: #e8f1fd; color: #2f6fb5; }
.icon-green  { background: #e9f7ef; color: #2e8b57; }
.icon-purple { background: #f0ebfd; color: #6b4fc4; }
.icon-orange { background: #fff1e6; color: #d97706; }
.icon-pink   { background: #fdeef3; color: #c2456e; }
.icon-teal   { background: #e6f7f6; color: #0f8b8d; }

/* 分组胶囊 */
.ht-groups {
    margin-top: 20px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 16px;
    padding: 6px 20px;
}
.ht-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    flex-wrap: wrap;
}
.ht-group:last-child {
    border-bottom: 0;
}
.ht-label {
    flex: 0 0 96px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, .58);
    display: flex;
    align-items: center;
    gap: 6px;
}
.ht-label i {
    font-size: 12px;
    color: rgba(255, 255, 255, .45);
}
.ht-group a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid transparent;
    color: rgba(255, 255, 255, .92);
    font-size: 12.5px;
    text-decoration: none;
    transition: all .18s;
}
.ht-group a:hover {
    background: #fff;
    color: #1c2b5c;
    text-decoration: none;
}
.ht-group a i {
    font-style: normal;
    font-size: 10.5px;
    color: #ffd479;
}
.ht-group a:hover i {
    color: #c3272b;
}

/* 响应式 */
@media (max-width: 1200px) {
    .ht-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .ht-hero {
        grid-column: span 2;
    }
}
@media (max-width: 991px) {
    .home-tools-section {
        padding: 40px 0 44px;
    }
    .ht-head h2 {
        font-size: 22px;
    }
    .ht-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ht-hero {
        grid-column: span 2;
        grid-row: span 1;
    }
    .ht-label {
        flex: 0 0 100%;
        margin-bottom: 2px;
    }
}
@media (max-width: 576px) {
    .home-tools-section {
        padding: 30px 0 34px;
    }
    .ht-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 18px;
    }
    .ht-head h2 {
        font-size: 19px;
    }
    .ht-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .ht-hero {
        grid-column: span 2;
        padding: 20px;
    }
    .ht-hero b {
        font-size: 18px;
    }
    .ht-card {
        padding: 14px 14px 13px;
    }
    .ht-card b {
        font-size: 13.5px;
    }
    .ht-card small {
        font-size: 11.5px;
    }
    .ht-groups {
        padding: 4px 14px;
    }
    .ht-group {
        gap: 8px;
        padding: 10px 0;
    }
    .ht-group a {
        padding: 5px 10px;
        font-size: 12px;
    }
}
