:root {--main-color: linear-gradient(30deg, #9900F0, #FF85B3, #9900F0);
      --main-hover-color: linear-gradient(30deg, hsl(278, 100%, 67%), #ffb7d3, #ca6eff);
      --main-border-color:rgb(205, 136, 255);
      --main-shadow : 0 0 3px 0 rgba(0, 0, 0, 1);
      --bubble-mine: linear-gradient(30deg, rgb(12, 45, 129), rgb(143, 38, 132));
      --bubble-other: linear-gradient(30deg,rgb(33, 33, 33), rgb(62, 62, 62), rgb(22, 22, 22));
      --main-text-roll: text-roll 2s infinite linear;
      --main-bg-size: 200% auto;
}

/* --- [기본 설정] --- */
body { margin: 0; background: rgb(0, 0, 0); color: #fff; font-family: "Noto Sans KR", sans-serif;font-weight: 400;  height: 100dvh; overflow: hidden; }
.container { display: flex; height: 100%; flex-direction: row; }

div::-webkit-scrollbar { width: 6px; border-radius: 10px; }
div::-webkit-scrollbar-track { background: transparent; }
div::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.5); border-radius: 10px; }

/* 비디오 섹션 전체 스크롤 설정 */
.video-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;      /* 가로 스크롤 절대 금지 */
    overflow-y: auto;        /* 세로 스크롤 허용 */
    scrollbar-width: none;   
    -ms-overflow-style: none;
}

.mobile-only-tabs, #mobile-panel { display: none; }
.video-section::-webkit-scrollbar {
    display: none;
}

/* [추가] 채널 제목 옆 방송 상태 뱃지 */
.ch-status {
    font-size: 14px;
    margin-left: 0px;
    padding: 5px 10px;
    border-radius: 3px;
    vertical-align: middle;
    font-weight: 600;
}

/* 텍스트 그라데이션 흐름 애니메이션 */
@keyframes text-roll {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.tab-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    padding: 0 15px 8px 15px;
    position: relative;
    transition: 0.3s;
    overflow: hidden;
}

/* 활성화 상태 (글자 그라데이션 + 애니메이션) */
.tab-btn.active {
    color: transparent; /* 글자색 투명화 필수 */
    background: linear-gradient(to right, #9900F0, #FF85B3, #9900F0);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: text-roll 5s infinite linear;
}

/* 활성화 상태 하단 롤링 바 */
.tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #9900F0, #FF85B3, #9900F0);
    background-size: 200% auto;
    animation: text-roll 2s infinite linear;
}

/* 호버 시 부드럽게 글자색 변경 */
.tab-btn:hover {
    color: #FF85B3;
}

.count-badge {
    font-size: 14px;
    color: #888;
    font-weight: 100;
}

/* 활성화된 탭의 숫자도 테마 그라데이션 적용 */
.tab-btn.active .count-badge,.tab-btn:hover > .count-badge {
    color: transparent;
    background: linear-gradient(to right, #9900F0, #FF85B3, #9900F0);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: text-roll 5s infinite linear;
}

/* PC용 알림 버튼 스타일 */
.tab-extra-controls {
    margin-left: auto; /* 우측 정렬 핵심 */
    display: flex;
    align-items: center;
    padding-right: 15px;
}

.notification-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    transition: 0.3s;
    padding-bottom: 8px;
}

.notification-btn:hover {
    color: #FF85B3;
    transform: scale(1.1);
}

/* 탭 메뉴 스타일 */
.content-tabs {
    display: flex;
    gap: 10px;
    padding: 10px 10px 0px 10px;
    border-bottom: 1px solid #333;
    background: #151515;
    position: sticky;
    z-index: 10;
    bottom: 0px;
}

#tabs-area{
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    margin: 0;
    transition: all 0.3s ease;
    z-index: 999;
    background: rgba(0, 0, 0, 0.95);
    box-shadow: rgb(0, 0, 0) 0px 0px 10px;
}

/* 콘텐츠는 스크롤 */
.tab-content-container{
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 10px;
  padding-bottom: 39px; 
  min-height: 390px;
  background: rgba(20,20,20,0.9);

}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.section-title { font-size: 16px; margin-bottom: 10px; color: #eee; }

/* 비디오 그리드 레이아웃 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(25%, 2fr));
    gap: 15px;
    padding-top: 10px;
}

/* 개별 카드 스타일 */
.video-card {
    background: transparent;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease;
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 5px 0 rgba(0, 0, 0, 1);
    position: relative;
}

.video-card:hover {

}

/* 썸네일 영역 */
.thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.video-duration {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 1cqw;
    font-weight: 500;
    z-index: 2;
    letter-spacing: 0.5px;
}

.thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
    cursor: pointer;
}

.video-card:hover .thumb-wrap img {opacity: 0.7;}

/* 썸네일 중앙 플레이 아이콘 (기본 숨김) */
.play-overlay-icon {
    position: absolute;
    opacity: 0.2;
    transition: 0.3s;
    display: flex; 
    align-items: center;  
    justify-content: center;
    gap: 10px;
}

.play-pc {top: 50%;transform: translate(-50%, -50%);
    left: 50%;}

.play-overlay-icon i {
    font-size: 5cqw;
    color: #fff;
    transition: 0.3s;
    text-shadow: rgba(0, 0, 0, 0.2) 0 5px 5px;
}

.play-overlay-icon span{color: #fff;font-size: 0px;font-weight: 600;transition: 0.3s;text-shadow: rgba(0, 0, 0, 0.5) 0 5px 5px;}

.video-card:hover .video-info-meta {
    left: 0%;
    top: 0%;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(1px);
}

.video-card:hover .play-overlay-icon {
    opacity: 1;
}

.video-card:hover .play-overlay-icon i {
    color: transparent; /* 글자색 투명화 필수 */
    background: linear-gradient(70deg, #9900F0, #FF85B3, #9900F0);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    cursor: pointer;
    animation: play-overlay 2s infinite linear}

.video-card:hover .play-overlay-icon span {font-size: 1.5cqw;}

.video-card:hover .video-info-meta::before {
    opacity: 1;
    background: linear-gradient(30deg, #9900F0, #FF85B3, #9900F0);
    padding: 3px;
    background-size: 200% auto;
    animation: play-overlay 2s infinite linear;
}


.video-card:active .play-overlay-icon {
    opacity: 1;
}

.video-card:active .video-info-meta::before {
    opacity: 1;
    background: linear-gradient(30deg, #9900F0, #FF85B3, #9900F0);
    padding: 3px;
    background-size: 200% auto;
    animation: play-overlay 2s infinite linear;
}

.video-card:active .video-info-meta {
    left: 0%;
    top: 0%;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(1px);
}

    /* 텍스트 그라데이션 흐름 애니메이션 */
@keyframes play-overlay {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* 텍스트 정보 */
.video-info-meta {padding: 5px 10px;
    position: absolute;
    left: 3%;
    top: 5%;
    width: 94%;
    height: 90%;
    box-sizing: border-box;
    border-radius: 10px;
    transition: 0.3s;
    backdrop-filter: blur(0px);
    z-index: 0;
    background: linear-gradient(to bottom, #000000ab, #00000000);
}

    .video-info-meta::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    padding: 2px;
    background: linear-gradient(30deg, #555, #fff, #555);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
    opacity: 0.5;
    transition: 0.3s;
}

.video-title {
    font-size: 1.1cqw;
    color: #fff;
    transition: 0.1s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-card:hover .video-title { font-size: 1.2cqw;

}

.video-date {
    font-size: 1cqw;
    color: #aaa;
}

.ch-status.on {
    background-color: #ff0000;
    color: #fff;
    border: 1 solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 0 10px #ff0000;
    transition: all 1s ease;
    animation: chon 3.5s infinite;
}

@keyframes chon {
    0% { box-shadow: 0 0 10px 5px #ff0000;}
    50% { box-shadow: 0 0 5px #9d0000;}
    100% { box-shadow: 0 0 10px 5px #ff0000; }
}

/* 대기중일 때 (투명 배경 + 회색 테두리) */
.ch-status.off {
    background-color: #333;
    color: #fff;
    border: 0;
    box-shadow: var(--main-shadow);
}

.live-badge.offline {
    background: #555 !important;  /* 회색 배경 */
    color: #ccc !important;       /* 연한 회색 글씨 */
}

#channel-title-display { 
    display: flex;
    align-items: center;
    background: rgba(18, 18, 18, 0.95);
    width: 100%; 
    font-size: 21px;
    color: #eee;
    min-height: 35px; /* 30px에서 살짝 여유를 줬습니다 */
    border-bottom: 1px solid #333;
    box-shadow: 1px 1px 3px #000;
    padding: 0 10px;
    font-weight: 600;
    /* 🔥 추가: 리스트가 길어져도 타이틀 영역이 절대 작아지지 않게 함 */
    flex-shrink: 0; 
    height: 60px;
    box-sizing: border-box;
    z-index: 1000;
    backdrop-filter: blur(7px);
}
.video-wrapper {
    position: relative; width: 100%;
    max-width: calc((100dvh - 120px - 30px) * 16 / 9);
    aspect-ratio: 16 / 9;
    background: #000; margin: 0 auto; display: flex;
    flex-shrink: 0;
    margin-top: 60px;
    z-index: 1;
}

video { width: 100%; height: 100%; display: block; object-fit: contain; }

#stream-thumbnail {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover; z-index: 5; display: block; 
}



/* 중앙 음소거 오버레이 */
/* 롤링 애니메이션 (문의 버튼과 동일) */
@keyframes scroll-mute {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

#center-mute-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    width: 15cqw;
    height: 15cqw;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 100vmax;
    cursor: pointer;
    background: transparent;
    box-shadow: 0px 0.1px 0.5px hsl(208deg 22% 58% / 0.34), 0px 1px 3px -0.4px hsl(208deg 22% 58% / 0.34), 0px 3px 8px -0.8px hsl(208deg 22% 58% / 0.34);
    transition: all 0.2s ease-in-out;
}

/* 움직이는 그라데이션 보더 (Before) */
#center-mute-overlay::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 200%; 
    height: 100%;
    background: linear-gradient(to right, #9900F0 0%, #FF85B3 50%, #9900F0 100%);
    background-size: 50% 100%;
    animation: scroll-mute 1.2s infinite linear;
}

/* 내부 검정색 배경 (After) */
#center-mute-overlay::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0.7cqw;
    border-radius: 100vmax;
    background-color: black;
    transition: inset 0.2s ease-in-out;
}

/* 내부 콘텐츠 (아이콘 + 텍스트) */
.mute-content {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px; /* 아이콘과 텍스트 사이 간격 */
    color: white;
}

.mute-content i {
    font-size: 8cqw;
}

.mute-content span {
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

/* 호버 효과 */
#center-mute-overlay:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0px 1.5px 5px -0.5px hsl(208deg 22% 58% / 0.36),
                0px 5px 12px -1.5px hsl(208deg 22% 58% / 0.36);
}

#center-mute-overlay:hover::after {
    inset: 1.3cqw; /* 호버 시 보더가 살짝 두꺼워지는 효과 */
}
.mute-guide-text {position: absolute;
    top: 110px;
    width: 200px;
    text-align: center;
    font-size: 22px;
    text-shadow: 1px 1px 2px #000;
    pointer-events: none;
    font-weight: bold;}

/* 플레이어 컨트롤 */
.player-overlay { position: absolute;
     bottom: 0;
     left: 0;
     width: 100%;
     background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
     padding: 15px 20px;
     box-sizing: border-box;
     opacity: 0;
     transition: opacity 0.3s;
     display: none;
     align-items: center;
     gap: 15px;
     z-index: 10;
 }
.video-wrapper:hover .player-overlay { opacity: 1; }
.btn-control { background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; width: 30px; transition: all 0.3s ease;}
.btn-control:hover {
     transform: scale(1.3);
    color: transparent; /* 글자색 투명화 필수 */
    background: linear-gradient(to right, #9900F0, #FF85B3, #9900F0);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: btn-roll 2s infinite linear;
 }
/* 텍스트 그라데이션 흐름 애니메이션 */
@keyframes btn-roll {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.volume-container {
    display: flex;
    align-items: center;
}

.slider-wrapper {
    position: relative;
    width: 100px;
    display: flex;
    align-items: center;
}

/* 볼륨 슬라이더 메인 트랙 (얇게) */
.volume-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px; /* 바 두께를 얇게 설정 */
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

/* 원형 볼 (Thumb) - 바보다 확실히 크게 */
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; 
    height: 14px;
    background: #fff;
    border-radius: 50%; /* 동그란 모양 */
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    border: none;
    margin-top: 0px; /* 트랙 중앙 정렬 */
}

/* 말풍선 스타일 (이미지 스타일) */
.volume-tooltip {
    position: absolute;
    top: -28px; /* 볼 위쪽 배치 */
    left: 9px;
    transform: translateX(-50%); /* 중심점 맞춤 */
    background: #fff;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    display: none; /* 평소에는 숨김 */
    pointer-events: none;
}

/* 말풍선 꼬리 부분 */
.volume-tooltip::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #fff;
}

/* 슬라이더 조작 시 말풍선 표시 */
.slider-wrapper:hover .volume-tooltip,
.volume-slider:active + .volume-tooltip, /* 조작 중 표시 */
.slider-wrapper:active .volume-tooltip {
    display: block;
}
.live-badge { background: red; color: white; padding: 2px 6px; font-size: 12px; font-weight: 600; border-radius: 4px; margin-left: auto; margin-right: 10px; }
.quality-group { display: flex; gap: 5px; }
.quality-btn { background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.3); color: #fff; padding: 4px 8px; font-size: 11px; cursor: pointer; border-radius: 15px; }
.quality-btn.active { background: var(--main-color); color: #000; font-weight: 600;border: 1px solid #FF85B3 }
#video-status { display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 18px; color: #ccc; background: rgba(0,0,0,0.5); padding: 10px 20px; border-radius: 8px; pointer-events: none; z-index: 5; }

/* 시청자 정보 */
.viewer-info { background: #111;
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
    color: #fff;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    min-height: 50px;
    box-shadow: 0 0 5px 3px rgba(0, 0, 0, 0.7);
    position: relative;
    flex-shrink: 0;
    align-items: center;
    z-index: 1;
 }
.viewer-count { font-weight: 600; }
/* --- 시청자 수 롤링 애니메이션 --- */

/* 1. 숫자가 보이는 '창문' 역할 */
.viewer-num { 
    display: inline-flex;       /* 내부 요소 정렬 */
    flex-direction: column;     /* 세로로 쌓기 */
    height: 19px;               /* 숫자가 딱 하나만 보이는 높이 (폰트 크기에 맞춰 조절) */
    overflow: hidden;           /* 영역 밖의 숫자는 숨김 (핵심!) */
    vertical-align: bottom;     /* 텍스트 줄 맞춤 */
    color: #4d85ff; 
    margin: 0 5px; 
    font-size: 17px;
    font-weight: 600;
    position: relative;
}
/* 2. 실제로 움직일 숫자 박스 */
.viewer-roll-box {
    display: flex;
    flex-direction: column;     /* 숫자들을 위아래로 배치 */
    transition: transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* 3. 각 숫자 스타일 */
.viewer-roll-item {
    height: 17px;               /* 부모(.viewer-num) 높이와 동일해야 함 */
    line-height: 17px;          /* 수직 중앙 정렬 */
    display: block;
}


/* 롤링 애니메이션 정의 */
@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

#mobile-contact-btn {
    position: relative;
    display: inline-flex; /* 위치 붕괴 방지를 위해 inline-flex 사용 */
    align-items: center;
    justify-content: center;
    padding: 7px 15px; /* 크기는 기존과 유사하게 조정 */
    overflow: hidden;
    border-radius: 100vmax;
    text-decoration: none;
    background: transparent;
    border: none;
    /* 그림자 설정 (고급 쉐도우 적용) */
box-shadow: 0px 0.1px 0.5px hsl(208deg 22% 58% / 0.34),
                0px 1px 3px -0.4px hsl(208deg 22% 58% / 0.34),
                0px 3px 8px -0.8px hsl(208deg 22% 58% / 0.34);
    transition: all 0.2s ease-in-out;
}

/* 움직이는 그라데이션 보더 (Before) */
#mobile-contact-btn::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 200%; /* 애니메이션을 위해 너비를 넓게 설정 */
    height: 100%;
    background: linear-gradient(to right, #9900F0 0%, #FF85B3 50%, #9900F0 100%);
    background-size: 50% 100%;
    animation: scroll 1.2s infinite linear;
}

/* 내부 검정색 배경 (After) */
#mobile-contact-btn::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 3px; /* 보더 두께 조절 */
    border-radius: 100vmax;
    background-color: black;
    transition: inset 0.2s ease-in-out;
}

/* 텍스트 영역 */
#mobile-contact-btn span {
position: relative;
    z-index: 3;
    color: white;
    font-size: 14px;
    text-transform: uppercase;
}

/* 호버 효과: 내부가 좁아지며 보더가 두꺼워짐 */
#mobile-contact-btn:hover {
box-shadow: 0px 1.5px 5px -0.5px hsl(208deg 22% 58% / 0.36),
                0px 5px 12px -1.5px hsl(208deg 22% 58% / 0.36);
}

#mobile-contact-btn:hover::after {
    inset: 5px;
}

/* --- [오른쪽: 채팅 섹션] --- */
.chat-section { width: 350px;
     min-width: 350px;
     max-width: 350px;
     flex: none;
     background: #111;
     display: flex;
     flex-direction: column;
     position: relative;
     z-index: 1001;
 }

/* 1. 유저 정보 영역 (왼쪽) 강제 중앙 정렬 */
#user-status {
    display: flex !important;  
    align-items: center;     
    gap: 6px;    
    height: 100%;       
}

/* 2. 뱃지(운영자) 미세 조정 */
#user-status span {
    display: flex;         
    align-items: center;
    justify-content: center;
    height: 20px;       
    line-height: 1;      
    padding: 0 0px;   
    margin: 0 !important;  
    position: relative;
    top: 0px;    
}

/* 3. 아이콘들(왕관, 톱니바퀴) 높이 맞춤 */
#user-status i {
    display: flex;
    align-items: center;
    margin: 0 !important;   
    height: 100%;
    font-size: 22px;
}

/* 4. 로그아웃 버튼 그룹 (오른쪽) 정렬 */
#auth-btn-group {
    display: flex;
    align-items: center;
    height: 100%;
}

.chat-header { padding: 5px 10px;
     background: #111;
     border-bottom: 1px solid #333;
     display: flex;
     justify-content: space-between;
     align-items: center;
     font-size: 18px;
     flex: none;
     height: 60px;
     box-sizing: border-box;
 }

#auth-btn { background: var(--main-color); color: #000; font-weight: 400; border: none; padding: 10px 15px; border-radius: 17px; cursor: pointer; font-size: 12px; }
#auth-btn:hover { background: var(--main-hover-color) }

/* ==============================
   1. 채팅방 상단 로그인/가입 버튼 디자인
   ============================== */
.auth-btn-group {display: inline-block;}

/* '로그인' 텍스트 버튼 */
.btn-text-login {
    background: transparent;
    border: none;
    color: #ccc;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 10px;
    padding: 7px 10px 5px 10px;
}

.btn-text-login:hover {color: #fff; }

/* 롤링 애니메이션 정의 (기존 정의가 있다면 중복 선언 생략 가능) */
@keyframes scroll-join {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* 메인 버튼 설정 */
.btn-green-join {
    position: relative;
    display: inline-flex;   /* 텍스트 정중앙 배치를 위해 설정 */
    align-items: center;
    justify-content: center;
    padding: 7px 15px;      /* 기존 사이즈 유지 */
    overflow: hidden;
    border-radius: 20px;    /* 기존 라운드 유지 */
    background: transparent;
    border: none;
    cursor: pointer;
    box-shadow: var(--main-shadow);
    transition: all 0.3s ease-in-out;
}

/* 움직이는 그라데이션 보더 (Before) */
.btn-green-join::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    /* 테마 색상 적용 */
    background: linear-gradient(to right, #9900F0 0%, #FF85B3 50%, #9900F0 100%);
    background-size: 50% 100%;
    animation: scroll-join 1.5s infinite linear;
}

/* 내부 검정색 배경 (After) */
.btn-green-join::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 2px;             /* 보더 두께 설정 */
    border-radius: 18px;    /* 외곽보다 살짝 작게 설정 */
    background-color: #000;
    transition: inset 0.2s ease-in-out;
}

/* 버튼 텍스트 스타일 */
.btn-green-join span {
    position: relative;
    z-index: 3;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding-top: 2px;
}

/* 호버 효과 */
.btn-green-join:hover {
    transform: scale(1.05); /* 살짝 커지는 효과 */
    box-shadow: 0 0 10px rgba(153, 0, 240, 0.5);
}

.btn-green-join:hover::after {
    inset: 4px;             /* 호버 시 보더가 더 두꺼워짐 */
}

.doJoin {background:var(--main-color);
    color:#000;
    border: 0;
    transition: all 1s ease;
    background-size: 100% auto;
}

.doJoin:hover {background: var(--main-color);background-size: 200% auto;}



/* ==============================
   2. 로그인/가입 전용 모달 스타일 (분리됨)
   이름을 .auth-content 로 변경하여 다른 모달과 겹치지 않음
   ============================== */
/* 기본 PC 스타일 */
.auth-content { 
    background: rgba(0,0,0,0.8); /* 배경을 조금 더 진하게 */
    margin: 10% auto; 
    padding: 10px 10px 15px 10px;
    width: 320px; 
    color: #fff; 
    border-radius: 15px; 
    border: 1px solid #444; 
    position: relative; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* 내부 요소 스타일 (modal-content와 겹치지 않게 명시적 지정) */
.auth-content h3 { 
    margin-top: 0; 
    text-align: center; 
    border-bottom: 1px solid #444; 
    padding-bottom: 15px; 
    margin-bottom: 15px;
}

.auth-content input[type="text"], 
.auth-content input[type="password"] { 
    width: 90%;
    padding: 12px 10px;
    margin: 8px auto; 
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid #555;
    color: white; 
    display: block;
    border-radius: 8px;
    box-sizing: border-box;
}

.auth-content button { 
    width: 90%; 
    padding: 12px; 
    margin-top: 10px; 
    border-radius: 8px; 
    cursor: pointer; 
    margin-left: auto; 
    margin-right: auto; 
    display: block; 
    font-weight: 600;
    transition: all 1s ease;
}

/* 버튼 색상 */
.singup-btn { background: var(--main-color); color: #000; border: 0;transition: all 0.3s ease;background-size: 100% auto; }
.close-btn { background: #333; color: #ccc; border: 1px solid #444; }
.login-btn { background: transparent; color: white; border: 1px solid #ccc; }
.singup-btn:hover { background: var(--main-color); background-size: 200% auto;}
.close-btn:hover { background: #444; color: #fff; }
.login-btn:hover { background: rgba(255,255,255,0.1); }

/* 공지사항 바 (접기/펼치기 기능 포함) */
#notice-bar { 
    position: sticky; 
    top: 0;           
    z-index: 9;      /* 채팅보다 위에 뜨도록 */
    margin: 0; 
    display: none;    /* 기본 숨김 (JS로 켜짐) */
    background: rgba(35, 38, 41, 0.6); /* 뒤에 채팅 비치지 않게 불투명도 조절 */
    color: #fff;
    padding: 13px 5px; 
    font-weight: 600;
    text-align: left;
    font-size: .875rem; 
    border: 2px solid rgba(255,255,255,0.1); /* 테두리 살짝 조정 */
    border-radius: 10px; /* 아래쪽만 둥글게 */
    flex: none;       /* 크기 줄어듦 방지 */
    align-items: flex-start;
    gap: 2px;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px); /* 배경 흐림 효과 (선택사항) */
    box-shadow: var(--main-shadow);
}

#notice-bar.collapsed { 
    width: 30px; 
    padding:10px 5px; 
    background: rgba(35, 38, 41, 0.8); 
    border-color: transparent; 
    overflow: hidden; 
    white-space: nowrap;
    border-radius: 50%; /* 접혔을 땐 둥글게 */
    margin-left: auto;  /* 접히면 오른쪽으로 붙게 (선택사항) */
    border: 2px solid rgba(255,255,255,0.1); /* 테두리 살짝 조정 */
}
#notice-toggle-btn { background: none;
     border: none;
     color: var(--main-color);
     cursor: pointer;
     padding: 0 5px;
     font-size: 16px;
     line-height: 1.2;
 }
#notice-content { flex: 1; word-break: break-all; line-height: 1.4; }
#notice-bar.collapsed #notice-content { display: none; }

/* 1. 톱니바퀴 아이콘 (클릭 가능하게) */
.gear-btn {
    cursor: pointer;
    color: #aaa;
    margin-left: 3px;
    transition: transform 0.3s;
}
.gear-btn:hover { color: #fff; transform: rotate(90deg); }

#banner-area { width: 100%; background: #151515; text-align: center; border-bottom: 1px solid #000; display: none; flex: none; }
#chat-banner-img { max-width: 96%;
    margin: 5px auto;
     height: auto;
     display: block;
    border-radius: 5px;
    border: 1px solid #333;
    box-shadow: var(--main-shadow);
 }

#messages { 
margin: 5px 5px 0px 5px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 10px 0px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: linear-gradient(30deg, #111, #000, #111);
    border-radius: 10px;
    min-height: 0;
    position: relative;  /* sticky 동작을 위해 추가 */
    border-left: 1px solid #151515;
    box-shadow:inset 0 0 10px 0 rgba(0, 0, 0, 1);
}

.msg-row { display: flex; flex-direction: column; max-width: 85%; }
.msg-row.mine { align-self: flex-end; align-items: flex-end; }
.msg-row.other { align-self: flex-start; align-items: flex-start; }
.nick-title { font-size: 14px; margin-bottom: 3px; margin-left: 2px; font-weight: 600; text-shadow: var(--main-shadow);}
.nick-admin { color: #ff9800; }
.nick-user { color: #55ff4f; }
.admin-clickable { cursor: pointer; }
.bubble { padding: 3px 10px;
     position: relative; /* 하트 뱃지의 기준점 */
     cursor: pointer;    /* 클릭 가능하다는 표시 */
     border-radius: 12px;
     font-size: 13px;
     word-break: break-all;
     line-height: 1.4;
     color: #ffffff;
     box-shadow: 1px 1px 7px rgba(0,0,0,0.7);
 }

 /* 하트 뱃지 디자인 */
.like-badge {
    position: absolute;
    bottom: -10px;
    background: #ff1414; 
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    display: none;      
    align-items: center;
    gap: 3px;
    z-index: 10;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 🔥 [추가] 남의 글(왼쪽 말풍선) -> 뱃지는 오른쪽 끝에 */
.bubble.other .like-badge {
    right: -12px;
    left: auto; /* 왼쪽 값 초기화 */
}

/* 🔥 [추가] 내 글(오른쪽 말풍선) -> 뱃지는 왼쪽 끝에 */
.bubble.mine .like-badge {
    left: -12px;  /* 왼쪽으로 이동! */
    right: auto; /* 오른쪽 값 초기화 */
}

/* 하트가 생길 때 뿅! 하고 나타나는 효과 */
.like-badge.show {
    display: flex;
    animation: popIn 0.3s forwards;
}

/* 내가 누르면 잠깐 커지는 효과 */
.like-badge.liked-anim {
    transform: scale(1.4);
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* 기존 .flying-heart 수정 */
.flying-heart {
    position: absolute;
    bottom: 5px;
    color: #ff1818;
    font-size: 14px;
    pointer-events: none;
    z-index: 999;
    animation: flySmoke 1.2s ease-out forwards;
}

/* 남의 글: 오른쪽에서 하트 뿜뿜 */
.bubble.other .flying-heart {
    right: 5px;
    left: auto;
}

/* 내 글: 왼쪽에서 하트 뿜뿜 */
.bubble.mine .flying-heart {
    left: 5px;
    right: auto;
}

@keyframes flySmoke {
    0% {
        transform: translate(0, 0) scale(0.5); /* 작게 시작 */
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translate(0, -10px) scale(1);
    }
    100% {
        opacity: 0; 
        transform: translate(var(--rx), -80px) scale(1.5);
    }
}

.bubble.mine { background: var(--bubble-mine); border-top-right-radius: 2px; }
.bubble.other { background: var(--bubble-other); border-top-left-radius: 2px;margin-left: 10px; }
.bubble img { max-width: 70px; max-height: 70px; border-radius: 8px; display: block; }
.bubble.img-mode { padding: 5px; background: transparent; box-shadow: none; }
.system-msg { align-self: center;
     background: linear-gradient(30deg, rgba(21, 112, 30, 0.1), rgba(10, 11, 86, 0.1));
     color: #FEF01B;
     padding: 5px 15px;
     border-radius: 15px;
     font-size: 14px;
     margin: 10px 0;
     text-align: center;
     box-shadow: var(--main-shadow);
     font-weight: 600;
 }

/* 1. 아래에서 위로 투명도와 함께 올라오는 키프레임 */
@keyframes msgSlideUp {
    0% {
        opacity: 0;
        transform: translateY(20px); /* 20px 아래에서 시작 */
    }
    100% {
        opacity: 1;
        transform: translateY(0);    /* 제자리로 */
    }
}

/* 2. 자바스크립트에서 붙여줄 클래스 */
.msg-animate {
    animation: msgSlideUp 0.3s cubic-bezier(0.25, 1, 0.5, 1) forwards; 
    /* cubic-bezier를 써서 기계적이지 않고 '슉~착' 하는 자연스러운 느낌을 줌 */
}

#chat-form { position: relative;
    display: flex;
     padding: 10px;
     background: #111;
     border-top: 1px solid #151515;
     align-items: center;
     gap: 0px;
     flex: none;
 }
/* 1. 입력창: 버튼보다 아래 층(Layer)에 위치하도록 설정 */
#m {
    flex: 1;
    padding: 12px 10px;
    border: none;
    border-radius:0 9px 9px 0;
    background: rgba(30, 30, 30, 0.9);
    color: white;
    outline: none;
    padding-left: 15px; /* 버튼이 들어갈 자리 확보 */
    box-shadow: inset var(--main-shadow);
    
    /* [핵심] 위치를 잡아주고 z-index를 낮게 설정 */
    position: relative; 
    z-index: 1; 
}
.btn-gif { padding: 0px; height: 43px; border: none; font-weight: 600; cursor: pointer; color: #fff; }
.btn-send { background: var(--main-color);color: #000; box-shadow: var(--main-shadow);}
.btn-gif {
    /* 기존 스타일 유지 */
    background: rgba(0, 0, 0, 0.3);
    color: white !important;
    font-weight: 600;
    width: 42px;
    height: 40px; 
    border-radius: 9px 0 0 9px;
    cursor: pointer;
    border: none;
    position: relative; 
    z-index: 9999 !important; /* 무조건 맨 위 */
}
.btn-gif:hover { background: rgba(0, 0, 0, 0.6); }

.close-btn-mini {background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 10px;
    font-weight: 400;
}
/* 롤링 애니메이션 정의 */
@keyframes scroll-warning {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

#login-warning {
  position: absolute;
    height: 90%;
    width: 96%;
    left: 2%;
    top: 5%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #000;
    cursor: pointer;
    overflow: hidden;
    z-index: 99999;
    transition: all 0.5s ease;
    border-radius: 10px;
}

/* 움직이는 그라데이션 보더 레이어 (Before) */
#login-warning::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 200%;           /* 무한 롤링을 위해 너비 확보 */
    height: 100%;
    background: linear-gradient(to right, #9900F0 0%, #FF85B3 50%, #9900F0 100%);
    background-size: 50% 100%;
    animation: scroll-warning 1.5s infinite linear;
    border-radius: 10px;
}

/* 내부 검정색 배경 레이어 (After) */
#login-warning::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 3px;            /* 보더 두께 (숫자가 작을수록 얇아짐) */
    background-color: #000;
    transition: all 0.3s ease-in-out;
    border-radius: 10px;
}

/* 텍스트 영역 (span 또는 직접 텍스트) */
#login-warning span, 
#login-warning-text {      /* 텍스트가 span에 감싸져 있지 않다면 추가 권장 */
    position: relative;
    z-index: 3;
    background: #fff;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;    /* 텍스트에 테마 그라데이션 적용 */
    font-weight: 600;
    font-size: 16px;
}

/* 호버 시: 보더가 두꺼워지며 텍스트 강조 */
#login-warning:hover::after {
    inset: 5px;            /* 호버 시 내부 검정 영역이 좁아지며 보더가 강조됨 */
}

#login-warning:hover span {
    filter: brightness(1.2); /* 호버 시 글자 밝기 강조 */
}
/* --- [모달 및 팝업] --- */
.modal { display: none; position: fixed; z-index: 99999; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8);backdrop-filter: blur(5px); }
.modal-content { 
    background: rgba(0,0,0,0.7);
     margin: 10% auto;
     padding: 10px 10px 20px 10px;
     box-shadow: var(--main-shadow);
    width: 320px;
     color: #fff;
     border-radius: 15px;
     border: 1px solid #333;
     position: relative;
}

.modal h3 {
    margin-top: 0;
    text-align: center;
    border-bottom: 1px solid var(--main-border-color);
    padding-bottom: 10px;
    margin-bottom: 0;

    /* 🔥 텍스트 그라데이션 및 애니메이션 적용 */
    color: transparent; /* 글자색 투명화 필수 */
    background: linear-gradient(to right, #9900F0, #FF85B3, #9900F0);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: text-roll 5s infinite linear;
    
    /* 텍스트 가독성을 위해 폰트 굵기 조정 */
    font-weight: 700;
}
.modal input[type="text"], .modal input[type="password"],#j_email { 
    width: 90%;
    padding: 12px 10px;
    margin: 10px 0; 
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid #333;
    color: white; 
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 20px; 
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6); 
}

#sendEmailCode {border:0;background:var(--main-color);color: #000 !important;background-size: 100% auto;}

#sendEmailCode:hover {background:var(--main-color);background-size: 200% auto;}

.mainbutton {background:var(--main-color);color:#000;border: 0;transition: 0.3s ease;background-size: 100% auto;}

.mainbutton:hover {background: var(--main-color);background-size: 200% auto;}

.modal button { 
    width: 90%; padding: 13px; margin-top: 10px; border-radius: 30px; 
    cursor: pointer; margin-left: auto; margin-right: auto; display: block; font-size: 16px;
}

.modal-content input[type="file"]{
    width: 85%;
    padding: 10px 10px;
    margin: 10px 0;
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid #333;
    color: white;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 20px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
}
.close-btn { background: none; color: white; border: 1px solid #333; }
.login-btn { background: none; color: white; border: 1px solid #333; }
.close-btn:hover, .login-btn:hover { background: rgba(50, 50, 50, 0.1) }

.user-table { width: 100%; border-collapse: collapse; margin-top: 0px; font-size: 12px; }
.user-table th, .user-table td { border-bottom: 1px solid #444; padding: 10px; text-align: center; }

/* 테이블 안의 버튼 디자인 */
.btn-manage {
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: 0.2s;
}

.btn-manage.edit { background: var(--main-color);color: #000; transition: all 1s ease;background-size: 100% auto;} /* 파란색 */
.btn-manage.edit:hover { background: var(--main-color);background-size: 200% auto; }

.btn-manage.del { background: none;border: 1px solid #222;transition: all 01s ease; } /* 빨간색 */
.btn-manage.del:hover { background: #a71d2a; }


.user-table th { background: #333; }
.btn-xs { padding: 2px 5px; font-size: 10px; margin: 0 2px; cursor: pointer; width: auto !important; display: inline-block !important; }

/* style.css 파일에서 #admin-menu 부분 수정 */
#admin-menu {
    display: none;
    position: fixed;
    background: rgba(20, 20, 20, 0.95);
    color: #fff;
    border: 1px solid #333;
    border-radius: 5px;
    z-index: 20000 !important; 
    width: 150px;
    box-shadow: var(--main-shadow);
    text-align: center;
}

/* 아래는 기존 유지 */
#admin-menu button { width: 140px; padding: 10px;color: #fff; background: rgba(0, 0, 0, 0.3); border: none; border-bottom: 1px solid #333; text-align: left; border-radius: 0px; font-weight: 600; }
#admin-menu button:last-child { border-bottom: 0px; }

.title {padding: 5px 10px;font-size: 14px;text-align: center;border-bottom: 1px solid #111;}

/* 채널 정보 전체 래퍼 (가로 정렬) */
.channel-info-wrapper {
    display: flex;
    align-items: center;
    gap: 10px; /* 이미지와 텍스트 사이 간격 */
}

/* 1. 프로필 사진을 감싸는 박스 (기준점) */
.profile-box {
    position: relative;
    display: inline-block;
    width: 44px;  /* 이미지 크기보다 살짝 여유 있게 */
    height: 44px;
    display: flex;
   /* align-items: center;*/
    justify-content: center;
}

/* 2. 프로필 이미지 (기본 스타일) */
.channel-profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent; /* 평소엔 투명 테두리 */
    transition: all 0.3s ease;
    border-color: #aaa;
}

/* 3. 기본 아이콘 (이미지 없을 때) */
.channel-profile-default {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    border: 2px solid transparent;
}

/* 텍스트 그룹 (제목 + 상태뱃지) */
.channel-text-group {
    display: flex;
    flex-direction: row;   /* ✨ 핵심: 가로 정렬로 변경 (기존 column -> row) */
    align-items: center;   /* 세로 높이 중앙 맞춤 */
    gap: 10px;             /* 제목과 뱃지 사이 간격 */
}

/* ✨ 4. 방송 중일 때 (is-live 클래스가 붙으면) */
.profile-box.is-live .channel-profile-img,
.profile-box.is-live .channel-profile-default {
    border-color: rgba(255, 0, 0, 1); /* 형광 초록 테두리 */
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.5); /* 초록색 빛나는 효과 */
}

/* ✨ 5. LIVE 뱃지 (평소엔 숨김) */
.live-tag-badge {
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 0, 0, 1);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 7px;
    /* padding-top: 2px; */
    border-radius: 3px;
    line-height: 1;
    display: none;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* 방송 중일 때만 뱃지 보임 */
.profile-box.is-live .live-tag-badge {
    display: block;
}

.btn-mobile-fullscreen {
    display: none;
}

/* --- [모바일 반응형 최종: 투명도 0.7 적용 (화면 잘 보임)] --- */
/* =========================================================
   [PC 공통] 모바일 전용 요소는 PC에서 무조건 숨김
   (미디어 쿼리 시작하기 전에 이 코드가 있어야 PC에서 안 보입니다)
   ========================================================= */
#btn-mobile-menu, #mobile-slide-menu { display: none; }


/* [추가] 모바일 메뉴 배경 레이어 스타일 */
.menu-overlay {
    display: none;        /* 평소엔 숨김 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* 50% 반투명 검정 */
    z-index: 9999;        /* 슬라이드 메뉴(10000) 바로 아래 */
    backdrop-filter: blur(2px); /* 배경 흐림 효과 */
}

/* 메뉴가 열릴 때 레이어 표시 */
#mobile-slide-menu.active + #menu-overlay, /* 인접 형제 선택자 사용 시 */
.menu-active-bg #menu-overlay { /* 또는 body 클래스 제어 시 */
    display: block;
}


/* 방명록 전체 컨테이너 */
#guestbook-container {
    padding: 5px 0;
    margin: 0 auto;
    color: #fff;
}

/* 상단 글쓰기 박스 */
.gb-write-box {
    padding: 5px;
    border-bottom: 1px solid #444;
    margin-bottom: 5px;
    display: flex;
    gap: 10px;
}
.gb-input {
    flex: 1;
    background: #333;
    border: none;
    color: white;
    padding: 10px;
    resize: none; /* 크기 조절 막기 */
    height: 15px;
    border-radius:20px;
    overflow-y: hidden;
    overflow-x: hidden;
    box-shadow: inset var(--main-shadow);
}
/* 롤링 애니메이션 정의 (공통 사용 중이면 중복 선언 생략 가능) */
@keyframes scroll-gb {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.gb-btn {
    position: relative;
    display: inline-flex;   /* 중앙 정렬 */
    align-items: center;
    justify-content: center;
    min-width: 65px;        /* 버튼 최소 너비 확보 */
    height: 35px;           /* 적절한 높이 설정 */
    padding: 0 17px;        /* 기존 패딩 유지 */
    overflow: hidden;
    border-radius: 20px;    /* 기존 라운드 유지 */
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 움직이는 그라데이션 보더 (Before) */
.gb-btn::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(to right, #9900F0 0%, #FF85B3 50%, #9900F0 100%);
    background-size: 50% 100%;
    animation: scroll-gb 1.5s infinite linear;
}

/* 내부 검정색 배경 (After) */
.gb-btn::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 2px;             /* 보더 두께 조절 */
    border-radius: 18px;    /* 내부 라운드 조절 */
    background-color: black;
    transition: inset 0.2s ease-in-out;
}

/* 버튼 텍스트 스타일 */
.gb-btn span {
    position: relative;
    z-index: 3;
    color: white;           /* 텍스트 색상 */
    font-size: 14px;        /* 기존 폰트 사이즈 유지 */
    font-weight: 600;
}

/* 호버 효과 */
.gb-btn:hover {
    transform: scale(1.05);
}

.gb-btn:hover::after {
    inset: 4px;             /* 호버 시 보더가 두꺼워짐 */
}

/* 게시글 목록 (카드 형태) */
.gb-card {
    background: none;
    border: 1px solid #161616;
    overflow: hidden;
    background: #111;
    margin-bottom: 10px;
    border-radius: 12px;
    box-shadow: 1px 1px 7px #000;
}


/* 원글 (클릭 가능한 헤더) */
    .gb-header {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 12px 15px;
    }
.gb-header:hover { background: linear-gradient(30deg, #111, #000, #111); }

.gb-writer  {
    font-weight: bold;
    color: #7166ff;
    margin-right: 5px;
}
.gb-reply-cnt { color: #aaa; font-size: 0.9em; background: #333; padding: 0px 6px; border-radius: 10px; }
/* PC: 3개의 요소가 있지만, 줄바꿈을 허용하여 배치 변경 */
.gb-header-top {
    display: flex;             
    flex-wrap: wrap;  
    align-items: center;       
    width: 100%;               
    gap: 0; 
}

/* 1. 작성자 영역 (왼쪽 상단 배치) */
.gb-header-top > div:first-child {
    order: 1;                  /* 순서 1번 */
    display: flex;             
    align-items: center;
}

/* 2. 본문 미리보기 (아래쪽 전체 배치) */
.gb-content-preview {
    order: 3;
    width: 100%; 
    margin-top: 8px; 
    white-space: normal; 
    word-break: break-all; 
    overflow: visible; 
    text-overflow: clip;  
    color: #fff;               
    text-align: left;
    font-size: 14px;
    padding-left: 15px;
    line-height: 1.4; 
}
/* 3. 날짜 영역 (세 번째 자식) */
.gb-date {
    order: 2; 
    margin-left: auto; 
    white-space: nowrap;
    color: #888;
    font-size: 0.9em;
}

/* 펼쳐졌을 때 내용 + 댓글 영역 */
.gb-body {
    display: none; /* 기본 숨김 */
    padding: 0 15px 15px 15px;
    background: #141414;
    border-top: 1px solid #333;
}

/* 댓글 리스트 */
.gb-reply-row {
    position: relative;
    display: flex;
    padding: 8px;
    border-bottom: 1px solid #222;
    font-size: 0.95em;
}
.gb-reply-writer {color: #00ff1c;
    font-weight: 400;
    padding-left: 20px;}

.gb-reply-content { flex: 1; color: #ccc; margin-left: 5px;}
.gb-del-btn { color: #777;
     cursor: pointer;
     margin-left: 10px;
     font-size: 0.8em;
     border: 1px solid #777;
    padding: 5px 10px;
    border-radius: 20px;
}

.gb-del-btn:hover {color: #bcbcbc;border: 1px solid #bcbcbc}

/* 댓글 입력창 (펼쳤을 때만 보임) */
.gb-reply-input-box {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* =========================================================
   [모바일 전용 스타일]
   ========================================================= */
@media screen and (orientation: portrait), screen and (max-width: 900px) {
    
    /* --- [기존 코드 유지 시작] --- */
    html, body {
        position: fixed;
        width: 100%;
        height: 100%;
        overflow: hidden;
        overscroll-behavior: none;
        touch-action: none;
    }

    .titleb::after {display: none;}
    .titleb::before {display: none;}

    /* 비디오 그리드 레이아웃 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(33%, 1fr));
    gap: 10px;
    padding-top: 10px;
}

.play-mo { bottom: 10px;right: 15px;}

 .play-overlay-icon i {font-size:10cqw;}
 .video-card:hover .play-overlay-icon span {font-size: 5cqw;}

.video-title {font-size: 3cqw;}
.video-date {font-size: 2cqw;}
.video-duration {font-size: 2cqw;}

.video-card:hover .video-title { font-size: 3.1cqw;}

       /* 비디오: 입력 중일 때 배경으로 */
    .video-section { 
        flex: none; 
        width: 100% !important; 
        height: auto; 
        background: #000; 
        padding: 0 !important; 
        z-index: 10; 
    }

    .content-tabs, 
    .tab-content-container {
        display: none !important;
    }

    #mobile-slide-menu.active ~ .menu-overlay {
        display: block !important;
    }

    .container { 
        flex-direction: column; 
        width: 100%; 
        height: 100%; 
        display: flex;
        position: relative;
    }

    #banner-area { display: none !important; }

    .btn-mobile-fullscreen {
        display: inline-block !important; 
        background: none; border: none; color: #ccc; font-size: 18px; 
        cursor: pointer; padding: 5px 0 5px 10px; transition: all 0.2s;
    }
    .btn-mobile-fullscreen:hover { color: #fff; transform: scale(1.1); }

    body.is-typing #notice-bar,
    body.is-typing #main-chat-header,
    body.gif-active #main-chat-header { 
        display: none !important; 
    }
    body.gif-active .viewer-info { display: none !important; }

    body.is-typing .container {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        height: 100%; 
        transition: none !important;
    }

    body.is-typing .video-section {
        position: absolute;
        top: 0; left: 0;
        z-index: 1; 
    }
    .video-wrapper { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; border-radius: 0;}

    .chat-section { 
        flex: 1; 
        width: 100% !important; 
        min-width: 0 !important; 
        max-width: none !important; 
        margin: 0 !important;
        display: flex;
        flex-direction: column;
        background: #111; 
        position: relative; 
        overflow: hidden; 
        min-height: 0;
        z-index: 20; 
    }
    body.is-typing .chat-section {
        position: absolute;
        top: 0; left: 0;
        height: 100%;
        background: transparent !important; 
        z-index: 50; 
    }

    /* 메시지창: 투명도 대폭 수정 */
    #messages { 
        flex: 1 !important; 
        width: 100% !important;
        margin: 0 !important; 
        border: 0 !important; 
        padding-bottom: 70px !important; 
        box-sizing: border-box; 
        overflow-y: auto !important;
        min-height: 0;
    }
    
    /* 배경 그라데이션을 아주 연하게(0.3) 변경하여 비디오가 잘 보이게 함 */
    body.is-typing #messages {
        background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 60%);
        padding-top: 220px; 
    }
    
    body.is-typing #messages::-webkit-scrollbar { display: none; }

    /* 말풍선 투명도(0.3) 적용 + 글씨 가독성용 그림자 강화 */
    body.is-typing .msg-row .bubble {
        background: rgba(0, 0, 0, 0.6) !important; 
        backdrop-filter: blur(1px);
        color: white !important;
        border: 1px solid rgba(255,255,255,0.007);
        text-shadow: 2px 2px 2px black, -1px -1px 1px black; 
        box-shadow: none;
    }

    body.is-typing .system-msg {
        background: rgba(0, 0, 0, 0.8) !important; 
        color: #FEF01B !important;   
        border: 1px solid rgba(255, 255, 255, 0.3); 
        text-shadow: 1px 1px 2px #000;  
        box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    }
    
    /* 닉네임도 더 투명하게 */
    body.is-typing .msg-row .nick-title {
        background: rgba(0,0,0,0.2);
        padding: 2px 6px;
        border-radius: 10px;
        text-shadow: 1px 1px 2px black;
    }

    /* 1. 기본 설정: 'is-typing' 상태일 때 9번째보다 오래된 메시지는 전부 투명하게(0) 만듬 */
body.is-typing #messages > div:nth-last-child(-n+3) {
    opacity: 1 !important;
}

body.is-typing #messages > div:nth-last-child(4) {
    opacity: 0.7 !important;
}

body.is-typing #messages > div:nth-last-child(5) {
    opacity: 0.3 !important;
}
body.is-typing #messages > div:nth-last-child(n+6) {
    opacity: 0.0 !important;
    pointer-events: none;  /* 투명해진 메시지 클릭 방지 (선택사항) */
}

body.is-typing #messages > .nick-user {font-size: 14px;}
body.is-typing #messages > .nick-title {margin-bottom: 1px;}

    /* 입력폼 */
    #chat-form { 
        position: absolute; 
        bottom: 0; left: 0; right: 0;
        z-index: 100; 
        width: 100% !important; 
        box-sizing: border-box;
        background: rgba(20, 20, 20, 0.85); 
        backdrop-filter: blur(5px); 
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: calc(5px + env(safe-area-inset-bottom));
    }

    #m {
        position: relative; z-index: 1; flex: 1;
        background: rgba(30, 30, 30, 0.9);
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.2);
        padding-left: 15px; 
    }
    .btn-gif {
        z-index: 100 !important; 
        background: rgba(0, 0, 0, 0.3);
    }

    /* 기존 유지 */
    .modal-content { margin: 15vh auto !important; width: 85% !important; }
    .mbmodal {margin: 7vh auto !important}
    .auth-content { margin: 20vh auto !important; width: 75% !important; }
    #channel-title-display { font-size: 21px; padding: 0px 15px !important;}
    .profile-box { position: relative; display: inline-block; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
    .channel-profile-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid #aaa; }
    .profile-box.is-live .channel-profile-img { box-shadow: 0 0 8px rgba(255, 0, 0, 0.5); border-color: red; }
    .gif-popover { height: 40vh; bottom: 60px; }
    #gif-results { height: calc(40vh - 100px); grid-template-columns: repeat(2, 1fr); }

    /* 1. 기존 채팅 헤더(로그인 버튼 있던 곳) 숨기기 */
    .chat-header {
        display: none !important;
    }

    /* 2. 햄버거 메뉴 버튼 (우측 상단 고정) */
    #btn-mobile-menu {
        display: block !important;
        position: absolute;
        top: 5px;
        right: 10px;
        z-index: 999;
        background: none;
        color: #fff;
        border: 0;
        padding: 8px 12px;
        font-size: 32px;
        cursor: pointer;
    }

    /* 3. 슬라이드 메뉴 패널 (우측에서 나옴) */
    #mobile-slide-menu {
        display: block !important;
        position: fixed;
        top: 0;
        right: 0;
        width: 260px;
        height: 100%;
        background: rgba(20, 20, 20, 0.7);
        border-left: 1px solid #444;
        z-index: 10000;
        padding: 20px;
        box-sizing: border-box;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.8);
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        backdrop-filter: blur(10px);
    }
    
    /* 메뉴 활성화 시 등장 */
    #mobile-slide-menu.active {
        transform: translateX(0);
    }

    /* 메뉴 내부 헤더 */
    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 25px;
        border-bottom: 1px solid #444;
        padding-bottom: 15px;
        color: #fff;
    }
    .close-menu-btn {
        background: none; border: none; color: #fff; font-size: 24px; cursor: pointer;
    }

    /* 메뉴 내부 버튼 그룹 */
    .mobile-auth-group {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding-bottom: 20px;
        border-bottom: 1px solid #333;
    }
    
    /* 로그인/가입 버튼 스타일 강화 */
    .mobile-auth-group button {
        width: 100%;
        padding: 12px;
        font-size: 15px;
        font-weight: 600;
        border-radius: 8px;
        cursor: pointer;
    }
    .btn-text-login { /* 기존 클래스 재사용하되 스타일 보강 */
        border: 1px solid #666 !important;
        background: rgba(255,255,255,0.05) !important;
        color: #fff !important;
    }
    .btn-green-join { 
        width: 100%; /* 가득 차게 */
    }

    .btn-green-join::after {border-radius: 10px; }

    /* 로그인 후 유저 정보 디자인 */
    .mobile-user-info {
        text-align: center;
        color: #fff;
    }
     .profile-area {
        padding: 15px;
        border-radius: 10px;
        margin-bottom: 20px;
        font-size: 18px;
        font-weight: 600;
        border: 1px solid #333;
        text-align: left;
        background: rgba(0, 0, 0, 0.3);
        box-shadow: inset var(--main-shadow);
    }
    
    /* 메뉴 항목 버튼들 */
    .mobile-menu-btn {
        width: 100%;
        padding: 12px;
        background: transparent;
        color: #ccc;
        border: none;
        border-bottom: 1px solid #333;
        text-align: left;
        font-size: 15px;
        cursor: pointer;
        transition: 0.2s;
    }
    .mobile-menu-btn:hover {
        background: rgba(255,255,255,0.05);
        color: #fff;
        padding-left: 20px; /* 호버 시 살짝 이동 효과 */
    }
    .mobile-menu-btn i { width: 25px; text-align: center; margin-right: 5px; }

    .mobile-only-tabs {
        display: flex !important;
        background: #111;
        border-bottom: 1px solid #333;
        border-top: 1px solid #333;
        flex-shrink: 0; /* 높이 고정 */
        width: 100%;
    }

    /* 텍스트 그라데이션 흐름 애니메이션 
@keyframes m-text-roll {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}
*/
.m-tab-btn {
        background: none;
        border: none;
        color: #999;
        font-weight: 600;
        cursor: pointer;
        position: relative;
        transition: 0.3s;
        overflow: hidden;
        padding: 12px 12px;
        font-size: 16px;
}

/* 활성화 상태 (글자 그라데이션 + 애니메이션) */
.m-tab-btn.active {
    color: transparent; /* 글자색 투명화 필수 */
    background: linear-gradient(to right, #9900F0, #FF85B3, #9900F0);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: m-text-roll 2s infinite linear;
}

/* 활성화 상태 하단 롤링 바 */
.m-tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #9900F0, #FF85B3, #9900F0);
    background-size: 200% auto;
    animation: text-roll 2s infinite linear;
}

/* 호버 시 부드럽게 글자색 변경 */
.m-tab-btn:hover {
    color: #FF85B3;
}

.count-badge {
    font-size: 14px;
    color: #888;
    font-weight: 100;
}

/* 활성화된 탭의 숫자도 테마 그라데이션 적용 */
.m-tab-btn.active .count-badge,.m-tab-btn:hover > .count-badge {
    color: transparent;
    background: linear-gradient(to right, #9900F0, #FF85B3, #9900F0);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: text-roll 5s infinite linear;
}

    /* 2. 패널 제어: messages와 mobile-panel 전환 */
    .m-tab-panel { 
        display: none !important; 
        width: 100% !important;
        margin: 0 !important;
        border: 0 !important;
    }

    /* 채팅창 활성화 (기존 flex 구조 유지) */
    #messages.active { 
        display: flex !important; 
        flex: 1;
    }

    /* 리스트 패널 활성화 */
    #mobile-panel.active {
        display: block !important;
        flex: 1;
        overflow-y: auto;
        padding: 10px;
        box-sizing: border-box;
    }

    /* 채팅 탭이 아닐 때 하단 폼과 플로팅 버튼 숨김 처리 (선택) */
    body.tab-not-chat #chat-form { display: none !important; }

/* 1. 헤더 전체: 위아래로 쌓이도록 변경 */
    .gb-header {
        display: flex;
        flex-direction: column; /* 세로 정렬 (Column) */
        align-items: flex-start;
        gap: 6px; /* 윗줄과 아랫줄 사이 간격 */
        padding: 12px 15px; /* 모바일에 맞는 패딩 조절 */
    }

  /* 3개의 자식 요소를 감싸는 부모 */
.gb-header-top {
    display: flex;             /* 가로 정렬의 핵심 */
    align-items: center;       /* 세로 중앙 정렬 */
    width: 100%;               /* 전체 너비 사용 */
    gap: 10px;                 /* 요소 사이 간격 */
}

    /* 3. 하단 내용 (미리보기): 아랫줄로 내리기 */
    .gb-content-preview {
        display: block;
        width: 100%;
        text-align: left; /* 왼쪽 정렬 */
        color: #fff; /* 글자색 */
        margin-top: 2px;
        text-overflow: ellipsis;
    }

    .reply-del-btn {
        position: absolute !important;
        right: 0px !important;
        top: 5px !important;}

    .gb-reply-content {margin-right: 50px;}

}


/* 모바일 가로 전용 */ 
@media screen and (orientation: landscape) and (max-width: 900px) {

  html, body {
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    touch-action: none !important;
    overscroll-behavior: none !important;
  }

}
.viewer-right-group {
    display: flex;          /* 가로 배치 (이게 없으면 줄바꿈됨) */
    align-items: center;    /* 수직 중앙 정렬 */
    gap: 8px;              /* 시청자 수와 공유 버튼 사이 간격 */
}


/* --- 공유 버튼 및 팝업 스타일 --- */
.share-wrapper {
    margin-left: 0 !important; /* 그룹 내부 gap으로 간격 조절하므로 margin 제거 */
    display: flex;
    align-items: center;
}

/* 공유 아이콘 버튼 */
.btn-share-icon {
    background: none;
    border: none;
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
    padding: 5px 5px 5px 10px;
    transition: color 0.2s;
    position: relative;
}
.btn-share-icon:hover { color: #fff; }

/* 팝업 메뉴 박스 (이미지와 유사하게 디자인) */
.share-popup {
    display: none; /* 평소엔 숨김 */
    position: absolute;
    bottom: 40px; /* 버튼 위로 띄움 */
    right: 5px;     /* 오른쪽 정렬 */
    width: 260px;
    background: #1f1f1f;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 100;
    flex-direction: column;
    color: #fff;
}
.share-popup.active { display: flex; } /* 활성화 시 보임 */

/* 팝업 헤더 텍스트 "공유:" */
.share-header {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #eee;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}

/* 아이콘들 가로 배치 */
.share-items {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

/* 개별 아이템 (아이콘+텍스트) */
.share-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex: 1;
}
.share-item:hover .share-icon-circle {
    background: #333;
    transform: translateY(-2px);
}

/* 동그란 아이콘 배경 */
.share-icon-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #2a2a2a; /* 약간 밝은 회색 */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 20px;
    transition: all 0.2s;
}

/* 텍스트 라벨 */
.share-item span {
    font-size: 12px;
    color: #bbb;
}

/* PIP(작은 화면) 버튼 스타일 */
.btn-pip-icon {
    background: none;
    border: none;
    color: #ccc;
    font-size: 16px; 
    cursor: pointer;
    padding: 5px 5px 5px 10px;
    transition: all 0.2s;
    position: relative;
}

.btn-pip-icon:hover {
    color: #fff;
    transform: scale(1.1);
}

/* 활성화되었을 때 (파란색 포인트) */
.btn-pip-icon.active {
    color: #4dabf7; /* 밝은 파란색 */
    text-shadow: 0 0 5px rgba(77, 171, 247, 0.6);
}

/* 팝업창 본체 */
.gif-popover {
    display: none;        /* 평소엔 숨김 */
    position: absolute;   /* 채팅폼 기준으로 위치 잡기 */
    bottom: 100%;         /* 🔥 폼 바로 윗부분에 배치 */
    left: 0;
    width: 98%;          /* 폼 너비와 똑같이 */
    height: 275px;        /* 적당한 높이 */
    background: rgba(20, 20, 20, 0.95); /* 진한 배경 */
    border-top: 1px solid #444;
    border-radius: 15px 15px 0 0; /* 위쪽만 둥글게 */
    padding: 5px;
    box-sizing: border-box;
    left: 1%;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

/* 헤더 (제목 + 닫기버튼) */
.gif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid #333;
    padding: 0px 10px;
}

.close-btn-mini {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
}
.close-btn-mini:hover { color: #fff; }

/* 검색창 영역 */
.gif-search-row {
    display: flex;
    gap: 0px;
    margin-bottom: 10px;
}

.gif-search-row input {
    flex: 1;
    padding: 8px 10px;
    border-radius: 9px 0 0 9px;
    border: 1px solid #222;
    background: #333;
    color: white;
    border-right: 0;
    box-shadow:inset var(--main-shadow);
}

.gif-search-row button {
    width: 70px;
    background: #222; /* 핑크색 포인트 */
    color: white;
    border: none;
    border-radius: 0 9px 9px 0;
    cursor: pointer;
    font-weight: 600;
    box-shadow: var(--main-shadow);
}

/* 검색 결과 그리드 (이미지 나열) */
#gif-results {
    height: 200px;          /* 스크롤 영역 높이 */
    overflow-y: auto;       /* 세로 스크롤 허용 (내용 넘치면 스크롤바 생김) */
    overflow-x: hidden;     /* 🔥 가로 스크롤은 무조건 숨김 */
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 한 줄에 3개씩 꽉 차게 배치 */
    gap: 5px;               /* 이미지 사이 간격 */
    width: 100%;            /* 부모 너비에 딱 맞춤 */
    box-sizing: border-box; /* 패딩/테두리 포함해서 너비 계산 */
}

/* 결과 이미지 스타일 */
#gif-results img {
    width: 100%;
    height: 80px;
    object-fit: cover;   /* 꽉 차게 */
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s;
}
#gif-results img:hover {
    border-color: var(--main-color);
}

.fa-user-shield {color: #55ff4f;}

/* 레전드 등급 전용 무지개 애니메이션 (기존 pulse 대체 가능) */
@keyframes rainbow-text {
    0% { filter: hue-rotate(0deg) drop-shadow(0 0 2px gold); }
    100% { filter: hue-rotate(360deg) drop-shadow(0 0 5px gold); }
}
.rank-legend { animation: rainbow-text 3s linear infinite !important; }

/* 아이콘 자체에서 빛이 흐르는 효과 */
.shine-text {
    position: relative;
    display: inline-block;
    /* 배경을 글자 모양으로 자름 */
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    /* 기본 배경색 + 움직이는 빛(사선) */
    background-repeat: no-repeat;
    background-image: linear-gradient(
        110deg, 
        rgba(255,255,255,0) 30%, 
        rgba(255,255,255,0.8) 50%, 
        rgba(255,255,255,0) 70%
    );
    background-size: 200% 100%;
    animation: text-shine 1s linear infinite;
    text-shadow: 0px 1px 1px rgb(0 0 0 /0.3);
}

@keyframes text-shine {
    0% { background-position: 150% 0; }
    100% { background-position: -50% 0; }
}

/* --- 투표 오버레이 (채팅창 상단) --- */
.vote-overlay {
    position: sticky; 
    top: 0; /* 스크롤 시 최상단 고정 */
    z-index: 8; /* 공지바(z-index:9)보다 아래에 위치해서 버튼 클릭 방해 안 함 */
    background: rgba(20, 20, 20, 0.60);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.3s ease;
    margin-right: 50px;      /* 오른쪽 공지 버튼 공간 확보 */
    margin-top: -55px;       /* 🔥 위쪽으로 끌어올려서 공지바 빈 공간 덮어쓰기 (높이 조절 필요시 숫자 변경) */
    margin-bottom: auto;     /* 🔥 채팅이 적어도 투표창은 항상 맨 위에 붙어있게 밀어내기 */
    margin-left: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
    overflow: hidden;
    flex: none;
}
.vote-header {
    background: rgba(35, 38, 41, 0.4);
    color: #fff;
    padding: 8px 12px;
    font-weight: 600;
    display: flex; justify-content: space-between; align-items: center;
}
.vote-fold-btn { background: none; border: none; color: #fff; cursor: pointer; font-size: 14px; }
.vote-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.vote-body.collapsed { display: none; } /* 접혔을 때 숨김 */

/* 투표 항목 */
.vote-item {
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 8px 10px;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid #444;
    transition: 0.2s;
}
.vote-item:hover { border-color: #666; }

/* 투표 그래프 (배경) */
.vote-bar {
    position: absolute; top: 0; left: 0; height: 100%;
    background: rgba(45, 126, 255, 0.3); /* 파란색 반투명 */
    width: 0%;
    transition: width 0.5s ease;
    z-index: 0;
}
.vote-text-wrap {
    position: relative; z-index: 1;
    display: flex; justify-content: space-between;
    font-size: 13px;
}

/* 투표하기 버튼 (유저용) */
/* 롤링 애니메이션 정의 (공통 사용 중이면 중복 선언 생략 가능) */
@keyframes scroll-vote {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.btn-do-vote {
    position: relative;
    display: inline-flex;   /* 중앙 정렬 */
    align-items: center;
    justify-content: center;
    width: 100%;            /* 기존 너비 유지 */
    height: 40px;           /* 적절한 높이 설정 */
    margin-top: 5px;        /* 기존 마진 유지 */
    overflow: hidden;
    border-radius: 20px;    /* 기존 라운드 유지 */
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 움직이는 그라데이션 보더 (Before) */
.btn-do-vote::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(to right, #9900F0 0%, #FF85B3 50%, #9900F0 100%);
    background-size: 50% 100%;
    animation: scroll-vote 1.5s infinite linear;
}

/* 내부 검정색 배경 (After) */
.btn-do-vote::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 2px;             /* 보더 두께 */
    border-radius: 18px;
    background-color: black;
    transition: inset 0.2s ease-in-out;
}

/* 버튼 텍스트 스타일 */
.btn-do-vote span {
    position: relative;
    z-index: 3;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

/* 호버 효과 */
.btn-do-vote:hover {
    box-shadow: 0 0 10px rgba(153, 0, 240, 0.4);
}

.btn-do-vote:hover::after {
    inset: 4px;             /* 호버 시 보더가 두꺼워짐 */
}

/* 생성 모달 인풋 */
.vote-input-row { display: flex; gap: 5px; margin-bottom: 5px; }
.vote-input-row input { flex: 1; margin: 0 !important; }

/* --- 결과 메시지 스타일 --- */
.vote-result-box {
    background: none;
    border: 0;
    padding: 0;
    color: #fff; font-size: 13px;
}
.vote-res-row {
    display: flex; justify-content: space-between;
    margin-top: 5px; border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 2px;
}
.vote-res-row:last-child {border-bottom:0}

/* 1. PC에서는 햄버거 버튼과 슬라이드 메뉴를 무조건 숨김 */
#btn-mobile-menu, #mobile-slide-menu {
    display: none;
}

/* 1. 빛나는 애니메이션 정의 */
@keyframes vote-glow {
    0% { box-shadow: 0 0 0 0 #f80137; border-color: #fff; }
    70% { box-shadow: 0 0 0 15px rgba(45, 126, 255, 0); border-color:#f80137; }
    100% { box-shadow: 0 0 0 0 rgba(45, 126, 255, 0); border-color: #fff; }
}

/* 2. 유저가 접었을 때 투표창 스타일 변경 */
.vote-overlay.user-collapsed {
    width: 40px !important;       /* 원형 너비 */
    height: 40px !important;      /* 원형 높이 */
    padding: 0 !important;        /* 패딩 제거 */
    border-radius: 50% !important;/* 완전한 원 */
    background: rgba(35, 38, 41, 0.9) !important; 
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: vote-glow 2s infinite;
    border: 2px solid var(--main-color);
}

/* 3. 접혔을 때 내부 요소 숨기기/조정 */
.vote-overlay.user-collapsed .vote-header {
    background: transparent;
    padding: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
}

/* 제목 숨기기 */
.vote-overlay.user-collapsed #vote-title-disp { 
    display: none !important; 
}

/* 접기 버튼(아이콘) 스타일 조정 - 중앙 정렬 */
.vote-overlay.user-collapsed .vote-fold-btn {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px; 
    color: #f80137;
    padding: 0; margin: 0; /* 여백 제거 */
}

.vote-overlay.user-collapsed #vote-body {
    display: none !important;
}

#mobile-channel-info-clone {
    color: #fff; /* 글자 흰색 */
}

/* 메뉴 안에서는 배경색 투명하게 (메인 화면 스타일 덮어쓰기) */
#mobile-channel-info-clone .channel-title-display {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0;
}

/* 텍스트 크기 등 미세 조정 */
#mobile-channel-info-clone .channel-text-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

#mobile-channel-info-clone #title-text {
    font-size: 15px; /* 메뉴니까 조금 작게 */
}


/* 하트 아이콘 팅기는 효과 */
@keyframes heart-beat {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* 숫자 롤링 애니메이션 (위로 슬라이드) */
@keyframes count-roll {
    0% { opacity: 0; transform: translateY(5px); }
    100% { opacity: 1; transform: translateY(0); }
}

.heart-active {
    animation: heart-beat 0.4s ease-out;
    display: inline-block;
}

.count-active {
    animation: count-roll 0.3s ease-out;
    display: inline-block;
}


/* 툴팁 박스 설정 */
.titleb::after {
    content: attr(data-tooltip); /* 속성값을 텍스트로 사용 */
    position: absolute;
    bottom: 95%; /* 버튼 위쪽에 배치 */
    left: -10%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.1s ease; /* 0.1초 만에 즉시 표시 */
}

/* 마우스 올렸을 때 즉시 노출 */
.titleb:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 말풍선 삼각형 꼬리 (선택 사항) */
.titleb::before {
    content: '';
    position: absolute;
    bottom: 70%;
    left: 45%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.1s ease;
}

.titleb:hover::before {
    opacity: 1;
    visibility: visible;
}