/**
 * 유튜브 라이브 특강 스타일
 * 목록, 상세 페이지 디자인
 */

/* 공통 스타일 */
:root {
    --youtube-red: #ff0000;
    --youtube-black: #282828;
    --youtube-dark-gray: #606060;
    --youtube-light-gray: #e5e5e5;
    --youtube-hover-gray: #f2f2f2;
    --youtube-blue: #065fd4;
    --badge-dday: #065fd4;
    --badge-today: #2ba640;
    --badge-past: #606060;
}

.youtube-live-container {
    max-width: 1600px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.youtube-live-header {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.youtube-live-header h2 {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
    color: var(--youtube-black);
}

.section-subtitle {
    font-size: 16px;
    font-weight: 500;
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--youtube-light-gray);
}

/* 목록 페이지 그리드 */
.youtube-live-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.youtube-live-grid.columns-1 {
    grid-template-columns: 1fr;
}

.youtube-live-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.youtube-live-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.youtube-live-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
    .youtube-live-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .youtube-live-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .youtube-live-grid {
        grid-template-columns: 1fr !important;
    }
}

/* 비디오 아이템 스타일 */
.youtube-live-item {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
}


.youtube-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.youtube-thumbnail {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
    background-color: #000;
    border-radius: 8px;
}

.youtube-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.youtube-live-item:hover .youtube-thumbnail img {
    transform: scale(1.05);
}

.youtube-live-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.live-badge, .past-badge, .dday-badge {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.live-badge {
    background-color: var(--youtube-red);
    color: white;
}

.past-badge {
    background-color: var(--badge-past);
    color: white;
}

.dday-badge.upcoming {
    background-color: var(--badge-dday);
    color: white;
}

.dday-badge.today {
    background-color: var(--badge-today);
    color: white;
}

.dday-badge.past {
    background-color: var(--badge-past);
    color: white;
}

.youtube-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.youtube-play-button svg {
    width: 100%;
    height: 100%;
}

.youtube-play-button .play-button-bg {
    fill: rgba(0, 0, 0, 0.7);
}

.youtube-live-item:hover .youtube-play-button {
    opacity: 1;
}

.youtube-info {
    padding: 12px 0;
}

.youtube-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0 0 4px;
    color: var(--youtube-black);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.youtube-meta {
    font-size: 14px;
    color: var(--youtube-dark-gray);
}

.youtube-date {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}

.no-live-message {
    text-align: center;
    padding: 40px 0;
    color: var(--youtube-dark-gray);
}

/* 상세 페이지 스타일 */
.youtube-live-detail-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 100px 16px;
}

.youtube-live-detail-header {
    margin: 16px 0 24px;
}

.back-to-list {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--youtube-dark-gray);
    font-size: 14px;
    transition: color 0.2s ease;
}

.back-to-list:hover {
    color: var(--youtube-blue);
}

.youtube-live-detail-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 992px) {
    .youtube-live-detail-content {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    }
}

.youtube-live-player {
    width: 100%;
    margin-bottom: 20px;
}

.youtube-embed-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    border-radius: 8px;
}

.youtube-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.youtube-thumbnail-fallback {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
    background-color: #000;
    border-radius: 8px;
}

.youtube-thumbnail-fallback img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background-color: var(--youtube-black);
}

.youtube-live-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -1px;
    margin: 0 0 16px;
    line-height: 1.3;
    color: var(--youtube-black);
}

.youtube-live-meta {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--youtube-light-gray);
}

.youtube-live-datetime {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--youtube-dark-gray);
}

.youtube-live-status {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}

.youtube-live-status.upcoming {
    background-color: var(--badge-dday);
    color: white;
}

.youtube-live-status.past {
    background-color: var(--badge-past);
    color: white;
}

.youtube-live-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.youtube-watch-btn, .share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.youtube-watch-btn {
    background-color: var(--youtube-red);
    color: white;
    border: none;
}

.youtube-watch-btn:hover {
    background-color: #cc0000;
    color: white;
}

.share-btn {
    background-color: var(--youtube-hover-gray);
    color: var(--youtube-black);
    border: none;
}

.share-btn:hover {
    background-color: var(--youtube-light-gray);
}

.youtube-live-description {
    margin-top: 24px;
}

.youtube-live-description h3 {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 12px;
    color: var(--youtube-black);
}

.description-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--youtube-dark-gray);
    white-space: pre-line;
}

/* 배너 스타일 */
.youtube-live-banner {
    margin: 24px 0;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--youtube-hover-gray);
    transition: transform 0.2s ease;
}

.youtube-banner-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.youtube-banner-content {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .youtube-banner-content {
        flex-direction: row;
        align-items: center;
    }
}

.youtube-banner-thumbnail {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
    background-color: #000;
}

@media (min-width: 768px) {
    .youtube-banner-thumbnail {
        width: 320px;
        height: 180px;
        padding-bottom: 0;
        flex-shrink: 0;
    }
}

.youtube-banner-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.youtube-banner-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.banner-badge {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.banner-badge.live {
    background-color: var(--youtube-red);
    color: white;
}

.banner-badge.past {
    background-color: var(--badge-past);
    color: white;
}

.banner-badge.dday.upcoming {
    background-color: var(--badge-dday);
    color: white;
}

.banner-badge.dday.today {
    background-color: var(--badge-today);
    color: white;
}

.banner-badge.dday.past {
    background-color: var(--badge-past);
    color: white;
}

.youtube-banner-info {
    padding: 16px;
    flex-grow: 1;
}

.youtube-banner-title {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 8px;
    color: var(--youtube-black);
    line-height: 1.4;
}

.youtube-banner-meta {
    font-size: 14px;
    color: var(--youtube-dark-gray);
    margin-bottom: 16px;
}

.youtube-banner-action {
    margin-top: 16px;
}

.youtube-banner-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    background-color: var(--youtube-blue);
    color: white;
    transition: background-color 0.2s ease;
}

.youtube-banner-btn:hover {
    background-color: #0046a6;
}

/* youtube_live_single 스타일 */
.youtube-live-single {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f9f9f9;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .youtube-live-single {
        flex-direction: row;
    }
}

.youtube-single-thumbnail {
    position: relative;
    width: 100%;
}

@media (min-width: 768px) {
    .youtube-single-thumbnail {
        width: 280px;
        flex-shrink: 0;
    }
}

.youtube-single-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.youtube-single-info {
    padding: 16px;
    flex-grow: 1;
}

.youtube-single-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--youtube-dark-gray);
}

.youtube-single-datetime {
    display: flex;
    align-items: center;
}

.youtube-single-dday {
    font-weight: 500;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    background-color: var(--badge-dday);
}

.youtube-single-status.completed {
    font-weight: 500;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    background-color: var(--badge-past);
}

.youtube-single-title {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 8px;
    color: var(--youtube-black);
    line-height: 1.4;
}

.youtube-single-description {
    font-size: 14px;
    color: var(--youtube-dark-gray);
    margin-bottom: 16px;
    line-height: 1.5;
}

.youtube-single-button-container {
    margin-top: 16px;
}

.youtube-single-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    background-color: var(--youtube-red);
    color: white;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.youtube-single-btn:hover {
    background-color: #cc0000;
}

@media screen and (max-width: 768px) {
    .youtube-live-detail-container{
        padding: 50px 16px;
    }
    .youtube-live-container{
        padding: 15px;
    }
}

/* 페이지네이션 스타일 */
.youtube-live-pagination {
    margin: 30px 0;
    text-align: center;
}

.youtube-live-pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.youtube-live-pagination-nav .page-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background-color: #f5f5f5;
    transition: all 0.2s ease;
}

.youtube-live-pagination-nav .page-item:hover {
    background-color: #e0e0e0;
}

.youtube-live-pagination-nav .page-item.active {
    background-color: #ff0000;
    color: white;
}

.youtube-live-pagination-nav .first-page,
.youtube-live-pagination-nav .prev-page,
.youtube-live-pagination-nav .next-page,
.youtube-live-pagination-nav .last-page {
    padding: 0;
    width: 36px;
}

.youtube-live-pagination-nav svg {
    width: 18px;
    height: 18px;
}

/* 반응형 조정 */
@media (max-width: 576px) {
    .youtube-live-pagination-nav .page-item {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .youtube-live-pagination-nav .first-page,
    .youtube-live-pagination-nav .last-page {
        display: none; /* 모바일에서는 처음/마지막 버튼 숨김 */
    }
}