/**
 * Channel Page Styles
 * 채널별 포트폴리오 전용 페이지
 */

/* ============================================
   PAGE HEADER
   ============================================ */
.channel-page-header {
    padding: 100px 0 30px;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-secondary) 100%);
    text-align: center;
}

.channel-page-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: 10px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.channel-page-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    letter-spacing: 2px;
}

/* ============================================
   CHANNEL TABS NAVIGATION
   ============================================ */
.channel-tabs-wrapper {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-bg-tertiary);
    backdrop-filter: blur(20px);
}

.channel-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 12px 40px;
    max-width: 1600px;
    margin: 0 auto;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.channel-tabs::-webkit-scrollbar {
    display: none;
}

.channel-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: 1px solid var(--color-bg-tertiary);
    border-radius: 50px;
    color: var(--color-text-muted);
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
}

.channel-tab:hover {
    border-color: var(--color-accent);
    color: var(--color-text);
}

.channel-tab.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

.channel-tab-logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.channel-tab-logo-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
    color: white;
}

.channel-tab .video-count {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: inherit;
}

.channel-tab.active .video-count {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   CHANNEL SECTIONS
   ============================================ */
.channel-sections {
    min-height: 100vh;
}

.channel-section {
    padding: 30px 0 50px;
    border-bottom: 1px solid var(--color-bg-tertiary);
    scroll-margin-top: 60px;
}

.channel-section:nth-child(even) {
    background: var(--color-bg-secondary);
}

.channel-section-header {
    max-width: 1600px;
    margin: 0 auto 15px;
    padding: 0 40px;
}

.channel-section-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.channel-section-info {
    flex: 1;
}

.channel-section-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-bg-tertiary);
    flex-shrink: 0;
}

.channel-section-logo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
}

.channel-section-name {
    font-family: 'Racer', 'Noto Sans KR', sans-serif;
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    font-weight: 100;
    letter-spacing: -2px;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-stroke: 0;
}

.channel-section-desc {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 10px;
}

.channel-section-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.channel-tag {
    padding: 6px 14px;
    background: var(--color-bg-tertiary);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--color-accent);
    letter-spacing: 1px;
}

.channel-section-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.channel-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--color-bg-tertiary);
    border-radius: 8px;
}

.channel-stat-number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-accent);
}

.channel-stat-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    letter-spacing: 1px;
}

/* ============================================
   VIDEO SLIDER
   ============================================ */
.channel-videos-slider {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
}

.channel-swiper {
    overflow: hidden !important;
}

.channel-videos-slider {
    overflow: hidden;
}

.channel-swiper .swiper-wrapper {
    padding: 10px 0;
}

.channel-video-slide {
    transition: transform 0.4s ease;
}

.channel-video-card {
    display: block;
    background: var(--color-bg);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.channel-video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.channel-video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--color-bg-tertiary);
}

.channel-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.channel-video-card:hover .channel-video-thumbnail img {
    transform: scale(1.1);
}

.channel-video-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-bg-tertiary), var(--color-bg));
    color: var(--color-text-muted);
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.channel-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 60px;
    height: 60px;
    background: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.channel-video-card:hover .channel-video-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.channel-video-play svg {
    width: 24px;
    height: 24px;
    margin-left: 4px;
    fill: white;
}

.channel-video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    font-size: 0.75rem;
    color: white;
    font-weight: 500;
}

.channel-video-info {
    padding: 20px;
}

.channel-video-title {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.channel-video-card:hover .channel-video-title {
    color: var(--color-accent);
}

.channel-video-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.channel-video-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.channel-video-views {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Swiper Navigation */
.channel-slider-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.channel-swiper-button {
    width: 50px;
    height: 50px;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.channel-swiper-button:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.channel-swiper-button svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-text);
}

.channel-swiper-button.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.channel-swiper-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.channel-swiper-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: var(--color-bg-tertiary);
    border-radius: 50%;
    opacity: 1;
    transition: all 0.3s ease;
}

.channel-swiper-pagination .swiper-pagination-bullet-active {
    background: var(--color-accent);
    transform: scale(1.3);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.channel-empty-state {
    text-align: center;
    padding: 60px 40px;
    color: var(--color-text-muted);
}

.channel-empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    stroke: var(--color-bg-tertiary);
}

.channel-empty-state p {
    font-size: 1rem;
    letter-spacing: 1px;
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-accent);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 77, 77, 0.4);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

/* ============================================
   FOOTER
   ============================================ */
.channel-footer {
    padding: 60px 0;
    background: var(--color-bg);
    border-top: 1px solid var(--color-bg-tertiary);
}

.channel-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-back-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.footer-back-link:hover {
    color: var(--color-accent);
}

.footer-back-link svg {
    width: 20px;
    height: 20px;
}

.footer-copyright {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    letter-spacing: 1px;
}

/* ============================================
   GROUP CHANNEL STYLES
   ============================================ */

/* 그룹 채널 섹션 */
.channel-section.is-group-channel {
    background: linear-gradient(180deg,
        rgba(255, 77, 77, 0.03) 0%,
        transparent 50%
    );
}

.channel-section.is-group-channel .channel-section-header {
    border-left: 3px solid var(--color-accent);
    padding-left: 25px;
}

/* 그룹 뱃지 */
.channel-group-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--color-accent);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    color: white;
    letter-spacing: 1px;
    margin-left: 15px;
    vertical-align: middle;
}

/* 그룹 설명 */
.group-description {
    max-width: 800px;
    margin: 20px 0;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-muted);
}

/* 하위 채널 섹션 */
.group-subchannels {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.group-subchannels-title {
    font-size: 0.85rem;
    color: var(--color-accent);
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-weight: 500;
}

.group-subchannels-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.group-subchannel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.group-subchannel-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.subchannel-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
}

.subchannel-subs {
    font-size: 0.8rem;
    color: var(--color-accent);
    padding: 2px 8px;
    background: rgba(255, 77, 77, 0.15);
    border-radius: 10px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .channel-swiper {
        overflow: hidden !important;
    }
}

@media (max-width: 992px) {
    .channel-page-header {
        padding: 120px 0 40px;
    }

    .channel-tabs {
        justify-content: flex-start;
        padding: 15px 20px;
    }

    .channel-section {
        padding: 60px 0 80px;
    }

    .channel-section-header {
        padding: 0 20px;
    }

    .channel-section-top {
        flex-direction: column;
    }

    .channel-section-stats {
        flex-direction: row;
        align-items: center;
    }

    .channel-videos-slider {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .channel-page-title {
        letter-spacing: 5px;
    }

    .channel-tab {
        padding: 10px 16px;
        font-size: 0.8rem;
    }

    .channel-section-logo,
    .channel-section-logo-placeholder {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .channel-section-name {
        letter-spacing: 0;
    }

    .channel-slider-nav {
        gap: 15px;
    }

    .channel-swiper-button {
        width: 40px;
        height: 40px;
    }

    .channel-swiper-button svg {
        width: 16px;
        height: 16px;
    }

    .channel-footer .container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .channel-video-info {
        padding: 15px;
    }

    .channel-video-title {
        font-size: 0.9rem;
    }

    .channel-section-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
}
