.video-category-item{
    padding:6px;
    border-radius: 20px;
    border:1px solid gray;
    font-size: 17rem;
}

.video-header{
    margin:20px;
}

.search-ipt-wrap{
    padding: 2px 20px 2px 10px;
    height: 40px;
    background-color: white;
    border-radius: 35px;
    overflow: hidden;
    width: 290px;
    align-self: center;
    border: 1px solid gray;
}
.search-ipt-wrap input{
    border: none;
    height: 80%;
    font-size: 17rem;
}
.search-ipt-wrap input:focus,.search-ipt-wrap input:active,.search-ipt-wrap input:focus-visible{
    border:none;
    outline: none;
}

.search-btn{
    border: none;
    background: none;
}

.video-item-wrap{
    width: calc(50% - 10px);
    border-radius: 10px;
    overflow: hidden;
    min-width: 0;
}

.video-item-left {
    text-align: center;
    background-color: black;
    width: 320px;
    flex-shrink: 0;
    height: auto;
    overflow: hidden;
}

/* Prevent image distortion in row-direction layout */
.video-item-left img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    display: block;
}

.video-item-title{
    font-weight: bold;
    font-size: 19rem;
}
.video-content{
    margin-top: 20px;
    font-size: 17rem;
    color:#656565;
}
.video-item-left video{
    max-width: 100%;
    vertical-align:middle;
}
.video-item-right{
    padding:20px;
    position: relative;
    background-color: rgb(236,236,236);
    overflow: hidden;
    color:#656565;
    min-width: 0;
}
.video-item-right a{
    text-decoration: none;
    color: #656565;
}
.video-item-right a:hover{
    color:black;
}
.video-item-share{
    position: absolute;
    right: 20px;
    bottom: 20px;
}
.video-category a{
    color:#656565;
    text-decoration: none;
    min-width: 130px;
    text-align: center;
}
.video-category a.active{
    color:white;
    background-color: gray;
}

/* ── Video thumbnail card ── */
.video-item-left {
    cursor: pointer;
}
.video-thumb-auto {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #111;
    position: relative;
}
.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.25);
    transition: background 0.2s;
}
.video-item-left:hover .video-play-overlay {
    background: rgba(0,0,0,0.45);
}
.video-play-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    color: #222;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    transition: transform 0.15s;
}
.video-item-left:hover .video-play-icon {
    transform: scale(1.1);
}

/* Modal overlay */
.video-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.92);
    align-items: center;
    justify-content: center;
}
.video-modal-overlay.active {
    display: flex;
}
body.modal-open {
    overflow: hidden;
}

/* Modal box - PC: full viewport */
.video-modal-box {
    position: relative;
    width: 100vw;
    height: 100vh;
    max-width: none;
    background: #000;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Modal header */
.video-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #1a1a1a;
    flex-shrink: 0;
    height: 48px;
    box-sizing: border-box;
}
.video-modal-title {
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 50px);
}
.video-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: none;
    background: #c0392b;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}
.video-modal-close:hover {
    background: #e74c3c;
}

/* Modal player - fill remaining height on PC */
.video-modal-player {
    flex: 1;
    position: relative;
    width: 100%;
    background: #000;
}
.video-modal-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Mobile: centered box with 16:9 ratio */
@media (max-width: 768px) {
    .video-modal-box {
        width: 100vw;
        height: auto;
        border-radius: 0;
    }
    .video-modal-player {
        flex: none;
        position: relative;
        padding-bottom: 56.25%;
        height: 0;
    }
    .video-modal-player iframe {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }
}
