﻿* {
    box-sizing: border-box;
    font-family: "Segoe UI", "Microsoft JhengHei", Arial, sans-serif;
}

body {
    margin: 0;
    background: #f6f7fb;
}

/* Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 24px;
}


/* 卡片 */
.video-card {
    background: #fff;
    border: 1px solid #bfc6dd;
    border-radius: 8px;
    margin: 12px;
    position: relative;
}

    .video-card::after {
        content: "";
        position: absolute;
        top: -12px;
        bottom: -12px;
        right: -12px;
        border-right: 1px dashed #ac771a;
    }

    .video-card::before {
        content: "";
        position: absolute;
        left: -12px;
        right: -12px;
        bottom: -12px;
        border-bottom: 1px dashed #ac771a;
    }

    .video-card:nth-child(4n)::after {
        display: none;
    }

    .video-card:nth-last-child(-n + 4)::before {
        display: none;
    }




/* Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    font-size: 13px;
    color: #6b7aa8;
    border-bottom: 1px solid #e1e5f2;
}

    .card-header .icons {
        display: flex;
        gap: 6px;
    }

    .card-header .icon {
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #d7dbea;
        font-size: 11px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

/* Thumbnail */
.thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

    .thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* 播放鍵 */
.play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .play-btn::before {
        content: "";
        width: 48px;
        height: 48px;
        background: #ff0033;
        border-radius: 50%;
    }

    .play-btn::after {
        content: "";
        position: absolute;
        border-style: solid;
        border-width: 10px 0 10px 16px;
        border-color: transparent transparent transparent white;
        margin-left: 4px;
    }

/* Footer */
.card-footer {
    padding: 8px 10px;
    font-size: 14px;
    color: #333;
}

/* RWD */
@media (max-width: 1200px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .video-card:nth-child(3n)::after {
        display: none;
    }

    .video-card:nth-last-child(-n + 3)::before {
        display: none;
    }
}

@media (max-width: 800px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .video-card:nth-child(2n)::after {
        display: none;
    }

    .video-card:nth-last-child(-n + 2)::before {
        display: none;
    }

    .video-grid {
        display: block;
    }
    .video-card::before {
        border-bottom: 0px dashed #ac771a;
    }
    .video-card::after {
        border-right: 0px dashed #ac771a;
    }
}



/* YouTube Modal */
.yt-play {
    display: none;
}

.yt-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.yt-play.show {
    display: grid;
    place-items: center;
}

.yt-modal-content {
    position: relative;
    width: 80%;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    background: #000;
}

.yt-modal iframe {
    width: 100%;
    height: 100%;
}

.yt-close {
    position: absolute;
    top: -36px;
    right: 0;
    font-size: 32px;
    color: #fff;
    cursor: pointer;
}


 .video_ajax_search {
    display: table-cell;
    width: 100%;
}

.video-ajaxsearchform {
    /*border: 3px solid;*/
    margin-bottom: 0px;
    position: relative;
    display: table;
    border: #bb8f82 1px solid;
    border-radius: 8px;
    width: 200px;
}

.video-ajaxsearchform-container form > div {
    display: table-row;
    position: relative;
}

#video-searchsubmit {
    display: block;
    position: absolute;
    right: 0;
    top: -1px;
    border: 0;
    padding: 0;
    width: 43px;
    height: 24px;
    background: transparent;
    text-indent: 100%;
    overflow: hidden;
    white-space: nowrap;
    border-radius: 0px 5px 5px 0px;
}


.video-searchfield input#yith-s {
    padding-right: 0;
    border-style: none;
}

.video-search form #s, .video-search form #yith-s {
    font-size: 12px;
    font-family: "微軟正黑體",Arial;
    color: #6d6c6c;
    font-style: normal;
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
    border: 0;
    width: 100%;
    padding: 6px 56px 6px 0px;
    padding-right: 56px;
    padding-right: 56px;
    margin-bottom: 0;
}


.video-searchfield::after {
    content: "\f002";
    display: block;
    position: absolute;
    z-index: 1;
    right: 13px;
    top: 50%;
    margin-top: -8px;
    pointer-events: none;
    font-style: normal;
    font-family: 'Font Awesome 5 Free';
    font-weight: 600;
    font-size: 15px;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.crumb .breadcrumb {
    padding: 0px 0px 5px 20px;
}