.duanju-module * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.duanju-module {
    touch-action: manipulation;
}

/* 标签栏 */
.tab-wrap {
    max-width: 1400px;
    margin: 0 auto 12px;
    padding: 0 12px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.tab-item {
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tab-item.active {
    background: #0ea5e9;
    color: #fff;
    border-color: #0ea5e9;
}

.tab-item:hover:not(.active) {
    border-color: #0ea5e9;
    color: #0ea5e9;
}

.tab-wrap::-webkit-scrollbar {
    height: 4px;
}

.tab-wrap::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* 卡片列表 */
.duanju-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    max-width: 1400px;
    margin: 0 auto 8px;
    padding: 0 12px;
}

@media (min-width: 1200px) {
    .duanju-list {
        grid-template-columns: repeat(6, 1fr);
    }
}

.duanju-card {
    position: relative;
    text-decoration: none;
    display: block;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border-radius: 8px;
    overflow: hidden;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    cursor: pointer;
    touch-action: manipulation;
}

.duanju-card.hide-step {
    visibility: hidden;
    height: 0 !important;
    margin: 0 !important;
    overflow: hidden;
}

.duanju-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.card-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    overflow: hidden;
}

/* 短剧封面 */
.drama-cover-box {
    width: 100%;
    height: 100%;
    position: relative;
}

.drama-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    will-change: transform;
}

.duanju-card:hover .drama-cover {
    transform: scale(1.04);
}

.drama-title-mask {
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
    padding: 18px 8px 6px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    pointer-events: none;
}

.drama-title {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 演员卡片 */
.actor-card-inner {
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 10px;
    gap: 8px;
}

.actor-avatar-box {
    width: 68%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    background: #e2e8f0;
    flex-shrink: 0;
}

.actor-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.duanju-card:hover .actor-avatar {
    transform: scale(1.05);
}

.actor-name {
    font-size: 12px;
    font-weight: 500;
    color: #1e293b;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    line-height: 1.3;
}

/* 悬浮简介弹窗 —— 搜索按钮固定底部 */
.duanju-desc {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.94);
    color: #fff;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.duanju-desc.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.desc-tip {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 2px 6px;
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 9px;
    font-weight: 500;
    border-radius: 4px;
    z-index: 11;
    pointer-events: none;
}

.desc-heading {
    font-size: 13px;
    font-weight: 600;
    color: #38bdf8;
    padding: 7px 10px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

/* 可滚动内容区 */
.desc-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 10px;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.desc-body::-webkit-scrollbar {
    width: 3px;
}

.desc-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
}

.desc-body::-webkit-scrollbar-thumb {
    background: #38bdf8;
    border-radius: 2px;
}

.desc-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: #7dd3fc;
    flex-wrap: wrap;
    line-height: 1.4;
}

.meta-item {
    flex-shrink: 0;
}

.desc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.info-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(14, 165, 233, 0.12);
    color: #38bdf8;
    font-size: 10px;
    line-height: 1.4;
}

.info-tag svg {
    flex-shrink: 0;
}

.desc-content {
    font-size: 11px;
    line-height: 1.5;
    color: #e0e7ff;
    word-break: break-all;
}

.desc-line {
    font-size: 11px;
    display: flex;
    gap: 6px;
    line-height: 1.5;
    margin: 0;
}

.desc-label {
    color: #7dd3fc;
    flex-shrink: 0;
}

.desc-value {
    color: #e0e7ff;
    word-break: break-all;
}

/* 底部固定搜索按钮 */
.desc-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 10px 10px;
    padding: 7px 0;
    border-radius: 6px;
    background: #0ea5e9;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.desc-search-btn:hover {
    background: #0284c7;
}

/* 加载更多 & 收起 */
.duanju-load-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 4px 20px 8px;
    position: relative;
}

.duanju-load-wrap::before {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
    z-index: 1;
}

.duanju-load-more-bar,
.duanju-collapse-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: color 0.24s ease;
}

.duanju-load-more-bar:hover:not(.disabled) {
    color: #0ea5e9;
}

.duanju-load-more-bar.disabled {
    color: #94a3b8;
    pointer-events: none;
}

.duanju-collapse-bar {
    display: none;
}

.duanju-collapse-bar:hover {
    color: #0ea5e9;
}

.duanju-load-icon,
.duanju-collapse-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.duanju-load-text,
.duanju-collapse-text {
    background-color: #ffffff;
    padding: 2px 8px;
    font-weight: 500;
    border-radius: 6px;
}

/* 空状态提示 */
.tip-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #64748b;
    gap: 10px;
}

.tip-text {
    font-size: 14px;
}

.tip-wrap svg {
    stroke: currentColor;
}

.spin-anim {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 深色模式 */
.io-black-mode .duanju-desc {
    background-color: rgba(10, 14, 23, 0.96);
}

.io-black-mode .desc-tip {
    background-color: rgba(255, 255, 255, 0.12);
}

.io-black-mode .desc-heading {
    color: #7dd3fc;
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.io-black-mode .desc-content {
    color: #cbd5e1;
}

.io-black-mode .desc-value {
    color: #cbd5e1;
}

.io-black-mode .duanju-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.io-black-mode .desc-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
}

.io-black-mode .duanju-load-wrap::before {
    background: linear-gradient(90deg, transparent, #475569, transparent);
}

.io-black-mode .duanju-load-more-bar,
.io-black-mode .duanju-collapse-bar {
    color: #94a3b8;
}

.io-black-mode .duanju-load-more-bar:hover:not(.disabled),
.io-black-mode .duanju-collapse-bar:hover {
    color: #7dd3fc;
}

.io-black-mode .duanju-load-text,
.io-black-mode .duanju-collapse-text {
    background-color: #0f172a;
}

.io-black-mode .tab-item {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

.io-black-mode .tab-item.active {
    background: #0ea5e9;
    color: #fff;
    border-color: #0ea5e9;
}

.io-black-mode .tab-item:hover:not(.active) {
    border-color: #7dd3fc;
    color: #7dd3fc;
}

.io-black-mode .tab-wrap::-webkit-scrollbar-thumb {
    background: #475569;
}

.io-black-mode .tip-wrap {
    color: #94a3b8;
}

.io-black-mode .actor-card-inner {
    background: #1e293b;
}

.io-black-mode .actor-name {
    color: #e2e8f0;
}

.io-black-mode .actor-avatar-box {
    background: #334155;
}

.io-black-mode .info-tag {
    background: rgba(125, 211, 252, 0.1);
    color: #7dd3fc;
}

/* 灰色模式 */
.io-grey-mode .duanju-desc {
    background-color: rgba(15, 23, 42, 0.9);
}

.io-grey-mode .desc-tip {
    background-color: rgba(255, 255, 255, 0.2);
}

.io-grey-mode .desc-heading {
    color: #38bdf8;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.io-grey-mode .desc-content {
    color: #e0e7ff;
}

.io-grey-mode .duanju-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.io-grey-mode .duanju-load-wrap::before {
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

.io-grey-mode .duanju-load-more-bar,
.io-grey-mode .duanju-collapse-bar {
    color: #64748b;
}

.io-grey-mode .duanju-load-more-bar:hover:not(.disabled),
.io-grey-mode .duanju-collapse-bar:hover {
    color: #38bdf8;
}

.io-grey-mode .duanju-load-text,
.io-grey-mode .duanju-collapse-text {
    background-color: #f8fafc;
}

.io-grey-mode .tab-item {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
}

.io-grey-mode .tab-item.active {
    background: #0ea5e9;
    color: #fff;
    border-color: #0ea5e9;
}

.io-grey-mode .tab-item:hover:not(.active) {
    border-color: #38bdf8;
    color: #38bdf8;
}

.io-grey-mode .tab-wrap::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

.io-grey-mode .tip-wrap {
    color: #64748b;
}

.io-grey-mode .actor-card-inner {
    background: #f1f5f9;
}

.io-grey-mode .actor-name {
    color: #1e293b;
}

.io-grey-mode .info-tag {
    background: rgba(14, 165, 233, 0.1);
}
