@import "index.css";

.videolist {
    height: 210px;
    background: #f7f9ff;
}

.videolist .container {
    width: 1200px;
    width: var(--maxWidth);
    height: 100%;
    position: relative;
}

.videolist .container dl {
    position: relative;
    margin-top: 50px;
    z-index: 1;
}

.videolist .container a {
    color: #0b75f1;
    word-break: keep-all;
}

.videolist .container>img {
    position: absolute;
    left: 0px;
}

.videolist .container dl+img {
    position: absolute;
    right: 0px;
    left: auto;
}

.videolist .container b {
    color: #0b75f1;
}

.videolist .container dt {
    color: #4d4d4d;
    font-weight: 600;
    font-size: 30px;
    line-height: 45px;
}

.videolist2 {
    margin: 60px 20px 65px;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 1200px;
}

.videolist2 .item {
    min-width: 260px;
    width: 260px;
    height: 170px;
    border: solid 1px #6d8bff;
    border-radius: 8px;
    margin: 40px;
    background: #6d8bff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.videolist2 .item:hover {
    transform: translateY(-8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1)
}

.videolist2 .item img {
    width: 260px;
    height: 130px;
    object-fit: cover;
}

.videolist2 .item .thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0;
    width: 100%;
    height: 130px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.videolist2 .item:hover .thumbnail-overlay {
    opacity: 1;
}

.videolist2 .item .play-btn {
    width: 60px;
    height: 60px;
    background: #0b75f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 8px rgba(11, 117, 241, 0.3);
}

.videolist2 .item .play-btn .icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    fill: currentColor;
}


.videolist2 .item>div {
    line-height: 24px;
    padding: 5px;
    font-size: 16px;
}

.videolist2 .item .text {
    width: 100%;
    height: 30px;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    display: -webkit-box;
}






/* 视频弹窗样式 */
.videoModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}


/* 
.menulink_videos { 
    position: relative;
    z-index: 1;
    height: 80%;
    border-radius: 4px;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(24, 144, 255, 0.3);
    transition: all 0.3s ease;
    margin: auto;
    overflow: hidden;
    transform: translateZ(0);

 
    color: transparent;
    
    background: linear-gradient(45deg,
            rgb(255, 24, 24) -2%,
            rgb(24, 24, 255) 14.28%,
            rgb(255, 200, 24) 32%,
            rgb(255, 24, 24) 46%,
            rgb(24, 24, 255) 60%,
            rgb(255, 200, 24) 110%);
    background-size: 200% 100%;
    animation: infiniteScroll 4s linear infinite;

 
    background-clip: text; 
  
} */

/* 关键2：伪元素做双层渐变，实现无限滚动 */
.menulink_videos1::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 400%;
    height: 100%;
    background-clip: text;
    filter: invert(1);
    z-index: -1;
    /* 放在文字下方 */
    background: linear-gradient(45deg,
            rgb(255, 24, 24) -2%,
            rgb(24, 24, 255) 14.28%,
            /* rgb(24, 255, 24) 28%,  */
            rgb(255, 200, 24) 32%,
            rgb(255, 24, 24) 46%,
            rgb(24, 24, 255) 60%,
            rgb(255, 200, 24) 100%
            /* rgb(24, 255, 24) 100% */
        );
    background-size: 200% 100%;
    animation: infiniteScroll 4s linear infinite;
}

/* 无限滚动关键帧 - 无缝循环 */
@keyframes infiniteScroll {
    0% {
        background-position: 0% 50%;
    }

    20% {
        background-position: 10% 50%;
    }

    80% {
        background-position: 95% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}



.videoModal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.videoModalContent {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modalClose {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}

.modalClose:hover,
.modalClose:focus {
    color: #333;
}

.videoPlayerWrapper {
    width: 100%;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

#videoPlayer {
    width: 100%;
    max-height: 500px;
    background: #000;
}

.videoInfo h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.videoInfo p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    width: 100%;
}

.loadingBox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.loadingBox span {
    width: 12px;
    height: 12px;
    background-color: #0b75f1;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loadingBox span:nth-child(1) {
    animation-delay: -0.32s;
}

.loadingBox span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    40% {
        opacity: 1;
        transform: scale(1);
    }
}

.noData {
    font-size: 20px;
    color: rgba(0, 0, 0, 0.5);
}

/* 响应式设计 */
@media screen and (max-width: 767px) {
    .videolist2 {
        margin: 30px 15px;
        display: block;
        width: auto;
    }

    .videolist2 .item .thumbnail-overlay {
        height: 100%;
    }

    .videolist2 .item {
        min-width: 100%;
        width: 100%;
        border: solid 1px #ededed;
        margin: 0 0 10px 0;
        justify-content: center;
        display: flex;
        height: auto;
    }

    .videolist2 .item img {
        width: 50%;
        height: auto;
        object-fit: unset;
    }

    .videolist2 .item>div {
        padding: 10px;
        font-size: 14px;     
         width: 100%;  
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    
    .videolist2 .item .text {
        height: 100%;
        width: 100%;
        justify-content: center;
        display: flex;
        align-items: center;
    }

    .videoModalContent {
        width: 95%;
        max-width: none;
        padding: 15px;
    }

    #videoPlayer {
        max-height: 300px;
    }

    .videoInfo h3 {
        font-size: 16px;
    }

    .videoInfo p {
        font-size: 12px;
    }
}