@charset "UTF-8";

/* [Variables] */
:root {
    --bg-dark: #0b0e12;
    --bg-card: #191f28;
    --point-color: #FF5F00;
    --text-main: #ffffff;
    --text-sub: #8B95A1;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* [Layout] */
body.dark-theme {
    background-color: var(--bg-dark);
    color: var(--text-main);
    margin: 0;
    word-break: keep-all;
}

.inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* [Header Section] */
.works-header {
    padding: clamp(80px, 10vh, 140px) 0 60px;
    text-align: center;
}

.works-header .badge {
    color: var(--point-color);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2px;
    display: inline-block;
    margin-bottom: 15px;
    padding: 4px 12px;
    background: rgba(255, 95, 0, 0.1);
    border-radius: 4px;
}

.works-header h2 {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 800;
    margin: 0 0 20px 0;
}

.works-header h2 strong { color: var(--point-color); }
.works-header p { color: var(--text-sub); font-size: clamp(16px, 2vw, 19px); margin: 0; }

/* [Filter Bar] */
.list-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sort-buttons { display: flex; gap: 8px; }
.sort-buttons a {
    color: var(--text-sub);
    font-size: 14px;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 50px;
    background: rgba(255,255,255,0.05);
    transition: var(--transition);
}

.sort-buttons a.active, .sort-buttons a:hover {
    background: var(--point-color);
    color: #fff;
}

/* [Youtube Grid] */
.yt-grid-container {
    display: grid;
    /* 기본 4열 배치 */
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.yt-card-item {
    background: var(--bg-card);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.yt-card-item:hover {
    transform: translateY(-12px);
    border-color: var(--point-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

/* 썸네일 영역 */
.yt-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* 비율 고정 */
    overflow: hidden;
}

.yt-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.yt-card-item:hover .yt-thumb-wrap img { transform: scale(1.08); }

/* 카드 본문 */
.yt-card-body {
    padding: 24px;
    flex-grow: 1;
}

.channel-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.p-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #000;
    flex-shrink: 0;
}

.p-text h6 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.p-text .follower { font-size: 13px; color: var(--text-sub); }

.yt-stats-row {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.stat { font-size: 13px; color: var(--text-sub); display: flex; align-items: center; gap: 6px; }
.stat i { color: var(--point-color); font-size: 14px; }

/* [Paging] */
.pagination-wrap {
    margin-top: 60px;
    padding-bottom: 100px;
    text-align: center;
}

/* ==================================================
   [Responsive - 반응형 핵심]
   ================================================== */

/* 데스크탑 (1200px 미만) - 3열 */
@media screen and (max-width: 1200px) {
    .yt-grid-container { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

/* 태블릿 (992px 미만) - 2열 */
@media screen and (max-width: 992px) {
    .yt-grid-container { grid-template-columns: repeat(2, 1fr); }
    .works-header { padding-top: 80px; }
}

/* 모바일 (640px 미만) - 1열 (시원하게 배치) */
@media screen and (max-width: 640px) {
    .yt-grid-container { grid-template-columns: 1fr; }
    .list-filter { flex-direction: column; align-items: flex-start; gap: 20px; }
    .sort-buttons { width: 100%; overflow-x: auto; padding-bottom: 5px; }
    .sort-buttons a { white-space: nowrap; flex: 1; text-align: center; }
    
    .yt-card-body { padding: 20px; }
    .p-img { width: 40px; height: 40px; }
}