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;
    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: 5px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb {
    background:#0191d8;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgb(164, 177, 236);
}

/*-----------------------------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 {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1100px;
    height: auto;
    overflow-y: auto;
    font-family: 'Pretendard', sans-serif;
    padding: 20px;
    background: white;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    z-index: 1055; /* popupOverlay2(1050)보다 위에 표시 */
    border-radius: 10px;
    align-items: center;

}
/* 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: 1200px;
    max-height: 100vh;
    /* position: relative 제거 - sticky 작동을 위해 */
    font-family: 'Pretendard', sans-serif;
}

.table-container {
    width: 100%;
    max-width: 100%;
    min-height: 300px;
    max-height: 75vh;
    overflow-x: auto; /* 테이블이 넘칠 경우 컨테이너 내에서만 스크롤 */
    overflow-y: visible; /* 툴팁이 컨테이너 밖으로 나갈 수 있도록 */
    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% - 17px); /* 스크롤바 너비 고려 */
    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% */

/* ==================== 채널 분석 테이블 컬럼 너비 설정 (모달 전용) ==================== */
/* 분석 모달은 화면 크기가 다르므로 별도 비율 적용 */
/* 분석 테이블은 숨겨진 videoID 컬럼이 없음 - 바로 체크박스부터 시작 */
#analysisResultTable th:nth-child(1), #analysisResultTable td:nth-child(1) { width: 4%; }     /* 체크박스 */
#analysisResultTable th:nth-child(2), #analysisResultTable td:nth-child(2) { width: 12%; }  /* 썸네일 */
#analysisResultTable th:nth-child(3), #analysisResultTable td:nth-child(3) { width: 22%; }  /* 제목 (28% → 22%, 20% 감소) */
#analysisResultTable th:nth-child(4), #analysisResultTable td:nth-child(4) { width: 7%; }  /* 조회수 (8% → 7%) */
#analysisResultTable th:nth-child(5), #analysisResultTable td:nth-child(5) { width: 14%; }  /* 구독자 (8% → 14%, 6% 증가) */
#analysisResultTable th:nth-child(6), #analysisResultTable td:nth-child(6) { width: 7%; }  /* 실적도 */
#analysisResultTable th:nth-child(7), #analysisResultTable td:nth-child(7) { width: 7%; }  /* 공헌도 */
#analysisResultTable th:nth-child(8), #analysisResultTable td:nth-child(8) { width: 9%; }  /* 게시일 (10% → 9%) */
#analysisResultTable th:nth-child(9), #analysisResultTable td:nth-child(9) { width: 7%; }  /* 좋아요 (8% → 7%) */
#analysisResultTable th:nth-child(10), #analysisResultTable td:nth-child(10) { width: 6%; } /* 댓글 */
#analysisResultTable th:nth-child(11), #analysisResultTable td:nth-child(11) { width: 5%; } /* 영상수 (6% → 5%) */
/* 합계: 4 + 12 + 22 + 7 + 14 + 7*2 + 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(2, 1fr) !important;
    grid-template-rows: repeat(2, auto) !important;
    gap: 20px !important;
    justify-items: center;
    align-items: start;
    max-width: 500px;
    margin: 20px auto !important;
    padding: 10px;
    width: 100%;
}

.channel-stats-grid .stats-card {
    width: 200px;
    min-width: 200px;
    max-width: 200px;
    margin: 0 !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 {
        gap: 10px !important;
        max-width: 380px;
    }
    
    .stats-card {
        max-width: 180px;
        padding: 12px;
    }
}

/*-----------------------------채널 분석 섹션 스타일------------------------------------*/

/* 채널 분석 버튼 */
.analyze-button-inline {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
    min-width: 70px;
    height: 36px;
    line-height: 1.2;
}

.analyze-button-inline:hover {
    background: linear-gradient(135deg, #2980b9, #1f6391);
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.5);
    transform: translateY(-2px);
}

.analyze-button-inline:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

/* 채널 분석 결과 영역 */
#channelAnalysisSection {
    position: fixed;
    top: 3vh;
    bottom: 3vh;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1400px;
    height: auto !important;
    z-index: 1001;
    border-top: 3px solid #007bff;
    background: white;
    padding: 12px !important;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 123, 255, 0.3);
    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: 8px !important;
    right: 8px !important;
    width: 36px !important;
    height: 36px !important;
    background: #dc3545 !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    font-size: 20px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    z-index: 1010 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.5) !important;
}

#channelAnalysisSection .analysis-close-btn:hover {
    background: #c82333 !important;
    transform: scale(1.1) !important;
}

/* 헤더 */
.analysis-header {
    margin: 5px 0 10px 0;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    flex-shrink: 0;
    min-height: 40px;
}

/* 검색 버튼 영역 */
.analysis-search-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.analysis-search-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
    min-width: 140px;
}

.analysis-search-btn:hover {
    background: linear-gradient(135deg, #0056b3, #003d82);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
    transform: translateY(-2px);
}

.analysis-search-btn:active {
    transform: translateY(0);
}

.analysis-search-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 검색 진행 상태 표시 */
#searchProgress {
    margin-top: 15px;
    padding: 15px 20px;
    text-align: center;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 8px;
    border: 2px solid #2196F3;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

#searchProgress span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #1565C0;
    font-size: 15px;
    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-y: scroll !important;
    overflow-x: hidden !important;
    max-width: 100%;
    flex: 1 1 auto !important;
    max-height: 50vh !important;
    min-height: 300px !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: 12px !important;
}

#channelAnalysisSection .table-container::-webkit-scrollbar-track {
    background: #e9ecef !important;
    border-radius: 6px;
    margin: 2px 0;
    border: 1px solid #dee2e6;
}

#channelAnalysisSection .table-container::-webkit-scrollbar-thumb {
    background: #007bff !important;
    border-radius: 6px;
    transition: background 0.3s ease;
    border: 1px solid #0056b3;
    min-height: 30px;
}

#channelAnalysisSection .table-container::-webkit-scrollbar-thumb:hover {
    background: #0056b3 !important;
    border-color: #004085;
}

/* Firefox 스크롤바 */
#channelAnalysisSection .table-container {
    scrollbar-width: auto !important;
    scrollbar-color: #007bff #e9ecef !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;
}

#analysisResultTable thead tr {
    display: table !important;
    width: calc(100% - 17px) !important; /* 스크롤바 너비 고려 */
    table-layout: fixed !important;
}

#analysisResultTable thead th {
    background: linear-gradient(135deg, #0191d8 0%, #016ba3 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

#analysisResultTable tbody {
    display: block !important;
    width: 100% !important;
    overflow-y: scroll !important; /* 스크롤바 항상 표시 */
    overflow-x: hidden !important;
    max-height: calc(50vh - 60px) !important;
}

#analysisResultTable tbody tr {
    display: table !important;
    width: 100% !important;
    table-layout: fixed !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;
}