/**
 * 老故事频道节目排期播放器样式
 * 仅用于 schedule.html 页面
 */

/* ========== 页面主体布局 ========== */
.wv-player-page {
    padding: 30px 0;
    background: var(--color-bg, #f5f5f5);
}

.wv-schedule-container {
    max-width: var(--container-width, 1200px);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* 左侧主区域 */
.wv-player-main {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}

/* 右侧边栏 */
.wv-player-sidebar {
    width: 380px;
    flex-shrink: 0;
}

/* ========== 视频播放器 ========== */
.wv-video-player-wrapper {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.wv-video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.wv-schedule-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}

/* 无节目占位 */
.wv-video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    color: #999;
}

.wv-video-placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.wv-video-placeholder-text {
    font-size: 18px;
    margin-bottom: 12px;
}

.wv-video-placeholder-next {
    font-size: 14px;
    color: #d4a017;
}

/* LIVE 标签 */
.wv-live-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(220, 38, 38, 0.9);
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

.wv-live-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: wv-pulse 1.5s ease-in-out infinite;
}

@keyframes wv-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ========== 当前节目信息条 ========== */
.wv-current-show-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #1f2937;
    color: #fff;
    border-radius: 0 0 8px 8px;
}

.wv-current-show-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.wv-show-time {
    font-size: 14px;
    color: #d4a017;
    font-weight: 600;
}

.wv-premiere-tag {
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 600;
}

.wv-current-show-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.wv-show-episode {
    font-size: 13px;
    color: #9ca3af;
}

.wv-current-show-right {
    display: flex;
    align-items: center;
}

.wv-next-show-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.wv-next-label {
    color: #9ca3af;
}

.wv-next-time {
    color: #d4a017;
    font-weight: 600;
}

.wv-next-name {
    color: #fff;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========== 排期日简介 ========== */
.wv-day-intro {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wv-day-intro h4 {
    font-size: 18px;
    color: var(--color-primary, #b91c1c);
    margin: 0 0 12px;
    font-weight: 700;
}

.wv-day-intro p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin: 0;
}

/* ========== 日期选择器 ========== */
.wv-date-switcher {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wv-date-switcher-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.wv-date-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.wv-date-item {
    flex-shrink: 0;
    width: 56px;
    text-align: center;
    padding: 10px 6px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.wv-date-item:hover {
    background: #e5e7eb;
}

.wv-date-active {
    background: var(--color-primary, #b91c1c);
    color: #fff;
}

.wv-date-active:hover {
    background: #991b1b;
}

.wv-date-today {
    border: 2px solid var(--color-primary, #b91c1c);
}

.wv-date-active.wv-date-today {
    border-color: #fff;
}

.wv-date-day {
    font-size: 12px;
    margin-bottom: 4px;
}

.wv-date-date {
    font-size: 18px;
    font-weight: 700;
}

.wv-date-today-tag {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #d4a017;
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 8px;
    line-height: 1;
}

/* ========== 排期列表 ========== */
.wv-schedule-list-wrapper {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wv-schedule-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    color: #666;
}

.wv-schedule-count {
    font-size: 12px;
    color: #9ca3af;
}

.wv-schedule-list {
    max-height: 600px;
    overflow-y: auto;
}

.wv-schedule-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.2s;
}

.wv-schedule-item:last-child {
    border-bottom: none;
}

.wv-schedule-item:hover {
    background: #f9fafb;
}

.wv-schedule-current {
    background: #fef3c7 !important;
}

.wv-schedule-current:hover {
    background: #fde68a !important;
}

.wv-schedule-time {
    flex-shrink: 0;
    width: 80px;
    text-align: center;
}

.wv-time-start {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

.wv-time-end {
    display: block;
    font-size: 12px;
    color: #9ca3af;
}

.wv-schedule-info {
    flex: 1;
    min-width: 0;
}

.wv-schedule-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wv-premiere-mini {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}

.wv-schedule-episode {
    font-size: 12px;
    color: #9ca3af;
}

.wv-schedule-status {
    flex-shrink: 0;
}

.wv-status-playing,
.wv-status-upcoming,
.wv-status-played {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.wv-status-playing {
    background: #fef2f2;
    color: #dc2626;
}

.wv-status-playing .wv-status-dot {
    width: 6px;
    height: 6px;
    background: #dc2626;
    border-radius: 50%;
    animation: wv-pulse 1.5s ease-in-out infinite;
}

.wv-status-upcoming {
    background: #eff6ff;
    color: #2563eb;
}

.wv-status-played {
    background: #f3f4f6;
    color: #9ca3af;
}

/* 排期项状态样式 */
.wv-schedule-playing {
    background: #fef2f2;
}

.wv-schedule-upcoming {
    opacity: 0.9;
}

.wv-schedule-played {
    opacity: 0.5;
}

.wv-schedule-played .wv-schedule-title {
    color: #9ca3af;
}

/* ========== 空状态 ========== */
.wv-schedule-empty {
    padding: 60px 20px;
    text-align: center;
    color: #9ca3af;
}

.wv-schedule-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .wv-schedule-container {
        flex-direction: column;
    }

    .wv-player-sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    /* 页面上下留白收窄，两侧贴边更紧凑 */
    .wv-player-page {
        padding: 16px 0;
    }

    .wv-schedule-container {
        padding: 0;
        gap: 16px;
        flex-direction: column;
        align-items: stretch;
    }

    /* 单列下主区/侧栏都拉满屏宽 */
    .wv-player-main,
    .wv-player-sidebar {
        width: 100%;
    }

    /* 播放器铺满屏幕宽度：去左右边距、去圆角 */
    .wv-video-player-wrapper {
        border-radius: 0;
        width: 100%;
    }

    /* 播放器黑底铺满整块宽度，占位内容居中 */
    .wv-video-player {
        width: 100%;
    }

    .wv-schedule-video {
        width: 100%;
        object-fit: cover;
    }

    /* 排期日简介、右侧排期区单独加回左右边距（播放器不加，保持铺满） */
    .wv-day-intro {
        margin: 16px 12px 0;
        padding: 16px;
    }

    .wv-player-sidebar {
        padding: 0 12px;
    }

    /* 当前节目信息条竖向堆叠 */
    .wv-current-show-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 14px;
    }

    .wv-current-show-left {
        flex-wrap: wrap;
    }

    .wv-current-show-title {
        font-size: 16px;
    }

    /* 下一档信息占满一行，名称可完整换行不再截断 */
    .wv-next-show-info {
        flex-wrap: wrap;
    }

    .wv-next-name {
        max-width: none;
        white-space: normal;
    }

    /* 日期选择器：卡片内边距收窄，日期块略小 */
    .wv-date-switcher {
        padding: 12px;
    }

    .wv-date-list {
        gap: 6px;
    }

    .wv-date-item {
        width: 50px;
        padding: 8px 4px;
    }

    /* 排期列表项：时间列压窄，状态标签换到第二行右侧 */
    .wv-schedule-item {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 14px;
    }

    .wv-schedule-time {
        width: 64px;
    }

    .wv-schedule-status {
        width: 100%;
        text-align: right;
    }

    /* 空状态高度收窄，避免手机上一大片空白 */
    .wv-schedule-empty {
        padding: 40px 16px;
    }

    .wv-schedule-empty-icon {
        font-size: 40px;
    }
}

/* ========== 小屏手机 ========== */
@media (max-width: 480px) {
    /* 播放器继续铺满，排期区边距略收窄 */
    .wv-player-sidebar {
        padding: 0 10px;
    }

    .wv-day-intro {
        margin-left: 10px;
        margin-right: 10px;
    }

    /* 视频占位文字缩小，适配窄屏 */
    .wv-video-placeholder-icon {
        font-size: 48px;
    }

    .wv-video-placeholder-text {
        font-size: 15px;
    }

    /* 日期块进一步压窄，一屏能看到更多天 */
    .wv-date-item {
        width: 46px;
        padding: 7px 3px;
    }

    .wv-date-date {
        font-size: 16px;
    }

    /* 排期标题字号略降，时间列再压窄 */
    .wv-schedule-time {
        width: 58px;
    }

    .wv-time-start {
        font-size: 14px;
    }
}
