/* ================================================
   채널 익스플로러 스킨 스타일시트
   Path: skin/board/explorer/style.css
   ================================================ */

/* ── 전체 래퍼 ── */
.tge-explorer {
    font-family: 'Noto Sans KR', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 16px 60px;
}

/* ── 카테고리 필터 ── */
.tge-explorer__category {
    margin-bottom: 20px;
}
.tge-explorer__category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.tge-explorer__category-list li {
    display: inline-block;
}
.tge-explorer__category-list li a,
.tge-explorer__category-list li strong {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(255, 255, 255, 0.04);
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}
.tge-explorer__category-list li a:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    color: #93c5fd;
    transform: translateY(-1px);
}
.tge-explorer__category-list li strong {
    background: linear-gradient(135deg, rgba(59,130,246,0.25) 0%, rgba(37,99,235,0.35) 100%);
    border-color: rgba(59, 130, 246, 0.5);
    color: #93c5fd;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}
.tge-explorer__category-list a.tge-explorer__category-link--active {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

/* ── 정렬 칩 영역 ── */
.tge-explorer__sort-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    align-items: center;
}

/* 정렬 칩 기본 */
.tge-sort-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px 8px 12px;
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 100px;
    color: #94a3b8;
    font-size: 0.84rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.22s ease;
    cursor: pointer;
    letter-spacing: 0.01em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.tge-sort-chip:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: rgba(148, 163, 184, 0.5);
    color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.tge-sort-chip__icon {
    font-size: 16px;
    line-height: 1;
    color: #7dd3fc;
}
.tge-sort-chip__label {
    line-height: 1;
    color: inherit;
}

/* 활성화 칩 */
.tge-sort-chip--active {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    border-color: rgba(96, 165, 250, 0.6);
    color: #fff;
    font-weight: 700;
    box-shadow:
        0 4px 20px rgba(37, 99, 235, 0.5),
        0 1px 0 rgba(255,255,255,0.15) inset;
}
.tge-sort-chip--active .tge-sort-chip__icon {
    color: #bfdbfe;
}
.tge-sort-chip--active:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    box-shadow:
        0 6px 24px rgba(37, 99, 235, 0.6),
        0 1px 0 rgba(255,255,255,0.15) inset;
    transform: translateY(-2px);
}
.tge-sort-arrow {
    font-size: 14px;
    opacity: 0.9;
    color: #bfdbfe;
}

/* ── 관리자 전체 선택 ── */
.tge-explorer__admin-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.875rem;
    color: #64748b;
}

/* ── 카드 그리드 ── */
.tge-explorer__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ── 카드 아이템 ── */
.tge-explorer__card-item {
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.tge-explorer__card-item--visible {
    opacity: 1;
    transform: translateY(0);
}

/* 카드 내부 콘텐츠 flex 조정 */
.tge-explorer__card-item .tge-card-wrap {
    padding: 0;
    flex: 1;
    display: flex;
    position: relative; /* 순위 리본 기준점 */
    overflow: hidden;   /* 리본 삐져나옴 방지 */
}

/* ── 순위 리본 ── */
.tge-rank-ribbon {
    position: absolute;
    top: 14px;
    left: -2px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 5px 14px 5px 10px;
    border-radius: 0 20px 20px 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    z-index: 20;
    letter-spacing: 0.02em;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.35);
    pointer-events: none;
}
.tge-rank-ribbon strong {
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
}
/* 1위 – 금 */
.tge-rank-ribbon--gold {
    background: linear-gradient(135deg, #f5a623 0%, #f7cc6d 50%, #e8960e 100%);
    box-shadow: 2px 2px 10px rgba(245, 166, 35, 0.5);
    color: #3b1a00;
}
/* 2위 – 은 */
.tge-rank-ribbon--silver {
    background: linear-gradient(135deg, #9ca3af 0%, #d1d5db 50%, #6b7280 100%);
    box-shadow: 2px 2px 10px rgba(156, 163, 175, 0.4);
    color: #1a1a2e;
}
/* 3위 – 동 */
.tge-rank-ribbon--bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #e8a96e 50%, #a0522d 100%);
    box-shadow: 2px 2px 10px rgba(205, 127, 50, 0.45);
    color: #1a0a00;
}
/* 4~10위 – 기본 */
.tge-rank-ribbon--default {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(99, 179, 237, 0.25);
    color: #94a3b8;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
}


.tge-explorer__card-item .tge-card {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}
/* 콘텐츠 영역: 뱃지/이름/핸들/구독자 → 중앙, 설명 → 좌측 */
.tge-explorer__card-item .tge-card__content {
    display: flex;
    flex-direction: column;
    flex: 1;
    align-items: center;
}
.tge-explorer__card-item .tge-card__desc {
    flex: 1;
    text-align: left !important;
    align-self: stretch;
}
.tge-explorer__card-item .tge-card__btn {
    width: 100% !important;
    align-self: stretch;
}

/* ── 관리자 체크박스 ── */
.tge-explorer__card-check {
    margin-top: 8px;
    text-align: center;
}

/* ── 빈 상태 ── */
.tge-explorer__empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    color: #64748b;
    gap: 12px;
}
.tge-explorer__empty-icon {
    font-size: 3rem;
    opacity: 0.4;
}
.tge-explorer__empty-text {
    font-size: 1rem;
    margin: 0;
}

/* ── 푸터 (관리자 버튼 + 페이지네이션) ── */
.tge-explorer__footer {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.tge-explorer__admin-btns {
    display: flex;
    gap: 8px;
}
.tge-explorer__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
}
.tge-explorer__btn .material-symbols-outlined {
    font-size: 18px;
}
.tge-explorer__btn--write {
    background: #3b82f6;
    color: #fff;
}
.tge-explorer__btn--write:hover {
    background: #2563eb;
}
.tge-explorer__btn--delete {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.tge-explorer__btn--delete:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* ── 페이지네이션 ── */
.tge-explorer__pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
}
.tge-explorer__pagination a,
.tge-explorer__pagination strong {
    display: inline-block;
    padding: 7px 13px;
    border-radius: 8px;
    border: 1px solid rgba(99, 179, 237, 0.25);
    color: #94a3b8;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.2s;
}
.tge-explorer__pagination strong {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}
.tge-explorer__pagination a:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

/* ── 카드 기본 디자인 (이전 하드코딩 스타일 복구) ── */
.tge-card-wrap {
    font-family: 'Noto Sans KR', sans-serif;
    display: flex;
    justify-content: stretch;
    padding: 0;
    flex: 1;
}
.tge-card {
    position: relative;
    background: linear-gradient(145deg, #1e2a3a 0%, #151f2e 60%, #0d1520 100%);
    border: 1px solid rgba(99, 179, 237, 0.18);
    border-radius: 20px;
    padding: 40px 30px 32px;
    width: 100%;
    max-width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.tge-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 25px rgba(59, 130, 246, 0.15);
    border-color: rgba(99, 179, 237, 0.4);
}
.tge-card__shine {
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99, 179, 237, 0.12) 0%, transparent 70%);
    pointer-events: none;
}
.tge-card__img-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}
.tge-card__img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(99, 179, 237, 0.5);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}
.tge-card__content {
    display: flex;
    flex-direction: column;
    flex: 1;
    align-items: center;
    text-align: center;
}
.tge-card__category-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 10px;
}
.tge-card__category {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}
.tge-card__title {
    color: #f1f5f9;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    letter-spacing: -0.02em;
}
.tge-card__handle {
    color: #64748b;
    font-size: 0.88rem;
    margin: 0 0 14px 0;
    font-weight: 400;
}
.tge-card__subs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #38bdf8;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
}
.tge-card__subs .material-symbols-outlined {
    font-size: 18px;
}
.tge-card__desc {
    color: #94a3b8;
    font-size: 0.875rem;
    line-height: 1.7;
    margin-bottom: 24px;
    padding: 0 4px;
    min-height: 5.1em;
    text-align: left !important;
    align-self: stretch;
    word-break: keep-all;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}
.tge-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100% !important;
    align-self: stretch;
    margin-top: auto;
    padding: 13px 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}
.tge-card__btn .material-symbols-outlined {
    font-size: 18px;
}
.tge-card__btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
    transform: scale(1.02);
}

/* ── 반응형 ── */
@media (max-width: 1024px) {
    .tge-explorer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .tge-explorer {
        padding: 20px 12px 40px;
        overflow-x: hidden; /* 강제 가로 스크롤 방지 */
    }
    .tge-explorer__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .tge-card {
        padding: 35px 20px 28px;
    }
    .tge-card__img {
        width: 100px;
        height: 100px;
    }
    .tge-card__title {
        font-size: 1.15rem;
    }
    .tge-card__desc {
        font-size: 0.85rem;
        -webkit-line-clamp: 4; /* 모바일에서 설명을 조금 더 노출 */
        line-clamp: 4;
    }
    
    .tge-explorer__sort-wrap {
        gap: 8px;
    }
    .tge-sort-chip {
        padding: 7px 12px 7px 10px;
        font-size: 0.8rem;
    }
    .tge-sort-chip__icon {
        font-size: 14px;
    }
}

/* 박스 사이징 전역 적용 (익스플로러 내부) */
.tge-explorer, 
.tge-explorer *, 
.tge-explorer *::before, 
.tge-explorer *::after {
    box-sizing: border-box;
}
