/* 搜索模态框样式 - 参考新版布局 */
.searchtc-modal-overlay {
    position: fixed;
    justify-content: center; /* 水平居中 */
    align-items: center;     /* 垂直居中 */
    position: fixed;         /* 或者 absolute，取决于你的需求 */
	
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: rgba(0, 0, 0, 0.85); */
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 999999 !important; /* 使用更高优先级覆盖左侧导航 */
    backdrop-filter: blur(10px);

    overflow-y: auto;
}

.searchtc-modal-overlay.searchtc-show {
    display: flex;
}

.searchtc-modal {
    background: rgb(30 29 29 / 91%);
    border-radius: 16px;
    width: 90%;
    max-width: 1200px;
    min-height: 80vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1000000 !important; /* 确保模态框内容也在最高层 */
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    /* 移除原本的偏移，改为居中状态 */
    transform: translateY(0); 
    opacity: 1; /* 如果是初始状态，建议设为 1，动画由 JS 控制 */
    
    /* 确保在 Flex 容器中自动居中 */
    margin: auto; 
    transition: all 0.3s ease;
    /* margin-bottom: 50px; */
}

.searchtc-modal-overlay.searchtc-show .searchtc-modal {
    transform: translateY(0);
    opacity: 1;
}

/* 模态框头部 */
.searchtc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    /* border-bottom: 1px solid rgba(255, 255, 255, 0.08); */
    flex-shrink: 0;
    gap: 20px;
}

.searchtc-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.searchtc-modal-title i {
    color: rgba(255, 255, 255, 0.5);
}

/* 搜索框 */
.searchtc-search-box {
    display: flex;
    align-items: center;
    flex-grow: 1;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    padding: 0 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s;
}

.searchtc-search-box:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.searchtc-search-box input {
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    padding: 12px 15px;
    flex-grow: 1;
    font-size: 15px;
    width: 100%;
}

.searchtc-search-box input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.searchtc-search-box .searchtc-search-icon {
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s;
    padding: 8px;
}

.searchtc-search-box .searchtc-search-icon:hover {
    color: #fff;
}

/* 清空按钮 */
.searchtc-search-box .searchtc-clear-icon {
    color: rgba(255, 255, 255, 0.35);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 8px;
    margin-right: 8px;
    display: none; /* 默认隐藏，有内容时显示 */
}

.searchtc-search-box .searchtc-clear-icon:hover {
    color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.searchtc-search-box .searchtc-clear-icon.show {
    display: block;
}

/* 关闭按钮 */
.searchtc-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.searchtc-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: rotate(90deg);
}

/* 标签页导航 */
.searchtc-tabs {
    display: flex;
    gap: 30px;
    padding: 0 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.searchtc-tab {
    padding: 18px 5px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    white-space: nowrap;
}

.searchtc-tab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.searchtc-tab.active {
    color: #fff;
    font-weight: 600;
}

.searchtc-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #b94c4c, #d7f65c);
    border-radius: 3px 3px 0 0;
}

/* 模态框主体 */
.searchtc-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex-grow: 1;
    max-height: calc(80vh - 150px);
}

.searchtc-modal-body::-webkit-scrollbar {
    width: 8px;
}

.searchtc-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.searchtc-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.searchtc-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* 历史搜索区域 */
.searchtc-history-section {
    margin-bottom: 30px;
}

.searchtc-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.searchtc-section-title-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.searchtc-clear-history {
    cursor: pointer;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.searchtc-clear-history:hover {
    color: rgba(255, 255, 255, 0.7);
}

.searchtc-history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.searchtc-history-item {
    background: rgba(255, 255, 255, 0.06);
    padding: 8px 16px;
    border-radius: 100px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.searchtc-history-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* 热门搜索 */
.searchtc-hot-section {
    margin-bottom: 30px;
}

.searchtc-hot-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.searchtc-hot-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.03);
}

.searchtc-hot-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.searchtc-hot-rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.searchtc-hot-item:nth-child(1) .searchtc-hot-rank { color: #f59e0b; }
.searchtc-hot-item:nth-child(2) .searchtc-hot-rank { color: #9ca3af; }
.searchtc-hot-item:nth-child(3) .searchtc-hot-rank { color: #b45309; }

.searchtc-hot-poster {
    width: 45px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.searchtc-hot-info {
    flex-grow: 1;
    min-width: 0;
}

.searchtc-hot-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.searchtc-hot-desc {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

/* 主要搜索结果（首部内容） */
.searchtc-featured-result {
    display: flex;
    gap: 25px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.searchtc-featured-poster {
    width: 160px;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.searchtc-featured-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.searchtc-featured-header {
    display: flex;
    /* justify-content: space-between; 关键：第一个元素靠左，最后一个元素靠右 */
    align-items: center;            /* 垂直居中，防止标题和按钮高度不一致导致错位 */
    width: 100%;                    /* 确保占满整行 */
    margin-bottom: 20px;            /* 可选：增加底部间距 */
}

.searchtc-featured-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0; /* 重置默认 margin，避免意外偏移 */
}

.searchtc-featured-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.searchtc-tag {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.searchtc-tag.vip {
    background: linear-gradient(90deg, #f5d263, #f2a94c);
    color: #7e4500;
    font-weight: 600;
}

.searchtc-tag.hot {
    background: linear-gradient(90deg, #ef4444, #dc2626);
    color: #fff;
}

.searchtc-tag.score {
    background: linear-gradient(90deg, #10b981, #059669);
    color: #fff;
}

.searchtc-featured-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.searchtc-featured-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.searchtc-featured-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 0px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.searchtc-featured-actors {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin-bottom: 20px;
}

.searchtc-featured-actors span {
    color: rgba(255, 255, 255, 0.8);
}

.searchtc-featured-buttons {
    display: flex;
    gap: 12px;
}

.searchtc-btn {
    padding: 12px 28px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.searchtc-btn-primary {
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.searchtc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.searchtc-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.searchtc-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.searchtc-btn-vip {
    background: linear-gradient(90deg, #f5d263, #f2a94c);
    color: #7e4500;
}

.searchtc-btn-vip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 210, 99, 0.4);
}

/* "与 xxx 相关"区域 */
.searchtc-related-section {
    margin-bottom: 30px;
}

.searchtc-related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.searchtc-related-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.searchtc-related-title span {
    color: #f472b6;
}

.searchtc-related-more {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.searchtc-related-more:hover {
    color: rgba(255, 255, 255, 0.8);
}


.searchtc-horizontal-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
}

.searchtc-horizontal-scroll::-webkit-scrollbar {
    height: 6px;
}

.searchtc-horizontal-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.searchtc-horizontal-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.searchtc-horizontal-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* 短剧纵向滚动网格布局 */
.searchtc-short-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    overflow-y: auto;
    padding: 10px;
}

.searchtc-short-grid::-webkit-scrollbar {
    width: 8px;
}

.searchtc-short-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.searchtc-short-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.searchtc-short-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.searchtc-card {
    flex-shrink: 0;
    width: 160px;
    cursor: pointer;
    transition: transform 0.2s;
}

.searchtc-card:hover {
    transform: translateY(-5px);
}

.searchtc-card-poster {
    width: 160px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.searchtc-card-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
	padding: 5px 5px 5px 5px; /* 上 右 下 左 */
	border-radius: 0px 0px 8px 8px; /* 左上, 右上, 右下, 左下 */
}

.searchtc-card-subtitle {
    /* 关键定位属性 */
    position: absolute;
    bottom: 0;          /* 贴底 */
    left: 0;            /* 贴左 */
    width: 100%;        /* 占满整行 */
    
    /* 样式美化 (根据需求调整) */
    padding: 8px 12px;  /* 内边距 */
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); /* 渐变背景，让文字更清晰 */
    color: #fff;        /* 白色文字 */
    font-size: 14px;
    font-weight: 500;
    box-sizing: border-box; /* 确保 padding 不增加总宽度 */
    z-index: 10;        /* 确保在图片上层 */
    
    /* 如果文字太长需要省略号 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.searchtc-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.searchtc-card-badge.vip {
    background: linear-gradient(90deg, #f5d263, #f2a94c);
    color: #7e4500;
}

.searchtc-card-badge.hot {
    background: linear-gradient(90deg, #ef4444, #dc2626);
    color: #fff;
}

.searchtc-card-badge.new {
    background: linear-gradient(90deg, #10b981, #059669);
    color: #fff;
}

.searchtc-card-container {
    position: relative; /* 必须：作为绝对定位子元素的参照物 */
    width: 100%;        /* 确保容器有宽度 */
	border-radius: 8px 8px 8px 8px; /* 左上, 右上, 右下, 左下  可选：圆角，防止内容溢出*/
    overflow: hidden;   /* 可选：防止 subtitle 超出圆角范围 */
}

/* 全部结果网格 */
.searchtc-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.searchtc-result-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.searchtc-result-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
}

.searchtc-result-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
}

.searchtc-result-info {
    padding: 12px;
}

.searchtc-result-title {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.searchtc-result-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.searchtc-result-remarks {
    color: rgba(255, 255, 255, 0.5);
}

.searchtc-result-vip {
    background: linear-gradient(90deg, #f5d263, #f2a94c);
    color: #7e4500;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

/* 空状态 */
.searchtc-empty-state {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.4);
}

.searchtc-empty-state i {
    font-size: 72px;
    margin-bottom: 20px;
    opacity: 0.2;
}

.searchtc-empty-state p {
    font-size: 16px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.5);
}

.searchtc-empty-state .sub-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.35);
}

/* 加载状态 */
.searchtc-loading-state {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.4);
}

.searchtc-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: searchtc-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes searchtc-spin {
    to { transform: rotate(360deg); }
}

/* 内容区域切换 */
.searchtc-content-section {
    display: none;
}

.searchtc-content-section.active {
    display: block;
}

/* 响应式 */
@media (max-width: 768px) {
    .searchtc-featured-result {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .searchtc-featured-poster {
        width: 160px;
        height: 240px;
    }

    .searchtc-featured-header {
        flex-direction: column;
        align-items: center;
    }



    .searchtc-modal-header {
        flex-wrap: wrap;
    }

    .searchtc-search-box {
        order: 3;
        width: 100%;
        max-width: none;
        margin-top: 10px;
    }

    .searchtc-tabs {
        gap: 20px;
        overflow-x: auto;
    }

    .searchtc-card {
        width: 140px;
    }

    .searchtc-card-poster {
        width: 140px;
        height: 210px;
    }
}
