/* ========================================
   Portfolio 페이지 전용 스타일
   ======================================== */

/* 치지직 썸네일 스타일 */
.chzzk-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.chzzk-thumbnail:hover {
    transform: scale(1.02);
}

.thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 199, 60, 0.8), rgba(0, 184, 49, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chzzk-thumbnail:hover .thumbnail-overlay {
    opacity: 1;
}

.chzzk-logo {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.chzzk-center-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.chzzk-logo-img {
    width: 80px;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    animation: pulse 2s infinite;
}

.thumbnail-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}

/* ========================================
   포트폴리오 탭 시스템
   ======================================== */
.portfolio-tabs {
    margin-bottom: 0;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-md);
}

.tab-btn.active {
    background: var(--primary-color);
    color: var(--text-white);
}

.tab-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.tab-btn.active:hover::before {
    left: 100%;
}

/* 탭 콘텐츠 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   기업 포트폴리오 Coming Soon 스타일
   ======================================== */
.coming-soon {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.coming-soon-content {
    max-width: 600px;
    padding: 3rem 2rem;
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--bg-gray);
}

.coming-soon-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.coming-soon h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.coming-soon p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.business-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--gradient-warm);
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-3px);
}

.feature-icon {
    font-size: 1.5rem;
}

.feature-item span:last-child {
    font-weight: 500;
    color: var(--text-primary);
}

/* YouTube 채널 카드 */
.youtube-channel-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-2xl);
    background: linear-gradient(135deg, var(--color-youtube) 0%, #cc0000 100%);
    border-radius: var(--border-radius);
    color: var(--text-white);
    margin-bottom: var(--spacing-3xl);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.15); /* YouTube red glow */
}

.channel-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.channel-icon {
    font-size: 4rem;
    opacity: 0.9;
}

.channel-details h2 {
    font-size: var(--font-2xl);
    margin-bottom: var(--spacing-sm);
}

.channel-details p {
    font-size: var(--font-base);
    opacity: 0.9;
}

.youtube-channel-card .btn {
    background: var(--text-white);
    color: var(--color-youtube);
    font-weight: 700;
    border: 2px solid var(--text-white);
}

.youtube-channel-card .btn:hover {
    background: transparent;
    color: var(--text-white);
    border-color: var(--text-white);
}

/* 비디오 그리드 */
.video-grid {
    display: grid;
    gap: var(--spacing-2xl);
    margin-top: var(--spacing-2xl);
}

.longform-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
}

.shorts-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.broadcast-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

/* 비디오 카드 */
.video-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.video-card.featured {
    border: 3px solid var(--primary-color);
}

/* 비디오 래퍼 */
.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 비율 */
    overflow: hidden;
}

.shorts-wrapper {
    padding-bottom: 177.78%; /* 9:16 비율 */
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 비디오 정보 */
.video-info {
    padding: var(--spacing-xl);
}

.video-info h3 {
    font-size: var(--font-xl);
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    line-height: 1.4;
}

.video-info h4 {
    font-size: var(--font-lg);
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.video-info p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.video-desc {
    font-style: italic;
    font-size: var(--font-sm);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

/* 비디오 태그 */
.video-tags {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
}

.tag {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(255, 136, 0, 0.1);
    color: var(--primary-color);
    border-radius: var(--border-radius-full);
    font-size: var(--font-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 방송 정보 */
.broadcast-info {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.platform {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--secondary-color);
    color: var(--text-white);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-xs);
    font-weight: 600;
}

.streamer {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--bg-light);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-xs);
    font-weight: 500;
}

/* 방송 알림 */
.broadcast-notice {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-2xl);
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1), rgba(255, 136, 0, 0.1));
    border-radius: var(--border-radius);
    border: 2px solid rgba(255, 0, 0, 0.2);
    margin-bottom: var(--spacing-2xl);
}

.notice-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.notice-content h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-xl);
}

.notice-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 기술 특징 */
.tech-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-2xl);
    margin-top: var(--spacing-2xl);
}

.tech-feature {
    text-align: center;
    padding: var(--spacing-2xl);
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.tech-feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.tech-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-lg);
}

.tech-feature h3 {
    font-size: var(--font-xl);
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.tech-feature p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CTA 섹션 */
.cta-section {
    background: var(--gradient-warm);
    padding: var(--spacing-3xl) 0;
}

.cta-section h2 {
    font-size: var(--font-4xl);
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.cta-section p {
    font-size: var(--font-xl);
    margin-bottom: var(--spacing-2xl);
    color: var(--text-secondary);
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.cta-section .btn-outline {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.cta-section .btn-outline:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

/* 로딩 상태 */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-secondary);
    font-size: var(--font-lg);
    z-index: 1;
}

.video-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-light);
    z-index: 0;
    transition: opacity 0.3s ease;
}

.video-wrapper.loaded::before {
    opacity: 0;
    pointer-events: none;
}

/* 비디오 카운터 */
.video-counter {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: rgba(0, 0, 0, 0.8);
    color: var(--text-white);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-xs);
    font-weight: 600;
}

/* 반응형 디자인 */
@media (min-width: 769px) and (max-width: 1024px) {
    .longform-grid { grid-template-columns: repeat(2, 1fr); }
    .shorts-grid { grid-template-columns: repeat(2, 1fr); }
    .tech-features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .youtube-channel-card {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-lg);
    }
    
    .channel-info {
        flex-direction: column;
        text-align: center;
    }
    
    .channel-icon {
        font-size: 3rem;
    }
    
    .shorts-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .broadcast-grid {
        grid-template-columns: 1fr;
    }
    
    .broadcast-notice {
        flex-direction: column;
        text-align: center;
    }
    
    .tech-features {
        grid-template-columns: 1fr;
    }
    
    .video-info {
        padding: var(--spacing-lg);
    }
    
    .video-info h3 {
        font-size: var(--font-lg);
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .youtube-channel-card {
        padding: var(--spacing-lg);
        margin: 0 var(--spacing-md) var(--spacing-2xl);
    }
    
    .channel-details h2 {
        font-size: var(--font-xl);
    }
    
    .shorts-grid {
        grid-template-columns: 1fr;
    }
    
    .video-card {
        margin: 0 var(--spacing-sm);
    }
    
    .video-tags {
        gap: var(--spacing-xs);
    }
    
    .tag {
        font-size: var(--font-xxs);
        padding: var(--spacing-xxs) var(--spacing-sm);
    }
    
    .broadcast-info {
        flex-direction: column;
        gap: var(--spacing-xs);
        align-items: flex-start;
    }
    
    .tech-feature {
        padding: var(--spacing-xl);
    }
    
    .tech-icon {
        font-size: 2.5rem;
    }
    
    /* 탭 시스템 모바일 반응형 */
    .tab-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .tab-btn {
        width: 200px;
        text-align: center;
    }
    
    .business-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .coming-soon-content {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }
    
    .coming-soon-icon {
        font-size: 3rem;
    }
}

/* ========================================
   기업 프로젝트 스타일
   ======================================== */
.corporate-project-showcase {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: var(--spacing-2xl);
}

.project-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: var(--spacing-2xl);
    color: var(--text-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.project-logo h3 {
    font-size: var(--font-2xl);
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.project-logo p {
    font-size: var(--font-base);
    opacity: 0.9;
}

.project-tags {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.project-tags .tag {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
}

.project-section {
    padding: var(--spacing-2xl);
    border-bottom: 1px solid var(--border-color);
}

.project-section:last-child {
    border-bottom: none;
}

.project-section h4 {
    font-size: var(--font-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    position: relative;
    padding-left: var(--spacing-lg);
}

.project-section h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* 기업 프로젝트 비디오 그리드 */
.corporate-longform {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    max-width: 800px;
    margin: 0 auto;
}

.corporate-shorts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    max-width: 600px;
    margin: 0 auto;
}

.corporate-live {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
    gap: var(--spacing-xl);
}

/* 기업 프로젝트 반응형 */
@media (max-width: 768px) {
    .project-header {
        flex-direction: column;
        text-align: center;
    }
    
    .project-section {
        padding: var(--spacing-xl);
    }
    
    .corporate-shorts {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .corporate-live {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .project-header {
        padding: var(--spacing-xl);
    }
    
    .project-logo h3 {
        font-size: var(--font-xl);
    }
    
    .project-section {
        padding: var(--spacing-lg);
    }
    
    .project-section h4 {
        font-size: var(--font-lg);
    }
    
    .corporate-shorts {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   다크모드
   ======================================== */
[data-theme="dark"] .page-header {
    background: var(--dark-header-gradient);
}

[data-theme="dark"] .tab-btn {
    color: var(--dark-text-secondary);
    border-color: var(--glass-border);
}

[data-theme="dark"] .tab-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

[data-theme="dark"] .tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

[data-theme="dark"] .video-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .video-card:hover {
    border-color: rgba(255, 136, 0, 0.3);
    box-shadow: 0 8px 32px rgba(255, 136, 0, 0.1);
}

[data-theme="dark"] .video-info {
    color: var(--dark-text-secondary);
}

[data-theme="dark"] .video-info h3 {
    color: var(--dark-text-primary);
}

[data-theme="dark"] .video-info p {
    color: var(--dark-text-tertiary);
}

[data-theme="dark"] .coming-soon-content {
    background: var(--dark-surface);
    border-color: var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .coming-soon h3 {
    color: var(--dark-text-primary);
}

[data-theme="dark"] .coming-soon p {
    color: var(--dark-text-tertiary);
}

[data-theme="dark"] .feature-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
}

[data-theme="dark"] .feature-item span:last-child {
    color: var(--dark-text-secondary);
}

[data-theme="dark"] .corporate-project-showcase {
    background: var(--dark-surface);
    border: 1px solid var(--glass-border);
}

[data-theme="dark"] .project-header {
    background: linear-gradient(135deg, rgba(255, 136, 0, 0.15), rgba(255, 102, 0, 0.1));
}

[data-theme="dark"] .project-logo h3 {
    color: var(--dark-text-primary);
}

[data-theme="dark"] .project-logo p {
    color: var(--dark-text-tertiary);
}

[data-theme="dark"] .project-tags .tag {
    background: rgba(255, 255, 255, 0.08);
    color: var(--dark-text-secondary);
}

[data-theme="dark"] .project-section h4 {
    color: var(--dark-text-primary);
}

/* 방송 공지 */
[data-theme="dark"] .broadcast-notice {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.08), rgba(255, 136, 0, 0.08));
    border-color: rgba(255, 0, 0, 0.3);
}

[data-theme="dark"] .notice-content h3 {
    color: var(--dark-text-primary);
}

[data-theme="dark"] .notice-content p {
    color: var(--dark-text-tertiary);
}

/* 비디오 정보 */
[data-theme="dark"] .video-card .video-info {
    padding-color: var(--glass-border);
}

/* 태그 */
[data-theme="dark"] .tag {
    background: rgba(255, 136, 0, 0.15);
    color: var(--primary-color);
}

/* 스트리머 태그 */
[data-theme="dark"] .streamer {
    background: rgba(255, 255, 255, 0.1);
    color: var(--dark-text-secondary);
}

/* coming-soon 보더 */
[data-theme="dark"] .coming-soon-content {
    border-color: var(--glass-border);
}

/* 테크 피쳐 */
[data-theme="dark"] .tech-feature {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .tech-feature:hover {
    border-color: rgba(255, 136, 0, 0.3);
    box-shadow: 0 8px 32px rgba(255, 136, 0, 0.1);
}

[data-theme="dark"] .tech-feature h3 {
    color: var(--dark-text-primary);
}

[data-theme="dark"] .tech-feature p {
    color: var(--dark-text-tertiary);
}

/* 비디오 래퍼 로딩 배경 */
[data-theme="dark"] .video-wrapper::before {
    background: var(--dark-surface);
}

/* 프로젝트 섹션 보더 */
[data-theme="dark"] .project-section {
    border-bottom-color: var(--glass-border);
}

/* 비디오 카드 video-info 배경 */
[data-theme="dark"] .video-info h4 {
    color: var(--dark-text-primary);
}

/* CTA 섹션 */
[data-theme="dark"] .cta-section {
    background: linear-gradient(135deg, rgba(255, 136, 0, 0.08), rgba(255, 102, 0, 0.04));
}

[data-theme="dark"] .cta-section h2 {
    color: var(--dark-text-primary);
}

[data-theme="dark"] .cta-section p {
    color: var(--dark-text-tertiary);
}

/* 비디오 로딩 텍스트 */
[data-theme="dark"] .video-loading {
    color: var(--dark-text-disabled);
}

/* ========================================
   접근성: prefers-reduced-motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .tab-content.active,
    .video-card,
    .tech-feature,
    .youtube-channel-card,
    .feature-item {
        animation: none !important;
        transition: none !important;
    }
}

/* ========================================
   접근성: focus-visible 상태
   ======================================== */
.tab-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.video-card:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.tag:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
}