/* LibreTV WordPress Plugin CSS - 与原项目保持一致的风格 */

:root {
    /* 简化配色方案 */
    --primary-color: #2563eb;       /* 简洁蓝色主色调 */
    --primary-light: #3b82f6;       /* 浅蓝色变体 */
    --secondary-color: #f8fafc;     /* 浅灰背景色 */
    --accent-color: #10b981;        /* 绿色强调色 */
    --text-color: #1f2937;          /* 深灰色文本 */
    --text-muted: #6b7280;          /* 灰色次级文本 */
    --border-color: #e5e7eb;        /* 浅灰色边框 */
    --page-gradient-start: #ffffff; /* 白色起始色 */
    --page-gradient-end: #f9fafb;   /* 浅灰结束色 */
    --card-gradient-start: #ffffff; /* 白色卡片起始色 */
    --card-gradient-end: #ffffff;   /* 白色卡片结束色 */
    --card-accent: rgba(37, 99, 235, 0.05); /* 淡蓝色卡片强调色 */
    --card-hover-border: #3b82f6;   /* 悬停边框颜色 */
}

.libretv-player-container {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
}

/* 主要容器样式简化 */
.libretv-wrapper {
    background: var(--page-gradient-start);
    color: var(--text-color);
    padding: 20px;
}

.libretv-main-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* 头部品牌区域简化 */
.libretv-header {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 10px;
}

.libretv-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.libretv-logo-icon {
    width: 40px;
    height: 40px;
    color: var(--primary-color);
    margin-right: 12px;
}

.libretv-logo-text {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--primary-color);
}

.libretv-slogan {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

/* 搜索区域样式 */
.libretv-search-area {
    display: flex;
    flex-direction: column;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* 搜索进度区域 */
.libretv-search-progress-area {
    margin-top: 20px;
}

.libretv-search-wrapper {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.libretv-search-form {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    height: 48px;
}

.libretv-search-input {
    flex: 1;
    padding: 0 16px;
    border: none;
    font-size: 14px;
    background: #ffffff;
    color: var(--text-color);
    outline: none;
    border-right: 1px solid var(--border-color);
}

.libretv-search-input::placeholder {
    color: var(--text-muted);
}

.libretv-search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 20px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 70px;
}

.libretv-search-btn:hover {
    background: var(--primary-light);
}

.libretv-source-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

.libretv-source-label {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.libretv-source-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    color: var(--text-color);
    outline: none;
    transition: all 0.2s;
    min-width: 120px;
}

.libretv-source-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* 热门搜索样式 */
.libretv-trending-searches {
    margin-top: 15px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
}

.libretv-trending-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.libretv-trending-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 4px;
}

.libretv-refresh-trending-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.libretv-refresh-trending-btn:hover {
    background: #e5e7eb;
    color: var(--text-color);
    transform: rotate(180deg);
}

.libretv-refresh-trending-btn:active {
    transform: rotate(180deg) scale(0.95);
}

.libretv-trending-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.libretv-trending-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
    overflow: hidden;
}

.libretv-trending-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.5s ease;
}

.libretv-trending-item:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.libretv-trending-item:hover::before {
    left: 100%;
}

.libretv-trending-item .libretv-trending-rank {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
    transition: all 0.2s;
}

.libretv-trending-item:hover .libretv-trending-rank {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.libretv-trending-item .libretv-trending-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.libretv-trending-item .libretv-trending-count {
    font-size: 10px;
    opacity: 0.7;
    margin-left: 4px;
}

.libretv-trending-item:hover .libretv-trending-count {
    opacity: 1;
}

/* 热门搜索加载状态 */
.libretv-trending-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 12px;
}

/* 加载状态下的热门搜索列表不使用flex布局 */
.libretv-trending-searches:has(.libretv-trending-loading) .libretv-trending-list {
    display: block;
    line-height: 1.5;
}

/* 兼容不支持:has()的浏览器 */
.libretv-trending-list.loading {
    display: block;
    line-height: 1.5;
}

.libretv-trending-loading .libretv-spinner {
    width: 16px;
    height: 16px;
    border-width: 2px;
    margin: 0 auto 8px;
}

/* 热门搜索空状态 */
.libretv-trending-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 12px;
}

/* 热门搜索动画效果 */
.libretv-trending-selected {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4) !important;
}

.libretv-refresh-rotating {
    animation: rotate 1s ease-in-out;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.libretv-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.libretv-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #00ccff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* 搜索结果区域样式简化 */
.libretv-results-area {
    margin-top: 30px;
}

.libretv-results-header {
    margin-bottom: 15px;
}

.libretv-results-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.libretv-results-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.libretv-results-source {
    font-size: 12px;
    color: var(--text-muted);
}

.libretv-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
}

/* 免责声明样式 */
.libretv-disclaimer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.libretv-disclaimer p {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
}

.libretv-video-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    color: var(--text-color);
    display: flex;
    flex-direction: row;
    height: 140px;
}

.libretv-video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.libretv-video-poster-container {
    position: relative;
    width: 100px;
    height: 100%;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 6px 0 0 6px;
}

.libretv-video-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f8fafc;
}

.libretv-video-info {
    padding: 12px;
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.libretv-video-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    flex-shrink: 0;
}

.libretv-video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
    flex-shrink: 0;
}

.libretv-meta-tag {
    background: #e0f2fe;
    color: var(--primary-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #b3e5fc;
}

.libretv-video-status {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.libretv-video-source {
    background: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    align-self: flex-start;
    margin-top: auto;
    flex-shrink: 0;
}

.libretv-video-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 2.6em;
}

.libretv-error {
    background: #fee;
    border: 1px solid #fdd;
    color: #c33;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.libretv-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    background: white;
    border-radius: 10px;
    margin-top: 20px;
}

/* 详情页模态框简化 */
.libretv-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    transition: all 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.libretv-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.libretv-modal-content {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 100%;
    max-width: 1000px;
    max-height: 90%;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
}

.libretv-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: #f8fafc;
}

.libretv-modal-title {
    color: var(--text-color);
    font-size: 20px;
    font-weight: 600;
    max-width: 85%;
    word-break: break-word;
    line-height: 1.3;
}

.libretv-modal-close {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.libretv-modal-close:hover {
    background: #f1f5f9;
    color: var(--text-color);
    border-color: var(--primary-color);
}

.libretv-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.libretv-player-wrapper {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
    position: relative;
    margin-bottom: 30px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.libretv-player-wrapper #dplayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 播放信息区域简化 */
.libretv-video-info-section {
    margin-bottom: 20px;
}

.libretv-video-source-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.libretv-source-name {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
}

.libretv-episode-count {
    color: var(--text-muted);
    font-size: 13px;
}

.libretv-switch-source {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #e0f2fe;
    color: var(--primary-color);
    border: 1px solid #b3e5fc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    font-weight: 500;
}

/* 播放信息区域中的主题切换按钮 */
.libretv-video-source-info .libretv-theme-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #e0f2fe;
    color: var(--primary-color);
    border: 1px solid #b3e5fc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

.libretv-video-source-info .libretv-theme-toggle:hover {
    background: #b3e5fc;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.libretv-switch-source:hover {
    background: #b3e5fc;
    border-color: var(--primary-color);
}

/* 播放控制区域简化 */
.libretv-player-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.libretv-prev-btn,
.libretv-next-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #e0f2fe;
    color: var(--text-color);
    border: 1px solid #b3e5fc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
}

.libretv-prev-btn:hover,
.libretv-next-btn:hover {
    background: #b3e5fc;
    border-color: var(--primary-color);
}

.libretv-prev-btn:disabled,
.libretv-next-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.libretv-current-episode {
    flex: 1;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

/* 播放设置区域简化 */
.libretv-player-settings {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.libretv-settings-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.libretv-settings-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.libretv-autoplay-setting,
.libretv-parser-setting {
    display: flex;
    align-items: center;
    gap: 10px;
}

.libretv-parser-setting {
    display: none; /* 默认隐藏，通过JavaScript控制显示 */
}

.libretv-setting-label {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
}

/* 自定义开关样式 */
.libretv-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.libretv-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.libretv-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .3s;
    border-radius: 24px;
    border: 1px solid var(--border-color);
}

.libretv-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .libretv-slider {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

input:checked + .libretv-slider:before {
    transform: translateX(26px);
}

.libretv-episodes-show-toggle,
.libretv-episodes-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #e0f2fe;
    color: var(--primary-color);
    border: 1px solid #b3e5fc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    font-weight: 500;
}

.libretv-episodes-show-toggle:hover,
.libretv-episodes-toggle:hover {
    background: #b3e5fc;
    border-color: var(--primary-color);
}

/* 选集区域样式简化 */
.libretv-episodes-section {
    margin-top: 16px;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
}

.libretv-episodes-section .libretv-episodes {
    padding: 16px;
}

/* 资源切换弹窗样式 */
.libretv-source-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.libretv-source-modal.show {
    display: flex;
    opacity: 1;
}

.libretv-source-modal-content {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 70vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.libretv-source-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.libretv-source-modal-header h4 {
    color: var(--text-color);
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.libretv-source-modal-close {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.libretv-source-modal-close:hover {
    background: #f1f5f9;
    color: var(--text-color);
    border-color: var(--primary-color);
}

.libretv-source-list {
    padding: 30px;
    max-height: 400px;
    overflow-y: auto;
}

.libretv-source-option {
    padding: 15px;
    margin-bottom: 10px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.libretv-source-option:hover {
    background: #e0f2fe;
    border-color: #b3e5fc;
}

.libretv-source-option.active {
    background: #e0f2fe;
    border-color: var(--primary-color);
}

.libretv-source-name {
    color: var(--text-color);
    font-weight: 600;
    font-size: 16px;
}

.libretv-source-episodes {
    color: var(--text-muted);
    font-size: 14px;
}

/* 自动隐藏控制栏功能 */
.dplayer-hide-controller .dplayer-controller {
    opacity: 0 !important;
    transform: translateY(100%) !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
    pointer-events: none !important;
}

/* 确保播放器在隐藏控制栏时仍可点击 */
.dplayer-hide-controller .dplayer-video-wrap {
    cursor: pointer;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .dplayer-hide-controller .dplayer-controller {
        transform: translateY(150%) !important;
    }
    
    /* 移动端播放器视频区域触摸优化 */
    .dplayer-hide-controller .dplayer-video-wrap {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
}

/* 加载状态和错误状态下强制显示控制栏 */
.dplayer-loading .dplayer-controller,
.dplayer-error .dplayer-controller {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}
    
    
    /* 搜索反馈样式简化 */
.libretv-search-feedback {
    padding: 16px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 在搜索进度区域中的反馈样式优化 */
.libretv-search-progress-area .libretv-search-feedback {
    padding: 12px 16px;
    margin-bottom: 0;
}

.libretv-search-info {
    margin-bottom: 16px;
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* 在搜索进度区域中的信息样式优化 */
.libretv-search-progress-area .libretv-search-info {
    margin-bottom: 12px;
    gap: 16px;
}

.libretv-search-query,
.libretv-search-source {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    white-space: nowrap;
}

.libretv-search-label {
    color: var(--text-muted);
    font-weight: 500;
}

.libretv-search-value {
    color: var(--primary-color);
    font-weight: 600;
    background: #e0f2fe;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #b3e5fc;
}

/* 进度条样式简化 */
.libretv-progress-container {
    max-width: 300px;
    margin: 0 auto;
}

.libretv-progress-bar {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.libretv-progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.libretv-progress-text {
    color: var(--text-color);
    font-size: 13px;
    font-weight: 500;
    min-height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.libretv-progress-text::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 搜索反馈响应式设计 - 中等屏幕 */
@media (max-width: 640px) {
    .libretv-search-info {
        gap: 20px;
        flex-direction: column;
    }
    
    .libretv-search-progress-area .libretv-search-info {
        gap: 15px;
    }
}

/* 搜索反馈响应式设计 - 小屏幕 */
@media (max-width: 768px) {
    .libretv-search-feedback {
        padding: 15px;
        margin: 0;
    }
    
    .libretv-search-progress-area .libretv-search-feedback {
        padding: 12px 15px;
    }
    
    .libretv-search-info {
        margin-bottom: 15px;
        gap: 15px;
        flex-direction: column;
    }
    
    .libretv-search-progress-area .libretv-search-info {
        margin-bottom: 12px;
        gap: 12px;
    }
    
    .libretv-search-query,
    .libretv-search-source {
        font-size: 14px;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }
    
    .libretv-progress-container {
        max-width: 280px;
    }
}

.libretv-episodes-info {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.libretv-episodes-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.libretv-episodes-controls button {
    padding: 8px 16px;
    background: rgba(0, 204, 255, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(0, 204, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(5px);
}

.libretv-episodes-controls button:hover {
    background: rgba(0, 204, 255, 0.2);
    border-color: rgba(0, 204, 255, 0.5);
    transform: translateY(-1px);
}

.libretv-episodes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

/* 加载状态特殊处理 - 避免文字竖排 */
.libretv-episodes .libretv-loading {
    grid-column: 1 / -1; /* 占据整行 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.libretv-episodes .libretv-loading div {
    white-space: nowrap; /* 防止文字换行 */
    margin: 0;
}

.libretv-episode-btn {
    padding: 8px 12px;
    background: #ffffff;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    position: relative;
}

.libretv-episode-btn:hover {
    background: #e0f2fe;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.libretv-episode-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Toast 通知样式 */
.libretv-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 20000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
}

.libretv-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.libretv-toast-success {
    background: linear-gradient(135deg, #10b981, #059669);
    border: 1px solid #34d399;
}

.libretv-toast-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: 1px solid #f87171;
}

.libretv-toast-info {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: 1px solid var(--primary-color);
}

/* 改进错误样式 */
.libretv-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.libretv-no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    background: linear-gradient(135deg, var(--card-gradient-start), var(--card-gradient-end));
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-top: 20px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .libretv-results {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 15px;
    }
    
    .libretv-main-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .libretv-wrapper {
        padding: 12px;
    }
    
    .libretv-logo-text {
        font-size: 2.2rem;
    }
    
    .libretv-logo-icon {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }
    
    .libretv-search-wrapper {
        padding: 20px 16px;
        border-radius: 12px;
    }
    
    .libretv-search-form {
        display: flex;
        height: 52px;
        gap: 0;
        border: 2px solid var(--border-color);
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        overflow: hidden;
    }
    
    .libretv-search-btn {
        height: 52px;
        border-radius: 0;
        font-size: 16px;
        font-weight: 600;
        min-width: 80px;
        box-shadow: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    .libretv-search-input {
        height: 52px;
        border: none;
        border-radius: 0;
        margin: 0;
        font-size: 16px;
        padding: 0 16px;
        background: #ffffff;
        box-shadow: none;
        -webkit-appearance: none;
        appearance: none;
        -webkit-tap-highlight-color: transparent;
        border-right: 1px solid var(--border-color);
    }
    
    .libretv-search-input:focus {
        border-color: var(--primary-color);
        box-shadow: none;
        outline: none;
    }
    
    .libretv-source-selector {
        margin-bottom: 12px;
        flex-direction: row;
        gap: 10px;
        justify-content: center;
    }
    
    .libretv-source-select {
        width: auto;
        min-width: 120px;
        height: 44px;
        border-radius: 8px;
        font-size: 14px;
        border: 2px solid var(--border-color);
    }
    
    .libretv-source-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }
    
    /* 移动端触摸优化 */
    .libretv-search-btn:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .libretv-search-input:active {
        transform: scale(1.01);
        transition: transform 0.1s ease;
    }
    
    /* 移动端搜索进度区域优化 */
    .libretv-search-progress-area .libretv-search-feedback {
        padding: 16px 12px;
        border-radius: 10px;
    }
    
    .libretv-search-progress-area .libretv-search-info {
        margin-bottom: 12px;
        gap: 12px;
        flex-direction: column;
    }
    
    .libretv-search-query,
    .libretv-search-source {
        font-size: 13px;
        justify-content: center;
    }
    
    .libretv-progress-container {
        max-width: 250px;
    }
    
    /* 移动端热门搜索样式 */
    .libretv-trending-searches {
        margin-top: 12px;
        padding: 10px;
        border-radius: 6px;
    }
    
    .libretv-trending-header {
        margin-bottom: 8px;
    }
    
    .libretv-trending-title {
        font-size: 12px;
    }
    
    .libretv-refresh-trending-btn {
        padding: 3px;
    }
    
    .libretv-trending-list {
        gap: 4px;
    }
    
    .libretv-trending-item {
        padding: 4px 8px;
        font-size: 11px;
        border-radius: 12px;
    }
    
    .libretv-trending-item .libretv-trending-rank {
        font-size: 9px;
        padding: 1px 4px;
        min-width: 14px;
    }
    
    .libretv-trending-item .libretv-trending-count {
        font-size: 9px;
    }
    
    .libretv-results {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .libretv-video-card {
        height: 140px;
    }
    
    .libretv-video-poster-container {
        width: 85px;
    }
    
    .libretv-video-info {
        padding: 10px;
    }
    
    .libretv-video-title {
        font-size: 13px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        margin-bottom: 6px;
        line-height: 1.3;
    }
    
    .libretv-modal {
        padding: 8px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .libretv-modal-content {
        width: calc(100% - 16px);
        max-height: calc(100vh - 40px);
        border-radius: 12px;
        margin: 0 8px;
        max-width: none;
    }
    
    .libretv-modal-header {
        padding: 15px 18px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .libretv-modal-title {
        font-size: 20px;
        max-width: calc(100% - 50px);
        line-height: 1.4;
        word-break: break-word;
        hyphens: auto;
        font-weight: 600;
        letter-spacing: 0.5px;
    }
    
    .libretv-modal-close {
        width: 36px;
        height: 36px;
        font-size: 18px;
        flex-shrink: 0;
    }
    
    .libretv-modal-body {
        padding: 15px 18px 20px;
    }
    
    .libretv-player-wrapper {
        padding-bottom: 56.25%; /* 保持16:9宽高比 */
        margin-bottom: 15px;
        border-radius: 8px;
        overflow: hidden;
    }
    
    /* 播放器信息区域移动端优化 */
    .libretv-video-info-section {
        margin-bottom: 15px;
    }
    
    .libretv-video-source-info {
        padding: 12px 15px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .libretv-source-name {
        font-size: 14px;
    }
    
    .libretv-episode-count {
        font-size: 13px;
    }
    
    .libretv-switch-source {
        margin-left: auto;
        font-size: 12px;
        padding: 6px 12px;
    }
    
    /* 播放控制区域移动端优化 */
    .libretv-player-controls {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 15px;
    }
    
    .libretv-current-episode {
        flex: 1 1 100%;
        text-align: center;
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .libretv-prev-btn,
    .libretv-next-btn {
        flex: 1;
        justify-content: center;
        padding: 8px 12px;
        font-size: 13px;
        min-height: 40px;
    }
    
    /* 播放设置区域移动端优化 */
    .libretv-player-settings {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 15px;
    }
    
    .libretv-autoplay-setting,
    .libretv-parser-setting {
        flex: 1 1 auto;
        min-width: 140px;
    }
    
    .libretv-episodes-show-toggle,
    .libretv-episodes-toggle {
        flex: 0 0 auto;
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .libretv-episodes {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 10px;
    }
    
    /* 移动端加载状态特殊处理 */
    .libretv-episodes .libretv-loading {
        grid-column: 1 / -1;
        min-height: 100px;
        padding: 30px 15px;
    }
    
    .libretv-episode-btn {
        padding: 10px 8px;
        font-size: 13px;
        min-height: 40px;
    }
    
    .libretv-episodes-header {
        flex-wrap: wrap;
        gap: 12px;
        justify-content: space-between;
        padding: 15px 18px;
    }
    
    .libretv-episodes-info {
        font-size: 15px;
    }
    
    .libretv-episodes-controls {
        gap: 8px;
        flex-wrap: wrap;
        flex: 0 0 auto;
    }
    
    .libretv-episodes-controls button {
        padding: 8px 12px;
        font-size: 12px;
        line-height: 1.4;
        letter-spacing: 0.3px;
    }
    
    /* 移动端触摸优化 */
    .libretv-modal-content * {
        -webkit-tap-highlight-color: transparent;
    }
    
    .libretv-episode-btn,
    .libretv-prev-btn,
    .libretv-next-btn,
    .libretv-episodes-show-toggle,
    .libretv-episodes-toggle,
    .libretv-switch-source {
        -webkit-tap-highlight-color: rgba(0, 204, 255, 0.2);
        -webkit-user-select: none;
        user-select: none;
    }
    
    .libretv-toast {
        right: 15px;
        left: 15px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .libretv-wrapper {
        padding: 8px;
    }
    
    .libretv-logo-text {
        font-size: 1.8rem;
    }
    
    .libretv-logo-icon {
        width: 32px;
        height: 32px;
        margin-right: 8px;
    }
    
    .libretv-search-wrapper {
        padding: 16px 12px;
        border-radius: 10px;
    }
    
    .libretv-search-form {
        height: 48px;
        border-radius: 10px;
    }
    
    .libretv-search-btn {
        height: 48px;
        border-radius: 0;
        font-size: 15px;
        min-width: 70px;
    }
    
    .libretv-search-input {
        height: 48px;
        border-radius: 0;
        font-size: 15px;
        padding: 0 14px;
    }
    
    .libretv-source-select {
        height: 40px;
        border-radius: 6px;
        font-size: 13px;
        min-width: 100px;
    }
    
    .libretv-results {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .libretv-video-card {
        height: 110px;
    }
    
    .libretv-video-poster-container {
        width: 70px;
    }
    
    .libretv-video-info {
        padding: 6px;
    }
    
    .libretv-video-title {
        font-size: 11px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        margin-bottom: 3px;
        line-height: 1.2;
    }
    
    .libretv-video-source {
        font-size: 8px;
        padding: 2px 5px;
    }
    
    .libretv-meta-tag {
        font-size: 8px;
        padding: 1px 4px;
    }
    
    /* 超小屏幕模态框优化 */
    .libretv-modal {
        padding: 4px;
        align-items: flex-start;
        padding-top: 10px;
    }
    
    .libretv-modal-content {
        width: calc(100% - 8px);
        max-height: calc(100vh - 20px);
        border-radius: 8px;
        margin: 0 4px;
    }
    
    .libretv-modal-header {
        padding: 12px 14px;
        gap: 8px;
    }
    
    .libretv-modal-title {
        font-size: 16px;
        max-width: calc(100% - 40px);
        line-height: 1.2;
    }
    
    .libretv-modal-close {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .libretv-modal-body {
        padding: 12px 14px 16px;
    }
    
    /* 资源切换弹窗手机端优化 */
    .libretv-source-modal-content {
        width: calc(100% - 8px);
        max-height: calc(100vh - 20px);
        border-radius: 8px;
        margin: 0 4px;
    }
    
    .libretv-source-modal-header {
        padding: 12px 14px;
    }
    
    .libretv-source-modal-header h4 {
        font-size: 16px;
    }
    
    .libretv-source-modal-close {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .libretv-source-list {
        padding: 16px;
    }
    
    .libretv-source-option {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .libretv-source-name {
        font-size: 14px;
    }
    
    .libretv-source-episodes {
        font-size: 12px;
    }
    
    /* 播放器区域超小屏优化 */
    .libretv-player-wrapper {
        margin-bottom: 12px;
        border-radius: 6px;
    }
    
    .libretv-video-info-section {
        margin-bottom: 12px;
    }
    
    .libretv-video-source-info {
        padding: 10px 12px;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .libretv-source-name {
        font-size: 13px;
    }
    
    .libretv-episode-count {
        font-size: 12px;
    }
    
    .libretv-switch-source {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    /* 播放控制区域超小屏优化 */
    .libretv-player-controls {
        gap: 8px;
        padding: 10px 12px;
        flex-wrap: wrap;
    }
    
    .libretv-current-episode {
        flex: 1 1 100%;
        text-align: center;
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .libretv-prev-btn,
    .libretv-next-btn {
        flex: 1;
        padding: 7px 10px;
        font-size: 12px;
        min-height: 36px;
    }
    
    /* 播放设置区域超小屏优化 */
    .libretv-player-settings {
        gap: 8px;
        padding: 8px 12px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .libretv-settings-left,
    .libretv-settings-right {
        gap: 8px;
        flex-wrap: nowrap;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .libretv-settings-left {
        order: 2;
    }
    
    .libretv-settings-right {
        order: 1;
    }
    
    .libretv-autoplay-setting,
    .libretv-parser-setting {
        flex: 1 1 auto;
        min-width: 0;
        white-space: nowrap;
        justify-content: center;
    }
    
    .libretv-episodes-show-toggle,
    .libretv-episodes-toggle {
        flex: 1 1 auto;
        padding: 6px 10px;
        font-size: 11px;
        white-space: nowrap;
        justify-content: center;
    }
    
    .libretv-setting-label {
        font-size: 11px;
    }
    
    /* 手机端开关样式简化 */
    .libretv-switch {
        width: 36px;
        height: 18px;
    }
    
    .libretv-slider {
        border-radius: 18px;
        border: none;
        background-color: #d1d5db;
    }
    
    .libretv-slider:before {
        height: 16px;
        width: 16px;
        left: 1px;
        bottom: 1px;
        background-color: white;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }
    
    input:checked + .libretv-slider {
        background-color: var(--primary-color);
    }
    
    input:checked + .libretv-slider:before {
        transform: translateX(18px);
    }
    
    /* 选集列表超小屏优化 */
    .libretv-episodes {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
        gap: 6px;
    }
    
    /* 超小屏加载状态特殊处理 */
    .libretv-episodes .libretv-loading {
        grid-column: 1 / -1;
        min-height: 80px;
        padding: 20px 10px;
        font-size: 14px;
    }
    
    .libretv-episode-btn {
        padding: 8px 6px;
        font-size: 11px;
        min-height: 36px;
    }
    
    .libretv-episodes-header {
        gap: 8px;
        padding: 12px 14px;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .libretv-episodes-info {
        font-size: 14px;
    }
    
    .libretv-episodes-controls {
        gap: 6px;
        flex-wrap: wrap;
        flex: 0 0 auto;
    }
    
    .libretv-episodes-controls button {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .libretv-disclaimer p {
        font-size: 10px;
        padding: 0 8px;
    }
}

/* 电影详情页样式简化 */
.libretv-movie-detail-container {
    margin: 12px 0;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    position: relative;
    color: var(--text-color);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.libretv-movie-detail-container:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.libretv-movie-loading {
    text-align: center;
    padding: 30px;
    color: #666;
}

.libretv-movie-loading .libretv-spinner {
    border: 2px solid #f0f0f0;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.libretv-movie-info {
    text-align: left;
}

.libretv-movie-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    margin: 0;
    gap: 10px;
    min-height: 44px;
}

.libretv-movie-header-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.libretv-movie-title {
    font-size: 16px!important;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 6px 0 0!important;
    line-height: 1.3;
    flex: 1;
    word-break: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.libretv-play-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.libretv-play-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-40%, -50%);
    width: 0;
    height: 0;
    border-left: 6px solid white;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

.libretv-movie-name {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #e0f2fe;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 500;
    border-radius: 16px;
    margin: 0;
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
    transition: all 0.2s ease;
    border: 1px solid #b3e5fc;
    position: relative;
}

/* 默认状态 - 不显示下拉图标 */
.libretv-movie-name::after {
    content: "";
    font-size: 10px;
    opacity: 0;
    margin-left: 0;
    transition: all 0.3s ease;
}

/* 可点击状态 */
.libretv-movie-name.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.libretv-movie-name.clickable:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.libretv-movie-name.clickable::after {
    content: "⌄";
    opacity: 0.7;
    margin-left: 6px;
    font-size: 10px;
    transition: all 0.3s ease;
}

.libretv-movie-name.clickable:hover::after {
    opacity: 1;
}

/* 激活状态简化 */
.libretv-movie-name.active {
    cursor: pointer;
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
    border-radius: 20px;
}

.libretv-movie-name.active::after {
    content: "▼";
    opacity: 1;
    margin-left: 6px;
}

.libretv-movie-name.active:hover {
    background: var(--primary-light);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

/* 非激活状态的悬停效果 */
.libretv-movie-name:not(.active):hover {
    background: #b3e5fc;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.libretv-movie-selectors {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.libretv-movie-sources,
.libretv-movie-names {
    margin: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.libretv-sources-label,
.libretv-movie-names-label {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    margin: 0;
    white-space: nowrap;
}

.libretv-source-select,
.libretv-movie-select {
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    background: #ffffff;
    color: #374151;
    outline: none;
    cursor: pointer;
    min-width: 100px;
    max-width: 180px;
    transition: all 0.2s ease;
    -webkit-appearance: button;
    appearance: button;
}

.libretv-source-select:focus,
.libretv-movie-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.libretv-source-select:hover,
.libretv-movie-select:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.libretv-movie-select {
    min-width: 120px;
    max-width: 250px;
}

.libretv-movie-episodes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    padding: 16px 20px 20px;
}

.libretv-play-btn {
    padding: 6px 10px;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.libretv-play-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.libretv-play-btn::before {
    content: "▶";
    margin-right: 6px;
    font-size: 12px;
}

/* 播放器模态框样式 */
.libretv-player-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 22, 34, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.libretv-player-modal.show {
    display: flex;
    opacity: 1;
}

.libretv-player-modal-content {
    background: linear-gradient(135deg, var(--card-gradient-start), var(--card-gradient-end));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 1000px;
    max-height: 90%;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.libretv-player-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(17, 17, 17, 0.8);
}

.libretv-player-modal-header h4 {
    color: var(--text-color);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.libretv-player-modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.libretv-player-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    transform: scale(1.05);
}

.libretv-player-container {
    padding: 20px;
    flex: 1;
}

#libretv-movie-player {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

#libretv-movie-player > div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .libretv-movie-detail-container {
        margin: 10px 0;
        border-radius: 8px;
    }
    
    .libretv-movie-header {
        padding: 10px 16px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        min-height: auto;
    }
    
    .libretv-movie-header-text {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        flex: 1;
        min-width: 0;
    }
    
    .libretv-movie-title {
        flex-shrink: 0;
        margin: 0;
        font-size: 15px!important;
    }
    
    

    
    .libretv-movie-name {
        flex-shrink: 0;
        margin-left: auto;
    }
    
    .libretv-movie-selectors {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }
    
    .libretv-movie-episodes {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 8px;
        padding: 12px 16px 16px;
    }
    
    .libretv-play-btn {
        padding: 8px 6px;
        font-size: 12px;
        min-height: 36px;
    }
    
}

@media (max-width: 576px) {
    .libretv-movie-detail-container {
        margin: 8px 0;
        border-radius: 6px;
    }
    
    .libretv-movie-header {
        padding: 10px 14px;
    }
    
    .libretv-movie-title {
        font-size: 14px!important;
    }


    
    .libretv-movie-name {
        font-size: 11px;
        padding: 4px 8px;
        border-radius: 14px;
    }
    
    /* 移动端激活状态优化 */
    .libretv-movie-name.active {
        font-size: 11px;
        padding: 4px 8px;
        border-radius: 14px;
    }
    
    .libretv-movie-name.active::before {
        border-radius: 12px;
    }
    
    .libretv-source-select,
    .libretv-movie-select {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .libretv-movie-episodes {
        padding: 10px 14px 14px;
    }
    
    .libretv-play-btn {
        padding: 6px 8px;
        font-size: 11px;
        min-width: 0;
        max-width: 130px;
        flex: 1 1 calc(50% - 4px);
    }
    
    .libretv-play-btn::before {
        margin-right: 4px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .libretv-movie-detail-container {
        margin: 6px 0;
        border-radius: 5px;
    }
    
    .libretv-movie-header {
        padding: 8px 12px;
        gap: 8px;
    }
    
    .libretv-play-icon::before {
        border-left: 4px solid white;
        border-top: 2px solid transparent;
        border-bottom: 2px solid transparent;
    }
    
    .libretv-movie-episodes {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
        gap: 6px;
        padding: 8px 12px 12px;
    }
    
    .libretv-play-btn {
        padding: 6px 4px;
        font-size: 10px;
        min-height: 32px;
    }
    
}

/* 超小屏幕优化 (≤320px) */
@media screen and (max-width: 320px) {
    .libretv-play-btn {
        padding: 4px 3px;
        font-size: 9px;
        min-height: 28px;
    }
    
    .libretv-movie-episodes {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 3px;
        padding: 6px 8px 8px;
    }
}

/* 大屏幕优化 (≥1200px) */
@media screen and (min-width: 1200px) {
    .libretv-play-btn {
        padding: 8px 14px;
        font-size: 13px;
        min-width: 0;
        max-width: 200px;
        flex: 0 1 auto;
    }
    
    .libretv-play-btn::before {
        margin-right: 6px;
        font-size: 12px;
    }
    
    .libretv-movie-episodes {
        gap: 12px;
        padding: 18px 24px 22px;
    }
}

/* 影片选择弹窗样式 */
.libretv-movie-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 15000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    padding: 20px;
    box-sizing: border-box;
}

.libretv-movie-selection-modal.show {
    display: flex;
}

.libretv-movie-selection-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.libretv-movie-selection-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
}

.libretv-movie-selection-title {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.libretv-movie-selection-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.libretv-movie-selection-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.libretv-movie-selection-body {
    padding: 20px 25px;
    overflow-y: auto;
    flex: 1;
}

.libretv-source-group {
    margin-bottom: 25px;
}

.libretv-source-group:last-child {
    margin-bottom: 0;
}

.libretv-source-group-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
    padding: 8px 12px;
    background: #f3f4f6;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.libretv-movie-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.libretv-movie-option {
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.libretv-movie-option:hover {
    border-color: #3b82f6;
    background: #f8faff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.libretv-movie-option.selected {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 1px #3b82f6;
}

.libretv-movie-option-name {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    flex: 1;
}

.libretv-movie-option-status {
    font-size: 12px;
    color: #6b7280;
    margin-left: 12px;
    background: rgba(34, 197, 94, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* 懒加载状态样式 */
.libretv-movie-option.loading {
    opacity: 0.6;
    pointer-events: none;
}

.libretv-lazy-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.libretv-lazy-loading .libretv-spinner {
    border: 2px solid #f0f0f0;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

.libretv-lazy-loading span {
    font-size: 14px;
    color: #666;
}

/* 播放器资源切换懒加载样式 */
.libretv-source-option.needs-loading {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
}

.libretv-source-option.needs-loading:hover {
    background: rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.5);
}

.libretv-source-loading-hint {
    font-size: 11px;
    color: #f59e0b;
    margin-top: 2px;
    font-style: italic;
}

.libretv-source-option.loading {
    opacity: 0.6;
    pointer-events: none;
}

.libretv-source-option.loading .libretv-source-name::after {
    content: "加载中...";
    margin-left: 8px;
    font-size: 11px;
    color: #666;
}

/* 资源切换模态框增强样式 */
.libretv-source-group {
    margin-bottom: 24px;
}

.libretv-source-group:last-child {
    margin-bottom: 0;
}

.libretv-source-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.libretv-source-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.libretv-source-count {
    font-size: 12px;
    color: #6b7280;
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

.libretv-movies-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.libretv-movie-option {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    position: relative;
}

.libretv-movie-option:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.libretv-movie-option.current {
    border-color: #10b981;
    background: #ecfdf5;
    box-shadow: 0 0 0 1px #10b981;
}

/* 播放器模态框中的影片名称样式 */
.libretv-player-movie-name {
    /* 独立于libretv-movie-detail-container，使用最简样式 */
    display: block;
}

.libretv-movie-status {
    font-size: 10px;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 1px 4px;
    border-radius: 8px;
    display: inline-block;
}

/* 备用播放器样式 */
.libretv-fallback-player {
    text-align: center;
    padding: 20px;
    color: var(--text-color);
}

.libretv-fallback-player h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 18px;
}

.libretv-fallback-player p {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.libretv-fallback-player video {
    background: #000;
    border-radius: 8px;
    margin-bottom: 15px;
}

.libretv-fallback-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.libretv-fallback-btn {
    padding: 8px 16px;
    background: rgba(0, 204, 255, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(0, 204, 255, 0.3);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.libretv-fallback-btn:hover {
    background: rgba(0, 204, 255, 0.2);
    border-color: rgba(0, 204, 255, 0.5);
}

/* 响应式设计 - 影片选择弹窗 */
@media (max-width: 768px) {
    .libretv-movie-selection-modal {
        padding: 15px;
    }
    
    .libretv-movie-selection-content {
        max-width: 100%;
        max-height: 85vh;
    }
    
    .libretv-movie-selection-header {
        padding: 15px 20px;
    }
    
    .libretv-movie-selection-title {
        font-size: 16px;
    }
    
    .libretv-movie-selection-body {
        padding: 15px 20px;
    }
    
    .libretv-source-group-title {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .libretv-movie-option {
        padding: 10px 14px;
    }
    
    .libretv-movie-option-name {
        font-size: 13px;
    }
    
    .libretv-movie-option-episodes {
        font-size: 11px;
    }
    
    .libretv-fallback-controls {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .libretv-fallback-btn {
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .libretv-movie-selection-modal {
        padding: 10px;
    }
    
    .libretv-movie-selection-content {
        max-height: 90vh;
    }
    
    .libretv-movie-selection-header {
        padding: 12px 15px;
    }
    
    .libretv-movie-selection-title {
        font-size: 14px;
    }
    
    .libretv-movie-selection-body {
        padding: 12px 15px;
    }
    
    .libretv-source-group {
        margin-bottom: 20px;
    }
    
    .libretv-source-group-title {
        font-size: 12px;
        padding: 5px 8px;
    }
    
    .libretv-movie-option {
        padding: 8px 12px;
    }
    
    .libretv-movie-option-name {
        font-size: 12px;
    }
    
    .libretv-movie-option-episodes {
        font-size: 10px;
    }
}

/* 自定义API源分隔线 */
.libretv-custom-sources-divider {
    margin: 20px 0 15px 0;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.libretv-custom-sources-divider h4 {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

/* 自定义API源样式 */
.libretv-custom-api-source {
    background: #f8fafc;
    border-left: 3px solid #3b82f6;
}

.libretv-custom-tag {
    display: inline-block;
    padding: 1px 6px;
    background: #3b82f6;
    color: white;
    font-size: 10px;
    font-weight: 500;
    border-radius: 3px;
    margin-left: 8px;
}

/* NSFW API源警告区域 */
.libretv-nsfw-sources-warning {
    margin: 30px 0 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 2px solid #dc2626;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
}

.libretv-nsfw-warning-header h4 {
    margin: 0 0 15px 0;
    color: #dc2626;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.libretv-nsfw-warning-content p {
    margin: 0 0 12px 0;
    color: #7f1d1d;
    font-size: 14px;
    line-height: 1.6;
}

.libretv-nsfw-warning-content p strong {
    color: #dc2626;
    font-weight: 600;
}

.libretv-nsfw-confirm {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #fecaca;
}

.libretv-nsfw-acknowledge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7f1d1d;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.libretv-nsfw-acknowledge input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #dc2626;
}

/* NSFW API源列表 */
.libretv-nsfw-sources {
    margin-top: 20px;
}

.libretv-nsfw-sources-divider {
    margin: 20px 0 15px 0;
    padding-top: 15px;
    border-top: 2px solid #dc2626;
}

.libretv-nsfw-sources-divider h4 {
    margin: 0;
    color: #dc2626;
    font-size: 14px;
    font-weight: 600;
}

/* NSFW API源样式 */
.libretv-nsfw-api-source {
    background: linear-gradient(135deg, #fef2f2, #fef7f7);
    border-left: 4px solid #dc2626;
    border: 1px solid #fecaca;
}

.libretv-nsfw-api-source:hover {
    background: linear-gradient(135deg, #fee2e2, #fef2f2);
    border-color: #f87171;
}

.libretv-nsfw-tag {
    display: inline-block;
    padding: 2px 6px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    margin-left: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.3);
}

/* 跳过设置样式 */
.libretv-skip-settings {
    margin-bottom: 20px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.libretv-skip-settings-header {
    padding: 0;
}

.libretv-skip-settings-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    color: var(--text-color);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.libretv-skip-settings-toggle:hover {
    background: #e0f2fe;
    color: var(--primary-color);
}

.libretv-skip-settings-toggle span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.libretv-skip-arrow {
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.libretv-skip-settings-content {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: #ffffff;
}

.libretv-skip-option {
    margin-bottom: 20px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.libretv-skip-option:last-child {
    margin-bottom: 0;
}

.libretv-skip-option-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.libretv-skip-time-setting {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 60px;
}

.libretv-skip-time-setting label {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    min-width: 70px;
}

.libretv-skip-time-setting input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.libretv-skip-time-setting input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.libretv-skip-time-setting input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.libretv-skip-time-display {
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
    background: #e0f2fe;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #b3e5fc;
}

.libretv-set-current-time-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--primary-color);
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.libretv-set-current-time-btn:hover {
    background: #dbeafe;
    border-color: var(--primary-color);
    color: var(--primary-light);
}

.libretv-set-current-time-btn:active {
    transform: translateY(1px);
}

.libretv-set-current-time-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* 跳过提示Toast样式 */
.libretv-skip-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 20000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.libretv-skip-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.libretv-skip-toast-intro {
    background: linear-gradient(135deg, #10b981, #059669);
    border: 1px solid #34d399;
}

.libretv-skip-toast-outro {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: 1px solid #fbbf24;
}

/* 移动端跳过设置优化 */
@media (max-width: 768px) {
    .libretv-skip-settings-toggle {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .libretv-skip-settings-content {
        padding: 12px 15px;
    }
    
    .libretv-skip-option {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .libretv-skip-time-setting {
        margin-left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .libretv-skip-time-setting label {
        min-width: auto;
        text-align: left;
    }
    
    .libretv-skip-time-display {
        text-align: center;
        align-self: center;
        min-width: 60px;
    }
    
    .libretv-skip-toast {
        right: 15px;
        left: 15px;
        max-width: none;
        top: 70px;
    }
}

@media (max-width: 480px) {
    .libretv-skip-settings-toggle {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .libretv-skip-settings-content {
        padding: 10px 12px;
    }
    
    .libretv-skip-option {
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .libretv-skip-option-header {
        margin-bottom: 10px;
    }
    
    .libretv-skip-time-setting {
        gap: 6px;
    }
    
    .libretv-skip-time-setting label {
        font-size: 12px;
    }
    
    .libretv-skip-time-display {
        font-size: 12px;
        padding: 3px 6px;
        min-width: 50px;
    }
    
    .libretv-skip-toast {
        font-size: 13px;
        padding: 10px 14px;
        top: 60px;
    }
}

/* 主题切换按钮样式 */
.libretv-theme-setting {
    display: flex;
    align-items: center;
}

.libretv-theme-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #e0f2fe;
    color: var(--primary-color);
    border: 1px solid #b3e5fc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    font-weight: 500;
}

.libretv-theme-toggle:hover {
    background: #b3e5fc;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.libretv-theme-text {
    white-space: nowrap;
}

/* 暗色主题样式 */
.libretv-modal.libretv-dark-theme {
    background: rgba(0, 0, 0, 0.9);
}

.libretv-modal.libretv-dark-theme .libretv-modal-content {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
}

.libretv-modal.libretv-dark-theme .libretv-modal-header {
    background: #111827;
    border-color: #374151;
}

.libretv-modal.libretv-dark-theme .libretv-modal-title {
    color: #f9fafb;
}

.libretv-modal.libretv-dark-theme .libretv-modal-close {
    background: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

.libretv-modal.libretv-dark-theme .libretv-modal-close:hover {
    background: #4b5563;
    color: #f9fafb;
    border-color: #6b7280;
}

/* 暗色主题 - 播放信息区域 */
.libretv-modal.libretv-dark-theme .libretv-video-source-info {
    background: #111827;
    border-color: #374151;
}

.libretv-modal.libretv-dark-theme .libretv-source-name {
    color: #60a5fa;
}

.libretv-modal.libretv-dark-theme .libretv-episode-count {
    color: #9ca3af;
}

.libretv-modal.libretv-dark-theme .libretv-switch-source {
    background: #1e3a8a;
    color: #93c5fd;
    border-color: #3b82f6;
}

.libretv-modal.libretv-dark-theme .libretv-switch-source:hover {
    background: #1e40af;
    border-color: #60a5fa;
}

/* 暗色主题 - 播放信息区域的主题切换按钮 */
.libretv-modal.libretv-dark-theme .libretv-video-source-info .libretv-theme-toggle {
    background: #1e3a8a;
    color: #93c5fd;
    border-color: #3b82f6;
}

.libretv-modal.libretv-dark-theme .libretv-video-source-info .libretv-theme-toggle:hover {
    background: #1e40af;
    border-color: #60a5fa;
}

/* 暗色主题 - 播放控制区域 */
.libretv-modal.libretv-dark-theme .libretv-player-controls {
    background: #111827;
    border-color: #374151;
}

.libretv-modal.libretv-dark-theme .libretv-current-episode {
    color: #f9fafb;
}

.libretv-modal.libretv-dark-theme .libretv-prev-btn,
.libretv-modal.libretv-dark-theme .libretv-next-btn {
    background: #1e3a8a;
    color: #e5e7eb;
    border-color: #3b82f6;
}

.libretv-modal.libretv-dark-theme .libretv-prev-btn:hover,
.libretv-modal.libretv-dark-theme .libretv-next-btn:hover {
    background: #1e40af;
    border-color: #60a5fa;
}

.libretv-modal.libretv-dark-theme .libretv-prev-btn:disabled,
.libretv-modal.libretv-dark-theme .libretv-next-btn:disabled {
    background: #374151;
    color: #6b7280;
    border-color: #4b5563;
}

/* 暗色主题 - 跳过设置区域 */
.libretv-modal.libretv-dark-theme .libretv-skip-settings {
    background: #111827;
    border-color: #374151;
}

.libretv-modal.libretv-dark-theme .libretv-skip-settings-toggle {
    color: #f9fafb;
}

.libretv-modal.libretv-dark-theme .libretv-skip-settings-toggle:hover {
    background: #1e3a8a;
    color: #93c5fd;
}

.libretv-modal.libretv-dark-theme .libretv-skip-settings-content {
    background: #1f2937;
    border-color: #374151;
}

.libretv-modal.libretv-dark-theme .libretv-skip-option {
    background: #111827;
    border-color: #374151;
}

.libretv-modal.libretv-dark-theme .libretv-setting-label {
    color: #f9fafb;
}

.libretv-modal.libretv-dark-theme .libretv-skip-time-setting label {
    color: #9ca3af;
}

.libretv-modal.libretv-dark-theme .libretv-skip-time-setting input[type="range"] {
    background: #4b5563;
}

.libretv-modal.libretv-dark-theme .libretv-skip-time-display {
    background: #1e3a8a;
    color: #93c5fd;
    border-color: #3b82f6;
}

.libretv-modal.libretv-dark-theme .libretv-set-current-time-btn {
    color: #93c5fd;
    background: #1e293b;
    border-color: #475569;
}

.libretv-modal.libretv-dark-theme .libretv-set-current-time-btn:hover {
    background: #1e3a8a;
    border-color: #3b82f6;
    color: #bfdbfe;
}

/* 暗色主题 - 播放设置区域 */
.libretv-modal.libretv-dark-theme .libretv-player-settings {
    background: #111827;
    border-color: #374151;
}

.libretv-modal.libretv-dark-theme .libretv-episodes-show-toggle,
.libretv-modal.libretv-dark-theme .libretv-episodes-toggle {
    background: #1e3a8a;
    color: #93c5fd;
    border-color: #3b82f6;
}

.libretv-modal.libretv-dark-theme .libretv-episodes-show-toggle:hover,
.libretv-modal.libretv-dark-theme .libretv-episodes-toggle:hover {
    background: #1e40af;
    border-color: #60a5fa;
}

.libretv-modal.libretv-dark-theme .libretv-theme-toggle {
    background: #1e3a8a;
    color: #93c5fd;
    border-color: #3b82f6;
}

.libretv-modal.libretv-dark-theme .libretv-theme-toggle:hover {
    background: #1e40af;
    border-color: #60a5fa;
}

/* 暗色主题 - 开关样式 */
.libretv-modal.libretv-dark-theme .libretv-slider {
    background-color: #4b5563;
    border-color: #6b7280;
}

.libretv-modal.libretv-dark-theme input:checked + .libretv-slider {
    background-color: #3b82f6;
    border-color: #60a5fa;
}

/* 暗色主题 - 选集区域 */
.libretv-modal.libretv-dark-theme .libretv-episodes-section {
    background: #111827;
    border-color: #374151;
}

.libretv-modal.libretv-dark-theme .libretv-episode-btn {
    background: #374151;
    color: #e5e7eb;
    border-color: #4b5563;
}

.libretv-modal.libretv-dark-theme .libretv-episode-btn:hover {
    background: #1e3a8a;
    border-color: #3b82f6;
    color: #93c5fd;
}

.libretv-modal.libretv-dark-theme .libretv-episode-btn.active {
    background: #3b82f6;
    border-color: #60a5fa;
    color: white;
}

/* 暗色主题 - 加载状态 */
.libretv-modal.libretv-dark-theme .libretv-loading {
    color: #9ca3af;
    background: #111827;
    border-color: #374151;
}

.libretv-modal.libretv-dark-theme .libretv-spinner {
    border-color: #4b5563;
    border-top-color: #60a5fa;
}

/* 暗色主题 - 错误状态 */
.libretv-modal.libretv-dark-theme .libretv-error {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

/* 移动端暗色主题优化 */
@media (max-width: 768px) {
    .libretv-modal.libretv-dark-theme .libretv-modal-content {
        background: #111827;
    }
    
    .libretv-theme-toggle {
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .libretv-theme-toggle {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    .libretv-theme-text {
        display: none;
    }
}

/* 管理后台样式 */
.libretv-admin-container {
    max-width: 1000px;
    margin: 20px 0;
}

.libretv-admin-section {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.libretv-admin-section-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
    color: #333;
}

.libretv-admin-section-body {
    padding: 20px;
}

.libretv-api-source {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.libretv-api-source:last-child {
    border-bottom: none;
}

.libretv-api-checkbox {
    margin-right: 15px;
}

.libretv-api-info {
    flex: 1;
}

.libretv-api-name {
    font-weight: bold;
    color: #333;
}

.libretv-api-url {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.libretv-custom-api-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.libretv-custom-api-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.libretv-remove-api {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.libretv-add-api {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

/* 加载容器 - 避免grid布局 */
.libretv-loading-container {
    display: block; /* 使用block布局，完全避免grid */
    padding: 16px 20px 20px; /* 与 .libretv-movie-episodes 相同的padding */
}

/* 自动加载样式 - 完全避免grid布局 */
.libretv-auto-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 14px;
    background: rgba(249, 250, 251, 0.8);
    border-radius: 8px;
    min-height: 100px;
    width: 100%;
}

.libretv-loading-text {
    margin-top: 12px;
    font-weight: 500;
    color: var(--text-color);
}

.loading-more {
    font-size: 12px;
    color: #10b981;
    font-weight: normal;
    animation: loading-pulse 2s infinite;
}

@keyframes loading-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 响应式加载容器样式 */
@media (max-width: 640px) {
    .libretv-loading-container {
        padding: 12px 16px 16px; /* 与移动端 .libretv-movie-episodes 相同的padding */
    }
    
    .libretv-auto-loading {
        padding: 30px 15px;
        min-height: 80px;
    }
}

@media (max-width: 480px) {
    .libretv-loading-container {
        padding: 10px 14px 14px;
    }
    
    .libretv-auto-loading {
        padding: 25px 12px;
        min-height: 70px;
        font-size: 13px;
    }
}

/* 流式结果动画 */
.libretv-streaming-item {
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 资源选择弹窗 */
.libretv-source-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.libretv-source-modal.show {
    opacity: 1;
}

.libretv-source-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.libretv-source-modal.show .libretv-source-modal-content {
    transform: scale(1);
}

.libretv-source-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.libretv-source-modal-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.libretv-source-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.libretv-source-modal-close:hover {
    background: #f0f0f0;
    color: #666;
}

.libretv-source-list {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px 0;
}

.libretv-source-group {
    margin-bottom: 15px;
}

.libretv-source-header {
    padding: 10px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.libretv-source-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.libretv-source-count {
    font-size: 12px;
    color: #666;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 10px;
}

.libretv-movies-list {
    max-height: 200px;
    overflow-y: auto;
}

.libretv-movie-option {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.libretv-movie-option:hover {
    background: #f8f9fa;
}

.libretv-movie-option.current {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.libretv-movie-option:last-child {
    border-bottom: none;
}

.libretv-player-movie-name {
    font-weight: 500;
    color: #333;
    font-size: 14px;
    margin-bottom: 4px;
}

.libretv-movie-status {
    font-size: 12px;
    color: #666;
}

/* 暗色主题适配 */
body.libretv-dark-theme .libretv-source-modal-content {
    background: #2d3748;
    color: #e2e8f0;
}

body.libretv-dark-theme .libretv-source-modal-header {
    background: #1a202c;
    border-bottom-color: #4a5568;
}

body.libretv-dark-theme .libretv-source-modal-header h4 {
    color: #e2e8f0;
}

body.libretv-dark-theme .libretv-source-modal-close {
    color: #a0aec0;
}

body.libretv-dark-theme .libretv-source-modal-close:hover {
    background: #4a5568;
    color: #e2e8f0;
}

body.libretv-dark-theme .libretv-source-header {
    background: #1a202c;
    border-bottom-color: #4a5568;
}

body.libretv-dark-theme .libretv-source-title {
    color: #e2e8f0;
}

body.libretv-dark-theme .libretv-source-count {
    color: #a0aec0;
    background: #4a5568;
}

body.libretv-dark-theme .libretv-movie-option {
    border-bottom-color: #4a5568;
}

body.libretv-dark-theme .libretv-movie-option:hover {
    background: #4a5568;
}

body.libretv-dark-theme .libretv-movie-option.current {
    background: #2b6cb0;
    border-left-color: #63b3ed;
}

body.libretv-dark-theme .libretv-player-movie-name {
    color: #e2e8f0;
}

body.libretv-dark-theme .libretv-movie-status {
    color: #a0aec0;
}
