/* ===== YouTube Latest 스킨 ===== */

.yt-latest-wrap {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,.1);
    margin-bottom: 1rem;
}

/* 헤더 */
.yt-latest-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 2px solid #ff0000;
}
.yt-latest-title {
    font-weight: bold;
    color: #1a1a1a;
    text-decoration: none;
}
.yt-latest-title:hover { color: #ff0000; }
.yt-latest-more {
    font-size: .8em;
    color: #888;
    text-decoration: none;
}
.yt-latest-more:hover { color: #ff0000; }

/* 그리드: 기본 4열, 반응형 축소 */
.yt-latest-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

/* 카드 */
.yt-latest-item {
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}
.yt-latest-item:last-child { border-right: none; }

/* 썸네일 (16:9) */
.yt-latest-thumb-wrap {
    display: block;
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    overflow: hidden;
    background: #111;
}
.yt-latest-thumb {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: opacity .2s;
}
.yt-latest-item:hover .yt-latest-thumb { opacity: .8; }

/* 재생 버튼 오버레이 */
.yt-latest-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.2rem;
    color: rgba(255,255,255,.85);
    pointer-events: none;
    transition: color .2s, transform .2s;
}
.yt-latest-item:hover .yt-latest-play {
    color: #ff0000;
    transform: translate(-50%, -50%) scale(1.1);
}

/* 제목/날짜 */
.yt-latest-info {
    padding: 7px 9px 9px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.yt-latest-subject {
    color: #222;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.yt-latest-subject:hover { color: #ff0000; }
.yt-latest-date {
    font-size: .8em;
    color: #aaa;
}

/* 반응형 */
@media (max-width: 991px) {
    .yt-latest-grid { grid-template-columns: repeat(2, 1fr); }
    .yt-latest-item:nth-child(2n) { border-right: none; }
}
@media (max-width: 575px) {
    .yt-latest-grid { grid-template-columns: repeat(2, 1fr); }
    .yt-latest-play { font-size: 1.8rem; }
}

/* 다크모드 */
@media (prefers-color-scheme: dark) {
    .yt-latest-wrap { background: #1e1e1e; }
    .yt-latest-title { color: #eee; }
    .yt-latest-item { border-color: #333; }
    .yt-latest-subject { color: #ddd; }
}
