/* ========================================
   YouTube 스타일 특수 컴포넌트
   ======================================== */

/* 이미지 슬라이드 */
.image-slide-container,
.video-slide-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--yt-radius-md);
    background-color: var(--yt-darker-bg);
}

/* 슬라이드 헤더 */
.slide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1rem;
    border-bottom: 1px solid var(--yt-border);
}

.slide-header h3 {
    font-size: 15px;
    font-weight: 500;
    color: #D0D0D0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.slide-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.slide-controls span {
    font-size: 12px;
    color: #B0B0B0;
}

.slide-btn {
    background: var(--yt-hover-bg);
    color: #D0D0D0;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--yt-transition);
}

.slide-btn:hover {
    background: var(--yt-border);
    color: #E0E0E0;
}

/* 슬라이더 컨테이너 */
.image-slider,
.video-slider {
    position: relative;
    overflow: hidden;
    padding: 1rem;
}

.slide-wrapper {
    display: flex;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-item {
    flex-shrink: 0;
    width: 100%;
}

.slide-item img,
.slide-item video {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    background-color: var(--yt-black);
    display: block;
}

/* 슬라이드 도트 컨트롤 */
.slide-dots {
    position: absolute;
    bottom: var(--yt-spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--yt-spacing-sm);
    z-index: 10;
}

.slide-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--yt-transition);
}

.slide-dot.active {
    background-color: var(--yt-white);
    width: 24px;
    border-radius: var(--yt-radius-full);
}

.slide-prev,
.slide-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--yt-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--yt-transition);
    z-index: 10;
}

.slide-prev:hover,
.slide-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.slide-prev {
    left: var(--yt-spacing-md);
}

.slide-next {
    right: var(--yt-spacing-md);
}

/* 비디오 플레이어 */
.video-player-wrapper {
    position: relative;
    width: 100%;
    background-color: var(--yt-black);
    border-radius: var(--yt-radius-md);
    overflow: hidden;
}

.video-player {
    width: 100%;
    height: auto;
    max-height: 720px;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--yt-transition);
}

.video-player-wrapper:hover .video-overlay {
    opacity: 1;
}

.play-btn {
    width: 80px;
    height: 80px;
    background-color: var(--yt-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--yt-white);
    font-size: 32px;
    cursor: pointer;
    transition: var(--yt-transition);
}

.play-btn:hover {
    background-color: var(--yt-red-hover);
    transform: scale(1.1);
}

/* 비디오 상세 정보 */
.video-view-container,
.image-view-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--yt-spacing-xl);
}

.video-header,
.image-header {
    margin-bottom: var(--yt-spacing-lg);
}

.video-title h1,
.image-title h1 {
    font-size: 20px;
    font-weight: 500;
    color: var(--yt-text-primary);
    line-height: 1.4;
    margin-bottom: var(--yt-spacing-md);
}

.video-stats,
.image-stats {
    display: flex;
    align-items: center;
    gap: var(--yt-spacing-lg);
    font-size: 14px;
    color: var(--yt-text-secondary);
}

/* 비디오 설명 */
.video-description,
.image-description {
    background-color: var(--yt-card-bg);
    border-radius: var(--yt-radius-md);
    padding: var(--yt-spacing-lg);
    margin-top: var(--yt-spacing-lg);
}

.description-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--yt-spacing-md);
}

.description-stats {
    font-size: 12px;
    color: var(--yt-text-secondary);
    display: flex;
    gap: var(--yt-spacing-md);
}

.description-text {
    font-size: 14px;
    color: var(--yt-text-primary);
    line-height: 1.6;
    white-space: pre-line;
}

.description-expand {
    margin-top: var(--yt-spacing-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--yt-text-secondary);
    cursor: pointer;
}

.description-expand:hover {
    color: var(--yt-text-primary);
}

/* 파일 목록 */
.video-files,
.image-files {
    background-color: var(--yt-card-bg);
    border-radius: var(--yt-radius-md);
    padding: var(--yt-spacing-lg);
    margin-top: var(--yt-spacing-lg);
}

.files-header {
    font-size: 16px;
    font-weight: 500;
    color: var(--yt-text-primary);
    margin-bottom: var(--yt-spacing-md);
    display: flex;
    align-items: center;
    gap: var(--yt-spacing-sm);
}

.file-item {
    display: flex;
    align-items: center;
    gap: var(--yt-spacing-md);
    padding: var(--yt-spacing-md);
    background-color: var(--yt-hover-bg);
    border-radius: var(--yt-radius-sm);
    margin-bottom: var(--yt-spacing-sm);
    transition: var(--yt-transition);
}

.file-item:hover {
    background-color: var(--yt-border);
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-icon {
    font-size: 20px;
    color: var(--yt-text-secondary);
}

.file-link {
    flex: 1;
    color: var(--yt-blue);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-link:hover {
    text-decoration: underline;
}

.file-size {
    font-size: 12px;
    color: var(--yt-text-secondary);
}

/* 댓글 섹션 (확장 가능) */
.comments-section {
    margin-top: var(--yt-spacing-2xl);
}

.comments-header {
    font-size: 16px;
    font-weight: 500;
    color: var(--yt-text-primary);
    margin-bottom: var(--yt-spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--yt-spacing-sm);
}

.comment-input {
    display: flex;
    gap: var(--yt-spacing-md);
    margin-bottom: var(--yt-spacing-xl);
}

.comment-input textarea {
    flex: 1;
    min-height: 40px;
    max-height: 200px;
    padding: var(--yt-spacing-md);
    background-color: var(--yt-card-bg);
    color: var(--yt-text-primary);
    border: 1px solid var(--yt-border);
    border-radius: var(--yt-radius-sm);
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
}

.comment-input textarea:focus {
    outline: none;
    border-color: var(--yt-blue);
}

/* 액션 버튼 그룹 */
.action-buttons,
.navigation-buttons {
    display: flex;
    gap: var(--yt-spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--yt-spacing-xl);
}

/* 통계 카드 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--yt-spacing-md);
    margin-bottom: var(--yt-spacing-xl);
}

.stat-item {
    background-color: var(--yt-card-bg);
    border: 1px solid var(--yt-border);
    border-radius: var(--yt-radius-md);
    padding: var(--yt-spacing-lg);
    text-align: center;
    transition: var(--yt-transition);
}

.stat-item:hover {
    background-color: var(--yt-hover-bg);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 32px;
    color: var(--yt-red);
    margin-bottom: var(--yt-spacing-sm);
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--yt-text-primary);
    margin-bottom: var(--yt-spacing-xs);
}

.stat-label {
    font-size: 12px;
    color: var(--yt-text-secondary);
}

/* 가족 구성원 카드 */
.family-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--yt-spacing-md);
}

.family-member-card {
    background-color: var(--yt-card-bg);
    border: 1px solid var(--yt-border);
    border-radius: var(--yt-radius-md);
    padding: var(--yt-spacing-lg);
    transition: var(--yt-transition);
}

.family-member-card:hover {
    background-color: var(--yt-hover-bg);
    border-color: var(--yt-divider);
}

.member-info {
    display: flex;
    align-items: center;
    gap: var(--yt-spacing-md);
    margin-bottom: var(--yt-spacing-md);
}

.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--yt-hover-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--yt-red);
}

.member-details {
    flex: 1;
}

.member-details h4 {
    font-size: 14px;
    font-weight: 500;
    color: var(--yt-text-primary);
    margin-bottom: var(--yt-spacing-xs);
}

.member-id {
    font-size: 12px;
    color: var(--yt-text-secondary);
}

.member-class {
    display: inline-block;
    padding: 2px 8px;
    background-color: var(--yt-hover-bg);
    color: var(--yt-text-secondary);
    border-radius: var(--yt-radius-full);
    font-size: 11px;
    font-weight: 500;
    margin-top: var(--yt-spacing-xs);
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .slide-prev,
    .slide-next {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .play-btn {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .video-title h1,
    .image-title h1 {
        font-size: 16px;
    }
    
    .video-stats,
    .image-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--yt-spacing-sm);
    }
    
    .action-buttons,
    .navigation-buttons {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .family-members-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .video-description,
    .image-description,
    .video-files,
    .image-files {
        padding: var(--yt-spacing-md);
    }
}

