@charset "UTF-8";

/* 폰트 설정 (Pretendard) */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

/* ==========================================================================
   🔥 [글로벌 배경 차단] style.css의 배경/워터마크 로고가 비치는 현상 원천 차단
   ========================================================================== */
html, body {
    background-image: none !important;
    background-color: #f8fafc !important;
}

html::before, html::after, 
body::before, body::after, 
body > div::before, body > div::after {
    display: none !important;
    background-image: none !important;
    content: none !important;
}

body { 
    font-family: 'Pretendard', sans-serif; 
    overflow-x: hidden; 
    padding-top: 0 !important; 
}

/* ==========================================================================
   🔥 [Mobile/Universal] 피드 레이아웃 (모바일 2열 그리드로 변경)
   ========================================================================== */
.feed-wrapper {
    /* 기존 스냅 스크롤 제거 후 그리드로 변경 */
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 모바일 기본 2열 */
    gap: 10px;
    padding: 10px;
    height: auto;
    overflow-y: visible;
    scroll-behavior: smooth;
}

.feed-wrapper::-webkit-scrollbar { 
    display: none; 
}

.feed-item {
    /* 스냅 설정 제거 */
    width: 100%;
    height: auto;
    position: relative;
    padding: 0;
}

.shorts-premium-card {
    width: 100%;
    /* 리스트에서는 무조건 정사각형 통일 */
    aspect-ratio: 1 / 1 !important;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 카드 내부 미디어 설정 */
.shorts-premium-card img, 
.shorts-premium-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   🔥 [PC] 4열 그리드 뷰 (데스크탑 최적화)
   ========================================================================== */
@media (min-width: 1024px) {
    body { 
        overflow-y: auto; 
    }
    
    .feed-wrapper {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
        padding: 2rem 4rem;
        max-width: 1600px;
        margin: 0 auto;
        align-items: start; 
    }
    
    .shorts-premium-card {
        border-radius: 1rem;
    }

    .shorts-premium-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(0,0,0,0.2);
        z-index: 10;
    }

    .blog-card {
        aspect-ratio: 1 / 1;
        height: auto;
    }
}

/* ==========================================================================
   🎬 [Video Modal] 영상 전용 모달 시스템 (원본 비율 재생용)
   ========================================================================== */
#videoContentModal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    pointer-events: auto;
}

.video-modal-container {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 숏폼 모달 비율 */
.modal-format-shorts {
    max-width: 420px;
    aspect-ratio: 9 / 16;
}

/* 롱폼 모달 비율 */
.modal-format-youtube {
    max-width: 1100px;
    aspect-ratio: 16 / 9;
}

.video-modal-player {
    width: 100%;
    height: 100%;
    border-radius: 1.5rem;
    overflow: hidden;
    background: #000;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.video-modal-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
}

/* ==========================================================================
   🔥 [UI Components] 상단 탭 및 필터
   ========================================================================== */
.tab-btn {
    position: relative;
    color: #64748b;
    transition: all 0.3s ease;
    font-weight: 700;
}

.tab-btn.active {
    color: #4f46e5;
    font-weight: 900;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #4f46e5;
    border-radius: 3px 3px 0 0;
}

.sub-tab-btn {
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    background: #f1f5f9;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sub-tab-btn.active {
    background: #1e293b;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }