/* 基础背景与字体 */
body {
    background-color: #f5f7f9;
    padding: 10px;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 布局：左侧 450px 固定，右侧自适应 */
.flex-container {
    display: flex;
    align-items: flex-start;
}

.side-panel {

    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

.main-panel {
    flex-grow: 1;
    margin-left: 20px;
    width: calc(100% - 470px); /* 450px + 20px gap */
}

/* 左侧卡片头部与右侧搜索模块的对齐与标题样式 */
.ctf-side-header {
    padding: 14px 16px;
    border-bottom: 1px solid #f2f2f2;
    background-color: #fff;
}

.ctf-side-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.ctf-side-title a {
    color: inherit;
    text-decoration: none;
}

.ctf-side-title a:hover {
    color: #1e9fff;
}

/* 右侧搜索卡片顶部留白与左侧标题对齐 */
.search-card .layui-card-body {
    padding-top: 14px;
}

/* 左侧树：长文本截断与样式 */
.layui-tree-entry .layui-tree-txt {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
    color: #333;
}



/* 1. 基础节点悬停效果 */
.layui-tree-entry:hover {
    background-color: rgba(7, 135, 231, 1); /* 鼠标经过时极淡的蓝色 */

}

/* 2. 选中节点的“微发亮”效果 */
.layui-tree-set-active > .layui-tree-entry {
    background-color: rgba(30, 159, 255, 1) !important; /* 选中的背景色 */
    border-right: 3px solid #1e9fff; /* 右侧亮蓝条提示 */
    transition: all 0.3s ease;
    box-shadow: inset 0 0 8px rgba(30, 159, 255, 1); /* 内发光 */
}

/* 3. 选中节点的文字样式 */
.layui-tree-set-active > .layui-tree-entry .layui-tree-txt {
    color: #fff !important;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.35); /* 文字微光，适配反白 */
}

/* 4. 给文件夹图标也染点颜色 */
.layui-tree-set-active > .layui-tree-entry .layui-icon {
    color: #fff !important;
}
/* 搜索区域与系列标签 */
.search-card {
    margin-bottom: 20px;
    border-radius: 8px;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.series-tag-box {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
}

.tag-btn {
    display: inline-block;
    padding: 4px 12px;
    margin: 0 8px 8px 0;
    background: #fff;
    border: 1px solid #d2d2d2;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.tag-btn:hover {
    border-color: #1e9fff;
    color: #1e9fff;
}

.tag-btn.active {
    background: #1e9fff;
    color: #fff;
    border-color: #1e9fff;
    font-weight: bold;
}

.filter-summary {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

.filter-summary-text {
    margin-left: 8px;
}

/* 4x3 卡片核心样式 */
.ctf-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eef0f2;
    transition: all 0.3s;

    display: flex;
    flex-direction: column;
}

.ctf-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* 图片与占位图逻辑 */
.card-img-wrapper {
    width: 100%;
    height: 150px;
    overflow: hidden;
    position: relative;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    padding: 15px;
    box-sizing: border-box;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #1e9fff 0%, #00d2ff 100%);
}

/* 随机背景变体 */
.bg-v1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.bg-v2 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.bg-v3 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.bg-v4 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }

.card-body {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 15px;
    font-weight: bold;
    line-height: 1.5;
    height: 45px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 2px;
    color: #2c3e50;
}

.card-info {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-info i {
    margin-right: 6px;
    color: #1e9fff;
    width: 14px;
    text-align: center;
}

.card-tags {
    margin-top: auto;
    padding-top: 2px;
    height: 30px;
    overflow: hidden;
}

.card-tags .layui-badge {
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 11px;
}

.card-footer {
    padding: 12px 15px;
    background: #fafbfc;
    border-top: 1px solid #f0f2f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pager-container {
    text-align: center;
    margin: 30px 0;
}
