/* 在线工具卡片与页面头部 */

.tool-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.tool-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #ece8dc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: none;
    box-shadow: 0 4px 14px rgba(166, 124, 0, 0.1);
    border-color: #e2d4a8;
}

.tool-card-visual {
    position: relative;
    height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f7f2e4;
}

.tool-card-visual::before,
.tool-card-visual::after {
    display: none;
}

.tool-card-cover {
    display: none;
}

.tool-card-visual svg {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    fill: none;
    stroke: #b08900;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: none;
}

/* 统一浅黄底，工具详情页横幅也保持朴素 */
.tool-theme-json,
.tool-theme-md5,
.tool-theme-hash,
.tool-theme-base64,
.tool-theme-url,
.tool-theme-image,
.tool-theme-faker,
.tool-theme-timestamp,
.tool-theme-regex,
.tool-theme-jwt,
.tool-theme-uuid,
.tool-theme-gitignore,
.tool-theme-git,
.tool-theme-textkit,
.tool-theme-httpcode,
.tool-theme-default {
    background: #f7f2e4;
    color: #5c4a1a;
}

.tool-card-body {
    padding: 14px 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tool-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #303133;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-card-desc {
    font-size: 12px;
    color: #909399;
    line-height: 1.4;
}

.tool-card-tag {
    display: inline-block;
    margin-top: auto;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    width: fit-content;
}

.tool-tag-json,
.tool-tag-md5,
.tool-tag-base64,
.tool-tag-image,
.tool-tag-default,
.tool-tag-dev,
.tool-tag-test,
.tool-tag-proj,
.tool-tag-prod {
    background: #f3ecd4;
    color: #8a6d12;
}

.tools-filter-card {
    margin-bottom: 28px;
}
.tools-filter-card .el-card__body {
    padding: 24px 28px 26px;
}
.tools-filter-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef0f4;
}
.tools-filter-header .card-title-custom {
    font-size: 20px;
    line-height: 1.4;
}
.tools-filter-subtitle {
    color: #909399;
    font-size: 13px;
    line-height: 1.4;
}
.tools-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.tools-filter-bar .el-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.tools-filter-bar .el-radio-button {
    margin: 0 !important;
}
.tools-filter-bar .el-radio-button__inner {
    border-radius: 20px !important;
    border: 1px solid #dcdfe6 !important;
    margin-left: 0 !important;
    box-shadow: none !important;
    padding: 10px 20px !important;
    font-size: 14px;
}
.tools-filter-bar .el-radio-button:first-child .el-radio-button__inner,
.tools-filter-bar .el-radio-button:last-child .el-radio-button__inner {
    border-radius: 20px !important;
}
.tool-simple-stack .el-form-item { margin-bottom: 14px; }
.tool-result-box {
    background: #f5f7fa;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    padding: 12px;
    min-height: 48px;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    line-height: 1.5;
}
.tool-match-item {
    background: #ecf5ff;
    border-left: 3px solid #409EFF;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
}
.tool-cheat-item {
    border: 1px solid #ebeef5;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
}
.tool-cheat-item code {
    display: block;
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 10px 12px;
    border-radius: 6px;
    margin-top: 8px;
    white-space: pre-wrap;
    word-break: break-all;
}

/* 工具页顶部横幅 */
.tool-page-hero {
    position: relative;
    border-radius: 16px 16px 0 0;
    margin: -20px -20px 20px;
    padding: 28px 24px;
    color: #5c4a1a;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
}

.tool-page-hero::before,
.tool-page-hero::after {
    display: none;
}

.tool-page-hero-icon {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: #efe6c8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-page-hero-icon svg {
    width: 36px;
    height: 36px;
    fill: none;
    stroke: #b08900;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tool-page-hero-text {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.tool-page-hero-text h1 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #4a3c14;
}

.tool-page-hero-text p {
    margin: 0;
    font-size: 13px;
    opacity: 0.85;
    line-height: 1.5;
    color: #7a6a3a;
}

.tool-page-card >>> .el-card__body {
    padding-top: 20px;
}

.tool-page-card .app-container {
    padding: 0;
}

.tool-page-card .app-container .tool-page-hero {
    margin-bottom: 16px;
}

.tools-grid-section {
    margin-top: 4px;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .tools-filter-card .el-card__body {
        padding: 18px 16px 20px;
    }

    .tools-filter-header {
        margin-bottom: 16px;
        padding-bottom: 14px;
    }

    .tools-filter-bar .el-radio-button__inner {
        padding: 8px 16px !important;
    }

    .tool-card-visual {
        height: 96px;
    }

    .tool-card-visual svg {
        width: 40px;
        height: 40px;
    }

    .tool-page-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 16px;
        margin: -16px -16px 16px;
    }

    .tool-page-hero-text h1 {
        font-size: 18px;
    }
}
