.tsyt-feed {
    position: relative;
    box-sizing: border-box;
}

.tsyt-feed * {
    box-sizing: border-box;
}

.tsyt-track {
    display: grid;
    gap: 16px;
}

.tsyt-layout-grid .tsyt-track,
.tsyt-layout-list .tsyt-track {
    grid-template-columns: repeat(var(--tsyt-columns, 3), 1fr);
}

.tsyt-layout-list .tsyt-track {
    grid-template-columns: 1fr;
}

.tsyt-layout-list .tsyt-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tsyt-layout-list .tsyt-thumb {
    flex: 0 0 200px;
}

.tsyt-layout-carousel .tsyt-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 16px;
    padding-bottom: 4px;
}

.tsyt-layout-carousel .tsyt-item {
    flex: 0 0 calc((100% - (var(--tsyt-columns, 3) - 1) * 16px) / var(--tsyt-columns, 3));
    scroll-snap-align: start;
}

.tsyt-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tsyt-thumb {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
}

.tsyt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

.tsyt-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
}

.tsyt-play-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent #fff;
}

.tsyt-title {
    font-weight: 600;
    text-decoration: none;
    color: inherit;
}

.tsyt-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.tsyt-nav-prev {
    left: -8px;
}

.tsyt-nav-next {
    right: -8px;
}

.tsyt-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tsyt-modal[hidden] {
    display: none;
}

.tsyt-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.tsyt-modal-body {
    position: relative;
    z-index: 1;
    width: min(90vw, 960px);
    aspect-ratio: 16 / 9;
}

.tsyt-modal-player,
.tsyt-modal-player iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.tsyt-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: 0;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

.tsyt-branding {
    margin-top: 8px;
    font-size: 12px;
    text-align: right;
    opacity: 0.7;
}

.tsyt-branding a {
    color: inherit;
}

@media (max-width: 782px) {
    .tsyt-layout-grid .tsyt-track,
    .tsyt-layout-list .tsyt-track {
        grid-template-columns: 1fr;
    }

    .tsyt-layout-carousel .tsyt-track {
        gap: 12px;
    }

    .tsyt-layout-carousel .tsyt-item {
        flex: 0 0 calc(66.666% - 8px);
    }
}
