
:root {
    --sidebar-width: 210px;
    --primary-color:  red;  /* 蓝色作为点缀色 */
    --dark-color: #2c3e50;    /* 深灰色主色调 */
    --light-color: #ecf0f1;   /* 浅灰色 */
    --background-color: #334766; /* 浅灰背景 */
}

::-webkit-scrollbar {
  display: none;  /* 隐藏但保留滚动功能 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: #333;
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--dark-color);
    color: white;
    transition: all 0.3s;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    height: 100px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background-color: #1a252f;
    background-image: url('logo.png');
    background-size: contain; /* 修改为contain确保完整显示图片 */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    filter: brightness(1.0) contrast(1.0); /* 额外提升亮度和对比度 */
    
}
/*元旦*/
.sidebar-header[data-date="1231"],
.sidebar-header[data-date="0101"]
{background-image: url('logo-YD.png');
} 
/*2026年七夕*/
.sidebar-header[data-date="0819"]
{background-image: url('logo-QX.png');
} 
/*2025年中秋*/

.sidebar-header[data-date="1006"]
{background-image: url('logo-ZQ.png');
}
/* 国庆背景 */
.sidebar-header[data-date="0903"],
.sidebar-header[data-date="1001"],
.sidebar-header[data-date="1002"],
.sidebar-header[data-date="1003"],
.sidebar-header[data-date="1004"],
.sidebar-header[data-date="1005"],
.sidebar-header[data-date="1007"]
{background-image: url('logo-GQ.png');
} 
/*以下是2026年春节*/
.sidebar-header[data-date="0216"],
.sidebar-header[data-date="0217"],
.sidebar-header[data-date="0218"],
.sidebar-header[data-date="0219"],
.sidebar-header[data-date="0220"],
.sidebar-header[data-date="0221"],
.sidebar-header[data-date="0222"],
.sidebar-header[data-date="0223"]
{background-image: url('logo-CJ.png');


}
.sidebar-logo {
    max-width: 100%;
    height: auto;
    
}


.sidebar-menu {
    padding: 5px 0;
}

.sidebar-menu a {
    display: block;
    padding: 12px 50px; /* 右侧内边距增加2px */
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover, 
.sidebar-menu a.active {
    background-color: rgba(255,255,255,0.2);
    border-left: 5px solid var(--primary-color);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: all 0.3s;
    background-color: #fff;
}

.top-nav {
    display: none;
    background-color: var(--dark-color);
    color: white;
    padding: 15px 20px;
    justify-content: space-between;
    align-items: center;
}

.menu-toggle {
    font-size: 20px;
    cursor: pointer;
    color: var(--primary-color);
}

.content {
    padding: 20px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));/*图片大小切换*/
    gap: 15px;
}

.grid-item {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    background-color: var(--dark-color);
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.grid-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill; /* 将cover改为fill */
}

.grid-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.5),rgba(0,0,0,1.0));
    color: white;
    font-size: 14px;
    /*font-weight: bold;   /* 添加字体加粗属性 */
    text-align:center ;  /* 添加文字居中属性 center*/
    display: flex;       /* 使用flex布局确保垂直居中 */
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中center */
}

.live-badge {
    position: absolute;
    top: 0px;
    right: 0px;
   /* background-image: url('/tv/img/zimtv.gif');*/
    background-image:linear-gradient(90deg,rgba(255,0,0,0.9),rgba(255,0,102,0.0));
   /* background:rgba(0,0,0,0.5);*/
    color: white;
    padding: 2px 4px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 400;
    text-shadow: 
        1px 1px 2px rgba(0,0,0,0.7),  /* 主阴影 */
        -1px -1px 1px rgba(255,255,255,0.3); /* 高光阴影 */
}


.player-container {
    background-color: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    margin-bottom: 10px;
}

.player-iframe {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    position: relative;
}

.player-iframe iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.channel-info {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid var(--primary-color);
}

.line-selector {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.line-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.line-btn {
    padding: 9px 9px;
    margin: 4px 0px; /* 新增上下边距6px，左右0px */
    background-color: var(--light-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    color: #000;
    text-decoration: none;
    display: inline-block; /* 确保边距生效 */
    vertical-align: middle; /* 垂直对齐 */
}

.line-btn.active {
    background-color: #ffcc00;
    color: white;
}

.btn {
    display: inline-block;
    min-width: 87px;
    padding: 8px;
    margin: 4px 2px;
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s;
    background-color:#fff; /*var(--primary-color);*/
    color: #2b2b2b;
    border: 1px solid #ccc;
}

.btn:hover {
    background: linear-gradient(45deg, red 0%, #ff00e5 100%);
    color: #fff;
}


@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    .btn {
        width: auto;
        min-width: 91px;
        margin: 3px 1px;
        text-align: center;
    }
    
}
/* 基础网格布局设置 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

/* 超大屏幕优化 */
@media (min-width: 1600px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    }
}

/* 标准PC端显示 */
@media (min-width: 1024px) and (max-width: 1599px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* 平板横屏/小屏PC */
@media (min-width: 768px) and (max-width: 1023px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* 手机横屏/大屏手机 */
@media (min-width: 480px) and (max-width: 767px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* 标准手机竖屏 */
@media (max-width: 479px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* 特别小的手机屏幕 */
@media (max-width: 360px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* 安卓设备特殊适配 */
@media (max-width: 480px) and (min-resolution: 2dppx) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* 确保网格项保持正确比例 */
.grid-item {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 比例 */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    background-color: var(--dark-color);
}

/*新增换一批*/
.more-link {
    float: right;
    font-size: 14px;
    color: #999;
    text-decoration: none;
    font-weight: normal;
    transition: color 0.1s;
}

.more-link:hover {
    color: #333;
}

.more-link i {
    margin-left: 10px;
    transition: transform 0.1s;
}

.fa-spin {
    animation: spin 0.05s linear infinite;
}

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

/* 新增顶部导航悬浮效果 */
.top-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--dark-color);
    color: white;
    padding: 15px 20px;
    justify-content: space-between;
    align-items: center;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* 新增点击外部区域关闭侧边栏 */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 998;
}

@media (max-width: 768px) {
    .top-nav {
        display: flex;
        height: 60px; /* 添加固定高度 */
    }
    
    .main-content {
        margin-left: 0;
        padding-top: 60px; /* 增加顶部内边距 */
        margin-top: 0px; /* 可以移除外边距 */
    }
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar.active + .overlay {
        display: block;
    }
    
}
/*图片加播放按钮开始*/
.mask{
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0%;
    top: 0%;
    background:url(ico-play.png) rgba(0,0,0,0.40) no-repeat center; 
    style: "width: 100%;height: 100%;";
    display: none;
    
} 
a:hover .mask{
    display: block;
    
}

/*搜索*/

   .search-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    gap: 5px; /* 统一控制元素间距 */

}
  .logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-right: 0px; /* logo与输入框间距 */
}

  .ip {
     margin-right: 10px;
   font-size:80%;
   color:#696969;
   font-weight: normal;
   font-family:'Microsoft JhengHei';
   text-decoration: none;
   /*margin-left: auto;*/
} 
#searchInput {
    padding: 10px 15px;
    width: 50%;
    border-radius: 20px;
    border: 1px solid #ddd;
    margin-right: 5px; /* 输入框与按钮间距 */
}
.search-container button {
    padding: 8px 12px;
    background: red;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;

}

 /* 火箭返回顶部按钮样式 */
        #back-to-top {
            position: fixed;
            right: 20px;
            bottom: 20px;
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            opacity: 0;
            transition: all 0.3s ease;
            font-family: 'Font Awesome 5 Free';
            font-weight: 900;
            font-size: 24px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.3);
            z-index: 999;
            border: none;
            outline: none;
        }
        
        #back-to-top.visible {
            opacity: 1;
        }
        
        #back-to-top:hover {
            transform: translateY(-5px);
            background: linear-gradient(135deg, #ff6b6b 0%, #ff416c 100%);
            box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
        }
        
        #back-to-top::before {
            content: "\f135"; /* Font Awesome火箭图标 */
            transform: rotate(-45deg); /* 向左旋转45度使火箭直立 */
            transition: transform 0.3s ease;
        }
        
        #back-to-top:hover::before {
            transform: rotate(-45deg) translateY(-5px); /* 保持旋转同时上浮 */
        }
        
        /* 火箭火焰效果 */
        #back-to-top::after {
            content: "";
            position: absolute;
            bottom: -15px;
            left: 50%;
            transform: translateX(-50%) rotate(0deg); /* 火焰也相应旋转 */
            width: 20px;
            height: 30px;
            background: linear-gradient(to top, #ff9a3c, #ff6b6b);
            border-radius: 50% 50% 0 0;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        #back-to-top:hover::after {
            opacity: 1;
        }
        
        /* 火箭起飞动画 - 更新为旋转后的动画 */
        @keyframes rocketTakeoff {
            0% { transform: rotate(-45deg) translateY(0); }
            50% { transform: rotate(-45deg) translateY(-5px); }
            100% { transform: rotate(-45deg) translateY(0); }
        }
        
        #back-to-top.visible::before {
            animation: rocketTakeoff 2s ease-in-out infinite;
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            #back-to-top {
                right: 15px;
                bottom: 15px;
                width: 50px;
                height: 50px;
                font-size: 20px;
            }
            
            #back-to-top::after {
                width: 15px;
                height: 20px;
                bottom: -12px;
            }
        }