/* 카카오톡 채팅 페이지 스타일 */
body {
    background-color: #434343 !important;
}

.kakao-chat-page {
    min-height: 100vh;
    background-color: #f5f5f5;
    margin-top: 70px;
}

.kakao-chat-container {
    max-width: 400px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    position: relative;
    height: calc(100vh - 110px);
    display: flex;
    flex-direction: column;
}

/* 채팅 헤더 */
.chat-header {
    background-color: #fee500;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    border-bottom: 1px solid #e6d800;
}

.chat-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.header-button {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    color: #000000;
}

.header-button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.back-button {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    color: #000000;
}

.back-button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* 채팅 영역 */
.chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #f5f5f5;
    
    /* 스크롤바 스타일링 */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

/* Webkit 브라우저용 스크롤바 스타일링 */
.chat-area::-webkit-scrollbar {
    width: 8px;
}

.chat-area::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

.chat-area::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

.chat-area::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

.chat-area::-webkit-scrollbar-corner {
    background: transparent;
}

/* 메시지 스타일 */
.message {
    display: flex;
    margin-bottom: 16px;
    align-items: flex-start;
}

.message.other-message {
    justify-content: flex-start;
}

.message.my-message {
    justify-content: flex-end;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 10px;
    object-fit: cover;
}

.message-content {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

.other-message .message-content {
    align-items: flex-start;
}

.my-message .message-content {
    align-items: flex-end;
}

.sender-name {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}

.message-bubble {
    background-color: var(--chat-light-bg-secondary);
    border: 1px solid var(--chat-light-border-light);
    border-radius: 18px;
    padding: 12px 16px;
    color: var(--chat-light-text-primary);
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: fit-content;
    width: auto;
    display: inline-block;
}

.my-message .message-bubble {
    background-color: #fee500;
    border-color: #e6d800;
    color: #000000;
}

.message-time {
    font-size: 11px;
    color: var(--chat-light-text-muted);
    margin-top: 4px;
    text-align: right;
}

.other-message .message-time {
    text-align: left;
}

.my-message .message-time {
    text-align: right;
}

.message-image {
    max-width: 300px;
    max-height: 300px;
    min-width: 100px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.message-image:hover {
    transform: scale(1.02);
}

/* 메시지 입력 영역 */
.message-input-area {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    gap: 8px;
}

.participant-selector {
    flex-shrink: 0;
}

.participant-select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background-color: #f8f9fa;
    color: #333333;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
    outline: none;
}

.participant-select:focus {
    border-color: #fee500;
    box-shadow: 0 0 0 2px rgba(254, 229, 0, 0.2);
}

.input-container {
    flex: 1;
    position: relative;
}

.message-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    font-size: 14px;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    line-height: 1.4;
}

.message-input:focus {
    border-color: #fee500;
}

.input-button {
    background: none;
    border: none;
    color: #666666;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.input-button:hover {
    background-color: #f0f0f0;
    color: #333333;
}

.input-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.photo-button {
    color: #28a745;
}

.photo-button:hover {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.send-button {
    color: #fee500;
    background-color: #333333;
}

.send-button:hover:not(:disabled) {
    background-color: #555555;
    color: #ffffff;
}

        /* 설정 사이드바 */
        .settings-sidebar {
            position: fixed;
            top: 0;
            right: -450px;
            width: 450px;
            height: 100vh;
            background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
            border-left: 1px solid #444;
            transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            overflow-y: auto;
            z-index: 1000;
            box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
        }

        .settings-sidebar.open {
            right: 0;
        }

        /* 사이드바 헤더 */
        .sidebar-header {
            padding: 25px 30px;
            border-bottom: 1px solid #444;
            background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .sidebar-header h2 {
            margin: 0;
            color: #ffffff;
            font-size: 24px;
            font-weight: 700;
            text-align: center;
        }

        .close-sidebar {
            position: absolute;
            top: 20px;
            right: 20px;
            background: none;
            border: none;
            color: #ffffff;
            cursor: pointer;
            padding: 8px;
            border-radius: 50%;
            transition: all 0.2s ease;
        }

        .close-sidebar:hover {
            background-color: rgba(255, 255, 255, 0.1);
            transform: scale(1.1);
        }

        .close-sidebar svg {
            width: 20px;
            height: 20px;
        }

        /* 사이드바 콘텐츠 */
        .sidebar-content {
            padding: 30px;
        }

        /* 섹션 스타일 */
        .sidebar-section {
            margin-bottom: 40px;
            background: rgba(255, 255, 255, 0.03);
            border-radius: 16px;
            padding: 25px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
        }

        .sidebar-section h3 {
            margin: 0 0 20px 0;
            color: #ffffff;
            font-size: 18px;
            font-weight: 600;
            padding-bottom: 12px;
            border-bottom: 2px solid #fee500;
        }

        .sidebar-section h4 {
            margin: 0 0 15px 0;
            color: #fee500;
            font-size: 16px;
            font-weight: 600;
        }

        /* 설정 아이템 */
        .setting-item {
            margin-bottom: 25px;
        }

        .setting-item label {
            display: block;
            margin-bottom: 10px;
            color: #ffffff;
            font-size: 14px;
            font-weight: 500;
            letter-spacing: 0.5px;
        }

        /* 입력 그룹 */
        .input-group {
            display: flex;
            gap: 12px;
            align-items: center;
        }

        .input-group input {
            flex: 1;
            padding: 12px 16px;
            border: 2px solid #444;
            border-radius: 8px;
            background-color: rgba(255, 255, 255, 0.05);
            color: #ffffff;
            font-size: 14px;
            transition: all 0.3s ease;
        }

        .input-group input:focus {
            outline: none;
            border-color: #fee500;
            background-color: rgba(255, 255, 255, 0.08);
            box-shadow: 0 0 0 3px rgba(254, 229, 0, 0.1);
        }

        /* 버튼 스타일 */
        .update-btn, .add-btn {
            padding: 12px 20px;
            background: linear-gradient(135deg, #fee500 0%, #f0d800 100%);
            color: #000000;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            font-size: 14px;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(254, 229, 0, 0.3);
        }

        .update-btn:hover, .add-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(254, 229, 0, 0.4);
        }

        /* 범위 컨테이너 */
        .range-container {
            display: flex;
            align-items: center;
            gap: 20px;
            margin-top: 10px;
        }

        .range-container input[type="range"] {
            flex: 1;
            height: 6px;
            border-radius: 3px;
            background: #444;
            outline: none;
            -webkit-appearance: none;
        }

        .range-container input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #fee500;
            cursor: pointer;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
        }

        .range-container input[type="range"]::-moz-range-thumb {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #fee500;
            cursor: pointer;
            border: none;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
        }

        .range-container span {
            color: #fee500;
            font-weight: 600;
            font-size: 14px;
            min-width: 60px;
            text-align: center;
        }

        /* 참가자 관리 */
        .participant-list {
            margin-bottom: 25px;
        }

        .participant-item {
            display: flex;
            align-items: center;
            padding: 15px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 12px;
            margin-bottom: 12px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
        }

        .participant-item:hover {
            background: rgba(255, 255, 255, 0.08);
            transform: translateX(5px);
        }

        .participant-item img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            margin-right: 15px;
            object-fit: cover;
            border: 2px solid #fee500;
        }

        .participant-info {
            flex: 1;
        }

        .participant-name {
            margin: 0;
            color: #ffffff;
            font-weight: 500;
            font-size: 14px;
        }

        .participant-actions {
            display: flex;
            gap: 8px;
        }

        .edit-btn, .delete-btn {
            padding: 6px 12px;
            border: none;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .edit-btn {
            background-color: #007bff;
            color: #ffffff;
        }

        .edit-btn:hover {
            background-color: #0056b3;
        }

        .delete-btn {
            background-color: #dc3545;
            color: #ffffff;
        }

        .delete-btn:hover {
            background-color: #c82333;
        }

        /* 새 참가자 추가 */
        .add-participant-section {
            background: rgba(254, 229, 0, 0.05);
            border-radius: 12px;
            padding: 20px;
            border: 1px solid rgba(254, 229, 0, 0.2);
        }

        .participant-preview {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .profile-pic-container {
            position: relative;
            display: inline-block;
        }

        .profile-pic-container img {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            cursor: pointer;
            border: 3px solid #fee500;
            transition: all 0.3s ease;
        }

        .profile-pic-container img:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 12px rgba(254, 229, 0, 0.4);
        }

        .change-pic-btn {
            position: absolute;
            bottom: -5px;
            right: -5px;
            background: #fee500;
            border: none;
            border-radius: 50%;
            width: 24px;
            height: 24px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
        }

        .change-pic-btn svg {
            width: 12px;
            height: 12px;
            color: #000000;
        }

        .name-input-container {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .name-input {
            flex: 1;
            padding: 12px 16px;
            border: 2px solid #444;
            border-radius: 8px;
            background-color: rgba(255, 255, 255, 0.05);
            color: #ffffff;
            font-size: 14px;
            transition: all 0.3s ease;
        }

        .name-input:focus {
            outline: none;
            border-color: #fee500;
            background-color: rgba(255, 255, 255, 0.08);
        }

        /* 액션 버튼 그룹 */
        .button-group {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .action-btn {
            padding: 14px 20px;
            background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
            color: #ffffff;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            font-size: 14px;
            transition: all 0.3s ease;
            text-align: center;
        }

        .action-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
        }

        .play-btn {
            background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
        }

        .play-btn:hover {
            box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
        }

        /* 스크롤바 스타일 */
        .settings-sidebar::-webkit-scrollbar {
            width: 8px;
        }

        .settings-sidebar::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.05);
        }

        .settings-sidebar::-webkit-scrollbar-thumb {
            background: #fee500;
            border-radius: 4px;
        }

        .settings-sidebar::-webkit-scrollbar-thumb:hover {
            background: #f0d800;
        }

/* 모달 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #2d2d2d;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 80vh;
    overflow: hidden;
    color: white;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    max-height: calc(80vh - 140px);
}

.modal-footer {
    padding: 15px 20px 20px;
    border-top: 1px solid #444;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-shrink: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #cccccc;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #555;
    border-radius: 6px;
    background-color: #3a3a3a;
    color: white;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #fee500;
}

/* 사진 크기 조정 슬라이더 스타일 */
.photo-size-controls {
    margin-top: 10px;
    padding: 12px;
    background-color: #3a3a3a;
    border-radius: 8px;
    border: 1px solid #555;
}

.photo-size-controls .form-group {
    margin-bottom: 10px;
}

.photo-size-controls label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #cccccc;
}

.photo-size-controls input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #555;
    outline: none;
    margin-bottom: 3px;
}

.photo-size-controls input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fee500;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.photo-size-controls input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fee500;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.photo-size-controls span {
    display: inline-block;
    font-size: 12px;
    color: #cccccc;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

/* 사진 미리보기 스타일 */
.photo-preview {
    margin-top: 8px;
    text-align: center;
}

.photo-preview img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    border: 1px solid #555;
    object-fit: contain;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 12px;
}

.save-btn, .cancel-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.save-btn {
    background-color: #28a745;
    color: white;
}

.save-btn:hover {
    background-color: #218838;
}

.cancel-btn {
    background-color: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background-color: #5a6268;
}

/* 이미지 모달 */
.image-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    padding: 0;
}

.image-modal-content .modal-body {
    padding: 0;
    text-align: center;
}

#modal-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 0 0 12px 12px;
}

/* 프로필 미리보기 */
.profile-preview {
    margin-top: 15px;
    text-align: center;
}

.profile-preview img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    border: 2px solid #555;
}

/* 오버레이 */
.overlay {
    display: none;
    position: fixed;
    z-index: 1999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

/* 다크모드 */
.kakao-chat-container.chat-dark-mode {
    background-color: #1a1a1a;
}

.kakao-chat-container.chat-dark-mode .chat-header {
    background-color: #2d2d2d;
    border-bottom-color: #444;
}

.kakao-chat-container.chat-dark-mode .chat-title {
    color: #ffffff;
}

.kakao-chat-container.chat-dark-mode .chat-area {
    background-color: #2d2d2d;
    
    /* 다크모드용 스크롤바 스타일링 */
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* 다크모드에서 Webkit 스크롤바 스타일링 */
.kakao-chat-container.chat-dark-mode .chat-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.kakao-chat-container.chat-dark-mode .chat-area::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.kakao-chat-container.chat-dark-mode .message-bubble {
    background-color: #3a3a3a;
    border-color: #555;
    color: #ffffff;
}

.kakao-chat-container.chat-dark-mode .my-message .message-bubble {
    background-color: #fee500;
    color: #000000;
    border: none;
}

.kakao-chat-container.chat-dark-mode .sender-name {
    color: #cccccc;
}

.kakao-chat-container.chat-dark-mode .message-time {
    color: #888;
}

.kakao-chat-container.chat-dark-mode .message-input-area {
    background-color: #2d2d2d;
    border-color: #444;
}

.kakao-chat-container.chat-dark-mode .participant-select {
    background-color: #3a3a3a;
    border-color: #555;
    color: #ffffff;
}

.kakao-chat-container.chat-dark-mode .message-input {
    background-color: #3a3a3a;
    border-color: #555;
    color: #ffffff;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #555;
    border-radius: 8px;
    background-color: #3a3a3a;
    color: #ffffff;
    font-size: 14px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #fee500;
    background-color: #444;
}

.form-group input[type="text"]::placeholder,
.form-group input[type="number"]::placeholder {
    color: #888;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #888;
    font-size: 12px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .kakao-chat-container {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        height: calc(100vh - 60px);
    }
    
    .settings-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px auto;
        max-height: 90vh;
    }
    
    .chat-header {
        padding: 10px 15px;
    }
    
    .message-input-area {
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .chat-title {
        max-width: 150px;
        font-size: 16px;
    }
    
    .sidebar-content {
        padding: 15px;
    }
    
    .participant-preview {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .name-input-container {
        width: 100%;
    }
}

        /* 토글 스위치 스타일 (기본) */
        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 25px;
        }

        /* 토글 라벨 스타일 */
        .toggle-label {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 15px;
            cursor: pointer;
            width: 100%;
            min-height: 30px;
        }

        .toggle-label span {
            color: #ffffff;
            font-weight: 500;
            font-size: 14px;
            flex: 1;
        }

        .toggle-label .toggle-switch {
            flex-shrink: 0;
            margin-left: 15px;
            display: flex;
            align-items: center;
        }

        /* 토글 라벨 내부의 체크박스 숨기기 */
        .toggle-label input[type="checkbox"] {
            position: absolute;
            opacity: 0;
            width: 0;
            height: 0;
        }

        /* 토글 라벨 내부의 슬라이더 스타일 */
        .toggle-label .toggle-slider {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 25px;
            background-color: #666;
            border-radius: 25px;
            border: 2px solid #444;
            cursor: pointer;
            transition: 0.3s ease;
            vertical-align: middle;
        }

        .toggle-label .toggle-slider:before {
            position: absolute;
            content: "";
            height: 17px;
            width: 17px;
            left: 2px;
            bottom: 2px;
            background-color: white;
            border-radius: 50%;
            transition: 0.3s ease;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        /* 체크된 상태의 슬라이더 */
        .toggle-label input[type="checkbox"]:checked + .toggle-slider {
            background-color: #28a745;
            border-color: #20c997;
        }

        .toggle-label input[type="checkbox"]:checked + .toggle-slider:before {
            transform: translateX(25px);
        }

        /* 다크모드 토글 특별 스타일 */
        .toggle-label #chat-dark-mode-toggle:checked + .toggle-slider {
            background-color: #fee500;
            border-color: #f0d800;
        }

        /* 시간표시 토글 특별 스타일 */
        .toggle-label #timestamp-toggle:checked + .toggle-slider {
            background-color: #28a745;
            border-color: #20c997;
        }

        /* 토글 상태 표시 */
        .toggle-status {
            font-size: 12px;
            color: #fee500;
            font-weight: 600;
            margin-top: 5px;
            text-align: center;
        }

        /* 입력 요소 스타일링 */
        input[type="text"], 
        input[type="number"], 
        select {
            width: 100%;
            padding: 14px 18px;
            border: 2px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.05);
            color: #ffffff;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        input[type="text"]:focus, 
        input[type="number"]:focus, 
        select:focus {
            outline: none;
            border-color: #fee500;
            background: rgba(255, 255, 255, 0.08);
            box-shadow: 0 0 0 4px rgba(254, 229, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.2);
            transform: translateY(-2px);
        }

        input[type="text"]:hover, 
        input[type="number"]:hover, 
        select:hover {
            border-color: rgba(254, 229, 0, 0.5);
            background: rgba(255, 255, 255, 0.07);
        }

        /* Select 요소 특별 스타일링 */
        select {
            appearance: none;
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23fee500' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 16px center;
            background-size: 16px;
            padding-right: 50px;
            cursor: pointer;
        }

        select option {
            background-color: #2d2d2d;
            color: #ffffff;
            padding: 12px;
            border: none;
        }

        select option:hover {
            background-color: #fee500;
            color: #000000;
        }

        /* Input 그룹 스타일링 */
        .input-group {
            display: flex;
            gap: 15px;
            align-items: center;
            margin-bottom: 20px;
        }

        .input-group input {
            flex: 1;
            margin: 0;
        }

        .input-group .update-btn {
            flex-shrink: 0;
            white-space: nowrap;
        }

        /* 채팅방 이름 컨테이너 */
        .chat-name-container {
            display: flex;
            gap: 15px;
            align-items: center;
            margin-top: 10px;
        }

        .chat-name-container input {
            flex: 1;
            margin: 0;
        }

        .chat-name-container .update-btn {
            flex-shrink: 0;
            white-space: nowrap;
        }

        /* 이름 입력 컨테이너 */
        .name-input-container {
            display: flex;
            gap: 15px;
            align-items: center;
            margin-top: 15px;
        }

        .name-input-container .name-input {
            flex: 1;
            margin: 0;
        }

        .name-input-container .add-btn {
            flex-shrink: 0;
            white-space: nowrap;
        }

        /* Placeholder 스타일링 */
        input::placeholder {
            color: rgba(255, 255, 255, 0.5);
            font-style: italic;
        }

        /* 글꼴 크기 값 표시 영역 스타일링 */
        #message-font-size-value,
        #sender-font-size-value,
        #timestamp-font-size-value,
        #profile-pic-size-value {
            display: inline-block;
            background: rgba(255, 255, 255, 0.1);
            padding: 8px 12px;
            border-radius: 6px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            color: #ffffff;
            font-weight: 600;
            min-width: 60px;
            text-align: center;
            backdrop-filter: blur(10px);
        }

        /* 글꼴 미리보기 텍스트 스타일링 */
        .font-preview-text {
            margin: 20px 0px;
            padding: 20px;
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 12px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
            backdrop-filter: blur(10px);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            text-align: center;
            line-height: 1.6;
        }

        /* 입력 요소 그룹 스타일링 */
        .form-group {
            margin-bottom: 25px;
        }

        .form-group label {
            display: block;
            margin-bottom: 12px;
            color: #ffffff;
            font-size: 14px;
            font-weight: 600;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            font-size: 12px;
        }

        /* 특별한 입력 스타일 */
        .special-input {
            background: linear-gradient(135deg, rgba(254, 229, 0, 0.05) 0%, rgba(255, 255, 255, 0.03) 100%);
            border: 2px solid rgba(254, 229, 0, 0.2);
        }

        .special-input:focus {
            border-color: #fee500;
            background: linear-gradient(135deg, rgba(254, 229, 0, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
        }

        /* 영상 생성 진행률 스타일 */
        .video-progress {
            margin-top: 15px;
            padding: 15px;
            background-color: #3a3a3a;
            border-radius: 8px;
            border: 1px solid #555;
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background-color: #555;
            border-radius: 4px;
            overflow: hidden;
            margin-bottom: 10px;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #007bff, #28a745);
            border-radius: 4px;
            transition: width 0.3s ease;
            width: 0%;
        }

        .progress-text {
            text-align: center;
            font-size: 14px;
            color: #fff;
            font-weight: 500;
        }
