﻿/* =====================================================
   styles_popchoice.css — PopChoice 완전 독립 스타일시트
   hiview.kr 의 styles.css 수정에 영향받지 않습니다.
====================================================== */

/* ===== BASE (styles.css 복사본) ===== */
html {
    overflow-x: hidden; /* 가로 스크롤바 제거 */
}

body {
    display: flex;
    margin: 0;
    background-color:rgb(255, 255, 255);
    overflow-x: hidden; /* 가로 스크롤바 제거 */
}
.alert-danger {
    display: none;
}
/*---------------------------컨텐츠분리---------------------------------*/

.main {
    display: none;
    padding: 80px 80px 0 80px; /* 상 우 하 좌 - 하단 패딩 제거 */
    text-align: center;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box; /* padding이 width에 포함되도록 */
}

.main.active {
    display: block;
}

.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

/* 페이드 인 애니메이션 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/*-----------------------------top-bar!------------------------------------*/ 

.top-bar {
    display: flex;
    justify-content: space-between; /* 양쪽 정렬 */
    align-items: center;
    width: 90%; /* 화면의 90% 너비 */
    height: 60px; /* 높이 설정 */
    margin: 0 auto; /* 중앙 정렬 */
    background-color: white; /* 어두운 배경 */
    padding: 0 20px;
    border-bottom: 1px solid #c4c4c4;
    position: fixed; /* 화면 최상단 고정 */
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 811;
}
.button-group {
    display: flex;
    gap: 10px; /* 버튼 간격 */
}

.top-bar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: white;
    color:rgb(196, 196, 196);
    font-size: 20px;
    font-family: 'Pretendard', sans-serif;
    font-weight: bold;
    text-decoration: none;
    padding: 12px 20px;
    transition: all 0.3s ease;
    /*box-shadow: 0 4px 6px rgba(255, 255, 255, 0.2);*/
    position: relative;
}

/* 아이콘 스타일 
.top-bar-button::before {
    content: '▶';
    font-size: 18px;
    margin-right: 8px;
}*/

/* 호버 시 */
.top-bar-button:hover {
    background-color: rgb(255, 255, 255);
    color: #0191d8;
    transform: scale(1.1);

}

/* 클릭 시 (활성화 효과) */
.top-bar-button.active {
    background-color: rgb(255, 255, 255);
    color: #0191d8;
    transform: scale(1.1);
}


.button_top {
    background:  #0191d8;
    color: white;
    padding: 5px 10px;
    font-size: 15px;
    border: none;
    border-radius: 10px;
    height: 35px;
    font-family: 'Pretendard', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    /*box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);*/
    outline: none;
    position: relative;
    overflow: hidden;
}

/* 호버 효과 */
.button_top:hover {
    background: linear-gradient(135deg,rgb(164, 177, 236),rgb(147, 134, 160));
    transform: translateY(-3px);
    /*box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);*/
}

/* 클릭 효과 */
.button_top:active {
    transform: scale(0.95);
    /*box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);*/
}

.drawer-container {
    position: relative;
    display: inline-block;
    z-index: 810;
}
.drawer-menu {
    position: absolute;
    top: 50%; /* 버튼 바로 아래 */
    left: 0;
    width: 100px;
    background-color:rgb(150, 150, 150);
    color: white;
    border-radius: 6px;
    overflow: hidden;
    max-height: 0; /* 초기에는 숨김 */
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
    
}
.drawer-menu button {
    display: block;
    padding: 10px 10px;
    background: #0191d8;
    color: white;
    border: white;
    width:100%;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Pretendard', sans-serif;
    font-size: 14px;
    z-index: 810;
}

.drawer-menu button:hover {
    background-color:rgb(153, 169, 240);
    color: white;
}

/* 메뉴가 열릴 때 스타일 */
.drawer-container:hover .drawer-menu {
    max-height: 400px; /* 메뉴 크기 조절 */
    opacity: 2;
}
.myUsageButton:hover .tooltip {
    visibility: visible;
    opacity: 1;
    font-size: 15px;
    font-weight: 500;
    padding: 12px 15px;
    background-color: #ffffff;
    /* .pc-nav-action .tooltip 의 color:white 와 충돌하지 않도록 명시 (흰 배경에 흰 글씨 방지) */
    color: #1a1a1a;
    white-space: pre-line;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid #ddd;
}
/*-----------------------------top-bar!------------------------------------*/ 



/*-----------------------------menu-bar!------------------------------------*/ 

.menu-bar {
    display: flex;
    justify-content: space-between; /* 양쪽 정렬 */
    align-items: center;
    height: 60px; /* 높이 설정 */
    width: 70%;
    margin: 0 auto; /* 중앙 정렬 */
    padding: 0 40px;
    border-radius: 8px; /* 모서리 둥글게 */
    /*position: fixed; 화면 최상단 고정 */
    top: 30;
    left: 10%;
    /*transform: translateX(-50%);*/
    z-index: 810;
}

.options-container {
    display: flex; /* 가로 정렬 */
    align-items: left; /* 중앙 정렬 */
    gap: 6px; /* 입력 필드와 버튼 사이 간격 */
    padding:20px;
}

.search-input {
    border: none;
    font-size: 14px;
    padding: 5px 15px;
    font-family: 'Pretendard', sans-serif;
    height: 40px;  /* 버튼 높이 */
    width: 200px;
    outline: none;
    color: #888;
    height: 20px;
}
.search-button {
    display: flex; /* 가로 정렬 */
    align-items: center; /* 중앙 정렬 */
    justify-content: center; 
    height: 35px;  /* 버튼 높이 */
    padding: 10px;
    color: white;
    font-size:15px;
    font-family: 'Pretendard', sans-serif;
    background-color: #0191d8; /* 버튼 배경색 */
    border: none;
    border-radius: 8px; /* 모서리 둥글게 */
    cursor: pointer;
    transition: 0.3s;
    margin-right: 3px;
    /*box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);*/
}
.search-button img {
    width: 30px;  /* 이미지 크기 조절 */
    height: 30px;
    margin-left: 8px; /* 텍스트와 간격 */
    margin-right: 8px; /* 텍스트와 간격 */
}
.search-button text {
    font-size: 15px;
    color: white;
}


/* 호버 효과 */
.search-button:hover {
    background: linear-gradient(135deg,rgb(164, 177, 236),rgb(147, 134, 160));
    transform: translateY(-3px);
    /*box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);*/
}

/* 클릭 효과 */
.search-button:active {
    transform: scale(0.95);
    /*box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);*/
}

/* 툴팁 스타일 (초기 숨김) */
.search-button::after {
    position: absolute;
    top: 80%; /* 버튼 아래에 배치 */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    color: black;
    padding: 6px 12px;
    font-size: 14px;
    white-space: nowrap;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 815;
}

/* 툴팁 화살표 */
.search-button::before {
    content: "";
    position: absolute;
    top: 80%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent rgba(0, 0, 0, 0.8) transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 815;
}

.search-button#toNum::after {
    content: "실적도/공헌도를 수치/등급으로 표현합니다.";
}
.search-button#toNum2::after {
    content: "실적도/공헌도를 수치/등급으로 표현합니다.";
}
.search-button#toNum3::after {
    content: "실적도/공헌도를 수치/등급으로 표현합니다.";
}

.search-button#collect_video::after {
    content: "영상 수집(폴더 생성/삭제)";
}

.search-button#filter::after {
    content: "필터 적용";
}
.search-button#original::after {
    content: "키워드 연관성 순 정렬";
}
.search-button#latest::after {
    content: "데이터를 최신화합니다 - 검색 횟수 차감";
}

/* 버튼 위에 마우스를 올리면 툴팁 표시 */
.search-button:hover::after,
.search-button:hover::before {
    opacity: 1;
    visibility: visible;
}

.storageList{
    gap: 50px;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 50px;
}

/*-----------------------------menu-bar!------------------------------------*/ 

/*-----------------------------checkbox!------------------------------------*/ 

/* 체크박스 컨테이너 */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 18px;
}

/* 기본 체크박스 숨기기 */
.checkbox-container input {
    display: none;
}

/* 커스텀 체크박스 */
.custom-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #ccc;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
    background-color: white;
}

.head-row-checkbox{
    width: 24px;
    height: 24px;
    border: 2px solid #ccc;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
    background-color: rgb(223, 223, 223);
}

.head-row-checkbox-my{
    width: 24px;
    height: 24px;
    border: 2px solid #ccc;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
    background-color: rgb(223, 223, 223);
}

.head-row-checkbox-channels,
.head-row-checkbox-my-channels{
    width: 24px;
    height: 24px;
    border: 2px solid #ccc;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
    background-color: rgb(223, 223, 223);
}

/* 이전 설정은 channelTableMain으로 통합됨 */

/* 체크박스 클릭 시 효과 */
.checkbox-container input:checked + .custom-checkbox {
    border-color:rgb(255, 255, 255);
    background-color: #0191d8;
}

/* 체크 표시 */
.custom-checkbox::after {
    content: "✔";
    font-size: 18px;
    color: white;
    display: none;
}

/* 체크된 상태에서 체크 아이콘 표시 */
.checkbox-container input:checked + .custom-checkbox::after {
    display: block;
}
/*-----------------------------checkbox!------------------------------------*/ 

/*-----------------------------history!------------------------------------*/

.hidden-div {
    width: 70%;
    padding: 10px;
    position: relative;
    border-radius: 10px;
    text-align: center;
    flex-direction: column;
    align-items: flex-start; /* 왼쪽 정렬 */
    background-color: #f1f1f1; /* 연한 배경 */
    min-height: 60px; /* 높이 확보 */
}

.history-button {
    display: inline-flex;
    align-items: center;
    background-color: #0191d8;
    color: white;
    font-family: 'Pretendard', sans-serif;
    border: none;
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 14px;
    margin-left: 20px;
    position: relative;
    cursor: pointer;
    gap: 10px;
}

.history-button-latest {
    display: inline-flex;
    align-items: center;
    background-color: #1540ff;
    color: white;
    font-family: 'Pretendard', sans-serif;
    border: none;
    border-radius: 10px;
    padding: 13px 17px;
    font-size: 16px;
    margin-left: 20px;
    position: relative;
    cursor: pointer;
    gap: 10px;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* 버튼 간격 */
    justify-content: flex-start; /* 버튼들을 왼쪽 정렬 */
}

.tagDesc {
    font-family: 'Pretendard', sans-serif;
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* 버튼 간격 */
    justify-content: flex-start; /* 버튼들을 왼쪽 정렬 */
    margin-bottom: 30px;
}


.close-btn {
    font-size: 14px;
    color: black;
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    right: -8px;
    top: -8px;
}

.history-button:hover {
    background-color:rgb(170, 170, 170);
}
.close-btn:hover {
    color: red;
}
.title {
    font-size: 16px;
    font-weight: bold;
    color: #333; /* 짙은 회색 */
    margin-bottom: 10px; /* 버튼과 간격 추가 */
}
.left_align {
    flex-wrap: wrap;
    gap: 10px; /* 버튼 간격 */
    justify-content: flex-start;
}

/*-----------------------------history!------------------------------------*/

/*-----------------------------scroll!------------------------------------*/
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f0f2f5;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: #b0b8c8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0191d8;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #b0b8c8 #f0f2f5;
}

/*-----------------------------overlay!------------------------------------*/
.popupOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(223, 223, 223, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1100; /* 영상/채널 수집 팝업용 오버레이 */
}
.popupOverlay2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(223, 223, 223, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1050; /* 필터 팝업용 오버레이 */
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* 반투명 배경 */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 900; /* 최상위 배치 */
}
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid white;
    border-top: 5px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
/*-----------------------------overlay!------------------------------------*/

/*-----------------------------main-contents!------------------------------------*/

.main-table {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    top: 10px;
    overflow-y: auto;
    width:80%;
    max-height: 100vh;
    /* position: relative 제거 - sticky 작동을 위해 */
    font-family: 'Pretendard', sans-serif;
}
.main-collection {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 20px;
    overflow-y: auto;
    max-height: 100vh;
    /* position: relative 제거 - sticky 작동을 위해 */
    font-family: 'Pretendard', sans-serif;
}
.collection-container {
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    background: white;
    /* position: relative 제거 - sticky 작동을 위해 */
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    left: 50%;
    transition: margin-top 0.3s ease-in-out;
}

.move-down {
    margin-top: 50px; /* 테이블 아래로 이동 */
}
.table-container {
    width: 100%;
    height: 20%;
    max-height: 75vh;
    overflow-y: scroll !important; /* 스크롤 강제 활성화 */
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    background: white;
}
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}
/* th와 td 공통 스타일 */
th, td {
    border-bottom: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    font-family: 'Pretendard', sans-serif;
}

/* td만 relative 포지션 (th는 sticky를 위해 제외) */
td {
    position: relative;
}

/* ✅ 구형 th 스타일 제거 - 아래 통합 스타일 사용 */


.highlight {
    background-color: #e0f2fe !important;
    border-left: 3px solid #0284c7 !important;
}
.more_than {
    background-color: #d1fae5 !important;
    border-left: 3px solid #10b981 !important;
}

/* 체크된 행 스타일 */
tbody tr:has(input[type="checkbox"]:checked) {
    background-color: #eff6ff !important;
    border-left: 3px solid #3b82f6;
}
select {
    font-family: 'Pretendard', sans-serif;
    width: 250px;
    font-size: 18px;
}
/*-----------------------------main-contents!------------------------------------*/


/*-----------------------------popup!------------------------------------*/

.popup, .history-popup {
    display: none;
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    max-height: 500px;
    overflow-y: auto;
    font-family: 'Pretendard', sans-serif;
    padding: 20px;
    background: white;
    border: 3px solid #0191d8;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    z-index: 1105; /* popupOverlay(1100)보다 위에 표시 */
    border-radius: 10px;
}

.popup button {
    margin-top: 10px;
    padding: 5px 10px;
    cursor: pointer;
    color: white;
    font-family: 'Pretendard', sans-serif;
    border-radius: 10px;
    background: #0191d8;
    border: 3px solid #0191d8;
}
.popup_button_delete {
    margin-top: 10px;
    padding: 5px 10px;
    cursor: pointer;
    color: white;
    font-family: 'Pretendard', sans-serif;
    border-radius: 10px;
    background: #fc5331;
    border: 3px solid #0191d8;
}


.popup li {
    padding: 5px;
    border-bottom: 1px solid #ccc;
    cursor: pointer;
}

/*-----------------------------popup!------------------------------------*/

/*-----------------------------other!------------------------------------*/

.status {
    margin-top: 20px;
    text-align: center;
}
.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #eee;
    border: 1px solid #ccc;
    position: relative;
    border-radius: 10px;
}
.progress-bar-fill {
    height: 100%;
    width: 0;
    background-color: #4caf50;
    transition: width 0.3s;
}
.green-cell {
    background-color: lightgreen !important;
}

input[type="text"], select {
    padding: 6px;
    margin: 1px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    background:rgb(255, 255, 255);
}
/*-----------------------------other!------------------------------------*/

/*-----------------------------tooltip!------------------------------------*/
.tooltip {
    visibility: hidden;
    background-color: white;
    color: black;
    text-align: left; /* 왼쪽 정렬로 가독성 향상 */
    padding: 8px;
    border-radius: 5px;
    position: absolute;
    top: calc(100% + 5px); /* th 아래에 표시 (5px 간격) */
    left: 50%;
    transform: translateX(-50%);
    white-space: normal; /* 여러 줄 표시 가능하도록 */
    width: 220px; /* 고정 너비로 테이블 밖으로 나가지 않도록 */
    font-size: 12px;
    line-height: 1.3;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1100; /* 다른 요소보다 위에 표시 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* 그림자 추가 */
    border: 1px solid #ddd;
    pointer-events: none; /* 툴팁 위에 마우스가 있어도 무시 */
}

/* 툴팁 화살표 추가 (위쪽) */
.tooltip::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #ddd;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid white;
}

th:hover .tooltip {
    visibility: visible;
    opacity: 0.95; /* 더 선명하게 */
}
/*-----------------------------tooltip!------------------------------------*/

/*-----------------------------filter!------------------------------------*/
/* .filter-popup 본문 스타일은 아래 "필터 팝업 — 전면 재설계" 블록에서 정의 */
/* 2x2 레이아웃 */
.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}
.main-container {
    width: 600px;
    height: auto;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
    margin: 50px auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

/* 둥근 박스 (날짜 설정 & 기여도) */
.rounded-box {
    width: 500px;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    margin-bottom: 20px;
    align-items: center;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.05);
}

/* 제목 스타일 (왼쪽 정렬) */
.section-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

/* 날짜 입력 & 필터 버튼 */
.date-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.date-input {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 8px;
    width: 160px;
    background-color: white;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.05);
}

.date-input input {
    border: none;
    outline: none;
    width: 100%;
    padding: 5px;
    font-size: 14px;
    background-color: transparent;
}

.date-icon {
    cursor: pointer;
    margin-left: 8px;
    font-size: 16px;
    color: #666;
}

/* 필터 버튼 */
.filter-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background-color: #eaeaea;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: #d6d6d6;
}

.filter-btn.active {
    background-color: #0191d8;
    color: white;
}

/* 기여도 스타일 */
.contribution-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: left;
}

.contribution-box {
    width: 70px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contribution-box input {
    display: none;
}

.contribution-box label {
    display: block;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.contribution-box input:checked + label {
    background-color:rgb(172, 172, 172);
    color: white;
    border-color: #0191d8;
    border-radius: 3px;
}
.confirm-container{
    display: flex;
    align-items: right;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}
/* 확인 버튼 */
.confirm-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #0191d8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width:150px;
}

.confirm-btn:hover {
    background-color: #0191d8;
}
/* 선택 목록 스타일 */
.selection-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.selection-box {
    width: 70px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    background-color: #fff;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.selection-box input {
    display: none;
}

.selection-box label {
    display: block;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.selection-box input:checked + label {
    background-color: rgb(172, 172, 172);
    color: white;
    border-color: #0191d8;
    border-radius: 3px;
}

/* Shorts 버튼 스타일 */
.shorts-list {
    display: flex;
    gap: 10px;
}

.shorts-box {
    align-items: center;
    justify-content: center;
    padding: 10px 5px;
    width: 100px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border: 1px solid #ddd;
    background-color: #fff;
    transition: all 0.3s ease;
}
.shorts-box input {
    display: none;
}
.shorts-box label {
    display: block;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.shorts-box input:checked + label {
    background-color: rgb(172, 172, 172);
    color: white;
    border-color: #0191d8;
    border-radius: 3px;
}
.worst { color: red; font-weight: bold; }
.bad { color:rgb(221, 107, 0); font-weight: bold;}
.normal { color: #c4b925; font-weight: bold;}
.good { color: green; font-weight: bold; }
.great { color: rgb(27, 79, 252); font-weight: bold; }

.radio-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.radio-label{
    width: 70px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    background-color: #fff;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}
.radio-label.selected {
    background-color: lightblue;
}

.radio-label.active {
    background-color: #4CAF50;
    color: white;
    transform: scale(1.05);
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.radio-input {
    display: none;
}


/*-----------------------------filter!------------------------------------*/


/*-----------------------------detail!------------------------------------*/




/* 영상 정보 모달 */
#detailsPopup.detail-popup {
    overflow-y:auto;
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1040px; /* 800px → 1040px (30% 증가) */
    max-height: 700px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    flex-direction: column;
    gap: 15px;
    z-index: 1120; /* 채널 분석 모달(1001)보다 위에 표시 */
    justify-content: center;
    font-family: 'Pretendard', sans-serif;

}

.detail-grid-container {
    display: flex; /* 내부 요소들을 가로 정렬 */
    gap: 10px;
    margin-bottom: 10px;
}
.detail-grid-container-btn {
    width:100%;
    gap: 10px;
    margin-bottom: 10px;
    text-align: center;
}
.detail-rounded-box-full {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width:100%;
    height:auto;
}
.detail-rounded-box {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 50%;
    width:50%;
    align-items: center;
    justify-content: center;
}
.detail-section-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #535353;
}

.detail-section-title2 {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333333;
}

.detail-section-title3 {
    font-size: 22px;
    font-weight: bold;
    margin-top: 10px;
    color: #183992;
}

.detail-section-title4 {
    font-size: 18px;
    margin-top: 4px;
    font-weight: bold;
    color: #535353;
}


.detail-flex{
    display: flex; /* 내부 요소들을 가로 정렬 */
    gap: 10px; /* 요소들 사이 여백 추가 */
    justify-content: space-between;
}

.detail-flex-full{
    display: flex; /* 내부 요소들을 가로 정렬 */
    gap: 10px; /* 요소들 사이 여백 추가 */
    width:100%;
}
.detail-confirm-btn {

    width: 30%;
    padding: 10px;
    background: #0191d8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-weight: bold;
}
.detail-confirm-btn:hover {
    background: #0191d8;
}

.detail-comment-more{
    cursor: pointer;
}

.detail-gap{
    display: flex; /* 내부 요소들을 가로 정렬 */
    margin-bottom: 20px;
}

.detail-gap-2{
    margin-bottom: 40px;
}
.detail-gap-flex{
    display: flex; /* 내부 요소들을 가로 정렬 */
}
.detail-blue{
    color: #1b57fd;
    font-size: 17px;
}

.detail-blue-more{
    color: #1b57fd;
    font-size: 17px;
    font-weight: bold;
}


.detail-gray{
    color: #5f5f5f;
    font-size: 17px;
}
.detail-blue2{
    color: #183992;
    font-size: 24px;
}

.detail-right{
    text-align: right;
}

.max-width-title{
    max-width:650px;
    width: 650px;
}
.max-width-title2{
    max-width:550px;
    width: 550px;
}

.video-container{
    position: relative;
    width: 170px;
    max-width: 170px;
    height: 120px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.video-container2{
    position: relative;
    width: 140px;
    height: 100px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
}

.custom-button {
    margin-top: 10px;
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #0191d8, rgb(168, 74, 255));
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    /*box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);*/
}

.custom-button:hover {
    background: linear-gradient(135deg, rgb(137, 196, 255), royalblue);
    transform: translateY(-3px);
    /*box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);*/
}


/*-----------------------------comments------------------------------------*/


.commentsPopup {
    overflow-y:auto;
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    max-height: 600px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    flex-direction: column;
    gap: 15px;
    z-index: 1130; /* 영상 정보 모달(1120)보다 위에 표시 */
    justify-content: center;
    font-family: 'Pretendard', sans-serif;

}

.comment-rounded-box-full {
    background: #f9f9f9;
    display:flex;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width:90%;
    height:auto;
}

.replyAuthorImage{
    width: 40px;
    height: 40px;
    border-radius: 50px;
    margin-right: 10px;

}
.replyAuthor{
    color:#1b57fd;
    font-size: 16px;
    font-weight: bold;

}

.commentDetail{
    display: flex;
    flex-direction: column;
    width: 100%;
}

.closeCommentButton{
    cursor: pointer;
    background: #0191d8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    padding: 10px 15px;
    font-weight: bold;
    transition: all 0.3s ease;
    bottom: 0;
}

.showReplyButton{
    cursor: pointer;
    background: #4e4e4e;
    color: white;
    border: none;
    border-radius: 11px;
    font-size: 13px;
    padding: 5px 10px;
    transition: all 0.3s ease;
}


.closeCommentButtonDiv{
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;

}
.replyDiv{
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 25px;
    margin-bottom: 25px;

}
.repliesDiv{
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
    color: #2f439e;
    border-bottom: #000000;
}

/* ==================== 테이블 스타일 ==================== */

.main-table {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    top: 70px;
    overflow-y: auto;
    width: 95%;
    min-width: 0;          /* 1200px → 0: 뷰포트 넘침 방지 */
    max-width: 100%;
    max-height: 100vh;
    box-sizing: border-box;
    font-family: 'Pretendard', sans-serif;
}

.table-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 300px;
    max-height: 75vh;
    overflow-x: auto;  /* 테이블 내부만 가로 스크롤 */
    overflow-y: auto;  /* visible → auto: visible+non-visible 혼용 시 CSS 스펙 버그 방지 */
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    background: white;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

table {
    width: 98%; /* 100% → 98%로 변경하여 스크롤바 방지 */
    margin: 0 auto; /* 중앙 정렬 */
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    display: flex;
    flex-direction: column;
}

/* thead는 고정 */
table thead {
    display: block;
    width: 100%;
    flex-shrink: 0;
    overflow: visible; /* 툴팁이 thead 밖으로 나갈 수 있도록 */
}

table thead tr {
    display: table;
    width: calc(100% - 6px); /* 커스텀 스크롤바 6px 고려 */
    table-layout: fixed;
}

/* tbody만 스크롤 */
table tbody {
    display: block;
    width: 100%;
    overflow-y: scroll; /* 스크롤바 항상 표시 */
    overflow-x: hidden;
    max-height: calc(75vh - 60px); /* 헤더 높이 제외 */
}

table tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

/* thead th와 tbody td의 너비 강제 동기화 */
table thead th,
table tbody td {
    box-sizing: border-box;
}

/* 테이블 셀 공통 스타일 (개선된 스타일) */
th, td {
    border-bottom: 1px solid #e5e7eb;
    padding: 14px 12px;
    text-align: center;
    font-family: 'Pretendard', sans-serif;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    transition: all 0.2s ease;
}

/* td만 relative 포지션 (th는 sticky를 위해 제외) */
tbody td {
    position: relative;
}

/* 줄무늬 패턴 (zebra striping) */
tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

/* 행 호버 효과 */
tbody tr:hover {
    background-color: #f0f9ff !important;
    box-shadow: 0 2px 8px rgba(1, 145, 216, 0.1);
    transform: translateY(-1px);
}

/* 테이블별 추가 스타일 */
#resultTable, #resultTable2, #resultTable3, #resultTable4 {
    border-radius: 12px;
    overflow: hidden;
}

/* 영상/채널 테이블 전체 설정 */
.videoTableMain, .channelTableMain {
    width: 100%;
    table-layout: fixed;
}

/* ==================== 영상 테이블 컬럼 너비 설정 ==================== */
/* 영상 테이블은 첫 번째 td가 숨겨진 videoID이므로 td 인덱스는 +1 */
.videoTableMain th:nth-child(1) { width: 5%; }     /* 체크박스 헤더 */
.videoTableMain td:nth-child(1) { width: 0; display: none; }  /* 숨겨진 videoID */
.videoTableMain td:nth-child(2) { width: 5%; }     /* 체크박스 데이터 */

.videoTableMain th:nth-child(2), .videoTableMain td:nth-child(3) { width: 10.27%; }  /* 썸네일 */
.videoTableMain th:nth-child(3), .videoTableMain td:nth-child(4) { width: 20.54%; }  /* 제목 (25.68% → 20.54%, 20% 감소) */
.videoTableMain th:nth-child(4), .videoTableMain td:nth-child(5) { width: 6.42%; }  /* 조회수 */
.videoTableMain th:nth-child(5), .videoTableMain td:nth-child(6) { width: 11.56%; }  /* 구독자 (6.42% → 11.56%, 5.14% 증가) */
.videoTableMain th:nth-child(6), .videoTableMain td:nth-child(7) { width: 6.42%; }  /* 실적도 */
.videoTableMain th:nth-child(7), .videoTableMain td:nth-child(8) { width: 6.42%; }  /* 공헌도 */
.videoTableMain th:nth-child(8), .videoTableMain td:nth-child(9) { width: 10.27%; }  /* 게시일 */
.videoTableMain th:nth-child(9), .videoTableMain td:nth-child(10) { width: 11.56%; }  /* 좋아요 */
.videoTableMain th:nth-child(10), .videoTableMain td:nth-child(11) { width: 5.77%; } /* 댓글 */
.videoTableMain th:nth-child(11), .videoTableMain td:nth-child(12) { width: 5.77%; } /* 영상수 */
/* 합계: 5 + 10.27*2 + 20.54 + 6.42*3 + 11.56*2 + 10.27 + 5.77*2 = 100% */

/* ==================== 채널 분석 테이블 컬럼 너비 설정 (모달 전용) ==================== */
/* 분석 테이블은 td[0]=숨김ID(+display:none), td[1]=체크박스, td[2]=썸네일 ... 구조 */
/* th는 11개(체크박스~영상수), td는 12개(숨김포함) — videoTableMain과 동일한 오프셋 패턴 */
#analysisResultTable td:nth-child(1)  { width: 0; display: none; }  /* 숨김 videoID */
#analysisResultTable th:nth-child(1)                               { width: 4%; }   /* 체크박스 헤더 */
#analysisResultTable td:nth-child(2)                               { width: 4%; }   /* 체크박스 데이터 */
#analysisResultTable th:nth-child(2), #analysisResultTable td:nth-child(3)  { width: 12%; }  /* 썸네일 */
#analysisResultTable th:nth-child(3), #analysisResultTable td:nth-child(4)  { width: 22%; }  /* 제목 */
#analysisResultTable th:nth-child(4), #analysisResultTable td:nth-child(5)  { width: 7%; }   /* 조회수 */
#analysisResultTable th:nth-child(5), #analysisResultTable td:nth-child(6)  { width: 14%; }  /* 구독자 */
#analysisResultTable th:nth-child(6), #analysisResultTable td:nth-child(7)  { width: 7%; }   /* 알고리즘적합도 */
#analysisResultTable th:nth-child(7), #analysisResultTable td:nth-child(8)  { width: 7%; }   /* 채널기여도 */
#analysisResultTable th:nth-child(8), #analysisResultTable td:nth-child(9)  { width: 9%; }   /* 게시일 */
#analysisResultTable th:nth-child(9), #analysisResultTable td:nth-child(10) { width: 7%; }   /* 좋아요 */
#analysisResultTable th:nth-child(10), #analysisResultTable td:nth-child(11){ width: 6%; }   /* 댓글 */
#analysisResultTable th:nth-child(11), #analysisResultTable td:nth-child(12){ width: 5%; }   /* 영상수 */
/* 합계: 4 + 12 + 22 + 7 + 14 + 7 + 7 + 9 + 7 + 6 + 5 = 100% */

/* ==================== 채널 테이블 컬럼 너비 설정 ==================== */
/* 채널 테이블은 첫 번째 td가 숨겨진 channelID이므로 td 인덱스는 +1 */
.channelTableMain th:nth-child(1) { width: 5%; }     /* 체크박스 헤더 */
.channelTableMain td:nth-child(1) { width: 0; display: none; }  /* 숨겨진 channelID */
.channelTableMain td:nth-child(2) { width: 5%; }     /* 체크박스 데이터 */

.channelTableMain th:nth-child(2), .channelTableMain td:nth-child(3) { width: 28.68%; }  /* 채널명 (20% 감소: 35.85 * 0.8) */
.channelTableMain th:nth-child(3), .channelTableMain td:nth-child(4) { width: 15.77%; } /* 채널개설일 (+1.43) */
.channelTableMain th:nth-child(4), .channelTableMain td:nth-child(5) { width: 10.39%; }  /* 구독자수 (+1.43) */
.channelTableMain th:nth-child(5), .channelTableMain td:nth-child(6) { width: 10.39%; }  /* 조회수 (+1.43) */
.channelTableMain th:nth-child(6), .channelTableMain td:nth-child(7) { width: 10.39%; }  /* 컨텐츠파워 (+1.43) */
.channelTableMain th:nth-child(7), .channelTableMain td:nth-child(8) { width: 10.39%; }  /* 채널성장속도 (+1.43) */
.channelTableMain th:nth-child(8), .channelTableMain td:nth-child(9) { width: 10.39%; }  /* 총영상수 (+1.43) */
/* 합계: 5 + 28.68 + 15.77 + 10.39*5 = 100% */

th {
    cursor: pointer;
    font-weight: 600;
    border: none;
    position: relative; /* 툴팁 위치 기준점 */
    overflow: visible; /* 툴팁이 셀 밖으로 나갈 수 있도록 */
    background: linear-gradient(135deg, #0191d8 0%, #016ba3 100%);
    color: white;
    font-size: 14px;
    padding: 16px 12px;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 헤더 호버 효과 */
th:hover {
    background: linear-gradient(135deg, #0280c7 0%, #015a8a 100%);
    box-shadow: 0 4px 8px rgba(1, 145, 216, 0.3);
}

/* ==================== 테이블 헤더 고정 스타일 ==================== */
/* thead와 tbody 구조 분리로 헤더 자동 고정 */
table thead th {
    background: linear-gradient(135deg, #0191d8 0%, #016ba3 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* ==================== 채널 정보 모달 스타일 ==================== */

#channelDetailsPopup.detail-popup {
    overflow-y: auto;
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 1100px;
    min-width: 900px;
    max-height: 750px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 16px;
    z-index: 1110; /* popupOverlay(1100)보다 위에 표시 */
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15), 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 0;
    font-family: 'Pretendard', sans-serif;
    border: 1px solid rgba(102, 126, 234, 0.1);
    animation: fadeInScale 0.4s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.detail-grid-container {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 0 20px;
}

.detail-rounded-box-full {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.08);
    width: 100%;
    transition: all 0.3s ease;
}

.detail-rounded-box-full:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.15);
}

.detail-rounded-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.08);
    max-width: 50%;
    width: 50%;
    transition: all 0.3s ease;
}

.detail-rounded-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.15);
}

.detail-section-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #535353;
}

.detail-section-title2 {
    font-size: 26px;
    font-weight: bold;
    margin: 0;
    margin-bottom: 20px;
    padding: 24px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.detail-section-title4 {
    font-size: 18px;
    margin-top: 4px;
    font-weight: bold;
    color: #535353;
}

.detail-flex-full {
    display: flex;
    gap: 10px;
    width: 100%;
}

.detail-gap {
    display: flex;
    margin-bottom: 20px;
    gap: 5px;
    align-items: center;
}

.detail-blue {
    color: #667eea;
    font-size: 17px;
    font-weight: 600;
}

.detail-blue2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 28px;
    font-weight: 800;
    display: inline-block;
}

.detail-gray {
    color: #5f5f5f;
    font-size: 17px;
}

.max-width-title2 {
    max-width: 700px;
    width: 700px;
    min-width: 600px;
}

/* 채널 썸네일 */
.channel-thumbnail-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-width: 120px;
}

.channel-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

/* 채널 통계 그리드 */
.channel-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    grid-template-rows: auto !important;
    gap: 10px !important;
    justify-items: stretch;
    align-items: start;
    max-width: 100%;
    margin: 12px 0 0 !important;
    padding: 0;
    width: 100%;
}

.channel-stats-grid .stats-card {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 12px 10px !important;
}

/* 통계 카드 */
.stats-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    margin: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
    max-width: 200px;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.stats-icon {
    font-size: 28px;
    min-width: 35px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.stats-content {
    flex: 1;
    color: white;
}

.stats-number {
    font-size: 20px;
    font-weight: 800;
    color: white;
    line-height: 1.2;
}

.stats-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 4px;
}

/* 채널 성과 지표 */
.channel-performance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.channel-performance-item:last-child {
    border-bottom: none;
}

/* YouTube 버튼 */
.channel-buttons-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.detail-youtube-btn {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.detail-youtube-btn:hover {
    background: linear-gradient(135deg, #e63939, #b00000);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.5);
}

/* 닫기 버튼 */
.closeCommentButtonDiv {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(to top, rgba(248, 249, 255, 0.95), transparent);
    backdrop-filter: blur(10px);
    border-radius: 0 0 16px 16px;
}

.closeCommentButton {
    cursor: pointer;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    padding: 14px 32px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.closeCommentButton:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #7c88ea 0%, #8a63b2 100%);
}

/* 태그 스타일 */
.detail-popup #channel-info2-1 {
    font-family: 'Arial', sans-serif !important;
    line-height: 1.8 !important;
    word-spacing: 5px !important;
    color: #667eea !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    letter-spacing: 0.5px !important;
}

/* 반응형 */
@media screen and (max-width: 768px) {
    .detail-popup {
        width: 98%;
        min-width: 910px; /* 700px → 910px (30% 증가) */
        max-height: 90vh;
    }
    
    .detail-grid-container {
        flex-direction: column;
    }
    
    .detail-rounded-box {
        min-width: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .channel-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    .stats-card {
        padding: 10px 8px !important;
    }
}

/*-----------------------------채널 분석 섹션 스타일------------------------------------*/

/* 채널·영상 테이블 내 분석 버튼 — 상단 필터 칩(.pc-filter-chip)과 동일 톤 */
.analyze-button-inline {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-width: 72px;
    padding: 0 14px;
    border: 1.5px solid var(--pc-border);
    border-radius: 20px;
    background: #fff !important;
    background-image: none !important;
    color: var(--pc-text);
    font-size: 13px;
    font-weight: 600;
    font-family: 'Pretendard', sans-serif;
    cursor: pointer;
    text-align: center;
    line-height: 1;
    transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
    box-shadow: none;
    transform: none;
}
.analyze-button-inline:hover {
    border-color: var(--pc-red);
    color: var(--pc-red);
    background: #fff8f8 !important;
    background-image: none !important;
    box-shadow: none;
}
.analyze-button-inline:active {
    transform: none;
}

/* 분석 데이터가 있을 때 — 레드 포인트 강조(칩 스타일 유지) */
.analyze-button-inline.analyze-button-done {
    border-color: var(--pc-red);
    color: var(--pc-red);
    background: #fff8f8 !important;
    background-image: none !important;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(232, 25, 44, 0.12);
}
.analyze-button-inline.analyze-button-done:hover {
    background: #ffefef !important;
    background-image: none !important;
    border-color: #c0152a;
    color: #c0152a;
}

/* 채널 분석 결과 영역 */
/* ═══ 채널 영상 분석 모달 — PopChoice 테마 ═══ */
#channelAnalysisSection {
    position: fixed;
    top: 3vh;
    bottom: 3vh;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1400px;
    height: auto;
    min-height: 0;
    max-height: none;
    z-index: 1001;
    background: #fff !important;
    padding: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 60px rgba(0,0,0,0.15) !important;
    border: 1px solid var(--pc-border) !important;
    border-top: 3px solid var(--pc-red) !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
}

#channelAnalysisSection:not([style*="display: none"]) {
    display: flex !important;
    flex-direction: column !important;
}

/* ── 닫기 버튼 ── */
#channelAnalysisSection .analysis-close-btn {
    position: absolute !important;
    top: 14px !important;
    right: 16px !important;
    width: 32px !important;
    height: 32px !important;
    background: #F1F5F9 !important;
    color: #64748B !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    z-index: 1010 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s !important;
    box-shadow: none !important;
}
#channelAnalysisSection .analysis-close-btn:hover {
    background: var(--pc-red) !important;
    color: #fff !important;
    transform: none !important;
}

/* ── 헤더 영역 ── */
.analysis-header {
    padding: 18px 52px 14px 24px;
    background: #FAFBFC;
    border-bottom: 1.5px solid var(--pc-border);
    flex-shrink: 0;
    min-height: unset;
    margin: 0 !important;
    text-align: left !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--pc-text) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── 검색 버튼 영역 ── */
.analysis-search-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px 24px 0;
    flex-shrink: 0;
}

.analysis-search-btn {
    background: var(--pc-red);
    color: #fff;
    border: 2px solid var(--pc-red);
    padding: 9px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Pretendard', sans-serif;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    box-shadow: none;
    min-width: 130px;
}
.analysis-search-btn:hover {
    background: #C0152A;
    border-color: #C0152A;
    transform: none;
    box-shadow: none;
}
.analysis-search-btn:active { transform: none; }

/* 데이터는 있지만 현재 보고 있지 않은 상태: 아웃라인 스타일 */
.analysis-search-btn.has-data {
    background: #fff;
    color: var(--pc-red);
    border: 2px solid var(--pc-red);
}
.analysis-search-btn.has-data:hover {
    background: #FFF0F0;
    border-color: #C0152A;
    color: #C0152A;
}

/* 현재 보고 있는 상태: 진한 색으로 강조 */
.analysis-search-btn.is-active {
    background: var(--pc-red);
    color: #fff;
    border: 2px solid var(--pc-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
}
.analysis-search-btn.is-active:hover {
    background: #C0152A;
    border-color: #C0152A;
}

.analysis-search-btn:disabled {
    background: #CBD5E1;
    color: #94A3B8;
    border-color: #CBD5E1;
    cursor: not-allowed;
    opacity: 1;
    box-shadow: none;
}

/* ── 진행 상태 표시 ── */
#searchProgress {
    margin: 10px 24px 0;
    padding: 11px 16px;
    text-align: center;
    background: #FFF5F5;
    border-radius: 8px;
    border: 1px solid #FECDD3;
    box-shadow: none;
}
#searchProgress span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--pc-red);
    font-size: 13px;
    font-weight: 600;
}

#searchProgress span::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid #1565C0;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spinner-rotate 0.8s linear infinite;
}

@keyframes spinner-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.searchProgress {
    margin-top: 10px;
    text-align: center;
    color: #666;
    font-size: 13px;
}

/* 분석 섹션 테이블 컨테이너 — 모달 높이에 맞춰 영역 확장 */
#channelAnalysisSection .table-container {
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    max-width: 100%;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-bottom: 12px !important;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    background: white;
}

/* 커스텀 스크롤바 */
#channelAnalysisSection .table-container::-webkit-scrollbar {
    width: 6px !important;
    height: 6px !important;
}

#channelAnalysisSection .table-container::-webkit-scrollbar-track {
    background: #F5F6F8 !important;
    border-radius: 3px;
}

#channelAnalysisSection .table-container::-webkit-scrollbar-thumb {
    background: #D0D3DD !important;
    border-radius: 3px !important;
    border: none !important;
    min-height: 30px;
}

#channelAnalysisSection .table-container::-webkit-scrollbar-thumb:hover {
    background: var(--pc-red) !important;
}

/* Firefox 스크롤바 */
#channelAnalysisSection .table-container {
    scrollbar-width: thin !important;
    scrollbar-color: #D0D3DD #F5F6F8 !important;
}

/* 분석 테이블 스타일 */
#analysisResultTable {
    font-size: 12px !important;
    border-spacing: 0 !important;
    margin-bottom: 30px !important;
}

#analysisResultTable td,
#analysisResultTable th {
    padding: 3px 5px !important;
    line-height: 1.1 !important;
    margin: 0 !important;
}

/* ==================== 채널 분석 테이블 ==================== */
#analysisResultTable {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

#analysisResultTable thead {
    display: block !important;
    width: 100% !important;
    flex-shrink: 0 !important;
    background: #F8F9FC !important;
}

#analysisResultTable thead tr {
    display: table !important;
    width: calc(100% - 17px) !important;
    table-layout: fixed !important;
}

#analysisResultTable thead th {
    background: #F8F9FC !important;
    color: #6B7180 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    border-bottom: 1.5px solid var(--pc-border) !important;
    box-shadow: none !important;
}

#analysisResultTable tbody {
    display: block !important;
    width: 100% !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

#analysisResultTable tbody tr {
    display: table !important;
    width: 100% !important;
    table-layout: fixed !important;
}

/* ── 분석 모달 내 menu-bar / search-button 오버라이드 ── */
#channelAnalysisSection .menu-bar {
    padding: 10px 24px 0 !important;
    background: transparent !important;
    border: none !important;
    flex-shrink: 0;
}
#channelAnalysisSection .button-group {
    display: flex !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}
#channelAnalysisSection .search-button {
    height: 30px !important;
    padding: 0 14px !important;
    border: 1.5px solid var(--pc-border) !important;
    border-radius: 20px !important;
    background: #fff !important;
    color: var(--pc-text) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    font-family: 'Pretendard', sans-serif !important;
    cursor: pointer !important;
    transition: all 0.15s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    box-shadow: none !important;
    background-image: none !important;
}
#channelAnalysisSection .search-button:hover {
    border-color: var(--pc-red) !important;
    color: var(--pc-red) !important;
    background: #FFF8F8 !important;
    transform: none !important;
    box-shadow: none !important;
}
#channelAnalysisSection .search-button img {
    width: 12px !important;
    height: 12px !important;
    filter: brightness(0) saturate(100%) !important;
}
#channelAnalysisSection .search-button:hover img {
    filter: brightness(0) saturate(100%) invert(13%) sepia(94%) saturate(4000%) hue-rotate(344deg) !important;
}

/* ── 분석 모달 테이블 컨테이너 ── */
#channelAnalysisSection .main-table {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 10px 24px 16px !important;
}
#channelAnalysisSection .table-container {
    border-radius: 10px !important;
    border: 1px solid var(--pc-border) !important;
    box-shadow: none !important;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    height: auto !important;
    overflow: hidden !important;
}
#channelAnalysisSection #analysisResultTable {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    margin-bottom: 0 !important;
}

/* 분석 모달 배경 */
.analysis-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.analysis-backdrop.show {
    opacity: 1;
}

/* body 스크롤 방지 */
body.modal-open {
    overflow: hidden;
}

/* ===== POPCHOICE 전용 오버라이드 ===== */

:root {
    --pc-red: #E8192C;
    --pc-red-hover: #C41224;
    --pc-bg: #F5F6F8;
    --pc-white: #FFFFFF;
    --pc-border: #E2E4E8;
    --pc-text: #1A1A2E;
    --pc-text-muted: #8B8FA8;
    --pc-shadow: 0 2px 12px rgba(0,0,0,0.07);
    --pc-nav-h: 56px;
}

html, body { height: 100%; overflow-x: hidden; margin: 0; }

body.pc-body {
    display: flex;
    flex-direction: column;
    background: var(--pc-bg);
    font-family: 'Pretendard', sans-serif;
}

/* ─── 상단 탭 내비게이션 ─── */
.pc-topnav {
    height: var(--pc-nav-h);
    background: var(--pc-white);
    border-bottom: 1px solid var(--pc-border);
    display: flex;
    align-items: center;
    padding: 0 32px;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 950; /* .overlay spinner(900)보다 높여서 로딩 중에도 버튼 클릭 가능 */
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    gap: 0;
}

.pc-topnav-logo {
    font-size: 18px;
    font-weight: 900;
    color: var(--pc-red);
    margin-right: 36px;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.pc-topnav-tabs { display: flex; flex: 1; }

a.pc-tab-btn {
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}

.pc-tab-btn {
    height: var(--pc-nav-h);
    padding: 0 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--pc-text-muted);
    cursor: pointer;
    font-family: 'Pretendard', sans-serif;
    transition: all 0.15s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    position: static;
}
.pc-tab-btn:hover { color: var(--pc-text); background: #FFF8F8; }
.pc-tab-btn.active {
    display: inline-flex !important; /* .active{display:block} 전역 규칙 무력화 */
    color: var(--pc-red);
    border-bottom-color: var(--pc-red);
    font-weight: 700;
    background: transparent;
    transform: none;
    animation: none !important; /* fadeIn 애니메이션도 제거 */
}

.pc-topnav-right { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }

.pc-nav-action {
    height: 32px;
    padding: 0 12px;
    border: none;
    background: transparent;
    color: var(--pc-text-muted);
    font-size: 13px;
    font-family: 'Pretendard', sans-serif;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}
.pc-nav-action:hover { background: #F5F5F7; color: var(--pc-text); }
.pc-nav-action.danger:hover { background: #FFF0F1; color: var(--pc-red); }
.pc-nav-action .tooltip {
    left: 50%;
    transform: translateX(-50%);
    top: calc(100% + 6px);
    white-space: nowrap;
    font-size: 12px;
    padding: 6px 10px;
    background: #1A1A2E;
    color: white;
    border: none;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.pc-nav-action:hover .tooltip { visibility: visible; opacity: 1; }

/* ─── 이용횟수 툴팁 (헤더 #myUsage 전용, PopChoice) ─── */
#myUsageTooltip.pc-usage-tooltip.tooltip,
.pc-nav-action .tooltip.pc-usage-tooltip {
    width: auto;
    min-width: 248px;
    max-width: 300px;
    padding: 0;
    white-space: normal;
    word-break: break-word;
    text-align: left;
    background: #fff;
    color: #12121f;
    border: 1px solid var(--pc-border, #e8e8ed);
    border-top: 3px solid var(--pc-red, #E8192C);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(15, 15, 26, 0.14);
    font-family: 'Pretendard', sans-serif;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 400;
    z-index: 1300;
    pointer-events: none;
}
.myUsageButton:hover #myUsageTooltip.pc-usage-tooltip,
.pc-nav-action:hover #myUsageTooltip.pc-usage-tooltip {
    padding: 0 !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    white-space: normal !important;
}
#myUsageTooltip.pc-usage-tooltip.tooltip::before {
    border-bottom-color: var(--pc-border, #e8e8ed);
}
#myUsageTooltip.pc-usage-tooltip.tooltip::after {
    border-bottom-color: #fff;
    top: -5px;
}
#myUsageTooltip .pc-usage-tip {
    padding: 12px 14px 14px;
}
#myUsageTooltip .pc-usage-tip__kicker {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #8b90a8;
    margin-bottom: 6px;
}
#myUsageTooltip .pc-usage-tip__user {
    font-size: 15px;
    font-weight: 800;
    color: #12121f;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    line-height: 1.25;
}
#myUsageTooltip .pc-usage-tip__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}
#myUsageTooltip .pc-usage-tip__label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}
#myUsageTooltip .pc-usage-tip__val {
    font-size: 13px;
    font-weight: 800;
    color: #1e293b;
}
#myUsageTooltip .pc-usage-tip__block {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f2f8;
}
#myUsageTooltip .pc-usage-tip__ratio {
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #12121f;
}
#myUsageTooltip .pc-usage-tip__slash {
    font-weight: 600;
    color: #94a3b8;
}
#myUsageTooltip .pc-usage-tip__bar {
    height: 7px;
    margin-top: 8px;
    border-radius: 999px;
    background: #eef0f6;
    overflow: hidden;
}
#myUsageTooltip .pc-usage-tip__bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--pc-red, #E8192C) 0%, #f55369 100%);
    min-width: 0;
    transition: width 0.25s ease;
}
#myUsageTooltip .pc-usage-tip--err .pc-usage-tip__err {
    margin: 0;
    padding: 10px 4px;
    font-size: 12px;
    font-weight: 600;
    color: #b91c1c;
    text-align: center;
}

/* ─── 콘텐츠 ─── */
.pc-content { margin-top: var(--pc-nav-h); flex: 1; background: var(--pc-bg); }

.pc-content .main { padding: 0; text-align: left; }

.pc-content .main.pc-topic-page {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--pc-nav-h, 52px));
}

/* ─── 검색 히어로 ─── */
.pc-search-hero {
    background: var(--pc-white);
    padding: 28px 40px 20px;
    border-bottom: 1px solid var(--pc-border);
}

.pc-search-row { display: flex; align-items: center; gap: 10px; max-width: 860px; }

.pc-search-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--pc-bg);
    border: 1.5px solid var(--pc-border);
    border-radius: 10px;
    padding: 0 16px;
    height: 48px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.pc-search-wrap:focus-within {
    border-color: var(--pc-red);
    background: white;
    box-shadow: 0 0 0 3px rgba(232,25,44,0.08);
}
.pc-search-wrap input {
    flex: 1; border: none; background: transparent; outline: none;
    font-size: 15px; font-family: 'Pretendard', sans-serif; color: var(--pc-text); height: 100%; padding: 0;
}
.pc-search-wrap input::placeholder { color: #B8BCC8; }
.pc-search-icon { color: #B8BCC8; margin-right: 10px; font-size: 17px; }

.pc-search-submit {
    height: 48px;
    padding: 0 28px;
    background: var(--pc-red);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Pretendard', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.pc-search-submit:hover { background: var(--pc-red-hover); }

/* ─── 필터 칩 ─── */
.pc-filter-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.pc-filter-chip {
    height: 32px;
    padding: 0 14px;
    border: 1.5px solid var(--pc-border);
    border-radius: 20px;
    background: white;
    color: var(--pc-text);
    font-size: 13px;
    font-family: 'Pretendard', sans-serif;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.pc-filter-chip:hover { border-color: var(--pc-red); color: var(--pc-red); background: #FFF8F8; }
.pc-filter-chip img { width: 13px; height: 13px; }

/* 수집 버튼 — 항목 선택 시 활성 스타일 */
.pc-filter-chip.collect-active {
    background: var(--pc-red) !important;
    color: #fff !important;
    border-color: var(--pc-red) !important;
    box-shadow: 0 2px 10px rgba(232,25,44,0.25);
    animation: collectPulse 0.3s ease;
}
.pc-filter-chip.collect-active:hover {
    background: #C0152A !important;
    border-color: #C0152A !important;
    color: #fff !important;
}
/* 채널 분석 모달 영상 수집 버튼 활성 상태 */
.search-button.collect-active {
    background: var(--pc-red) !important;
    color: #fff !important;
    border-color: var(--pc-red) !important;
    box-shadow: 0 2px 10px rgba(232,25,44,0.25);
    animation: collectPulse 0.3s ease;
}
.search-button.collect-active:hover {
    background: #C0152A !important;
    border-color: #C0152A !important;
    color: #fff !important;
}
@keyframes collectPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.07); }
    100% { transform: scale(1); }
}

/* ─── 결과 영역 ─── */
.pc-results-area { padding: 20px 40px 0; }
.pc-tab-content-wrap { padding: 24px 40px 0; }

/* ─── 메뉴바 오버라이드 ─── */
.pc-content .menu-bar {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 8px; padding: 0 0 14px; border-bottom: none; margin-bottom: 14px;
    height: auto;
    width: auto;
}
.pc-content .menu-bar .button-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ─── 버튼 오버라이드 ─── */
.pc-content .search-button {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 5px; height: 34px; padding: 0 14px;
    font-size: 13px; font-family: 'Pretendard', sans-serif; font-weight: 500;
    background: white; border: 1.5px solid var(--pc-border); border-radius: 8px;
    color: #4A4F6A; cursor: pointer; transition: all 0.15s; white-space: nowrap; position: static;
}
.pc-content .search-button:hover { background: #FFF0F1; border-color: var(--pc-red); color: var(--pc-red); }
.pc-content .search-button img { height: 15px; width: 15px; }
.pc-content .search-button::after, .pc-content .search-button::before { display: none; }

.pc-content .search-input {
    height: 34px; padding: 0 12px;
    border: 1.5px solid var(--pc-border); border-radius: 8px;
    font-size: 13px; font-family: 'Pretendard', sans-serif;
    min-width: 200px; outline: none; background: white; transition: border-color 0.15s;
}
.pc-content .search-input:focus { border-color: var(--pc-red); box-shadow: 0 0 0 3px rgba(232,25,44,0.08); }

.pc-content select {
    height: 34px; padding: 0 10px;
    border: 1.5px solid var(--pc-border); border-radius: 8px;
    font-size: 13px; font-family: 'Pretendard', sans-serif; background: white; outline: none; cursor: pointer;
}

/* ─── 테이블 오버라이드 ─── */
.pc-content .main-table {
    min-width: 0 !important;      /* base의 1200px 무력화 */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

.pc-content .table-container {
    border-radius: 12px;
    box-shadow: var(--pc-shadow);
    border: 1px solid var(--pc-border);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;             /* 테이블 자체의 가로 스크롤은 컨테이너 내에서만 */
    overflow-y: auto;
    max-height: 68vh;
    background: white;
}

.pc-content table thead { background: #F8F9FC !important; }
.pc-content table thead tr { background: #F8F9FC !important; }

.pc-content table thead th {
    background: #F8F9FC !important;
    color: #6B7180 !important;
    font-weight: 600;
    font-size: 12px;
    padding: 12px 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 1.5px solid var(--pc-border);
    box-shadow: none !important;
    text-shadow: none;
}
.pc-content table thead th:hover { background: #F0F2FA !important; color: var(--pc-red) !important; box-shadow: none !important; }

.pc-content table tbody tr:nth-child(even) { background-color: #FAFBFE; }
.pc-content table tbody tr:nth-child(odd) { background-color: #FFFFFF; }
.pc-content table tbody tr:hover { background-color: #FFF5F6 !important; box-shadow: none; transform: none; }
.pc-content table tbody td { border-bottom: 1px solid #F0F2F5; padding: 10px; font-size: 13px; }

/* 체크된 행 */
.pc-content tbody tr:has(input[type="checkbox"]:checked) {
    background-color: #FFF0F1 !important;
    border-left: 3px solid var(--pc-red);
}

/* 하이라이트 */
.pc-content .highlight { background-color: #FFF0F1 !important; border-left: 3px solid var(--pc-red) !important; }
.pc-content .more_than { background-color: #F0FFF4 !important; border-left: 3px solid #10b981 !important; }

/* ─── 검색 내역 드롭다운 영역 ─── */
.pc-search-hero .hidden-div {
    width: 100%;
    margin-top: 10px;
    padding: 14px 16px;
    background: #FFFFFF;
    border: 1px solid var(--pc-border);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    box-sizing: border-box;
}

/* 제목 행 */
.pc-search-hero .tagDesc {
    margin-bottom: 10px;
    gap: 0;
}
.pc-search-hero .tagDesc .tag-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--pc-text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: none;
    padding: 0;
}

/* 태그 컨테이너 */
.pc-search-hero .tag-container {
    justify-content: flex-start;
    gap: 6px;
}
.pc-search-hero .tag-container .tag {
    display: inline-flex;
}

/* 일반 검색 내역 버튼 */
.pc-search-hero .history-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #F5F6F8;
    color: var(--pc-text);
    font-family: 'Pretendard', sans-serif;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--pc-border);
    border-radius: 20px;
    padding: 5px 12px 5px 14px;
    margin-left: 0;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pc-search-hero .history-button:hover {
    background: #FFF0F1;
    border-color: var(--pc-red);
    color: var(--pc-red);
}

/* 최신 검색 내역 버튼 (강조) */
.pc-search-hero .history-button-latest {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--pc-red);
    color: #FFFFFF;
    font-family: 'Pretendard', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--pc-red);
    border-radius: 20px;
    padding: 5px 14px;
    margin-left: 0;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}
.pc-search-hero .history-button-latest:hover {
    background: #C0152A;
    border-color: #C0152A;
}

/* × 닫기 버튼 */
.pc-search-hero .close-btn {
    font-size: 11px;
    font-weight: 700;
    color: var(--pc-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    position: static;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}
.pc-search-hero .close-btn:hover {
    color: var(--pc-red);
}

/* ─── 채널 분석 섹션 (top-bar 없으므로 위치 재조정) ─── */
#channelAnalysisSection {
    top: calc(var(--pc-nav-h) + 2vh) !important;
    bottom: 2vh !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 95% !important;
    max-width: 1400px !important;
}

/* ─── 푸터 ─── */
.pc-content footer {
    display: flex; justify-content: center; align-items: center;
    flex-wrap: wrap; gap: 12px;
    padding: 14px 0 24px;
    font-size: 12px; color: #94a3b8;
    border-top: 1px solid var(--pc-border); margin-top: 16px;
}
.pc-content footer a { color: #94a3b8; text-decoration: none; }
.pc-content footer a:hover { color: var(--pc-red); }

/* ─── 로그아웃 모달 (PopChoice) ─── */
#logoutModal.pc-logout-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(380px, calc(100vw - 32px));
    margin: 0;
    padding: 0;
    z-index: 1200;
    font-family: 'Pretendard', sans-serif;
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--pc-border, #e8e8ed);
    border-top: 3px solid var(--pc-red, #E8192C);
    box-shadow: 0 20px 48px rgba(15, 15, 26, 0.16), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    overflow: hidden;
    box-sizing: border-box;
}
#logoutModal .pc-logout-modal__inner {
    padding: 22px 24px 20px;
}
#logoutModal .pc-logout-modal__title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.45;
    color: #12121f;
    letter-spacing: -0.02em;
}
#logoutModal .pc-logout-modal__desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 400;
    color: #64748b;
}
#logoutModal .pc-logout-modal__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
}
#logoutModal .pc-logout-modal__btn {
    margin: 0;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: 'Pretendard', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
    border: 1.5px solid transparent;
    min-width: 96px;
}
#logoutModal .pc-logout-modal__btn--ghost {
    background: #fff;
    color: #475569 !important;
    border-color: #e2e8f0;
    box-shadow: none;
}
#logoutModal .pc-logout-modal__btn--ghost:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b !important;
}
#logoutModal .pc-logout-modal__btn--primary {
    background: var(--pc-red, #E8192C);
    color: #fff !important;
    border-color: var(--pc-red, #E8192C);
    box-shadow: 0 2px 10px rgba(232, 25, 44, 0.28);
}
#logoutModal .pc-logout-modal__btn--primary:hover {
    background: #C0152A;
    border-color: #C0152A;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(232, 25, 44, 0.35);
}

/* ─── 랜딩 페이지 (비로그인) — 좌: 브랜딩·구글 / 우: 기능 카드 2×2 ─── */
/*
 * 전역 body { display:flex }(row) 때문에 자식이 1개일 때 가로로만 늘어나고 너비는 콘텐츠만큼만 잡혀
 * 오른쪽에 body의 흰 배경이 비는 현상이 난다. 랜딩 전용으로 세로 플렉스 + 100% 폭을 명시한다.
 */
body.pc-landing-body {
    margin: 0;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: linear-gradient(160deg, #06060c 0%, #0f0f18 38%, #14122a 100%);
}
.pc-landing {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
    font-family: 'Pretendard', sans-serif;
    padding: clamp(16px, 3vh, 36px) clamp(16px, 3vw, 40px) clamp(12px, 2vh, 24px);
    background: linear-gradient(160deg, #06060c 0%, #0f0f18 38%, #14122a 100%);
    color: #cdd6f4;
}
.pc-landing-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 1;
    background-image:
        radial-gradient(ellipse 70% 50% at 28% 35%, rgba(232, 25, 44, 0.1), transparent 52%),
        radial-gradient(ellipse 55% 45% at 78% 55%, rgba(255, 255, 255, 0.04), transparent 50%),
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: auto, auto, 56px 56px, 56px 56px;
    background-position: center, center, center, center;
}
.pc-landing-main {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: min(1160px, 100%);
    margin: 0 auto;
    gap: clamp(32px, 6vw, 88px);
    box-sizing: border-box;
}
.pc-landing-brand {
    flex: 0 1 400px;
    min-width: min(100%, 260px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.pc-landing-hero {
    text-align: center;
    width: 100%;
    max-width: 400px;
}
.pc-landing-logo {
    font-size: clamp(42px, 5.5vw, 56px);
    font-weight: 900;
    color: var(--pc-red);
    letter-spacing: -0.04em;
    line-height: 1;
    margin: 0 0 18px;
}
.pc-landing-tagline {
    font-size: clamp(15px, 1.9vw, 18px);
    color: #8b92b0;
    font-weight: 400;
    margin: 0 0 clamp(28px, 4vh, 44px);
    line-height: 1.65;
}
.pc-landing-tagline strong {
    color: #e8eaf8;
    font-weight: 600;
}
.pc-landing-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 40px;
    min-height: 52px;
    width: 100%;
    max-width: 320px;
    box-sizing: border-box;
    background: var(--pc-red);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    font-family: 'Pretendard', sans-serif;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.12s, box-shadow 0.2s;
    box-shadow: 0 6px 28px rgba(232, 25, 44, 0.45);
}
.pc-landing-btn-icon {
    flex-shrink: 0;
}
.pc-landing-btn:hover {
    background: var(--pc-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 36px rgba(232, 25, 44, 0.5);
}
.pc-landing-features {
    flex: 1 1 480px;
    min-width: min(100%, 280px);
    max-width: 520px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(14px, 2vw, 20px);
    align-content: center;
}
.pc-feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: clamp(140px, 20vh, 176px);
    padding: clamp(20px, 2.8vh, 28px) clamp(16px, 2vw, 22px);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}
.pc-feature-card:hover {
    background: rgba(232, 25, 44, 0.08);
    border-color: rgba(232, 25, 44, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.pc-feature-card-icon {
    font-size: clamp(32px, 4vw, 40px);
    line-height: 1;
    margin-bottom: 14px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
.pc-feature-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.pc-feature-card-title {
    font-size: clamp(14px, 1.5vw, 16px);
    font-weight: 700;
    color: #e8eaf8;
    letter-spacing: -0.02em;
}
.pc-feature-card-desc {
    font-size: clamp(12px, 1.25vw, 13px);
    color: #6c7294;
    margin-top: 0;
    line-height: 1.5;
    max-width: 20em;
}
.pc-landing-footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: clamp(16px, 2.5vh, 28px);
    font-size: 12px;
    color: #4a5068;
    text-align: center;
    width: 100%;
    max-width: 1160px;
    margin-left: auto;
    margin-right: auto;
}
.pc-landing-footer a {
    color: #5c6378;
    text-decoration: none;
}
.pc-landing-footer a:hover {
    color: var(--pc-red);
}

@media (max-width: 900px) {
    .pc-landing-main {
        flex-direction: column;
        align-items: center;
        gap: clamp(36px, 5vh, 56px);
        padding-bottom: 8px;
    }
    .pc-landing-brand {
        flex: none;
        width: 100%;
        max-width: 440px;
    }
    .pc-landing-features {
        flex: none;
        width: 100%;
        max-width: 480px;
    }
}

@media (max-width: 520px) {
    .pc-landing-features {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    .pc-feature-card {
        min-height: auto;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        gap: 14px;
        padding: 16px 18px;
    }
    .pc-feature-card-icon {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .pc-feature-card-body {
        align-items: flex-start;
        text-align: left;
        flex: 1;
        gap: 4px;
    }
    .pc-feature-card-desc {
        max-width: none;
    }
}

/* ─── 스크롤바 전면 오버라이드 (파란색 → PopChoice 중립 스타일) ─── */

/* 1) 페이지 전체 스크롤바 (html / body 레벨) */
body.pc-body::-webkit-scrollbar          { width: 8px; }
body.pc-body::-webkit-scrollbar-track    { background: #F0F1F5; }
body.pc-body::-webkit-scrollbar-thumb    { background: #C8CBD6; border-radius: 4px; }
body.pc-body::-webkit-scrollbar-thumb:hover { background: var(--pc-red); }

/* Firefox 세로 스크롤바 스타일 (overflow-x: clip은 가로 스크롤 차단 섹션에서 정의) */
body.pc-body {
    scrollbar-width: thin;
    scrollbar-color: #C8CBD6 #F0F1F5;
}

/* 2) pc-content 내부 스크롤바 (테이블 등) */
.pc-content ::-webkit-scrollbar          { width: 6px; height: 6px; }
.pc-content ::-webkit-scrollbar-track    { background: #F5F6F8; }
.pc-content ::-webkit-scrollbar-thumb    { background: #D0D3DD; border-radius: 3px; }
.pc-content ::-webkit-scrollbar-thumb:hover { background: var(--pc-red); }

/* 3) 테이블 컨테이너 스크롤바 (overflow는 상단 테이블 오버라이드 섹션에서 정의) */
.pc-content .table-container {
    scrollbar-width: thin;
    scrollbar-color: #D0D3DD #F5F6F8;
}

/* 4) 채널 분석 모달 스크롤바는 위(line ~2213)에서 직접 수정 */

/* ─── 주제찾기 (/topic/) ─── */
.pc-topic-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 340px; gap: 16px; text-align: center;
}

.pc-topic-page {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    flex: 1;
    min-height: calc(100vh - var(--pc-nav-h, 52px));
    background: #e8edf3;
}

.pc-topic-workspace {
    display: flex;
    flex: 1;
    min-height: 0;
    align-items: stretch;
}

.pc-topic-sidebar {
    width: 320px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.04);
}

.pc-topic-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e8ecf1;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.pc-topic-card--sidebar {
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    min-height: 100%;
}

.pc-topic-card__head {
    display: flex;
    gap: 18px;
    padding: 28px 28px 22px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #fffefc 0%, #fff 50%);
}

.pc-topic-card__head--sidebar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 26px 22px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}

.pc-topic-card__icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    border-radius: 16px;
    background: linear-gradient(145deg, #fff5f5 0%, #ffe4e6 100%);
    border: 1px solid #fecdd3;
    box-shadow: 0 2px 8px rgba(232, 25, 44, 0.08);
}

.pc-topic-card__head--sidebar .pc-topic-card__icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
    border-radius: 14px;
}

.pc-topic-card__head-text { min-width: 0; }

.pc-topic-card__eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #E8192C;
    margin: 0 0 8px;
}

.pc-topic-card__head--sidebar .pc-topic-card__eyebrow {
    margin: 0 0 12px;
    font-size: 11px;
    letter-spacing: 0.1em;
}

.pc-topic-card__title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
    margin: 0 0 10px;
    line-height: 1.2;
}

.pc-topic-card__head--sidebar .pc-topic-card__title {
    margin: 0 0 6px;
    font-size: 22px;
}

.pc-topic-card__lead {
    font-size: 14px;
    line-height: 1.65;
    color: #64748b;
    margin: 0;
    max-width: 520px;
}

.pc-topic-card__head--sidebar .pc-topic-card__lead {
    max-width: none;
    font-size: 13px;
    line-height: 1.6;
}

.pc-topic-card__body {
    padding: 24px 28px 8px;
}

.pc-topic-card--sidebar .pc-topic-card__body {
    padding: 18px 22px 8px;
}

.pc-topic-field { margin-bottom: 22px; }

.pc-topic-field__label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}

.pc-topic-field__hint {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 12px;
    line-height: 1.5;
}

.pc-topic-field__hint strong { color: #64748b; font-weight: 600; }

.pc-topic-select-wrap {
    position: relative;
}

.pc-topic-select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: 52px;
    padding: 0 48px 0 16px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
    color: #0f172a;
    background-color: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 20px;
}

.pc-topic-select:hover {
    border-color: #cbd5e1;
    background-color: #fff;
}

.pc-topic-select:focus {
    outline: none;
    border-color: #E8192C;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(232, 25, 44, 0.12);
}

.pc-topic-skip-panel {
    padding: 16px 18px;
    margin-bottom: 8px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #eef2f6;
}

.pc-topic-skip-row {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
    margin: 0;
}

.pc-topic-skip-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pc-topic-skip-ui {
    flex-shrink: 0;
    width: 46px;
    height: 28px;
    border-radius: 999px;
    background: #cbd5e1;
    position: relative;
    margin-top: 2px;
    transition: background 0.2s ease;
}

.pc-topic-skip-ui::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
    transition: transform 0.2s ease;
}

.pc-topic-skip-input:checked + .pc-topic-skip-ui {
    background: #E8192C;
}

.pc-topic-skip-input:checked + .pc-topic-skip-ui::after {
    transform: translateX(18px);
}

.pc-topic-skip-input:focus-visible + .pc-topic-skip-ui {
    box-shadow: 0 0 0 3px rgba(232, 25, 44, 0.28);
}

.pc-topic-skip-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.pc-topic-skip-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.pc-topic-skip-desc {
    font-size: 12px;
    line-height: 1.5;
    color: #94a3b8;
}

.pc-topic-card__foot {
    padding: 8px 28px 28px;
}

.pc-topic-card--sidebar .pc-topic-card__foot {
    padding: 8px 22px 24px;
}

.pc-topic-main {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 24px 28px 32px;
    gap: 16px;
    background: #eef2f7;
}

.pc-topic-main-panel {
    flex: 1;
    min-height: 0;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e8ecf1;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 전역 .table-container(height%/max-height·scroll !important) 무력화 — 패널과 동일 높이로 스크롤 */
.pc-topic-main-panel .table-container.pc-topic-table-scroll {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    height: auto !important;
    max-height: none !important;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* 전역 table{display:flex}가 주제찾기 표 레이아웃을 깨뜨리지 않도록 */
.pc-topic-main-panel table.pc-topic-table {
    display: table !important;
    width: 100%;
    border-collapse: collapse !important;
    border-spacing: 0;
    box-shadow: none;
    margin: 0;
}

.pc-topic-main-panel .pc-topic-table thead {
    display: table-header-group !important;
}

.pc-topic-main-panel .pc-topic-table tbody {
    display: table-row-group !important;
}

/* 주제찾기: 인기 차트 샘플 영상 테이블 */
.pc-topic-sample-wrap {
    flex: 0 1 auto;
    max-height: min(88vh, 2800px);
    overflow-y: auto;
}

.pc-topic-sample-tables-root {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 0 12px 20px;
    width: 100%;
    box-sizing: border-box;
}

.pc-topic-sample-category-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.pc-topic-sample-category-title {
    margin: 0;
    padding: 0 8px;
    font-size: 0.98rem;
    font-weight: 700;
    color: #334155;
}

.pc-topic-sample-category-block .table-container.pc-topic-table-scroll {
    max-height: min(46vh, 520px);
}

.pc-topic-sample-heading {
    margin: 0;
    padding: 18px 20px 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
}

.pc-topic-sample-lead {
    margin: 0;
    padding: 8px 20px 14px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.45;
}

.pc-topic-sample-table .pc-topic-sample-th-thumb {
    width: 128px;
}

.pc-topic-sample-th-sort {
    white-space: nowrap;
}

.pc-topic-th-sort {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 4px 6px;
    border: none;
    background: transparent;
    font: inherit;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    border-radius: 6px;
}

.pc-topic-th-sort:hover {
    color: #e8192c;
}

.pc-topic-sort-ind {
    font-size: 10px;
    opacity: 0.88;
}

.pc-topic-sample-thumb {
    display: block;
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 8px;
    background: #f1f5f9;
}

.pc-topic-sample-table td.pc-topic-sample-title-cell {
    text-align: left;
    max-width: min(380px, 45vw);
}

.pc-topic-sample-table td.pc-topic-sample-title-cell a {
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
}

.pc-topic-sample-table td.pc-topic-sample-title-cell a:hover {
    color: #e8192c;
    text-decoration: underline;
}

.pc-topic-sample-table td.pc-topic-sample-channel-cell {
    text-align: left;
    max-width: 220px;
}

.pc-topic-sample-table td.pc-topic-sample-channel-cell a {
    color: #475569;
    text-decoration: none;
}

.pc-topic-sample-table td.pc-topic-sample-channel-cell a:hover {
    color: #e8192c;
}

.pc-topic-btn-primary {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 56px;
    padding: 14px 20px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(180deg, #f43f5e 0%, #E8192C 100%);
    color: #fff;
    font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(232, 25, 44, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.pc-topic-btn-primary:hover:not(:disabled) {
    filter: brightness(1.05);
    box-shadow: 0 6px 20px rgba(232, 25, 44, 0.4);
}

.pc-topic-btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

.pc-topic-btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    box-shadow: none;
}

.pc-topic-btn-primary__label {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.pc-topic-btn-primary__sub {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.92;
}

.pc-topic-card--sidebar .pc-topic-step {
    text-align: left;
}

.pc-topic-card--sidebar .pc-topic-error {
    text-align: left;
}

.pc-topic-step {
    min-height: 24px;
    margin-top: 14px;
    font-size: 13px;
    color: #64748b;
    text-align: center;
}

.pc-topic-step.pc-topic-step-busy {
    color: #E8192C;
    font-weight: 600;
}

.pc-topic-error {
    min-height: 22px;
    margin-top: 10px;
    font-size: 13px;
    color: #b91c1c;
    font-weight: 600;
    text-align: center;
}

.pc-topic-summary {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 14px 18px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e8ecf1;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
    font-size: 13px;
    color: #475569;
    line-height: 1.55;
    box-sizing: border-box;
}

.pc-topic-results-wrap {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 0 4px;
}

.pc-topic-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
    border-radius: 0;
    overflow: visible;
    border: none;
    box-shadow: none;
}

.pc-topic-table th,
.pc-topic-table td {
    border-bottom: 1px solid #f1f5f9;
    padding: 12px 14px;
    text-align: center;
    vertical-align: middle;
}

.pc-topic-table th {
    background: #fafbfc;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
    font-size: 12px;
    text-transform: none;
    letter-spacing: -0.01em;
}

.pc-topic-table td.num {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.pc-topic-table tbody tr:hover {
    background: #fffafb;
}

.pc-topic-main-panel .pc-topic-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    box-shadow: 0 1px 0 #eef0f4;
}

/* 주제찾기: 분석 중 전체 마스크 (공지 2000보다 위) */
.pc-topic-busy-overlay {
    position: fixed;
    inset: 0;
    z-index: 2600;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    pointer-events: auto;
    backdrop-filter: blur(2px);
}

.pc-topic-busy-card {
    width: 100%;
    max-width: 380px;
    margin: 20px;
    padding: 28px 26px 24px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
    border: 1px solid #e8ecf1;
    text-align: center;
    font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
}

.pc-topic-busy-card .pc-topic-busy-spinner {
    margin: 0 auto 16px;
    border-color: #e2e8f0;
    border-top-color: #E8192C;
}

.pc-topic-busy-title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.pc-topic-busy-hint {
    margin: 0 0 20px;
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
}

.pc-topic-busy-bar-wrap {
    margin-bottom: 18px;
}

.pc-topic-busy-bar-track {
    height: 10px;
    border-radius: 999px;
    background: #f1f5f9;
    overflow: hidden;
    border: 1px solid #e8ecf1;
}

.pc-topic-busy-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #fb7185 0%, #E8192C 100%);
    transition: width 0.2s ease-out;
}

.pc-topic-busy-percent {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}

.pc-topic-busy-cancel {
    display: none;
    width: 100%;
    margin-top: 4px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    color: #b91c1c;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.pc-topic-busy-cancel:hover {
    background: #ffe4e6;
    border-color: #fda4af;
}

@media (max-width: 960px) {
    .pc-topic-workspace {
        flex-direction: column;
    }
    .pc-topic-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    }
    .pc-topic-main {
        padding: 20px 16px 28px;
    }
}

@media (max-width: 520px) {
    .pc-topic-card__head:not(.pc-topic-card__head--sidebar) {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px 20px 18px;
    }
    .pc-topic-card__body {
        padding-left: 20px;
        padding-right: 20px;
    }
    .pc-topic-card__foot {
        padding-left: 20px;
        padding-right: 20px;
    }
    .pc-topic-card__title {
        font-size: 22px;
    }
    .pc-topic-card__head--sidebar .pc-topic-card__title {
        font-size: 20px;
    }
    .pc-topic-card--sidebar .pc-topic-card__body,
    .pc-topic-card--sidebar .pc-topic-card__foot,
    .pc-topic-card__head--sidebar {
        padding-left: 18px;
        padding-right: 18px;
    }
}

/* 테이블 셀 별점 */
.pc-star-rating {
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════
   가로 스크롤 완전 차단
   ═══════════════════════════════════════════════════════ */
/* clip = hidden보다 강력: 스크롤 컨테이너 자체를 만들지 않음 */
html                    { overflow-x: clip !important; }
body.pc-body            { overflow-x: clip !important; }
.pc-content             { overflow-x: clip; max-width: 100vw; }

/* 각 탭 섹션과 검색/결과 영역 봉인 */
.pc-content .main,
.pc-search-hero,
.pc-results-area {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* 필터 팝업: fixed이지만 뷰포트 초과 방지 */
/* ═══════════════════════════════════════════════════════
   팝업 모달 — PopChoice 공통 테마
   ═══════════════════════════════════════════════════════ */

/* ─── 영상수집 / 폴더 팝업 (.popup) ─── */
.popup {
    border: 1.5px solid var(--pc-border) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10) !important;
    border-radius: 14px !important;
    background: #FFFFFF !important;
    font-family: 'Pretendard', sans-serif;
    padding: 28px 28px 22px !important;
    color: var(--pc-text);
}

/* 팝업 안 일반 버튼 */
.popup button {
    background: var(--pc-red) !important;
    border: none !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 16px !important;
    margin-top: 4px !important;
    transition: background 0.15s;
}
.popup button:hover {
    background: #C0152A !important;
}

/* 닫기 버튼 — 회색 계열 (onclick에 closeStorage가 포함된 버튼) */
.popup button[onclick*="closeStorage"] {
    background: #F0F1F5 !important;
    color: var(--pc-text) !important;
    border: 1px solid var(--pc-border) !important;
}
.popup button[onclick*="closeStorage"]:hover {
    background: #E4E5EB !important;
}

/* 폴더 삭제 버튼 */
.popup_button_delete {
    background: #FFF0F1 !important;
    border: 1.5px solid #FFC5CB !important;
    border-radius: 8px !important;
    color: var(--pc-red) !important;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 16px !important;
    margin-top: 4px !important;
    cursor: pointer;
    transition: background 0.15s;
}
.popup_button_delete:hover {
    background: #FFE4E8 !important;
}

/* select 드롭다운 */
.popup .select,
.popup select.select {
    border: 1.5px solid var(--pc-border) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    font-family: 'Pretendard', sans-serif;
    color: var(--pc-text);
    background: #FAFAFA !important;
    outline: none;
    transition: border-color 0.15s;
    appearance: auto;
}
.popup .select:focus,
.popup select.select:focus {
    border-color: var(--pc-red) !important;
}

/* storageList 간격 */
.popup .storageList {
    display: flex;
    align-items: center;
    gap: 12px !important;
    margin-bottom: 20px !important;
}

/* ─── 영상 수집 / 폴더 관리 / 채널 수집 — PopChoice 카드형 (.pc-folder-modal) ─── */
.popup.pc-folder-modal {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: min(500px, 94vw) !important;
    max-width: 520px !important;
    max-height: min(88vh, 620px) !important;
    padding: 0 !important;
    overflow: hidden !important;
    flex-direction: column !important;
    border: 1px solid var(--pc-border, #e8e8ed) !important;
    border-top: 3px solid var(--pc-red, #E8192C) !important;
    border-radius: 14px !important;
    box-shadow: 0 24px 56px rgba(15, 15, 26, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.04) inset !important;
    background: #fff !important;
}

.popup.pc-folder-modal .pcm-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 14px;
    border-bottom: 1px solid var(--pc-border, #e8e8ed);
    background: linear-gradient(180deg, #fff 0%, #fafbfd 100%);
    flex-shrink: 0;
}
.popup.pc-folder-modal .pcm-hd-title {
    font-size: 16px;
    font-weight: 800;
    color: #12121f;
    letter-spacing: -0.03em;
}
.popup.pc-folder-modal .pcm-hd-close {
    background: #f1f5f9 !important;
    border: none !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    cursor: pointer;
    padding: 6px 10px !important;
    margin: 0 !important;
    border-radius: 8px !important;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
    box-shadow: none !important;
}
.popup.pc-folder-modal .pcm-hd-close:hover {
    background: var(--pc-red, #E8192C) !important;
    color: #fff !important;
}

.popup.pc-folder-modal .pcm-bd {
    padding: 18px 22px 20px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    background: #f4f5f8;
}
.popup.pc-folder-modal .pcm-lead {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.55;
    color: #475569;
    font-weight: 500;
}
.popup.pc-folder-modal .pcm-lead strong {
    color: var(--pc-text, #1a1a2e);
    font-weight: 700;
}

.popup.pc-folder-modal .pcm-folder-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 0 !important;
}
.popup.pc-folder-modal .pcm-folder-row--full {
    flex-direction: column;
}
.popup.pc-folder-modal .pcm-select,
.popup.pc-folder-modal select.pcm-select {
    flex: 1 1 auto;
    min-width: 0 !important;
    width: 100% !important;
    min-height: 42px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    background: #fff !important;
    border: 1.5px solid var(--pc-border, #e8e8ed) !important;
    color: var(--pc-text, #1a1a2e);
}
.popup.pc-folder-modal .pcm-select:focus,
.popup.pc-folder-modal select.pcm-select:focus {
    border-color: var(--pc-red, #E8192C) !important;
    outline: none;
}

.popup.pc-folder-modal .pcm-primary-btn {
    flex: 0 0 auto;
    align-self: stretch;
    min-width: 100px !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 0 20px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    border: none !important;
    background: var(--pc-red, #E8192C) !important;
    color: #fff !important;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(232, 25, 44, 0.28);
    transition: background 0.15s, box-shadow 0.15s;
}
.popup.pc-folder-modal .pcm-primary-btn:hover {
    background: #c0152a !important;
    box-shadow: 0 4px 16px rgba(232, 25, 44, 0.32);
}

.popup.pc-folder-modal .pcm-ft {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px 16px;
    border-top: 1px solid var(--pc-border, #e8e8ed);
    background: linear-gradient(180deg, #fafbfd 0%, #fff 100%);
    flex-shrink: 0;
}
.popup.pc-folder-modal .pcm-ft-btn {
    margin: 0 !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1.2;
    box-shadow: none !important;
}
.popup.pc-folder-modal .pcm-ft-btn.pcm-ft-outline {
    background: #fff !important;
    color: var(--pc-red, #E8192C) !important;
    border: 1.5px solid var(--pc-red, #E8192C) !important;
}
.popup.pc-folder-modal .pcm-ft-btn.pcm-ft-outline:hover {
    background: #fff8f8 !important;
}
.popup.pc-folder-modal .pcm-ft-btn.pcm-ft-danger,
.popup.pc-folder-modal .pcm-ft-btn.popup_button_delete {
    background: #fff5f5 !important;
    color: #b91c1c !important;
    border: 1.5px solid #fecaca !important;
}
.popup.pc-folder-modal .pcm-ft-btn.pcm-ft-danger:hover,
.popup.pc-folder-modal .pcm-ft-btn.popup_button_delete:hover {
    background: #ffe4e6 !important;
    border-color: #f87171 !important;
}
.popup.pc-folder-modal .pcm-ft-btn.pcm-ft-muted {
    background: #fff !important;
    color: #475569 !important;
    border: 1.5px solid var(--pc-border, #e8e8ed) !important;
}
.popup.pc-folder-modal .pcm-ft-btn.pcm-ft-muted:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
}

@media (max-width: 480px) {
    .popup.pc-folder-modal .pcm-folder-row:not(.pcm-folder-row--full) {
        flex-direction: column;
    }
    .popup.pc-folder-modal .pcm-primary-btn {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════
   결과 표시 필터 모달 (filterPopup / channelFilterPopup) — PopChoice
   ═══════════════════════════════════════════════════════ */

.filter-popup.pc-filter-modal,
.filter-popup {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: min(640px, 94vw) !important;
    max-height: min(88vh, 820px) !important;
    background: #fff !important;
    border-radius: 14px !important;
    border: 1px solid var(--pc-border, #e8e8ed) !important;
    border-top: 3px solid var(--pc-red, #E8192C) !important;
    box-shadow: 0 24px 56px rgba(15, 15, 26, 0.14), 0 0 0 1px rgba(255,255,255,0.04) inset !important;
    font-family: 'Pretendard', sans-serif !important;
    z-index: 1110 !important;
    display: none;
    flex-direction: column !important;
    overflow: hidden !important;
    min-width: 0 !important;
    padding: 0 !important;
}

/* PopChoice 필터 모달만 가로 확대 — 이중 별점 열에 여유 */
.filter-popup.pc-filter-modal {
    width: min(960px, 98vw) !important;
}

/* ── 헤더 ── */
.filter-popup .fp-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px 14px;
    border-bottom: 1px solid var(--pc-border, #e8e8ed);
    background: linear-gradient(180deg, #fff 0%, #fafbfd 100%);
    flex-shrink: 0;
}
.filter-popup .fp-hd-title {
    font-size: 16px;
    font-weight: 800;
    color: #12121f;
    letter-spacing: -0.03em;
}
.filter-popup .fp-hd-close {
    background: #f1f5f9;
    border: none;
    font-size: 15px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}
.filter-popup .fp-hd-close:hover {
    background: var(--pc-red, #E8192C);
    color: #fff;
}

/* ── 본문 ── */
.filter-popup .fp-bd {
    padding: 16px 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    background: #f4f5f8;
}

/* ── 패널 (각 섹션) ── */
.filter-popup .fp-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--pc-border, #e8e8ed);
    box-shadow: 0 1px 3px rgba(15, 15, 26, 0.04);
}
.filter-popup .fp-panel-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.02em;
}
.filter-popup .fp-panel-title .fp-sub {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    margin-left: 6px;
}
.filter-popup .fp-date-dash { color: #94a3b8; padding: 0 4px; font-weight: 600; }

/* ── 날짜 입력 ── */
.filter-popup .date-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.filter-popup .date-input {
    border: 1.5px solid #DDDFE6 !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: none !important;
    flex: 1;
    min-width: 110px;
    transition: border-color 0.15s;
}
.filter-popup .date-input:focus-within { border-color: var(--pc-red) !important; }
.filter-popup .date-input input { font-size: 12px !important; color: #334155 !important; }
.filter-popup .search-button {
    background: #fff !important;
    color: #475569 !important;
    border: 1.5px solid var(--pc-border, #e8e8ed) !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 7px 14px !important;
    box-shadow: none !important;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.filter-popup .search-button:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
}

/* ── 기간 버튼 (pill chip) ── */
.filter-popup .filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-popup .filter-btn {
    background: #f8fafc !important;
    border: 1.5px solid var(--pc-border, #e8e8ed) !important;
    border-radius: 999px !important;
    color: #475569 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 6px 14px !important;
    cursor: pointer;
    transition: all 0.15s;
}
.filter-popup .filter-btn:hover {
    background: #fff5f5 !important;
    border-color: var(--pc-red) !important;
    color: var(--pc-red) !important;
}
.filter-popup .filter-btn.active {
    background: var(--pc-red) !important;
    border-color: var(--pc-red) !important;
    color: #fff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(232, 25, 44, 0.22);
}

/* ── Shorts 토글 ── */
.filter-popup .fp-shorts {
    display: flex;
    gap: 10px;
}
.filter-popup .fp-shorts .radio-label {
    flex: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px !important;
    border-radius: 10px !important;
    border: 1.5px solid var(--pc-border, #e8e8ed) !important;
    background: #f8fafc !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    cursor: pointer;
    min-width: unset !important;
    transition: all 0.15s;
    box-shadow: none !important;
    animation: none !important;
    transform: none !important;
}
.filter-popup .fp-shorts .radio-label:hover:not(.active) {
    background: #fff !important;
    border-color: var(--pc-red) !important;
    color: var(--pc-red) !important;
}
.filter-popup .fp-shorts .radio-label.active {
    background: var(--pc-red) !important;
    border-color: var(--pc-red) !important;
    color: #fff !important;
    box-shadow: 0 2px 12px rgba(232, 25, 44, 0.25) !important;
}
.filter-popup .fp-sw-icon { font-size: 10px; opacity: 0.85; }
.filter-popup .fp-shorts .radio-label.active .fp-sw-icon { opacity: 1; }

/* ── 별점 세그먼트 (전역 .radio-label width 고정 해제 + 잘림 방지 + 등급색) ── */
.filter-popup .fp-rating-wrap {
    flex-direction: row !important;
    gap: 12px !important;
    align-items: stretch !important;
}
.filter-popup .fp-rating-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.filter-popup .fp-stars {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    border-radius: 10px;
    overflow: hidden; /* 모서리만 클립 — 셀 내부 여유로 글리프는 안 잘리게 */
    border: 1.5px solid var(--pc-border, #e8e8ed);
    background: #f8fafc;
}
.filter-popup .fp-stars .radio-label {
    flex: 1 1 0;
    width: auto !important;
    min-width: 54px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 4px 14px !important;
    min-height: 56px;
    box-sizing: border-box;
    border: none !important;
    border-right: 1px solid #e8ecf4 !important;
    border-radius: 0 !important;
    background: #fff !important;
    cursor: pointer;
    overflow: visible;
    transition: background 0.15s;
    box-shadow: none !important;
    animation: none !important;
    transform: none !important;
    color: #334155 !important;
}
.filter-popup .fp-stars .radio-label:last-child { border-right: none !important; }
.filter-popup .fp-stars .radio-label:hover:not(.active) { background: #fff5f5 !important; }
.filter-popup .fp-stars .radio-label.active {
    background: var(--pc-red) !important;
    color: #fff !important;
    transform: none !important;
    box-shadow: none !important;
}
.filter-popup .fp-star-ico {
    font-size: 13px;
    line-height: 1.35;
    letter-spacing: -0.06em;
    display: block;
    font-style: normal;
    padding: 2px 0 0;
    flex-shrink: 0;
    white-space: nowrap;
}

/* PopChoice 필터: 별 문자열이 두 열에서 겹치지 않도록 한 단계 더 여유 */
.filter-popup.pc-filter-modal .fp-stars .radio-label {
    min-width: 58px !important;
    padding: 10px 5px 12px !important;
}
.filter-popup.pc-filter-modal .fp-star-ico {
    font-size: 12px;
    letter-spacing: -0.1em;
}
.filter-popup .fp-star-lbl {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    display: block;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* 등급별 별 색 (필터 모달만) */
.filter-popup .fp-stars .radio-label.great .fp-star-ico { color: #2563eb; }
.filter-popup .fp-stars .radio-label.good .fp-star-ico { color: #059669; }
.filter-popup .fp-stars .radio-label.normal .fp-star-ico { color: #d97706; }
.filter-popup .fp-stars .radio-label.bad .fp-star-ico { color: #ea580c; }
.filter-popup .fp-stars .radio-label.worst .fp-star-ico { color: #dc2626; }

.filter-popup .fp-stars .radio-label.active .fp-star-ico { color: #fff !important; }
.filter-popup .fp-stars .radio-label.active .fp-star-lbl { color: rgba(255, 255, 255, 0.92); }

/* ── 푸터 ── */
.filter-popup .fp-ft {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 22px 16px;
    border-top: 1px solid var(--pc-border, #e8e8ed);
    justify-content: flex-end;
    background: linear-gradient(180deg, #fafbfd 0%, #fff 100%);
    flex-shrink: 0;
}

/* ── 적용 / 닫기 ── */
.filter-popup .fp-ft .confirm-btn {
    margin: 0 !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 10px 22px !important;
    min-width: 100px;
    width: auto !important;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.filter-popup .fp-ft .confirm-btn:first-of-type,
.filter-popup .fp-ft .confirm-btn#checkBtn,
.filter-popup .fp-ft .confirm-btn#channelCheckBtn {
    background: var(--pc-red) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 2px 12px rgba(232, 25, 44, 0.28);
}
.filter-popup .fp-ft .confirm-btn:first-of-type:hover,
.filter-popup .fp-ft .confirm-btn#checkBtn:hover,
.filter-popup .fp-ft .confirm-btn#channelCheckBtn:hover {
    background: #c0152a !important;
    box-shadow: 0 4px 16px rgba(232, 25, 44, 0.32);
}
.filter-popup .fp-ft .confirm-btn:last-of-type {
    background: #fff !important;
    color: #475569 !important;
    border: 1.5px solid var(--pc-border, #e8e8ed) !important;
    box-shadow: none !important;
}
.filter-popup .fp-ft .confirm-btn:last-of-type:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
}

/* ═══════════════════════════════════════════════════════
   영상/채널 정보 모달 — PopChoice 테마 전면 재설계
   ═══════════════════════════════════════════════════════ */

/* ── 모달 기본 틀 ── */
.detail-popup {
    overflow-y: auto !important;
    display: none;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: min(900px, 95vw) !important;
    max-height: 88vh !important;
    min-width: 0 !important;
    background: #fff !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 64px rgba(0,0,0,0.14), 0 4px 16px rgba(0,0,0,0.06) !important;
    border: 1px solid #ECEDF2 !important;
    padding: 0 !important;
    font-family: 'Pretendard', sans-serif !important;
    flex-direction: column !important;
    gap: 0 !important;
    animation: dpFadeIn 0.2s ease-out !important;
}
@keyframes dpFadeIn {
    from { opacity: 0; transform: translate(-50%, -47%) scale(0.97); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
/* channelDetailsPopup은 위 base 규칙으로 통일 */
#channelDetailsPopup.detail-popup,
#detailsPopup.detail-popup {
    min-width: 0 !important;
    background: #fff !important;
    border: 1px solid #ECEDF2 !important;
    box-shadow: 0 24px 64px rgba(0,0,0,0.14), 0 4px 16px rgba(0,0,0,0.06) !important;
    border-radius: 16px !important;
    padding: 0 !important;
}

/* ── 헤더 ── */
.dp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 16px;
    border-bottom: 1.5px solid #F0F1F5;
    background: #FAFBFC;
    border-radius: 16px 16px 0 0;
    position: sticky;
    top: 0;
    z-index: 2;
}
.dp-header-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--pc-text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.dp-header-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: var(--pc-red);
    border-radius: 2px;
    flex-shrink: 0;
}
.dp-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #9098A9;
    cursor: pointer;
    padding: 5px 9px;
    border-radius: 6px;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
}
.dp-close:hover { background: #F0F1F5; color: var(--pc-text); }

/* ── 본문 ── */
.dp-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── 채널 정보 구분선 ── */
.dp-section-divider {
    font-size: 13px;
    font-weight: 700;
    color: var(--pc-text);
    padding: 8px 0 6px;
    border-bottom: 2px solid #ECEDF2;
    margin-top: 6px;
}

/* ── 카드 그리드 ── */
.detail-grid-container {
    display: flex !important;
    gap: 10px !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

/* ── 카드 공통 ── */
.detail-rounded-box-full,
.detail-rounded-box {
    background: #F8F9FC !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: none !important;
    border: 1px solid #ECEDF2 !important;
    transition: border-color 0.15s !important;
}
.detail-rounded-box-full:hover,
.detail-rounded-box:hover {
    transform: none !important;
    border-color: #D0D3DD !important;
    box-shadow: none !important;
}
.detail-rounded-box-full { width: 100% !important; }
.detail-rounded-box { max-width: 50% !important; width: 50% !important; }

/* ── 기본 정보 레이아웃 ── */
.detail-flex-full {
    display: flex !important;
    gap: 16px !important;
    width: 100% !important;
    align-items: flex-start !important;
}
.detail-flex {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
}
.detail-gap {
    display: flex !important;
    margin-bottom: 8px !important;
    gap: 6px !important;
    align-items: center !important;
}

/* ── 텍스트 정보 컨테이너 ── */
.dp-info-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dp-video-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--pc-text);
    line-height: 1.4;
    margin-bottom: 6px;
}
.dp-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.dp-meta-label {
    font-size: 11px;
    font-weight: 700;
    color: #9098A9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #ECEDF2;
    padding: 2px 8px;
    border-radius: 4px;
}
.dp-meta-value {
    font-size: 13px;
    color: #6B7180;
    font-weight: 500;
}
.dp-stat-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.dp-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #fff;
    border: 1px solid #ECEDF2;
    border-radius: 8px;
    padding: 8px 14px;
    min-width: 80px;
}
.dp-stat-label {
    font-size: 10px;
    font-weight: 700;
    color: #9098A9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.dp-stat-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--pc-text);
}

/* ── 섹션 타이틀 ── */
.detail-section-title {
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    color: #9098A9 !important;
    margin-bottom: 10px !important;
}
/* 이전 대형 헤더 타이틀 숨김 (dp-header로 대체) */
.detail-section-title2 { display: none !important; }

.detail-section-title3 {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: var(--pc-text) !important;
    margin-top: 4px !important;
}
.detail-section-title4 {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #9098A9 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    margin-top: 0 !important;
}

/* ── 값 색상 ── */
.detail-blue {
    color: var(--pc-text) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    background: none !important;
    -webkit-text-fill-color: unset !important;
}
.detail-blue-more {
    color: var(--pc-red) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    background: none !important;
    -webkit-text-fill-color: unset !important;
}
.detail-gray {
    color: #6B7180 !important;
    font-size: 13px !important;
}
.detail-blue2 {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: var(--pc-text) !important;
    background: none !important;
    background-clip: unset !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    letter-spacing: -0.03em !important;
    display: block !important;
    margin-top: 2px !important;
}

/* ── 채널 통계 그리드 내 카드 폰트 압축 ── */
.channel-stats-grid .stats-number {
    font-size: 15px !important;
    word-break: break-all;
}
.channel-stats-grid .stats-icon { font-size: 20px !important; }

/* ── 채널 통계 카드 (stats-card) – PopChoice 오버라이드 ── */
.stats-card {
    background: #fff !important;
    border: 1px solid #ECEDF2 !important;
    border-left: 3px solid var(--pc-red) !important;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06) !important;
    border-radius: 10px !important;
    transition: box-shadow 0.15s, border-color 0.15s !important;
}
.stats-card:hover {
    transform: none !important;
    box-shadow: 0 4px 14px rgba(232,25,44,0.10) !important;
    border-color: #ECEDF2 !important;
    border-left-color: var(--pc-red) !important;
}
.stats-number {
    color: var(--pc-text) !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    -webkit-text-fill-color: unset !important;
}
.stats-label {
    color: #9098A9 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}
.stats-content { color: var(--pc-text) !important; }
.stats-icon {
    font-size: 24px !important;
    text-shadow: none !important;
    opacity: 0.85;
}

/* ── 태그 ── */
.dp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: var(--pc-text);
    line-height: 1.6;
}
.detail-popup #channel-info2-1,
.detail-popup #info1-3,
.detail-popup #info6-2-2 {
    font-size: 13px !important;
    color: var(--pc-text) !important;
    font-weight: 500 !important;
    font-family: 'Pretendard', sans-serif !important;
    -webkit-text-fill-color: unset !important;
    background: none !important;
}

/* ── 설명 ── */
.dp-desc {
    font-size: 13px;
    color: #6B7180;
    line-height: 1.7;
    overflow-y: auto;
    max-height: 120px;
}

/* ── 댓글 ── */
.dp-comment-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.detail-comment-more {
    cursor: pointer;
    color: var(--pc-red) !important;
    font-weight: 700 !important;
    font-size: 12px !important;
}

/* ── stat 카드 (채널 통계) ── */
.dp-stat-card {
    flex: 1 !important;
    max-width: unset !important;
    width: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
}

/* ── 채널 썸네일 ── */
.channel-thumbnail-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px !important;
    min-width: 80px !important;
    flex-shrink: 0 !important;
}
.channel-thumbnail-container img {
    width: 72px !important;
    height: 72px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid #ECEDF2 !important;
}
.channel-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: var(--pc-text) !important;
    margin-bottom: 4px !important;
}

/* ── 채널 행 ── */
.dp-channel-row {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    justify-content: space-between !important;
}
.dp-channel-thumb-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

/* ── 성과 지표 ── */
.channel-performance-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid #F0F1F5 !important;
}
.channel-performance-item:last-child { border-bottom: none !important; }

/* ── YouTube 버튼 ── */
.dp-btn-row {
    display: flex !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    padding: 8px 0 !important;
}
.detail-youtube-btn,
.channel-buttons-container .detail-youtube-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: var(--pc-red) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    padding: 11px 28px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: background 0.15s !important;
    box-shadow: none !important;
    transform: none !important;
    width: auto !important;
    font-family: 'Pretendard', sans-serif !important;
}
.detail-youtube-btn:hover { background: #C0152A !important; transform: none !important; box-shadow: none !important; }

/* ── 채널보기 버튼 (영상정보 모달) ── */
.custom-button {
    background: var(--pc-red) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 8px 20px !important;
    border-radius: 7px !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: background 0.15s !important;
    margin-top: 6px !important;
    transform: none !important;
    box-shadow: none !important;
}
.custom-button:hover {
    background: #C0152A !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ── 닫기 버튼 ── */
.closeCommentButtonDiv {
    position: sticky !important;
    bottom: 0 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    padding: 14px 24px !important;
    background: #FAFBFC !important;
    border-top: 1.5px solid #F0F1F5 !important;
    border-radius: 0 0 16px 16px !important;
    backdrop-filter: none !important;
}
.closeCommentButton {
    cursor: pointer !important;
    background: #EDEEF3 !important;
    color: var(--pc-text) !important;
    border: 1px solid #DDDFE6 !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 9px 28px !important;
    transition: background 0.15s !important;
    box-shadow: none !important;
    transform: none !important;
    font-family: 'Pretendard', sans-serif !important;
}
.closeCommentButton:hover {
    background: #DEE0E8 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ════════════════════════════════════════════
   PopChoice 댓글 더보기 모달 (commentsPopup)
   ════════════════════════════════════════════ */
.commentsPopup {
    overflow-y: auto !important;
    display: none;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 92% !important;
    max-width: 520px !important;
    max-height: 72vh !important;
    background: #fff !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18) !important;
    padding: 0 !important;
    flex-direction: column !important;
    gap: 0 !important;
    z-index: 1130 !important;
    font-family: 'Pretendard', sans-serif !important;
    border-top: 4px solid var(--pc-red) !important;
}

/* 헤더 (JS로 동적 생성) */
.cm-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 18px 20px 14px !important;
    border-bottom: 1.5px solid #F0F1F5 !important;
    position: sticky !important;
    top: 0 !important;
    background: #fff !important;
    z-index: 1 !important;
    border-radius: 12px 12px 0 0 !important;
}
.cm-header-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1A1D23 !important;
    font-family: 'Pretendard', sans-serif !important;
}
.cm-header-close {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    border: none !important;
    background: #F5F6F8 !important;
    color: #6B7280 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.15s !important;
    line-height: 1 !important;
    font-family: 'Pretendard', sans-serif !important;
}
.cm-header-close:hover {
    background: #EDEEF3 !important;
    color: #1A1D23 !important;
}

/* 댓글 목록 래퍼 */
.cm-list {
    padding: 8px 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 댓글 카드 */
.comment-rounded-box-full {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 14px 20px !important;
    background: #fff !important;
    border-radius: 0 !important;
    border-bottom: 1px solid #F3F4F6 !important;
    box-shadow: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.comment-rounded-box-full:last-of-type {
    border-bottom: none !important;
}

/* 프로필 이미지 */
.replyAuthorImage {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    margin-right: 0 !important;
    flex-shrink: 0 !important;
    object-fit: cover !important;
    border: 1.5px solid #F0F1F5 !important;
}

/* 댓글 내용 영역 */
.commentDetail {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 4px !important;
}

/* 작성자 이름 + 좋아요 */
.authorName {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #374151 !important;
    font-family: 'Pretendard', sans-serif !important;
}

/* 댓글 본문 */
.commentText {
    font-size: 14px !important;
    color: #4B5563 !important;
    line-height: 1.6 !important;
    word-break: break-all !important;
    font-family: 'Pretendard', sans-serif !important;
}

/* 답글 영역 */
.replies {
    margin-top: 8px !important;
    padding-left: 12px !important;
    border-left: 2.5px solid #F0F1F5 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

/* 개별 답글 */
.replyDiv {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #F9FAFB !important;
}
.replyDiv:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.replyDetail {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    min-width: 0 !important;
}
.replyAuthor {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #374151 !important;
}
.replyText {
    font-size: 13px !important;
    color: #6B7280 !important;
    line-height: 1.5 !important;
    word-break: break-all !important;
    font-family: 'Pretendard', sans-serif !important;
}

/* 답글 보기 버튼 */
.showReplies {
    margin-top: 6px !important;
}
.showReplyButton {
    cursor: pointer !important;
    background: #F8F9FC !important;
    color: #6B7280 !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 4px 12px !important;
    transition: background 0.15s, color 0.15s !important;
    font-family: 'Pretendard', sans-serif !important;
    box-shadow: none !important;
}
.showReplyButton:hover {
    background: #F0F1F5 !important;
    color: #374151 !important;
}

/* 닫기 버튼 푸터 */
.closeCommentButtonDiv {
    position: sticky !important;
    bottom: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 14px 20px !important;
    background: #fff !important;
    border-top: 1.5px solid #F0F1F5 !important;
    border-radius: 0 0 12px 12px !important;
    backdrop-filter: none !important;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.04) !important;
}
.closeCommentButton {
    cursor: pointer !important;
    background: var(--pc-red) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 10px 40px !important;
    transition: background 0.15s !important;
    box-shadow: none !important;
    transform: none !important;
    font-family: 'Pretendard', sans-serif !important;
}
.closeCommentButton:hover {
    background: #C0152A !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ── 영상 썸네일 ── */
.video-container {
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10) !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    width: 180px !important;
    min-width: 180px !important;
    height: 120px !important;
}

/* ════════════════════════════════════════════
   검색 조건 ⚙ 버튼 (영상 발굴 / 채널 검색 옆)
   ════════════════════════════════════════════ */
.pc-search-filter-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1.5px solid var(--pc-border, #e0e0e0);
    border-radius: 8px;
    background: #fff;
    color: #555;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
    margin-left: 6px;
}
.pc-search-filter-btn:hover {
    background: var(--pc-red, #E8192C);
    border-color: var(--pc-red, #E8192C);
    color: #fff;
    box-shadow: 0 2px 8px rgba(232,25,44,0.18);
}
.sf-filter-badge {
    display: inline-flex;
    align-items: center;
    align-self: center;
    font-size: 11px;
    color: #666;
    background: #f2f2f2;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 2px 7px;
    margin-left: 6px;
    white-space: nowrap;
    line-height: 1.5;
    letter-spacing: -0.01em;
    pointer-events: none;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

/* ════════════════════════════════════════════
   검색 조건 팝업 (videoSearchFilterPopup / channelSearchFilterPopup)
   ════════════════════════════════════════════ */
.sf-popup {
    position: absolute;
    z-index: 9999;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14);
    min-width: 280px;
    max-width: 340px;
    overflow: hidden;
}
.sf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px 11px;
    border-bottom: 1.5px solid #f0f0f0;
    background: #fafafa;
}
.sf-title {
    font-size: 13px;
    font-weight: 700;
    color: #222;
    letter-spacing: -0.2px;
}
.sf-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #888;
    padding: 2px 4px;
    border-radius: 4px;
    line-height: 1;
    transition: background 0.12s, color 0.12s;
}
.sf-close:hover {
    background: #fee2e4;
    color: var(--pc-red, #E8192C);
}
.sf-body {
    padding: 14px 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sf-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sf-label {
    flex-shrink: 0;
    width: 90px;
    font-size: 12px;
    font-weight: 600;
    color: #444;
}
.sf-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}
.sf-input {
    flex: 1;
    min-width: 0;
    height: 30px;
    padding: 0 8px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 12px;
    color: #333;
    background: #fafafa;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.sf-input:focus {
    outline: none;
    border-color: var(--pc-red, #E8192C);
    background: #fff;
}
.sf-unit {
    font-size: 11px;
    color: #888;
    flex-shrink: 0;
}
.sf-date {
    cursor: pointer;
}
.sf-date-clear {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 11px;
    color: #bbb;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.12s;
}
.sf-date-clear:hover { color: var(--pc-red, #E8192C); }
.sf-select-wrap {
    flex: 1;
}
.sf-select {
    width: 100%;
    height: 30px;
    padding: 0 8px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 12px;
    color: #333;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.15s;
    box-sizing: border-box;
    appearance: auto;
}
.sf-select:focus {
    outline: none;
    border-color: var(--pc-red, #E8192C);
    background: #fff;
}
.sf-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 16px 13px;
    border-top: 1.5px solid #f0f0f0;
    background: #fafafa;
}
.sf-reset {
    background: #f5f5f5;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.sf-reset:hover {
    background: #eee;
    border-color: #bbb;
}
.sf-confirm {
    background: var(--pc-red, #E8192C);
    border: 1.5px solid var(--pc-red, #E8192C);
    border-radius: 6px;
    padding: 5px 18px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: background 0.12s;
}
.sf-confirm:hover {
    background: #C0152A;
    border-color: #C0152A;
}

/* ─── 반응형 ─── */
@media (max-width: 820px) {
    .pc-search-hero, .pc-results-area, .pc-tab-content-wrap { padding-left: 16px; padding-right: 16px; }
    .pc-topnav-tabs { overflow-x: auto; }
    .pc-landing-features { grid-template-columns: 1fr 1fr; }
    .detail-popup { width: 98vw !important; max-height: 92vh !important; }
    .dp-body { padding: 14px 16px; }
    .detail-rounded-box { max-width: 100% !important; width: 100% !important; }
    .detail-grid-container { flex-direction: column !important; }
    .dp-stat-row { gap: 8px; }
    .filter-popup .fp-rating-wrap { flex-direction: column !important; }
    .filter-popup:not(.pc-filter-modal) { width: min(100vw - 16px, 640px) !important; }
    .filter-popup.pc-filter-modal { width: min(100vw - 16px, 960px) !important; }
}

/* ─── PopChoice 법적 문서(개인정보·이용약관) 전용 ─── */
body.pc-legal-body {
    margin: 0;
    min-height: 100vh;
    background: var(--pc-bg, #F5F6F8);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--pc-text, #1A1A2E);
    line-height: 1.65;
    font-size: 15px;
    --pc-legal-top-h: 72px;
}
.pc-legal-topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    min-height: var(--pc-legal-top-h, 72px);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    background: var(--pc-white, #fff);
    border-bottom: 1px solid var(--pc-border, #E2E4E8);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.pc-legal-logo {
    font-size: 18px;
    font-weight: 900;
    color: var(--pc-red, #E8192C);
    text-decoration: none;
    flex-shrink: 0;
}
.pc-legal-logo:hover {
    color: var(--pc-red-hover, #C41224);
}
.pc-legal-topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 14px 20px;
    flex: 1;
    min-width: 0;
}
.pc-legal-nav {
    display: flex;
    gap: 16px;
    font-size: 13px;
    align-items: center;
}
.pc-legal-nav a {
    color: var(--pc-text-muted, #8B8FA8);
    text-decoration: none;
    font-weight: 600;
}
.pc-legal-nav a:hover {
    color: var(--pc-red, #E8192C);
}
/* 법적 페이지 — 메인으로 (눈에 띄는 우측 CTA) */
.pc-legal-back-service {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 26px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: #fff !important;
    text-decoration: none !important;
    background: var(--pc-red, #E8192C);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(232, 25, 44, 0.38);
    transition: background 0.15s, box-shadow 0.15s, transform 0.12s;
    flex-shrink: 0;
    white-space: nowrap;
}
.pc-legal-back-service:hover {
    background: var(--pc-red-hover, #C41224);
    color: #fff !important;
    box-shadow: 0 6px 22px rgba(232, 25, 44, 0.45);
    transform: translateY(-1px);
}
.pc-legal-main {
    max-width: 820px;
    margin: 0 auto;
    padding: calc(var(--pc-legal-top-h, 72px) + 28px) 24px 56px;
}
.pc-legal-main h1 {
    font-size: 1.65rem;
    font-weight: 800;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}
.pc-legal-meta {
    font-size: 13px;
    color: var(--pc-text-muted, #8B8FA8);
    margin-bottom: 28px;
}
.pc-legal-main h2 {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 28px 0 10px;
    color: var(--pc-text, #1A1A2E);
}
.pc-legal-main p,
.pc-legal-main li {
    margin: 0 0 10px;
    color: var(--pc-text, #1A1A2E);
}
.pc-legal-main ul {
    margin: 0 0 14px;
    padding-left: 22px;
}
.pc-legal-main a {
    color: var(--pc-red, #E8192C);
    font-weight: 600;
    text-decoration: none;
}
.pc-legal-main a:hover {
    text-decoration: underline;
}
.pc-legal-foot {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--pc-border, #E2E4E8);
    font-size: 13px;
    color: var(--pc-text-muted, #8B8FA8);
}
@media (max-width: 600px) {
    body.pc-legal-body { --pc-legal-top-h: 68px; }
    .pc-legal-topnav { padding: 10px 16px; flex-wrap: wrap; row-gap: 10px; }
    .pc-legal-topbar-actions {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }
    .pc-legal-nav { gap: 10px; font-size: 12px; }
    .pc-legal-back-service {
        padding: 12px 18px;
        font-size: 14px;
    }
    .pc-legal-main { padding-left: 16px; padding-right: 16px; }
}