/* thumbnails.css - 카테고리별 썸네일 관련 스타일 */

/* 썸네일 기본 스타일 */
.card-image > div:not(.category-label):not(.like-button):not(.indicator):not(.tags-container) {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* 썸네일을 이미지 아래에 표시 */
}

/* 이미지 로드 실패 시 썸네일 표시 스타일 */
.card-image img[style*="display: none"] + div {
    z-index: 1; /* 이미지가 숨겨진 경우 썸네일을 위로 표시 */
}

/* 카테고리 라벨, 좋아요 버튼, 태그 등은 항상 최상위에 표시 */
.category-label, .like-button, .indicator, .tags-container {
    z-index: 2;
}

/* 개발 카테고리 썸네일 */
.dev-thumbnail {
    background: var(--dev-gradient);
    position: relative;
}

.dev-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.05) 10px,
        rgba(255, 255, 255, 0.05) 20px
    );
}

.code-pattern {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Consolas', 'Monaco', monospace;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    line-height: 1.6;
    white-space: pre;
    font-size: 14px;
}

/* 디자인 카테고리 썸네일 */
.design-thumbnail {
    background: var(--design-gradient);
    position: relative;
}

.design-circles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.design-circle {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

.design-circle:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 30px;
    left: 30px;
}

.design-circle:nth-child(2) {
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    animation-delay: 1s;
}

.design-circle:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 60px;
    right: 60px;
    animation-delay: 2s;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
    100% { transform: scale(1); opacity: 0.3; }
}

/* 기획 카테고리 썸네일 */
.plan-thumbnail {
    background: var(--plan-gradient);
    position: relative;
}

.plan-flowchart {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

/* 마케팅 카테고리 썸네일 */
.marketing-thumbnail {
    background: var(--marketing-gradient);
    position: relative;
}

/* VibeCoding 카테고리 썸네일 수정 - 애니메이션 최소화 버전 */
.vibecoding-thumbnail {
    background: var(--vibecoding-gradient);
    position: relative;
    overflow: hidden;
}

/* 밝은 그라디언트 효과 */
.vibecoding-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.15) 0%,
        transparent 70%
    );
}

.code-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 20px;
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    line-height: 1.6;
}

/* 뉴스 카테고리 썸네일 */
.news-thumbnail {
    background: var(--news-gradient);
    position: relative;
}

.news-lines {
    position: absolute;
    width: 80%;
    height: 60%;
    top: 20%;
    left: 10%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-line {
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    animation: newsLoad 2s ease-in-out infinite;
}

.news-line:nth-child(1) { width: 90%; }
.news-line:nth-child(2) { width: 75%; animation-delay: 0.3s; }
.news-line:nth-child(3) { width: 85%; animation-delay: 0.6s; }
.news-line:nth-child(4) { width: 65%; animation-delay: 0.9s; }

@keyframes newsLoad {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* 트렌드 카테고리 썸네일 */
.trend-thumbnail {
    background: var(--trend-gradient);
    position: relative;
}

.neural-network {
    position: absolute;
    width: 100%;
    height: 100%;
}

.neuron {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: neuronPulse 3s ease-in-out infinite;
}

.connection {
    position: absolute;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.4);
    transform-origin: left center;
}

@keyframes neuronPulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.5); opacity: 1; }
    100% { transform: scale(1); opacity: 0.5; }
}

/* 기본 썸네일 (콘텐츠 타입이 없는 경우) */
.default-thumbnail {
    background: linear-gradient(135deg, #3498db, #9b59b6);
    position: relative;
}


/* thumbnails.css에 추가할 스타일 - 배경 텍스트 더 흐리게, 제목 중앙 크게 */

/* thumbnails.css에 추가할 스타일 - 수정된 제목 스타일 */

/* 배경 코드 텍스트 흐림 처리 */
.code-text {
    opacity: 0.2 !important; /* 더 흐리게 */
    font-size: 14px;
    z-index: 1;
}

.dev-code-container code, 
.dev-code-container pre,
.code-pattern {
    opacity: 0.2 !important; /* 더 흐리게 */
}

/* 개발 사이클 아이콘/그래픽 요소 흐림 처리 */
.dev-stage {
    opacity: 0.2 !important;
}

.connection-line {
    opacity: 0.15 !important;
}

.design-circle {
    opacity: 0.2 !important;
}

.news-line {
    opacity: 0.2 !important;
}

.neuron, .connection {
    opacity: 0.2 !important;
}

/* 중앙 제목 스타일 - 수정됨 */
.thumbnail-title {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    padding: 15px 0;
    text-align: center;
    color: white;
    font-size: 22px; /* 더 크게 */
    font-weight: 700;
    z-index: 10;
    line-height: 1.4;
    /**text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);*/
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
    background-color: rgba(0, 0, 0, 0.35); /* 약간의 배경 색상만 */
    backdrop-filter: blur(3px); /* 배경 블러 효과 */
    word-break: keep-all;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* 카테고리별 모양 없는 제목 배경 스타일 */
.vibecoding-thumbnail .thumbnail-title {
    background-color: rgba(121, 80, 242, 0.35);
}

.dev-thumbnail .thumbnail-title {
    background-color: rgba(77, 171, 247, 0.35);
}

.design-thumbnail .thumbnail-title {
    background-color: rgba(240, 101, 149, 0.35);
}

.plan-thumbnail .thumbnail-title {
    background-color: rgba(249, 199, 79, 0.35);
}

.marketing-thumbnail .thumbnail-title {
    background-color: rgba(151, 117, 250, 0.35);
}

.trend-thumbnail .thumbnail-title {
    background-color: rgba(81, 207, 102, 0.35);
}

.news-thumbnail .thumbnail-title {
    background-color: rgba(134, 142, 150, 0.35);
}

/* 모바일 환경에서의 썸네일 제목 스타일 조정 */
@media (max-width: 767px) {
    .thumbnail-title {
        font-size: 20px;
        padding: 12px 0;
    }
}

@media (max-width: 575px) {
    .thumbnail-title {
        font-size: 18px;
        padding: 10px 0;
    }
}