/* ==============================================================
   tools — 在线工具集

   【子主题统一 UI 规范】（与 app_card_list / 主题 .widget-title 同规格）
   标题栏  : flex / space-between / gap 12
             margin 0 0 12px; padding-bottom 10px; border-bottom 2px solid var(--border-primary)
   分区标题: 17px / 600 / var(--text-primary)（居中版用主题色短横条点缀，不用 emoji）
   卡片    : var(--bg-card) + 1px var(--border-primary) + var(--border-radius) + var(--shadow-sm)
   卡片悬停: border-color var(--theme-color) + var(--shadow-md)
   图标底板: var(--bg-secondary) + 1px var(--border-primary)，图标用 var(--theme-color)
   强调色  : 一律 var(--theme-color)
             —— 原每卡片不同色（#4fc3f7 浅蓝 / #66bb6a 绿 / #ab47bc 紫）已全部去掉
             —— hero 原为 4 段深蓝渐变（深色 hero），已改为浅色主题底
   ============================================================== */

/* ========== 页面容器 ========== */
.tols-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ========== Hero（浅色版） ========== */
.tols-hero {
    position: relative;
    text-align: center;
    padding: 44px 24px 38px;
    margin-bottom: 36px;
    overflow: hidden;
    border-radius: var(--border-radius);
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
}

.tols-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* 主题色淡染底，浅色 / 暗色都成立（替代原来的深蓝渐变） */
.tols-hero__gradient {
    position: absolute;
    inset: 0;
    background: var(--theme-color);
    opacity: 0.06;
}

/* 原白点噪点纹理，与统一风格冲突，隐藏 */
.tols-hero__pattern {
    display: none;
}

.tols-hero__inner {
    position: relative;
    z-index: 1;
}

.tols-hero__title {
    font-size: 1.6em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 10px;
    line-height: 1.35;
}

.tols-hero__subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 22px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.tols-hero__stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-tertiary);
}

.tols-hero__stat strong {
    color: var(--theme-color);
    font-weight: 600;
}

.tols-hero__dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--border-hover);
}

/* ========== 分区标题（居中版） ========== */
.tols-section {
    margin-bottom: 40px;
}

.tols-section__header {
    text-align: center;
    margin-bottom: 26px;
}

.tols-section__title {
    position: relative;
    font-size: 1.06em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 14px;
    padding-bottom: 12px;
    line-height: 1.4;
}

.tols-section__title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 28px;
    height: 2px;
    border-radius: 2px;
    background: var(--theme-color);
}

.tols-section__desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* ========== 卡片网格 ========== */
.tols-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* ========== 卡片 ========== */
.tols-card {
    display: flex;
    flex-direction: column;
    padding: 22px 20px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.tols-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--theme-color);
}

/* 图标底板 */
.tols-card__icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    color: var(--theme-color);
    transition: background-color 0.25s, border-color 0.25s;
}

.tols-card:hover .tols-card__icon-wrap {
    background: var(--bg-hover);
    border-color: var(--theme-color);
}

.tols-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* 标题 */
.tols-card__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.4;
}

/* 描述 */
.tols-card__desc {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 0 0 16px;
    line-height: 1.7;
    flex: 1;
}

/* 动作 */
.tols-card__action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--theme-color);
    transition: gap 0.25s, color 0.25s;
}

.tols-card__action svg {
    transition: transform 0.25s;
}

.tols-card:hover .tols-card__action {
    gap: 10px;
}

.tols-card:hover .tols-card__action svg {
    transform: translateX(3px);
}

/* ========== 空状态 ========== */
.tols-empty {
    text-align: center;
    padding: 70px 20px;
}

.tols-empty__icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.tols-empty__text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 8px;
}

.tols-empty__hint {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .tols-hero { padding: 32px 18px 28px; margin-bottom: 28px; }
    .tols-hero__title { font-size: 1.3em; }
    .tols-hero__subtitle { font-size: 13px; }
    .tols-hero__stats { flex-wrap: wrap; }

    .tols-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 16px;
    }

    .tols-card { padding: 18px 16px 16px; }
}

@media (max-width: 480px) {
    .tols-grid { grid-template-columns: 1fr; }
    .tols-hero__title { font-size: 1.2em; }
}
