/* 치지직 인기 클립 섹션 스타일 */

/* 치지직 클립 섹션 전체 제한 */
.content-section:has(.clips-grid) {
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.section-subtitle {
    font-size: 0.8em;
    font-weight: normal;
    color: #666;
    margin-left: 10px;
}

.clips-update-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
}

.update-time {
    font-size: 0.9em;
    opacity: 0.9;
}

.view-all-link {
    color: white;
    text-decoration: none;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9em;
    transition: background 0.3s ease;
}

.view-all-link:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
}

.clips-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    max-width: 100%;
    overflow: hidden;
}

.clip-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.clip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.clip-thumbnail {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #f5f5f5;
}

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

.clip-card:hover .clip-thumbnail img {
    transform: scale(1.05);
}

.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 2em;
}

.clip-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.clip-card:hover .clip-overlay {
    opacity: 1;
}

.play-button {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: #333;
    transition: transform 0.3s ease;
}

.clip-card:hover .play-button {
    transform: scale(1.1);
}

.clip-rank {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: bold;
}

.clip-info {
    padding: 15px;
}

.clip-title {
    margin: 0 0 10px 0;
    font-size: 1em;
    line-height: 1.4;
}

.clip-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.clip-title a:hover {
    color: #667eea;
    text-decoration: none;
}

.clip-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
    color: #666;
}

.channel-name,
.view-count {
    display: flex;
    align-items: center;
    gap: 5px;
}

.channel-name i,
.view-count i {
    font-size: 0.9em;
}

.clips-footer {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
}

.clips-description {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

.clips-description i {
    margin-right: 8px;
    color: #667eea;
}

/* 데이터 없을 때 스타일 */
.no-data-message {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 20px 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.no-data-icon {
    font-size: 4em;
    color: #ddd;
    margin-bottom: 20px;
}

.no-data-message h3 {
    color: #666;
    margin-bottom: 10px;
}

.no-data-message p {
    color: #888;
    margin-bottom: 30px;
}

/* 로딩 스피너 */
.loading-spinner {
    display: inline-block;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .clips-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .clips-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .clip-thumbnail {
        height: 140px;
    }
    
    .clips-update-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .clip-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .clips-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .clip-thumbnail {
        height: 180px;
    }
    
    .clip-info {
        padding: 12px;
    }
    
    .clip-title {
        font-size: 0.95em;
    }
    
    .clip-meta {
        font-size: 0.8em;
    }
}

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .clip-card {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .clip-title a {
        color: #e2e8f0;
    }
    
    .clip-title a:hover {
        color: #90cdf4;
    }
    
    .clip-meta {
        color: #a0aec0;
    }
    
    .clips-footer {
        background: #1a202c;
    }
    
    .clips-description {
        color: #a0aec0;
    }
    
    .no-data-message {
        background: #1a202c;
    }
    
    .no-data-message h3 {
        color: #e2e8f0;
    }
    
    .no-data-message p {
        color: #a0aec0;
    }
}
