/*
Theme Name: SQTV - 商丘网络电视台
Theme URI: https://sqtvstation.cn
Author: 商丘网络电视台
Author URI: https://sqtvstation.cn
Description: 商丘网络电视台自定义主题，模仿三言科技风格。简洁干净的新闻资讯布局，支持头条(图文)、融媒(视频)、直播(回放)三大内容分类。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sqtv
Tags: one-column, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ===== CSS Variables ===== */
:root {
    --sqtv-primary: #1a365d;
    --sqtv-accent: #e24b4a;
    --sqtv-blue: #378add;
    --sqtv-text: #333;
    --sqtv-text-light: #666;
    --sqtv-text-muted: #999;
    --sqtv-bg: #f5f5f5;
    --sqtv-white: #fff;
    --sqtv-border: #e8e8e8;
    --sqtv-dark: #1A1A1A;
    --sqtv-header-h: 56px;
    --sqtv-sidebar-w: 160px;
    --sqtv-content-w: 1200px;
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", sans-serif; color: var(--sqtv-text); background: var(--sqtv-white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* ===== Header ===== */
.sqtv-header {
    background: var(--sqtv-dark);
    height: var(--sqtv-header-h);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.sqtv-header-inner {
    max-width: var(--sqtv-content-w);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}
.sqtv-logo {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.sqtv-logo-icon {
    width: 32px;
    height: 32px;
    background: var(--sqtv-accent);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    font-weight: 900;
    letter-spacing: 0.5px;
}
.sqtv-logo-text { letter-spacing: 1px; }

/* Main Nav */
.sqtv-main-nav { flex: 1; margin: 0 20px; overflow: hidden; }
.sqtv-main-nav > ul {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
}
.sqtv-main-nav > ul > li {
    text-align: center;
    list-style: none;
}
.sqtv-main-nav > ul > li > a {
    display: block;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 0 20px;
    line-height: var(--sqtv-header-h);
    transition: color 0.2s;
    white-space: nowrap;
}
.sqtv-main-nav > ul > li > a:hover { color: var(--sqtv-accent); }
.sqtv-main-nav > ul > li.current-menu-item > a,
.sqtv-main-nav > ul > li.current-cat > a { color: var(--sqtv-accent); }

/* Search */
.sqtv-header-search {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    height: 32px;
    width: 180px;
    flex-shrink: 0;
}
.sqtv-header-search form {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}
.sqtv-header-search input {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 12px;
    padding: 0 10px;
    width: 100%;
    height: 100%;
    outline: none;
}
.sqtv-header-search input::placeholder { color: rgba(255,255,255,0.5); }
.sqtv-header-search button {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    padding: 0 8px;
    font-size: 14px;
    height: 100%;
}

/* ===== Breadcrumb ===== */
.sqtv-breadcrumb {
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}
.sqtv-breadcrumb-inner {
    max-width: var(--sqtv-content-w);
    margin: 0 auto;
    padding: 8px 20px;
    font-size: 13px;
    color: var(--sqtv-text-muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}
.sqtv-breadcrumb a {
    color: var(--sqtv-blue);
    text-decoration: none;
}
.sqtv-breadcrumb a:hover {
    text-decoration: underline;
}
.sqtv-breadcrumb-sep {
    margin: 0 4px;
    color: #ccc;
}

/* ===== Layout ===== */
.sqtv-page {
    max-width: var(--sqtv-content-w);
    margin: 0 auto;
    display: flex;
    min-height: calc(100vh - var(--sqtv-header-h) - 120px);
}

/* ===== Sidebar (三言科技风格) ===== */
.sqtv-sidebar {
    width: 140px;
    flex-shrink: 0;
    padding: 16px 0;
    background: #fafafa;
    position: sticky;
    top: var(--sqtv-header-h);
    height: calc(100vh - var(--sqtv-header-h));
    overflow: visible;
    z-index: 10;
}
.sqtv-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sqtv-sidebar li {
    list-style: none;
    position: relative;
}
.sqtv-sidebar .sidebar-title {
    font-size: 12px;
    color: #fff;
    background: var(--sqtv-blue);
    padding: 8px 16px;
    margin-bottom: 12px;
    letter-spacing: 1px;
    font-weight: 600;
    border-radius: 20px;
    text-align: center;
}
.sqtv-sidebar a {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    color: #888;
    text-decoration: none;
    border-left: 3px solid transparent;
    background: transparent;
    transition: all 0.2s ease;
}
.sqtv-sidebar a:hover {
    color: var(--sqtv-text);
    background: #eee;
}
.sqtv-sidebar .current-cat a,
.sqtv-sidebar li.current-menu-item a,
.sqtv-sidebar li.current-page-item a {
    color: var(--sqtv-accent) !important;
    border-left-color: var(--sqtv-accent) !important;
    background: #fff !important;
    font-weight: 600;
}

/* ===== 融媒矩阵 - 二维码悬停 ===== */
.sqtv-social-item {
    position: relative;
}
.sqtv-social-item .sqtv-qrcode {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 8px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    width: 160px;
}
.sqtv-social-item .sqtv-qrcode::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 6px 6px 0;
    border-style: solid;
    border-color: transparent #fff transparent transparent;
}
.sqtv-social-item .sqtv-qrcode img {
    width: 136px;
    height: 136px;
    display: block;
    border-radius: 4px;
}
.sqtv-social-item:hover .sqtv-qrcode {
    opacity: 1;
    visibility: visible;
}

/* ===== Main Content ===== */
.sqtv-content {
    flex: 1;
    padding: 12px 32px 24px;
    min-width: 0;
}

/* ===== Featured Banner ===== */
.sqtv-banner {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 28px;
    position: relative;
    background: linear-gradient(135deg, var(--sqtv-primary), #2d5aa0);
    min-height: 320px;
    display: flex;
    align-items: flex-end;
    padding: 40px;
}
.sqtv-banner-tag {
    display: inline-block;
    background: var(--sqtv-accent);
    color: #fff;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}
.sqtv-banner h2 {
    font-size: 24px;
    color: #fff;
    line-height: 1.5;
    margin-bottom: 8px;
    max-width: 500px;
}
.sqtv-banner p {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    max-width: 500px;
}
.sqtv-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
}

/* ===== Section Title ===== */
.sqtv-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--sqtv-text);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--sqtv-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sqtv-section-title::before {
    content: '';
    width: 3px;
    height: 18px;
    background: var(--sqtv-accent);
    border-radius: 2px;
    margin-right: 10px;
}
.sqtv-section-title a {
    font-size: 13px;
    color: var(--sqtv-text-muted);
    font-weight: 400;
}
.sqtv-section-title a:hover { color: var(--sqtv-blue); }

/* ===== News List ===== */
.sqtv-news-list { margin-bottom: 32px; }
.sqtv-news-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
}
.sqtv-news-item:hover { background: #fafafa; margin: 0 -16px; padding: 20px 16px; border-radius: 6px; }
.sqtv-news-item:last-child { border-bottom: none; }

.sqtv-news-thumb {
    width: 220px;
    height: 148px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eee;
    position: relative;
}
.sqtv-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.sqtv-news-item:hover .sqtv-news-thumb img { transform: scale(1.03); }
.sqtv-news-thumb .sqtv-cat-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    backdrop-filter: blur(4px);
}
.sqtv-news-thumb .sqtv-video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(226,75,74,0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
}

.sqtv-news-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.sqtv-news-info h3 {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--sqtv-text);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}
.sqtv-news-item:hover .sqtv-news-info h3 { color: var(--sqtv-accent); }
.sqtv-news-info .sqtv-excerpt {
    font-size: 13px;
    color: var(--sqtv-text-muted);
    line-height: 1.7;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sqtv-news-meta {
    font-size: 12px;
    color: #ccc;
    display: flex;
    gap: 16px;
}

/* ===== Pagination ===== */
.sqtv-pagination {
    text-align: center;
    padding: 32px 0;
}
.sqtv-pagination a,
.sqtv-pagination span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 3px;
    border: 1px solid var(--sqtv-border);
    border-radius: 4px;
    font-size: 14px;
    color: var(--sqtv-text-light);
    transition: all 0.2s;
}
.sqtv-pagination a:hover { border-color: var(--sqtv-accent); color: var(--sqtv-accent); }
.sqtv-pagination .current { background: var(--sqtv-accent); color: #fff; border-color: var(--sqtv-accent); }

/* ===== Single Post ===== */
body.single .sqtv-content { padding-top: 12px; }
.sqtv-single { max-width: 780px; margin: 0 auto; padding: 8px 0; }
.sqtv-single-header { margin-bottom: 16px; }
.sqtv-single-header h1 {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--sqtv-text);
    margin-bottom: 12px;
}
.sqtv-single-meta {
    font-size: 13px;
    color: var(--sqtv-text-muted);
    display: flex;
    gap: 16px;
}
.sqtv-single-content {
    font-size: 15px;
    line-height: 1.9;
    color: #444;
}
.sqtv-single-content p { margin-bottom: 18px; }
.sqtv-single-content img { border-radius: 6px; margin: 16px 0; max-width: 100%; height: auto; }
.sqtv-single-content h2, .sqtv-single-content h3 { color: var(--sqtv-text); margin: 28px 0 14px; }
.sqtv-single-content a { color: var(--sqtv-blue); }
.sqtv-single-content a:hover { color: var(--sqtv-accent); }
.sqtv-single-thumb {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
}
.sqtv-single-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post navigation */
.sqtv-post-nav {
    display: flex;
    justify-content: space-between;
    padding: 24px 0;
    margin-top: 32px;
    border-top: 1px solid var(--sqtv-border);
    font-size: 14px;
}
.sqtv-post-nav a { color: var(--sqtv-text-light); }
.sqtv-post-nav a:hover { color: var(--sqtv-accent); }

/* ===== Related News ===== */
.sqtv-related-news {
    margin: 40px 0 30px;
    padding-top: 24px;
    border-top: 1px solid var(--sqtv-border);
    clear: both;
    width: 100%;
}
.sqtv-related-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--sqtv-text);
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 4px solid var(--sqtv-accent);
}
.sqtv-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: start;
}
.sqtv-related-item {
    display: block;
    text-decoration: none;
    color: var(--sqtv-text);
    transition: transform 0.2s ease;
}
.sqtv-related-item:hover {
    transform: translateY(-3px);
}
.sqtv-related-item:hover .sqtv-related-item-title {
    color: var(--sqtv-accent);
}
.sqtv-related-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    margin-bottom: 10px;
}
.sqtv-related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.sqtv-related-item:hover .sqtv-related-thumb img {
    transform: scale(1.05);
}
.sqtv-related-item-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--sqtv-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    transition: color 0.2s ease;
}

/* ===== Page ===== */
.sqtv-page-content {
    padding: 16px 0;
}
.sqtv-page-content h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--sqtv-border);
}
.sqtv-page-content .entry-content {
    font-size: 15px;
    line-height: 1.9;
    color: #444;
}

/* ===== Footer ===== */
.sqtv-footer {
    background: var(--sqtv-dark);
    color: rgba(255,255,255,0.5);
    padding: 32px 20px;
    text-align: center;
    font-size: 13px;
}
.sqtv-footer a { color: rgba(255,255,255,0.7); }
.sqtv-footer a:hover { color: #fff; }
.sqtv-footer-inner {
    max-width: var(--sqtv-content-w);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.sqtv-footer-sep {
    margin: 0 8px;
    color: rgba(255,255,255,0.3);
}

/* ===== No Results ===== */
.sqtv-no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--sqtv-text-muted);
}
.sqtv-no-results h2 { font-size: 20px; margin-bottom: 12px; color: var(--sqtv-text); }

/* ===== Search Results ===== */
.sqtv-search-results h1 { font-size: 18px; margin-bottom: 20px; color: var(--sqtv-text-muted); }

/* ===== 汉堡菜单按钮 ===== */
.sqtv-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
    z-index: 1001;
}
.sqtv-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 4px 0;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.sqtv-menu-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.sqtv-menu-toggle.active span:nth-child(2) { opacity: 0; }
.sqtv-menu-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ===== 手机端下拉菜单（PC端强制隐藏，右侧弹出，宽度自适应导航内容） ===== */
.sqtv-mobile-menu {
    display: none !important;
    position: fixed;
    top: 50px;
    left: auto;
    right: 12px;
    width: max-content;
    min-width: 150px;
    max-width: calc(100vw - 24px);
    background: var(--sqtv-dark);
    z-index: 1000;
    padding: 4px 0;
    border-radius: 0 0 8px 8px;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
.sqtv-mobile-menu.open {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.sqtv-mobile-menu-inner { padding: 0; }
.sqtv-mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sqtv-mobile-nav-list li a {
    display: block;
    padding: 12px 18px;
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: color 0.2s;
}
.sqtv-mobile-nav-list li:last-child a { border-bottom: none; }
.sqtv-mobile-nav-list li a:hover,
.sqtv-mobile-nav-list li.active a { color: var(--sqtv-accent); }

/* 手机菜单分隔线 */
.sqtv-mobile-sep {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 4px 10px;
    pointer-events: none;
}
/* 手机菜单子项（听广播） */
.sqtv-mobile-sub a {
    font-size: 13px !important;
    padding: 10px 18px !important;
    color: rgba(255,255,255,0.7) !important;
}

/* ===== 遮罩层（PC端强制隐藏） ===== */
.sqtv-menu-overlay {
    display: none !important;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 999;
}
.sqtv-menu-overlay.show { display: block !important; }
body.sqtv-menu-open { overflow: hidden; }

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    :root { --sqtv-sidebar-w: 0px; --sqtv-header-h: 50px; }
    .sqtv-sidebar { display: none; }
    .sqtv-header-inner { padding: 0 12px; }
    .sqtv-main-nav { display: none; }
    .sqtv-header-search { width: 100px; }
    .sqtv-header-search input { width: 70px; font-size: 11px; }
    .sqtv-menu-toggle { display: block; }
    .sqtv-content { padding: 12px; }
    .sqtv-news-item { flex-direction: column; gap: 10px; }
    .sqtv-related-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .sqtv-related-title { font-size: 15px; }
    .sqtv-news-thumb { width: 100%; height: 180px; }
    .sqtv-news-info h3 { font-size: 14px; -webkit-line-clamp: 2; }
    .sqtv-single h1 { font-size: 18px; }
    /* 单列视频列表布局手机端适配 */
    .video-post-container + .video-post-container { margin-top: 20px; }
    .sqtv-breadcrumb-inner { padding: 6px 12px; font-size: 12px; }
    .sqtv-footer-inner { flex-direction: column; gap: 8px; }
    .sqtv-banner { min-height: 200px; padding: 20px; }
    .sqtv-banner h2 { font-size: 16px; }
    .sqtv-banner p { font-size: 13px; }
}

/* ===== 内容模板样式（用于文章内统一排版） ===== */
.sqtv-tpl-container { max-width: 900px; margin: 0 auto; }

/* 直播预告：信息卡片 */
.sqtv-tpl-info { background: #f8f9fa; padding: 25px; border-radius: 10px; margin-bottom: 20px; }
.sqtv-tpl-info-row { display: flex; align-items: center; margin-bottom: 15px; }
.sqtv-tpl-info-row:last-child { margin-bottom: 0; }
.sqtv-tpl-info-icon { font-size: 40px; margin-right: 15px; flex-shrink: 0; width: 50px; text-align: center; }
.sqtv-tpl-info-label { font-size: 14px; color: #999; }
.sqtv-tpl-info-value { font-size: 22px; font-weight: bold; color: #333; }
.sqtv-tpl-info-value-sm { font-size: 18px; color: #555; }

/* 直播预告：温馨提示 */
.sqtv-tpl-notice { background: #fff3cd; padding: 20px; border-radius: 10px; border-left: 4px solid #ffc107; }
.sqtv-tpl-notice p { margin: 0; font-size: 15px; color: #856404; }

/* 视频回放 */
.sqtv-tpl-video { max-width: 900px; margin: 0 auto; }
.sqtv-tpl-video h2 { font-size: 20px; color: #333; margin: 0 0 15px; }
.sqtv-tpl-video-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; margin: 20px 0; }
.sqtv-tpl-video-wrap video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #000; }
.sqtv-tpl-video-src { color: #666; font-size: 13px; margin-top: 5px; }
.sqtv-tpl-video-src a { color: #337ab7; }

/* 文章内容：章节标题 */
.sqtv-tpl-heading { font-size: 18px; color: #1a1a2e; margin: 30px 0 15px; }

/* 文章内容：引言段落 */
.sqtv-tpl-lead { font-size: 18px; font-weight: bold; color: #1a1a2e; margin: 15px 0; }

/* 文章内容：引用/数据卡片 */
.sqtv-tpl-card { padding: 20px; border-radius: 8px; margin: 20px 0; }
.sqtv-tpl-card-yellow { background: #fff3cd; border-left: 4px solid #ffc107; }
.sqtv-tpl-card-yellow p { margin: 0; font-size: 14px; color: #856404; }
.sqtv-tpl-card-blue { background: #e8f4f8; }
.sqtv-tpl-card-blue p { margin: 0; color: #0c5460; }
.sqtv-tpl-card-gray { background: #f0f0f0; padding: 20px; border-radius: 8px; margin: 20px 0; }
.sqtv-tpl-card-gray p { margin: 0 0 10px; font-weight: bold; color: #333; }
.sqtv-tpl-card-gray ul { margin: 0; padding-left: 20px; color: #555; }

/* 文章内容：深色强调卡片 */
.sqtv-tpl-callout { background: linear-gradient(135deg,#0f3460,#1a1a2e); color: #fff; padding: 25px; border-radius: 10px; margin: 25px 0; text-align: center; }
.sqtv-tpl-callout p { margin: 0; }

/* 文章内容：祝福/结尾块 */
.sqtv-tpl-ending { text-align: center; margin: 30px 0; padding: 20px; background: #f8f9fa; border-radius: 8px; }

/* 文章内容：创作说明/来源 */
.sqtv-tpl-footer { margin-top: 40px; padding: 20px; background: #f8f9fa; border-radius: 8px; font-size: 12px; color: #999; line-height: 1.8; }

/* 活动通知：深蓝banner头 */
.sqtv-tpl-banner { background: linear-gradient(135deg,#1a5276,#2980b9); color: #fff; padding: 30px; border-radius: 12px; text-align: center; margin-bottom: 25px; }
.sqtv-tpl-banner h2 { margin: 0; font-size: 24px; }
.sqtv-tpl-banner p { margin: 10px 0 0; font-size: 16px; opacity: 0.9; }

/* 活动通知：橙色时间高亮 */
.sqtv-tpl-time { background: #fef9e7; padding: 20px; border-radius: 10px; margin-bottom: 20px; border-left: 4px solid #f39c12; }
.sqtv-tpl-time-label { font-size: 14px; color: #999; margin-bottom: 5px; }
.sqtv-tpl-time-value { font-size: 20px; font-weight: bold; color: #e67e22; }

/* 活动通知：步骤列表 */
.sqtv-tpl-steps { background: #eaf2f8; padding: 25px; border-radius: 10px; margin-bottom: 20px; }
.sqtv-tpl-steps h3 { margin: 0 0 15px; color: #2c3e50; }
.sqtv-tpl-steps ol { line-height: 2; color: #444; padding-left: 20px; }

/* 二维码显示区 */
.sqtv-tpl-qrcode { text-align: center; margin: 20px 0; padding: 20px; background: #fff; border-radius: 10px; border: 2px dashed #2980b9; }
.sqtv-tpl-qrcode p { color: #1a5276; font-weight: bold; font-size: 16px; margin-bottom: 15px; }
.sqtv-tpl-qrcode img { width: 100%; max-width: 400px; display: block; margin: 0 auto; border-radius: 8px; }

/* 分割线 */
.sqtv-tpl-hr { margin: 30px 0; border: none; border-top: 1px solid #eee; }

/* 文章正文区域 */
.sqtv-tpl-body { line-height: 2.1; font-size: 16px; color: #222; }
.sqtv-tpl-body p { margin: 0 0 15px; text-indent: 2em; }

/* 全宽图片 */
.sqtv-tpl-img-full { width: 100%; max-width: 900px; height: auto; display: block; margin: 0 auto 25px; border-radius: 8px; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }

/* ===== Live Player 直播播放器 ===== */
.sqtv-live-page { padding: 0; }

.sqtv-live-header {
    margin-bottom: 20px;
}
.sqtv-live-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--sqtv-text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.sqtv-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--sqtv-accent);
    color: #fff;
    padding: 4px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.sqtv-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: sqtvPulse 1.5s infinite;
}
@keyframes sqtvPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.sqtv-live-subtitle {
    font-size: 14px;
    color: var(--sqtv-text-muted);
    margin: 0;
}

/* 播放器 */
.sqtv-player-wrapper {
    margin-bottom: 24px;
}
.sqtv-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.sqtv-player video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

/* 加载动画 */
.sqtv-player-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.8);
    color: #fff;
    z-index: 5;
    gap: 16px;
}
.sqtv-loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: var(--sqtv-accent);
    border-radius: 50%;
    animation: sqtvSpin 0.8s linear infinite;
}
@keyframes sqtvSpin {
    to { transform: rotate(360deg); }
}
.sqtv-player-loading p {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

/* 错误提示 */
.sqtv-player-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.85);
    color: #fff;
    z-index: 5;
    gap: 12px;
}
.sqtv-error-icon {
    font-size: 48px;
    color: var(--sqtv-accent);
}
.sqtv-player-error p {
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    margin: 0;
}
.sqtv-error-hint {
    font-size: 13px !important;
    color: rgba(255,255,255,0.5) !important;
}
.sqtv-retry-btn {
    margin-top: 8px;
    padding: 8px 24px;
    background: var(--sqtv-accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}
.sqtv-retry-btn:hover {
    background: #c9403f;
}

/* 播放器信息栏 */
.sqtv-player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-top: 8px;
}
.sqtv-channel-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sqtv-channel-badge {
    display: inline-block;
    background: var(--sqtv-primary);
    color: #fff;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}
.sqtv-channel-name {
    font-size: 14px;
    color: var(--sqtv-text);
    font-weight: 500;
}

/* 播放状态 */
.sqtv-player-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.sqtv-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.sqtv-status-live .sqtv-status-dot {
    background: #22c55e;
    animation: sqtvPulse 1.5s infinite;
}
.sqtv-status-live .sqtv-status-text {
    color: #22c55e;
    font-weight: 600;
}
.sqtv-status-buffering .sqtv-status-dot {
    background: #f59e0b;
    animation: sqtvSpin 0.8s linear infinite;
}
.sqtv-status-buffering .sqtv-status-text {
    color: #f59e0b;
}
.sqtv-status-ready .sqtv-status-dot {
    background: #3b82f6;
}
.sqtv-status-ready .sqtv-status-text {
    color: #3b82f6;
}
.sqtv-status-error .sqtv-status-dot {
    background: var(--sqtv-accent);
}
.sqtv-status-error .sqtv-status-text {
    color: var(--sqtv-accent);
}

/* 直播页面说明 */
.sqtv-live-desc {
    font-size: 14px;
    color: var(--sqtv-text-light);
    line-height: 1.8;
    padding: 20px 0;
    border-top: 1px solid var(--sqtv-border);
}

/* 直播页面移动端适配 */
@media (max-width: 768px) {
    .sqtv-live-title { font-size: 18px; }
    .sqtv-player { border-radius: 0; aspect-ratio: 16 / 9; }
    .sqtv-player-info { flex-direction: column; gap: 8px; align-items: flex-start; }
}

/* ===== 直播分类卡片网格 ===== */
.sqtv-live-grid-wrap {
    padding: 0;
}

/* 子分类导航 */
.sqtv-subcats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}
.sqtv-subcat-item {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--sqtv-text-muted);
    background: #f5f5f5;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.sqtv-subcat-item:hover {
    color: var(--sqtv-blue);
    background: #e8edf5;
}
.sqtv-subcat-item.active {
    color: #fff;
    background: var(--sqtv-blue);
    font-weight: 500;
}

/* 4列网格 */
.sqtv-live-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* 单个卡片 */
.sqtv-live-card {
    display: block;
    background: var(--sqtv-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--sqtv-border);
}
.sqtv-live-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* 缩略图区域 */
.sqtv-live-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #2a2a3a;
}
.sqtv-live-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.sqtv-live-card:hover .sqtv-live-card-thumb img {
    transform: scale(1.05);
}

/* 无图占位 - 增强版（分类背景图） */
.sqtv-live-card-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
}
.sqtv-live-card-icon-wrap {
    width: 48px;
    height: 48px;
    opacity: 0.5;
    margin-bottom: 6px;
}
.sqtv-live-card-icon-wrap svg {
    width: 100%;
    height: 100%;
}
.sqtv-live-card-yd {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 1px;
}

/* ===== 分类背景图（缩略图无图时的渐变背景） ===== */
/* 默认背景 */
.bg-default {
    background: linear-gradient(135deg, #2a3a5c, #1a2942);
}
/* 政务 - 深蓝到藏青（稳重权威） */
.bg-zhengwu {
    background: linear-gradient(135deg, #1a365d 0%, #234e52 50%, #173a5c 100%);
}
/* 文旅 - 暖橙到红色（活力文化） */
.bg-wenlv {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 30%, #d35400 70%, #a04000 100%);
}
/* 教育 - 蓝色到青蓝（学术智慧） */
.bg-jiaoyu {
    background: linear-gradient(135deg, #1a5276 0%, #2980b9 40%, #1abc9c 100%);
}
/* 商业 - 深灰到金色（商业质感） */
.bg-shangye {
    background: linear-gradient(135deg, #2c3e50 0%, #4a5568 40%, #c5942b 100%);
}
/* 赛事 - 紫色到品红（动感活力） */
.bg-saishi {
    background: linear-gradient(135deg, #4a0e4e 0%, #8e44ad 40%, #c0392b 100%);
}

/* 分类标签（右上角） */
.sqtv-live-card-cat {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* 时间行/地点行样式增强 */
.sqtv-live-card-row--time svg {
    fill: #378add;
    opacity: 0.8;
}
.sqtv-live-card-row--loc svg {
    fill: #e24b4a;
    opacity: 0.8;
}

/* 轻量占位（保留兼容） */
.sqtv-live-card-placeholder-light {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* 状态标签 */
.sqtv-live-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    z-index: 2;
}
.sqtv-live-card-badge--live {
    background: var(--sqtv-accent);
}
.sqtv-live-card-badge--upcoming {
    background: var(--sqtv-blue);
}
.sqtv-live-card-badge--ended {
    background: rgba(0,0,0,0.5);
}

/* 播放图标 */
.sqtv-live-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    color: var(--sqtv-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    padding-left: 3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: background 0.2s;
}
.sqtv-live-card:hover .sqtv-live-card-play {
    background: #fff;
}

/* 信息区域 */
.sqtv-live-card-info {
    padding: 12px 14px 14px;
}
.sqtv-live-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--sqtv-text);
    line-height: 1.5;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

/* 时间/地点行 */
.sqtv-live-card-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--sqtv-text-muted);
    line-height: 1.4;
    margin-bottom: 4px;
}
.sqtv-live-card-row:last-child {
    margin-bottom: 0;
}
.sqtv-live-card-row svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    fill: var(--sqtv-text-muted);
    opacity: 0.7;
}

/* 直播分类响应式 */
@media (max-width: 1200px) {
    .sqtv-live-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 900px) {
    .sqtv-live-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .sqtv-live-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .sqtv-live-card-title {
        font-size: 13px;
    }
}
