:root {--main-color: #2d7eff;
      --main-hover-color: #10a1d2;
      --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));
}

/* --- [기본 설정] --- */
body { margin: 0; background: rgb(21, 21, 21); color: #fff; font-family: sans-serif; 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; 
    justify-content: flex-start; align-items: center; 
    overflow: hidden; position: relative;
}

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

.ch-status.on {
    background-color: #ff0000;
    color: #fff;
    border: 0;
    box-shadow: var(--main-shadow);
}



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

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

#channel-title-display { 
    display: flex;
    align-items: center;
    line-height: 1;  
    background: #111;
    width: 100%; 
    font-size: 21px;
    font-weight: bold; 
    padding: 5px 0px;
    color: #eee;
    min-height: 30px; 
    border-bottom: 1px solid #333;
    box-shadow: 1px 1px 3px #000;
    padding-left: 20px; font-weight: 400;
}

.video-wrapper {
    position: relative; width: 100%;
    max-width: calc((100dvh - 120px) * 16 / 9);
    aspect-ratio: 16 / 9;
    background: #000; margin: 0 auto; display: flex;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

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; 
}

/* 중앙 음소거 오버레이 */
#center-mute-overlay {
    position: absolute;
     top: 50%;
     left: 50%;
     transform: translate(-50%, -50%);
     z-index: 20;
     background: rgba(0, 0, 0, 0.6);
     border: 2px solid rgba(255, 255, 255, 0.3);
     border-radius: 50%;
     width: 80px;
     height: 80px;
     display: flex;
     justify-content: center;
     align-items: center;
     cursor: pointer;
     transition: all 0.2s;
     backdrop-filter: blur(2px);

}
#center-mute-overlay:hover { background: rgba(255, 235, 59, 0.8); transform: translate(-50%, -50%) scale(1.1); border-color: #fff; }
#center-mute-overlay i { font-size: 35px; color: #fff; }
#center-mute-overlay:hover i { color: #000; }
.mute-guide-text { position: absolute; top: 90px; width: 150px; text-align: center; font-size: 14px; text-shadow: 1px 1px 2px #000; pointer-events: none; }

/* 플레이어 컨트롤 */
.player-overlay { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); padding: 10px 20px; box-sizing: border-box; opacity: 0; transition: opacity 0.3s; display: flex; 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: 20px; cursor: pointer; width: 30px; }
.btn-control:hover { color: #FEF01B; transform: scale(1.1); }
.volume-slider { width: 80px; cursor: pointer; }
.live-badge { background: red; color: white; padding: 2px 6px; font-size: 12px; font-weight: bold; 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: 2px 8px; font-size: 11px; cursor: pointer; border-radius: 3px; }
.quality-btn.active { background: #FEF01B; color: #000; font-weight: bold; }
#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: 8px 15px;
     box-sizing: border-box;
     color: #fff;
     font-size: 13px;
     display: flex;
     justify-content: space-between;
     align-items: center;
     min-height: 35px;
     box-shadow: var(--main-shadow);
     position: relative;
 }
.viewer-count { font-weight: bold; }
/* --- 시청자 수 롤링 애니메이션 --- */

/* 1. 숫자가 보이는 '창문' 역할 */
.viewer-num { 
    display: inline-flex;       /* 내부 요소 정렬 */
    flex-direction: column;     /* 세로로 쌓기 */
    height: 19px;               /* 숫자가 딱 하나만 보이는 높이 (폰트 크기에 맞춰 조절) */
    overflow: hidden;           /* 영역 밖의 숫자는 숨김 (핵심!) */
    vertical-align: bottom;     /* 텍스트 줄 맞춤 */
    color: #4d85ff; 
    margin: 0 5px; 
    font-size: 16px;
    font-weight: bold;
    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: 18px;               /* 부모(.viewer-num) 높이와 동일해야 함 */
    line-height: 18px;          /* 수직 중앙 정렬 */
    display: block;
}
#mobile-contact-btn { color: #fff;
     text-decoration: none;
     font-weight: bold;
     font-size: 14px;
     border: 0;
     padding: 4px 12px;
     border-radius: 15px;
     background: var(--main-color);
     box-shadow: var(--main-shadow);
     transition: all 0.5s ease;
 }
#mobile-contact-btn:hover { background: var(--main-color);
     color: #fff;
     box-shadow: 0 0 10px var(--main-color);
 }

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

/* 1. 유저 정보 영역 (왼쪽) 강제 중앙 정렬 */
#user-status {
    display: flex !important;    /* 인라인 속성 무시하고 Flex박스로 변경 */
    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;        /* gap을 쓰므로 기존 margin 제거 */
    position: relative;
    top: 0px;                    /* 시각적으로 1px 내려야 한글과 아이콘 높이가 딱 맞음 */
}

/* 3. 아이콘들(왕관, 톱니바퀴) 높이 맞춤 */
#user-status i {
    display: flex;
    align-items: center;
    margin: 0 !important;        /* 기존 인라인 스타일의 margin 제거 */
    height: 100%;
}

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

.chat-header { padding: 11.5px 10px;
     background: #111;
     border-bottom: 1px solid #333;
     display: flex;
     justify-content: space-between;
     align-items: center;
     font-size: 16px;
     flex: none;
 }

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

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

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

/* '가입' 녹색 버튼 (이미지 참고) */
.btn-green-join {
    background: var(--main-color);
    box-shadow: var(--main-shadow);
    color: #000;
    border: none;
    padding: 7px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 20px;
}
.btn-green-join:hover { background: var(--main-hover-color); }


/* ==============================
   2. 로그인/가입 전용 모달 스타일 (분리됨)
   이름을 .auth-content 로 변경하여 다른 모달과 겹치지 않음
   ============================== */

/* 기본 PC 스타일 */
.auth-content { 
    background: rgba(0,0,0,0.8); /* 배경을 조금 더 진하게 */
    margin: 10% auto; 
    padding: 20px 10px; 
    width: 320px; 
    color: #fff; 
    border-radius: 10px; 
    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: bold;
    transition: all 0.5s ease;
}

/* 버튼 색상 */
.singup-btn { background: var(--main-color); color: #000; border: 0;transition: all 0.3s ease; }
.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-hover-color); }
.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: bold;
    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. 톱니바퀴 아이콘 (클릭 가능하게) */
.admin-gear-btn {
    cursor: pointer;
    color: #aaa;
    margin-left: 3px;
    transition: transform 0.3s;
}
.admin-gear-btn:hover { color: #fff; transform: rotate(90deg); }

/* 2. 관리자 메뉴 (숨겨져 있다가 나타남) */
#admin-toolbar {
    /* ✨ 핵심 1: Flexbox 적용하여 가로 정렬 */
    display: flex;
    justify-content: space-between; /* 요소 사이 균등 배분 */
    gap: 5px;                       /* 버튼 사이 간격 5px */
    
    background: rgba(40, 40, 40, 0.95);
    border-bottom: 1px solid #444;
    overflow: hidden;

    /* 애니메이션용 초기값 */
    max-height: 0;
    opacity: 0;
    padding: 0 10px; /* 닫혀있을 때 패딩 */
    transition: all 0.3s ease;
}

#admin-toolbar.active {
    max-height: 200px;
    opacity: 1;
    padding: 10px; /* 열렸을 때 전체 여백 */
}

/* 버튼 디자인 */
.btn-admin-tool { 
    flex: 1;              
    background: #d32f2f; 
    color: white; 
    border: none; 
    padding: 10px 0;      /* 위아래 높이만 설정 (가로는 자동) */
    border-radius: 4px; 
    font-size: 12px; 
    font-weight: bold;
    cursor: pointer; 
    margin: 0;            /* 불필요한 마진 제거 */
    white-space: nowrap;  /* 줄바꿈 방지 */
    box-shadow: var(--main-shadow);
}

.btn-admin-tool:hover { background: #b71c1c; }

/* 3. 채팅 청소 플로팅 버튼 (동그란 지우개) */
#btn-clear-float {
    display: none; /* 기본 숨김 */
    position: absolute;
    bottom: 70px; /* 채팅 입력창 높이만큼 띄움 (입력창 가리지 않게) */
    right: 10px;
    width: 45px;
    height: 45px;
    background: rgba(220, 53, 69, 0.9); /* 빨간색 반투명 */
    color: white;
    border: none;
    border-radius: 50%; /* 완전 원형 */
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,1);
    z-index: 1000;
    transition: 0.2s;
}
#btn-clear-float:hover { background: #ff4d4d; transform: scale(1.1); }

#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: #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: 16px; margin-bottom: 3px; margin-left: 2px; font-weight: bold; text-shadow: var(--main-shadow);}
.nick-admin { color: #ff9800; }
.nick-user { color: #55ff4f; }
.admin-clickable { cursor: pointer; }
.bubble { padding: 5px 12px;
     position: relative; /* 하트 뱃지의 기준점 */
     cursor: pointer;    /* 클릭 가능하다는 표시 */
     border-radius: 12px;
     font-size: 14px;
     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;
    /* right: -5px;  <-- 🚨 삭제! (아래에서 따로 지정) */
    
    background: #ff1414; 
    color: white;
    font-size: 10px;
    font-weight: bold;
    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;
    /* right: 5px; <-- 🚨 이것도 삭제하거나 auto로 */
    
    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;     /* 투명해지면서 */
        /* 위로 쭉(-80px) 올라가면서, 좌우 랜덤(--rx) 방향으로 퍼짐 */
        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: #333;
    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: bold; 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: bold;
    width: 43px;
    height: 45px; 
    border-radius: 9px 0 0 9px;
    cursor: pointer;
    border: none;
    
    /* [필수] 위치 설정이 있어야 z-index가 먹힘 (absolute가 아니더라도 relative 등 필요) */
    /* 현재 flex 구조라면 relative로 충분할 수 있지만, 겹쳐 있다면 absolute 필요 */
    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;
}
#login-warning {position: absolute;
    height: 100%;
    width: 100%;
    left: 0;
    line-height: 7vh;
    text-align: center;
     background: #000;
     cursor: pointer;
     color: var(--main-color);
     font-weight: bold;
     flex: none;
     transition: all 0.5s ease;
     z-index: 99999;
}
#login-warning:hover { background: var(--main-color); color: #000; }

/* --- [모달 및 팝업] --- */
.modal { display: none; position: fixed; z-index: 9999; 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: 20px 10px;
     box-shadow: var(--main-shadow);
    width: 320px;
     color: #fff;
     border-radius: 10px;
     border: 1px solid #333;
     position: relative;

}
.modal h3 { margin-top: 0; text-align: center; border-bottom: 1px solid var(--main-color); padding-bottom: 10px; margin-bottom: 0;}
.modal input[type="text"], .modal input[type="password"] { 
    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); 
}

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

.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.7) }

.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: bold;
    transition: 0.2s;
}

.btn-manage.edit { background: #007bff; } /* 파란색 */
.btn-manage.edit:hover { background: #0056b3; }

.btn-manage.del { background: #dc3545; } /* 빨간색 */
.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; }

#admin-menu { display: none;
     position: fixed;
     background: rgba(20, 20, 20, 0.95);
     color: #fff;
     border: 1px solid #333;
     border-radius: 5px;
     z-index: 9999;
     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: -2px; /* 사진 하단에 걸치게 */
    left: 50%;
    transform: translateX(-50%); /* 정확히 가운데 정렬 */
    background: rgba(255, 0, 0, 1);
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    padding: 1px 4px;
    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; }


/* =========================================================
   [모바일 전용 스타일]
   ========================================================= */
@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;
    }

    .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); }

    /* 입력 중(is-typing) 숨김 처리 */
    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;
    }

    /* 비디오: 입력 중일 때 배경으로 */
    .video-section { 
        flex: none; 
        width: 100% !important; 
        height: auto; 
        background: #000; 
        padding: 0 !important; 
        z-index: 10; 
    }
    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.7) !important; 
        backdrop-filter: blur(1px);
        color: white !important;
        border: 1px solid rgba(255,255,255,0.1);
        text-shadow: 2px 2px 2px black, -1px -1px 1px black; 
        box-shadow: none;
    }
    
    /* 닉네임도 더 투명하게 */
    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;
    }

    /* 입력폼 */
    #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(255, 255, 255, 0.1);
        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; }
    #mobile-contact-btn { display: inline-block; padding: 7px 15px; } 
    #channel-title-display { font-size: 16px; padding: 15px 0px 15px 20px !important;}
    .profile-box { position: relative; display: inline-block; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; }
    .channel-profile-img { width: 30px; height: 30px; 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: fixed;
        top: 10px;
        right: 15px;
        z-index: 9999;
        background: rgba(0, 0, 0, 0.5);
        color: #fff;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 5px;
        padding: 8px 12px;
        font-size: 20px;
        cursor: pointer;
        backdrop-filter: blur(3px);
    }

    /* 3. 슬라이드 메뉴 패널 (우측에서 나옴) */
    #mobile-slide-menu {
        display: block !important;
        position: fixed;
        top: 0;
        right: 0;
        width: 260px;       /* 메뉴 너비 */
        height: 100%;       /* 전체 높이 */
        background: rgba(20, 20, 20, 0.98); /* 아주 진한 배경 */
        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);
    }
    
    /* 메뉴 활성화 시 등장 */
    #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;
    }
    
    /* 로그인/가입 버튼 스타일 강화 */
    .mobile-auth-group button {
        width: 100%;
        padding: 12px;
        font-size: 15px;
        font-weight: bold;
        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%; /* 가득 차게 */
    }

    /* 로그인 후 유저 정보 디자인 */
    .mobile-user-info {
        text-align: center;
        color: #fff;
    }
    .profile-area {
        padding: 15px;
        border-radius: 10px;
        margin-bottom: 20px;
        font-size: 18px;
        font-weight: bold;
        border: 1px solid #333;
        text-align: left;
    }
    
    /* 메뉴 항목 버튼들 */
    .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; }
}
.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;
}
.btn-share-icon:hover { color: #fff; }

/* 팝업 메뉴 박스 (이미지와 유사하게 디자인) */
.share-popup {
    display: none; /* 평소엔 숨김 */
    position: absolute;
    bottom: 40px; /* 버튼 위로 띄움 */
    right: 0;     /* 오른쪽 정렬 */
    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: bold;
    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;
}

.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 서랍장 스타일] --- */

/* 팝업창 본체 */
.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: bold;
    font-size: 14px;
    border-bottom: 1px solid #333;
    padding-bottom: 0px;
}

.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: bold;
    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; }
}

/* --- 투표 관리 플로팅 버튼 --- */
#btn-vote-manage {
    display: none; /* 기본 숨김 (관리자만 보임) */
    position: absolute;
    bottom: 125px; /* 지우개 버튼(70px) 위 */
    right: 10px;
    width: 45px; height: 45px;
    background: rgba(33, 150, 243, 0.9);
    color: white; border: none; border-radius: 50%;
    font-size: 20px; cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,1);
    z-index: 1000; transition: 0.2s;
}
#btn-vote-manage:hover { background: #42a5f5; transform: scale(1.1); }

/* --- 투표 오버레이 (채팅창 상단) --- */
.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: bold;
    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;
}

/* 투표하기 버튼 (유저용) */
.btn-do-vote {
    background: var(--main-color);
    color: #fff; border: 0;
    padding: 8px; border-radius: 20px;
    font-weight: bold; cursor: pointer;
    margin-top: 5px; width: 100%;
}
.btn-do-vote:hover { background: var(--main-hover-color); }

/* 관리자 컨트롤 */
#vote-admin-controls {
    display: flex; gap: 5px; padding: 5px 10px 10px 10px;
}
.btn-vote-end { flex: 1; background: var(--main-color); color: #fff; border:0; padding:8px; border-radius:20px; cursor:pointer;}
.btn-vote-cancel { flex: 1; background: none; color: #fff; border:1px solid #555; padding:8px; border-radius:20px; cursor:pointer;}

/* 생성 모달 인풋 */
.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;
}