/* 短剧百科复刻站 - 业务样式补充（theme.css 由 Tailwind 生成） */
:root {
    --dbk-header-height: 61px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Inter, Poppins, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.mobile-sidebar-open {
    overflow: hidden;
}

.dbk-mobile-overlay {
    display: none;
}

nav.header {
    height: var(--dbk-header-height);
}

nav.header.is-scrolled {
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.main-content {
    margin-top: calc(var(--dbk-header-height) - 1px);
}

.card {
    border: 1px solid rgba(226, 232, 240, 0.75);
}

.dark .card {
    border-color: rgba(38, 51, 77, 0.8);
}

.card-hover {
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px -20px rgba(79, 70, 229, .45);
    border-color: rgba(99, 102, 241, .35);
}

.card-hover .line-clamp-2 {
    min-height: 2.9rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 .6rem;
    border-radius: .5rem;
    background: #e9eef5;
    color: #64748b;
    font-size: .8125rem;
    transition: all .2s ease;
}

.dark .pagination-btn {
    background: #313e59;
    color: #c2c9d6;
}

.pagination-btn:hover {
    background: #dbe3ef;
    color: #4f46e5;
}

.dark .pagination-btn:hover {
    background: #465675;
    color: #818cf8;
}

.pagination-btn.is-current {
    background: #4f46e5;
    color: #fff;
}

.dark .pagination-btn.is-current {
    background: #5f5af6;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    border-radius: .5rem;
    white-space: nowrap;
}

.badge {
    display: inline-flex;
    align-items: center;
}

.form-input {
    outline: none;
}

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-1 { -webkit-line-clamp: 1; }
.line-clamp-2 { -webkit-line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; }

img {
    background-color: rgba(148, 163, 184, .08);
}

img.is-loaded {
    background-color: transparent;
}

/* 侧栏在移动端默认隐藏，打开 mobile-sidebar-open 后显示 */
@media (max-width: 1279px) {
    body:not(.mobile-sidebar-open) .sidebar,
    body:not(.mobile-sidebar-open) .sidebar-panel,
    body:not(.mobile-sidebar-open) .main-sidebar {
        transform: translateX(-100%) !important;
    }

    body.mobile-sidebar-open .sidebar,
    body.mobile-sidebar-open .sidebar-panel,
    body.mobile-sidebar-open .main-sidebar {
        transform: translateX(0) !important;
    }

    .dbk-mobile-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 28;
        background: rgba(15, 23, 42, .42);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
        backdrop-filter: blur(1px);
    }

    body.mobile-sidebar-open .dbk-mobile-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar {
        position: relative;
        z-index: 50;
    }
}

@media (min-width: 1280px) {
    body:not(.is-sidebar-open) .sidebar-panel {
        transform: translateX(-100%);
    }

    body:not(.is-sidebar-open) .main-content {
        margin-left: var(--main-sidebar-width);
    }

    body:not(.is-sidebar-open) nav.header {
        width: calc(100% - var(--main-sidebar-width));
    }

    body:not(.is-sidebar-open) .sidebar-panel ~ nav.header {
        margin-left: 0;
    }
}

::selection {
    background: rgba(79, 70, 229, .2);
}

.admin-stat-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1280px) {
    .admin-stat-grid-five {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.chart-pair {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    width: 100%;
    height: 128px;
}

.chart-pair-lg {
    height: 150px;
}

.chart-bar {
    width: 46%;
    border-radius: 3px 3px 0 0;
}

.chart-bar-real {
    background: #4f46e5;
}

.dark .chart-bar-real {
    background: #818cf8;
}

.chart-bar-bot {
    background: #fbbf24;
}

.visit-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .1rem .35rem;
    border-radius: .3rem;
    font-size: .625rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.visit-badge-real {
    background: rgba(16, 185, 129, .12);
    color: #059669;
}

.visit-badge-bot {
    background: rgba(245, 158, 11, .16);
    color: #b45309;
}

.dark .visit-badge-real {
    background: rgba(52, 211, 153, .14);
    color: #6ee7b7;
}

.dark .visit-badge-bot {
    background: rgba(251, 191, 36, .16);
    color: #fcd34d;
}

.is-scrollbar-hidden::-webkit-scrollbar {
    display: none;
}

.is-scrollbar-hidden {
    scrollbar-width: none;
}

/* 详情页立即观看弹窗：内嵌短剧TV搜索/播放 */
body.player-modal-open {
    overflow: hidden;
}

.player-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.player-modal[hidden] {
    display: none;
}

.player-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, .72);
    backdrop-filter: blur(3px);
}

.player-modal-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1180px;
    height: 100%;
    max-height: calc(100vh - 2rem);
    overflow: hidden;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 30px 90px -30px rgba(2, 6, 23, .65);
}

.dark .player-modal-shell {
    background: #1b2537;
}

.player-modal-head {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid rgba(226, 232, 240, .85);
}

.dark .player-modal-head {
    border-color: rgba(38, 51, 77, .9);
}

.player-modal-body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    background: #05070d;
}

.player-results {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    padding: 1rem;
    background: #f8fafc;
}

.dark .player-results {
    background: #0b1220;
}

.player-results-head {
    margin-bottom: .75rem;
    color: #64748b;
    font-size: .75rem;
    font-weight: 500;
}

.player-results-head[hidden] {
    display: none;
}

.dark .player-results-head {
    color: #94a3b8;
}

.player-result-list {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: .75rem;
    align-content: start;
}

@media (min-width: 640px) {
    .player-result-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .player-result-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.player-result-card {
    display: flex;
    gap: .75rem;
    width: 100%;
    min-width: 0;
    padding: .65rem;
    text-align: left;
    border: 1px solid #e2e8f0;
    border-radius: .75rem;
    background: #fff;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.player-result-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, .45);
    box-shadow: 0 14px 30px -18px rgba(79, 70, 229, .55);
}

.dark .player-result-card {
    border-color: rgba(38, 51, 77, .9);
    background: #1b2537;
}

.player-result-poster {
    width: 64px;
    height: 86px;
    flex: 0 0 auto;
    border-radius: .45rem;
    object-fit: cover;
    background: #e2e8f0;
}

.player-result-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: .2rem;
}

.player-result-name {
    overflow: hidden;
    color: #1e293b;
    font-size: .875rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark .player-result-name {
    color: #f1f5f9;
}

.player-result-meta {
    overflow: hidden;
    color: #94a3b8;
    font-size: .7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-result-play {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: .2rem;
    margin-top: auto;
    padding: .2rem .5rem;
    border-radius: .375rem;
    background: rgba(79, 70, 229, .1);
    color: #4f46e5;
    font-size: .7rem;
    font-weight: 600;
}

.dark .player-result-play {
    background: rgba(129, 140, 248, .14);
    color: #a5b4fc;
}

.player-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 12rem;
    color: #64748b;
    font-size: .875rem;
    text-align: center;
}

.player-empty[hidden] {
    display: none;
}

.player-stage {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: #05070d;
}

.player-stage[hidden] {
    display: none;
}

.player-stage-bar {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .75rem;
    min-height: 2.5rem;
    padding: .3rem .75rem;
    background: #0f172a;
    color: #cbd5e1;
    font-size: .75rem;
}

.player-back {
    flex: 0 0 auto;
    padding: .25rem .55rem;
    border-radius: .375rem;
    color: #e2e8f0;
    font-size: .75rem;
}

.player-back:hover {
    background: rgba(255, 255, 255, .1);
}

.player-now {
    overflow: hidden;
    min-width: 0;
    color: #94a3b8;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-modal-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.player-modal-loading {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    color: rgba(255, 255, 255, .75);
    font-size: .875rem;
    background: #05070d;
}

.player-modal-loading.is-hidden {
    display: none;
}

.player-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: .5rem;
    color: #64748b;
    font-size: 1.25rem;
    line-height: 1;
}

.player-modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.dark .player-modal-close:hover {
    background: #26334d;
    color: #fff;
}

@media (max-width: 640px) {
    .player-modal {
        padding: 0;
    }

    .player-modal-shell {
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }

    .player-modal-head {
        padding: .6rem .75rem;
    }
}
