@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Thin.woff2') format('woff2');
    font-weight: 100;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Light.woff2') format('woff2');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Black.woff2') format('woff2');
    font-weight: 900;
    font-display: swap;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: #f8f9fa;
    min-height: 100vh;
}

.container {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 40px;
    margin: 0 auto;
}

/* 페이지 헤더 */
.page-header {
    margin-bottom: 40px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-top .sort-options {
    margin-left: auto;
}

.category-label {
    display: inline-block;
    padding: 6px 16px;
    background-color: #8b5cf6;
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

h1 {
    text-align: left;
    color: #1a1a1a;
    margin: 0;
    padding: 0;
    font-size: 48px;
    font-weight: 800;
    font-family: 'Pretendard', sans-serif;
    letter-spacing: -1.5px;
    line-height: 1.2;
}

.title-main {
    display: inline;
}

.title-count {
    display: inline-block;
    color: #6b7280;
    font-size: 15px;
    font-weight: 600;
    margin-left: auto;
}

.update-info {
    text-align: center;
    margin: 0 0 30px 0;
    padding: 16px 20px;
    background-color: #f3f4f6;
    border-radius: 12px;
    color: #374151;
}

.update-time {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 6px;
    font-weight: 500;
}

.next-update {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 4px;
}

.loading {
    text-align: center;
    color: #6b7280;
    display: none;
    margin-top: 10px;
    font-weight: 600;
    font-size: 14px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* 탭 메뉴 스타일 */
.tab-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.tab-buttons {
    display: flex;
    gap: 8px;
}

.tab-btn {
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
    position: relative;
}

.tab-btn:hover {
    color: #1a1a1a;
}

.tab-btn.active {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
}

/* 정렬 옵션 스타일 */
.sort-options {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sort-options label {
    font-size: 16px;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
    align-items: right;
    margin-left: auto;
    margin-right: 6px;
}

.sort-select {
    padding: 8px 16px;
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
    font-weight: 500;
    color: #1a1a1a;
}

.sort-select:hover {
    border-color: #9ca3af;
}

.sort-select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-top: 20px;
}

.video-section {
    width: 100%;
    max-width: 1000px;
    display: none;
}

.video-section.active {
    display: block;
}

.video-container {
    width: 100%;
}

.video-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
    background-color: white;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.video-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.video-item .video-thumbnail {
    flex-shrink: 0;
    width: 30%;
    max-width: 200px;
    min-width: 140px;
}

.video-thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    background-color: #e0e0e0;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: block;
}

.video-item:hover .video-thumbnail {
    transform: scale(1.02);
}

.video-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.5;
}

.video-title:hover {
    color: #8b5cf6;
}

.video-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
}

.view-count {
    color: #2563eb;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* 변화 차이 인라인 표시 */
.view-change-inline {
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 14px;
    margin-left: 4px;
}

.view-change-inline.positive {
    color: #28a745;
    background-color: #d4edda;
}

.view-change-inline.negative {
    color: #dc3545;
    background-color: #f8d7da;
}

.view-change-inline.zero {
    color: #6c757d;
    background-color: #e9ecef;
}

.published-date {
    color: #6c757d;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.date-value {
    font-weight: 600;
    color: #495057;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .sort-options {
        width: 100%;
        justify-content: space-between;
    }
    
    .tab-menu {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .tab-buttons {
        flex: 1;
        min-width: 0;
    }
    
    .title-count {
        font-size: 14px;
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
        text-align: left;
    }
    
    .video-item {
        flex-direction: column;
    }
    
    .video-item a {
        width: 100%;
        max-width: 100%;
    }
    
    .container {
        padding: 24px;
        margin: 10px;
    }
    
    h1 {
        font-size: 32px;
        letter-spacing: -1px;
    }
    
    .title-count {
        font-size: 20px;
        margin-left: 8px;
    }
    
    .page-header {
        margin-bottom: 30px;
    }
}

