/* 채팅방 버튼 스타일 - chatbot과 구분하기 위해 구체적인 클래스명 사용 */
#chatroom-icon {
    position: relative;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    padding: 12px 20px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 8000;
}

#chatroom-icon:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.15);
}

#chatroom-icon:active {
    transform: translateY(0);
}

#chatroom-icon:focus {
    outline: 2px solid rgba(99, 102, 241, 0.5);
    outline-offset: 2px;
}

/* 채팅방 드롭다운 목록 스타일 */
.chatroom-dropdown {
    position: absolute;
    width: 360px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(-16px) scale(0.96);
    pointer-events: none;
    z-index: 8050;
    top: calc(100% + 12px);
    right: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
}

.chatroom-dropdown.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.chatroom-dropdown .modal-content {
    padding: 24px;
    position: relative;
}

/* 닫기 버튼 - 기존 chat-close-btn과 구분 */
.chatroom-dropdown .close-btn,
.chatroom-window .close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.04);
    border: none;
}

.chatroom-dropdown .close-btn:hover,
.chatroom-window .close-btn:hover {
    color: #1e293b;
    background: rgba(15, 23, 42, 0.08);
    transform: rotate(90deg);
}

/* 채팅방 목록 제목 */
.chatroom-dropdown h5 {
    color: #0f172a;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 0;
}

/* 채팅방 목록 스타일 */
.chatroom-list {
    max-height: 300px;
    overflow-y: auto; /* 스크롤 생성 */
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.chatroom-list li {
    padding: 14px 16px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(15, 23, 42, 0.05);
    font-size: 14px;
    color: #334155;
    font-weight: 500;
}

.chatroom-list li:hover {
    background: rgba(99, 102, 241, 0.08);
    transform: translateX(2px);
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

.chatroom-list li:active {
    transform: translateX(1px);
}

/* 채팅창 스타일 - 기존 chatbot-container와 구분 */
.chatroom-window {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 380px;
    height: 480px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: chatroomWindowIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 8040;
    margin-top: 15px;
}

/* 채팅창 헤더 - 기존 chat-header와 구분 */
.chatroom-window .chat-header {
    background: rgba(248, 250, 252, 0.8);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    position: relative;
}

.chatroom-window .chat-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

#chatroom-title {
    font-size: 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 채팅 메시지 영역 - 기존 chat-log와 구분 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(248, 250, 252, 0.4);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.1);
    border-radius: 8px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.2);
}

/* 메시지 스타일 - 기존 message와 구분 */
.chat-messages .message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.4;
    animation: chatroomMessageIn 0.3s ease;
    word-break: break-word;
    white-space: pre-wrap;
}

.chat-messages .message.sent {
    align-self: flex-end;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.chat-messages .message.received {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 채팅 입력 영역 */
.chat-input-wrapper {
    display: flex;
    padding: 20px;
    background: rgba(248, 250, 252, 0.8);
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    gap: 12px;
    align-items: center;
}

#chat-input {
    flex: 1;
    border: 1px solid rgba(15, 23, 42, 0.12);
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    color: #374151;
}

#chat-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
    background: rgba(255, 255, 255, 1);
}

#chat-input::placeholder {
    color: #9ca3af;
}

/* 인스타그램 스타일 전송 버튼 */
#send-chat {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#send-chat:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

#send-chat:active {
    transform: translateY(0) scale(1);
}

#send-chat:focus {
    outline: 2px solid rgba(99, 102, 241, 0.5);
    outline-offset: 2px;
}

/* 전송 아이콘 SVG */
.send-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
}

#send-chat:hover .send-icon {
    transform: rotate(-45deg) scale(1.1);
}

/* 비활성화 상태 */
#send-chat:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

#send-chat:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.chatroom-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatroom-item:hover {
    background-color: rgba(248, 250, 252, 0.8);
}

.chatroom-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    color: #0f172a;
}

.chatroom-latest-message {
    color: #64748b;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.chatroom-latest-time {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
    align-self: flex-end;
}

/* 숨김 클래스 */
.d-none {
    display: none !important;
}

.message-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    animation: chatroomMessageIn 0.3s ease;
}

.message-container.sent {
    align-items: flex-end;
}

.message-container.received {
    align-items: flex-start;
}

.message-container .timestamp {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 6px;
    padding: 0 8px;
    user-select: none;
}

.message-container.sent .timestamp {
    text-align: right;
}

.message-container.received .timestamp {
    text-align: left;
}

/* 채팅 알림 스타일 - 부드러운 애니메이션 추가 */
.chat-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%) translateY(-20px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    cursor: default;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    overflow: hidden;
    max-width: 350px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-notification:hover {
    cursor: pointer;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    transform: translateX(0) translateY(0) scale(1.02);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3), 0 4px 16px rgba(0, 0, 0, 0.15);
}

.chat-notification.show {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
}

/* 알림 등장 애니메이션 키프레임 */
@keyframes notificationSlideIn {
    0% {
        opacity: 0;
        transform: translateX(100%) translateY(-20px) scale(0.9);
    }
    60% {
        transform: translateX(-8px) translateY(0) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(1);
    }
}

.chat-notification.animate-in {
    animation: notificationSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatroom-unread-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 20px;
    margin-left: 8px;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: subtle-pulse 2s infinite;
}

.chatroom-unread-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.6s ease;
}

.chatroom-unread-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.4);
}

.chatroom-unread-badge:hover::before {
    left: 100%;
}

/* 숫자별 크기 조정 */
.chatroom-unread-badge[data-count="0"] {
    display: none;
}

.chatroom-unread-badge[data-count*="99"] {
    padding: 4px 6px;
    font-size: 10px;
}

/* 부드러운 펄스 애니메이션 */
@keyframes subtle-pulse {
    0% {
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    }
    50% {
        box-shadow: 0 2px 12px rgba(255, 107, 107, 0.5);
    }
    100% {
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    }
}

/* 다크 모드 대응 */
@media (prefers-color-scheme: dark) {
    .chatroom-unread-badge {
        background: linear-gradient(135deg, #ff5757, #ff3838);
        box-shadow: 0 2px 8px rgba(255, 87, 87, 0.4);
    }

    .chatroom-unread-badge:hover {
        box-shadow: 0 4px 16px rgba(255, 87, 87, 0.6);
    }

    @keyframes subtle-pulse {
        0% {
            box-shadow: 0 2px 8px rgba(255, 87, 87, 0.4);
        }
        50% {
            box-shadow: 0 2px 12px rgba(255, 87, 87, 0.6);
        }
        100% {
            box-shadow: 0 2px 8px rgba(255, 87, 87, 0.4);
        }
    }
}

/* 높은 숫자 처리 (99+ 표시) */
.chatroom-unread-badge.high-count {
    background: linear-gradient(135deg, #ff4757, #c44569);
    font-size: 10px;
    padding: 4px 6px;
    font-weight: 800;
}

/* 애니메이션 효과 - 새 메시지 도착 시 */
.chatroom-unread-badge.new-message {
    animation: bounce-in 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounce-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .chatroom-unread-badge {
        font-size: 10px;
        padding: 3px 6px;
        min-width: 18px;
        height: 18px;
        margin-left: 6px;
    }
}

/* 접근성 개선 */
.chatroom-unread-badge[aria-label] {
    position: relative;
}

.chatroom-unread-badge[aria-label]:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* 특별한 상황별 스타일 */
.chatroom-unread-badge.urgent {
    background: linear-gradient(135deg, #ff3838, #ff1744);
    animation: urgent-pulse 1s infinite;
}

@keyframes urgent-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 56, 56, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 16px rgba(255, 56, 56, 0.8);
    }
}

/* VIP 사용자 메시지 배지 */
.chatroom-unread-badge.vip {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #2d3748;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.chatroom-unread-badge.vip:hover {
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.6);
}

/* 읽음 여부 표시 */
.read-status {
    font-size: 11px;
    color: #4caf50;
    white-space: nowrap; /* 줄바꿈 방지 */
    margin-top: 0; /* 상하 여백 제거 */
}

.read-status::before {
    content: "✓ ";
    color: #4caf50;
}

.read-status:empty {
    display: none;
}

/* 옵션 4: 펄스 + 그라데이션 도트 */
.notification-icon {
    position: absolute;
    top: 50%;                /* 부모 기준 세로 중앙으로 이동 */
    transform: translateY(-50%); /* 정확히 세로 중앙 맞춤 */
    left: 100%;
    margin-left: 10px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.notification-icon::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, #ff4757, #ff3838);
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

.notification-icon:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

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

/* 알림 배지 숫자 ?*/
.badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    border: 2px solid white;
}

/* 알림 탭 - 글래스모피즘 디자인 */
.chat-notification-tab {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    margin-top: 20px;
    width: 380px;
    z-index: 999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 0;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    overflow: hidden;
}

.chat-notification-tab.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.modal-content {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.modal-content h5 {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 16px 0;
    padding: 24px 24px 0;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
    color: #718096;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

.unread-list {
    list-style: none;
    padding: 0 24px 24px;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

.unread-list::-webkit-scrollbar {
    width: 6px;
}

.unread-list::-webkit-scrollbar-track {
    background: transparent;
}

.unread-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.unread-message-item {
    padding: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border-radius: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.message-sender {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.message-time {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
}

.message-content {
    color: #4a5568;
    font-size: 13px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    max-height: 2.8em;
}

.unread-message-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.unread-message-item:hover {
    background: rgba(106, 90, 205, 0.15);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(106, 90, 205, 0.1);
}

/* 빈 메시지 스타일 */
.unread-list li:only-child:not(.unread-message-item) {
    text-align: center;
    color: #718096;
    font-style: italic;
    padding: 32px 16px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.d-none {
    display: none !important;
}

/* 다크 모드 대응 */
@media (prefers-color-scheme: dark) {
    .chat-notification-tab {
        background: rgba(26, 32, 44, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .modal-content h5 {
        color: #f7fafc;
    }

    .close-btn {
        color: #cbd5e0;
        background: rgba(255, 255, 255, 0.1);
    }

    .close-btn:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    .unread-message-item {
        background: rgba(255, 255, 255, 0.1);
    }

    .message-sender {
        color: #e2e8f0;
    }

    .message-content {
        color: #cbd5e0;
    }

    .message-time {
        color: #a0aec0;
    }

    .unread-message-item:hover {
        background: rgba(106, 90, 205, 0.2);
    }

    .unread-list li:only-child:not(.unread-message-item) {
        background: rgba(255, 255, 255, 0.1);
        color: #a0aec0;
    }
}

/* 모바일 대응 */
@media (max-width: 480px) {
    .chat-notification-tab {
        width: 320px;
        right: -20px;
    }

    .unread-message-item {
        padding: 12px;
    }
}

/* 기존 애니메이션 키프레임 */
@keyframes chatroomWindowIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes chatroomMessageIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .chatroom-dropdown,
    .chatroom-window {
        width: calc(100vw - 40px);
        right: 20px;
    }

    #chatroom-icon {
        padding: 10px 16px;
        font-size: 14px;
    }

    .chat-notification {
        right: 15px;
        top: 15px;
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .chatroom-dropdown,
    .chatroom-window {
        width: calc(100vw - 20px);
        right: 10px;
    }

    .chatroom-window {
        height: calc(100vh - 120px);
        top: 60px;
    }

    .chat-notification {
        right: 10px;
        top: 10px;
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* 접근성 향상 - 모션 감소 설정 */
@media (prefers-reduced-motion: reduce) {
    .chatroom-dropdown,
    .chatroom-window,
    .chat-messages .message,
    #chatroom-icon,
    .chatroom-list li,
    #send-chat,
    .chat-notification {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .chatroom-dropdown,
    .chatroom-window {
        border: 2px solid #000;
        background: #fff;
    }

    .chatroom-list li {
        border: 1px solid #000;
    }

    #chat-input {
        border: 2px solid #000;
    }

    .chat-notification {
        background: #000;
        border: 2px solid #fff;
    }
}