/* ============================================
   系列专栏样式
   ============================================ */

/* 页面容器 - 让footer贴底 */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-wrapper .series-page {
    flex: 1;
    align-self: center;
}

.page-wrapper .footer {
    margin-top: auto;
}

/* 系列列表页 */
.series-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 20px 100px;
    width: 100%;
}

.series-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.series-header h1 {
    font-size: 24px;
    font-weight: 600;
}

.series-sort-btns {
    display: flex;
    gap: 10px;
}

.series-sort-btns button {
    padding: 6px 16px;
    border: 1px solid #e3e5e7;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: all 0.3s;
    position: relative;
    z-index: 10;
}

.series-sort-btns button:hover,
.series-sort-btns button.active {
    background: #00a1d6;
    color: white;
    border-color: #00a1d6;
}

.series-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.series-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.series-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.series-card-cover {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.series-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.series-card:hover .series-card-cover img {
    transform: scale(1.05);
}

.series-card-episodes {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.series-card-info {
    padding: 16px;
}

.series-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.series-card-desc {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.series-card-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.series-card-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.series-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #999;
}

.series-card-meta .author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.series-card-meta .author img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.series-card-meta .category {
    padding: 1px 8px;
    background: #f4f5f7;
    border-radius: 10px;
}

/* ============================================
   系列详情页 - 播放器(左)+课节列表(右)
   ============================================ */

/* 播放器+课节列表 并排区域 */
.series-player-area {
    max-width: 1400px;
    margin: 76px auto 0;
    padding: 16px 20px 0;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* 播放器（左侧） */
.series-player-main {
    flex: 1;
    min-width: 0;
}

.series-player-wrapper {
    position: relative;
    background: #010101;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16/9;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.series-player-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.series-now-playing {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 10px 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
}

.series-now-playing .playing-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

/* 课节列表（右侧面板） */
.series-episode-panel {
    width: 400px;
    flex-shrink: 0;
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 100px);
    position: sticky;
    top: 80px;
}

.episode-panel-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.episode-panel-header .ep-count {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 13px;
}

.episode-panel-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.episode-panel-list::-webkit-scrollbar {
    width: 4px;
}

.episode-panel-list::-webkit-scrollbar-track {
    background: transparent;
}

.episode-panel-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.episode-panel-list::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

.episode-panel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.episode-panel-item:hover {
    background: var(--bg-primary);
}

.episode-panel-item.active {
    background: rgba(0, 161, 214, 0.1);
    border-left-color: var(--bili-blue);
    box-shadow: inset 0 0 0 1px rgba(0, 161, 214, 0.15);
}

.episode-panel-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--bili-blue);
    border-radius: 0 2px 2px 0;
}

.episode-panel-item.locked {
    cursor: pointer;
}

.episode-panel-item.locked:hover {
    background: var(--bg-primary);
}

.ep-panel-num {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: var(--bili-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    transition: all 0.2s;
    position: relative;
}

.episode-panel-item:hover .ep-panel-num {
    transform: scale(1.05);
}

.episode-panel-item.locked .ep-panel-num {
    background: linear-gradient(135deg, #ff9a56, #ff6a3d);
}

.ep-panel-info {
    flex: 1;
    min-width: 0;
}

.ep-panel-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.episode-panel-item:hover .ep-panel-title {
    color: var(--bili-blue);
}

.episode-panel-item.active .ep-panel-title {
    color: var(--bili-blue);
    font-weight: 600;
}

.ep-panel-meta {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    gap: 10px;
    margin-top: 3px;
}

.ep-panel-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* 播放中动画指示器 */
.episode-panel-item.active .ep-panel-num {
    background: var(--bili-blue);
    animation: pulse 2s infinite;
}

.episode-panel-item.active .ep-panel-num::after {
    content: '\f04b';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 9px;
    position: absolute;
}

.episode-panel-item.active .ep-panel-num span {
    visibility: hidden;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 161, 214, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(0, 161, 214, 0); }
}

/* ============================================
   信息卡片 - 标题+作者融合
   ============================================ */

.series-info-card {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 20px 24px;
}

.series-info-inner {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 24px 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s;
}

.series-info-inner:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* 顶部：作者行 */
.series-author-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.series-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    transition: transform 0.2s, border-color 0.2s;
}

.series-author-avatar:hover {
    transform: scale(1.05);
    border-color: var(--bili-pink);
}

.series-author-info {
    flex: 1;
    min-width: 0;
}

.series-author-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    transition: color 0.2s;
}

.series-author-name:hover {
    color: var(--bili-blue);
}

.series-author-bio {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.btn-follow-user {
    padding: 7px 22px;
    border-radius: 20px;
    border: none;
    background: var(--bili-pink);
    color: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.25s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(255, 154, 86, 0.25);
}

.btn-follow-user:hover {
    background: #ffb366;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 154, 86, 0.35);
}

.btn-follow-user:active {
    transform: translateY(0);
}

/* 标题 */
.series-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

/* 元数据行 */
.series-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.series-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.series-meta span i {
    color: var(--bili-blue);
    font-size: 12px;
}

.series-meta .meta-divider {
    width: 1px;
    height: 12px;
    background: var(--border-color);
    margin: 0 4px;
}

/* 简介 */
.series-desc-text {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 12px 16px;
    background: var(--bg-primary);
    border-radius: 8px;
    border-left: 3px solid var(--bili-blue);
}

/* 操作按钮行 */
.series-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: 16px;
}

.btn-follow-series {
    padding: 9px 28px;
    border-radius: 22px;
    border: none;
    background: var(--bili-blue);
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(0, 161, 214, 0.3);
}

.btn-follow-series:hover {
    background: #00b5e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 161, 214, 0.4);
}

.btn-follow-series:active {
    transform: translateY(0);
}

.btn-follow-series.followed {
    background: var(--bg-primary);
    color: var(--text-secondary);
    box-shadow: none;
}

.btn-follow-series.followed:hover {
    background: #e3e5e7;
}

.btn-play-all {
    padding: 9px 28px;
    border-radius: 22px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-play-all:hover {
    border-color: var(--bili-blue);
    color: var(--bili-blue);
    background: rgba(0, 161, 214, 0.04);
}

/* 侧边栏通用 */
.sidebar-card {
    background: var(--bg-white);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* 空状态 */
.series-empty {
    text-align: center;
    padding: 100px 20px;
    color: var(--text-secondary);
}

.series-empty i {
    font-size: 56px;
    margin-bottom: 20px;
    display: block;
    color: #ddd;
}

.series-empty p {
    font-size: 16px;
    margin-bottom: 8px;
}

/* VIP徽章 */
.vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #ff9a56, #ff6a3d);
    color: white;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.locked-badge {
    font-size: 11px;
    color: #ff9a56;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ============================================
   响应式设计
   ============================================ */

@media (max-width: 1200px) {
    .series-episode-panel {
        width: 360px;
    }
}

@media (max-width: 900px) {
    .series-player-area {
        margin-top: 68px;
        padding: 12px 16px 0;
        flex-direction: column;
    }

    .series-episode-panel {
        width: 100%;
        max-height: 320px;
        position: static;
    }

    .series-title {
        font-size: 20px;
    }

    .series-info-inner {
        padding: 20px 22px;
    }
}

@media (max-width: 768px) {
    .series-player-area {
        padding: 10px 10px 0;
    }

    .series-player-wrapper {
        border-radius: 8px;
    }

    .series-info-card {
        padding: 12px 10px 20px;
    }

    .series-info-inner {
        padding: 18px 16px;
    }

    .series-title {
        font-size: 18px;
    }

    .series-desc-text {
        font-size: 13px;
        padding: 10px 12px;
    }

    .series-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-follow-series,
    .btn-play-all {
        justify-content: center;
    }

    .series-list {
        grid-template-columns: 1fr;
    }

    .series-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .episode-panel-item {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .series-author-row {
        flex-wrap: wrap;
    }

    .btn-follow-user {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .series-meta {
        gap: 4px;
    }

    .series-meta .meta-divider {
        margin: 0 2px;
    }
}
