@font-face {
    font-family: 'CustomFont';
    src: url('../fonts/FONT.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'CustomFont', 'Vazir', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-attachment: fixed;
    direction: rtl;
    margin: 0;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 154, 68, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 107, 53, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.chatroom-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    max-width: 100%;
    width: 100%;
    margin: 0;
}

/* Header Style */
.chat-header {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(255, 154, 68, 0.1) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 107, 53, 0.2);
    padding: 16px 24px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.chat-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff6b35, #ff9a44, #ff6b35, transparent);
}

.nitro-chat-title {
    font-family: 'CustomFont', 'Vazir', Arial, sans-serif;
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(135deg, #ff6b35, #ff9a44, #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
    position: relative;
}

.nitro-chat-title::before {
    content: '⚡';
    -webkit-text-fill-color: #ff6b35;
    margin-left: 8px;
    animation: pulse 2s infinite;
}

.nitro-chat-title::after {
    content: '⚡';
    -webkit-text-fill-color: #ff9a44;
    margin-right: 8px;
    animation: pulse 2s infinite 0.5s;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Chat Room Style */
#chat-room {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px 8px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#chat-room::-webkit-scrollbar {
    width: 6px;
}

#chat-room::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

#chat-room::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff6b35, #ff9a44);
    border-radius: 3px;
}

#message-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Message Items */
#message-list li {
    position: relative;
    word-break: break-word;
    margin-bottom: 12px;
    padding: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    max-width: 75%;
    clear: both;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

#message-list li {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
}

#message-list li:focus,
#message-list li:active {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.message-bubble {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
}

.message-bubble:focus,
.message-bubble:active {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

/* Message Items - Force alignment */
#message-list li.own-message {
    align-self: flex-end !important;
    align-items: flex-end !important;
    margin-right: 0;
    margin-left: auto;
}

/* Others Messages (Left Side - Different Color) */
#message-list li.other-message {
    align-self: flex-start !important;
    align-items: flex-start !important;
    margin-left: 0;
    margin-right: auto;
}

.message-bubble {
    position: relative;
    padding: 12px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Own Message Bubble - Orange Theme */
.own-message .message-bubble {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    border: 1px solid rgba(255, 154, 68, 0.3);
    border-bottom-right-radius: 6px;
    color: white;
    margin-right: 8px;
}

.own-message .message-bubble::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: -8px;
    width: 16px;
    height: 16px;
    background: #ff8c42;
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    border: 1px solid rgba(255, 154, 68, 0.3);
    border-left: none;
    border-top: none;
}

/* Other Message Bubble - Blue/Purple Theme */
.other-message .message-bubble {
    background: linear-gradient(135deg, #2a2a4a, #3a3a6a);
    border: 1px solid rgba(100, 100, 255, 0.2);
    border-bottom-left-radius: 6px;
    color: #e0e0ff;
    margin-left: 8px;
}

.other-message .message-bubble::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -8px;
    width: 16px;
    height: 16px;
    background: #3a3a6a;
    clip-path: polygon(0 0, 0 100%, 100% 100%);
    border: 1px solid rgba(100, 100, 255, 0.2);
    border-right: none;
    border-top: none;
}

/* Message Elements */
.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    gap: 8px;
    font-size: 12px;
    opacity: 0.9;
}

.own-message .message-header {
    justify-content: flex-end;
    color: rgba(255, 255, 255, 0.8);
}

.other-message .message-header {
    justify-content: flex-start;
    color: rgba(200, 200, 255, 0.8);
}

.timestamp {
    font-size: 10px;
    opacity: 0.7;
}

.title {
    font-weight: bold;
    font-family: 'CustomFont', 'Vazir', Arial, sans-serif;
}

.reply-button {
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.reply-button:hover {
    opacity: 1;
    transform: scale(1.2);
}

.contentTop {
    margin-bottom: 4px;
}

.content {
    font-size: 15px;
    line-height: 1.5;
    font-family: 'CustomFont', 'Vazir', Arial, sans-serif;
}

/* System Messages - Updated */
.system-message {
    font-style: normal;
    opacity: 0.8;
    display: inline-block;
    background: transparent;
    padding: 4px 10px;
    border-radius: 12px;
    text-align: center;
    max-width: 80%;
    margin: 2px auto;
    align-self: center !important;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'CustomFont', 'Vazir', Arial, sans-serif;
    font-size: 11px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.system-message-li {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100% !important;
}


/* Image in messages - New styles */
.message-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    object-fit: cover;
    display: block;
}

.message-image:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
}

.image-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Reply Style */
.reply-message {
    border-right: solid #1e90ff 4px;
    margin-bottom: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.other-message .reply-message {
    border-right-color: #ff6b35;
}

.reply-header {
    color: #1e90ff;
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 2px;
}

.other-message .reply-header {
    color: #ff6b35;
}

.reply-content {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    max-width: 200px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Input Box */
.input-box {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 107, 53, 0.2);
    padding: 12px 16px;
    position: relative;
}

.message-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

#message-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    resize: none;
    font-family: 'CustomFont', 'Vazir', sans-serif;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-height: 45px;
    max-height: 120px;
    overflow-y: auto;
}

#message-input::placeholder {
    font-family: 'CustomFont', 'Vazir', sans-serif;
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
}

#message-input:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

/* Send Button */
#send-button {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    width: 45px;
    height: 45px;
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    position: relative;
    overflow: hidden;
}

#send-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.5s ease;
}

#send-button:hover::before {
    width: 200%;
    height: 200%;
}

#send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.5);
}

#send-button:active {
    transform: translateY(0);
}

.send-icon {
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 1;
}

/* Photo Upload Button */
#photo-upload-button {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    width: 45px;
    height: 45px;
    min-width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#photo-upload-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ff6b35;
    transform: translateY(-2px);
}

.photo-icon {
    width: 20px;
    height: 20px;
}

/* Photo Preview */
#photo-upload-preview {
    position: relative;
    display: inline-block;
    margin-bottom: 8px;
}

#photo-upload-preview img {
    max-width: 80px;
    max-height: 80px;
    border-radius: 12px;
    border: 2px solid rgba(255, 107, 53, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.photo-upload-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    border-radius: 50%;
    color: white;
    background: #ff4444;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.photo-upload-remove:hover {
    background: #ff0000;
    transform: scale(1.1);
}

/* Reply Preview */
#reply-preview {
    position: relative;
    background: rgba(255, 107, 53, 0.1);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-bottom: none;
    margin-bottom: -1px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#reply-preview-close {
    font-size: 24px;
    color: #ff6b35;
    cursor: pointer;
    min-width: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

#reply-preview-close:hover {
    color: #ff0000;
    transform: scale(1.2);
}

.reply-preview-parts {
    flex: 1;
}

#reply-preview-header {
    font-style: normal;
    color: #ff6b35;
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 2px;
}

#reply-preview-content {
    color: rgba(255, 255, 255, 0.7);
    max-width: 300px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 12px;
}

/* System Messages */
.system-message-li {
    text-align: center;
    display: flex;
    justify-content: center;
}

/* Scroll to Bottom Button */
.scroll-bottom-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 107, 53, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 154, 68, 0.5);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    transition: all 0.3s ease;
    animation: fadeInUp 0.3s ease;
}

.scroll-bottom-btn:hover {
    background: rgba(255, 107, 53, 1);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.6);
}

.scroll-bottom-btn:active {
    transform: translateY(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* مخفی کردن دکمه وقتی پایین صفحه هستیم */
.scroll-bottom-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: rgba(30, 30, 50, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 12px;
    padding: 4px;
    min-width: 120px;
    z-index: 1000;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    animation: contextFadeIn 0.2s ease;
}

@keyframes contextFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.context-menu-item {
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: 'CustomFont', 'Vazir', Arial, sans-serif;
}

.context-menu-item:hover {
    background: rgba(255, 107, 53, 0.2);
}

.context-menu-item svg {
    width: 16px;
    height: 16px;
}

/* Edited Tag */
.edited-tag {
    font-size: 9px;
    opacity: 0.5;
    margin-right: 4px;
    font-style: italic;
}

/* Edit Input */
.edit-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.5);
    border-radius: 12px;
    color: white;
    padding: 8px 12px;
    font-family: 'CustomFont', 'Vazir', Arial, sans-serif;
    font-size: 14px;
    resize: none;
    outline: none;
    margin-top: 4px;
}

.edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.edit-save-btn, .edit-cancel-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-family: 'CustomFont', 'Vazir', Arial, sans-serif;
}

.edit-save-btn {
    background: #ff6b35;
    color: white;
}

.edit-cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Swipe Animation */
#message-list li {
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y pinch-zoom;
}

/* Placeholder for unloaded images */
.message-image-placeholder {
    width: 200px;
    height: 150px;
    background: rgba(255, 107, 53, 0.1);
    border: 2px dashed rgba(255, 107, 53, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    flex-direction: column;
    gap: 8px;
}

.message-image-placeholder:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: #ff6b35;
    transform: scale(1.02);
}

.message-image-placeholder svg {
    width: 40px;
    height: 40px;
    fill: #ff6b35;
    opacity: 0.7;
}

.message-image-placeholder span {
    color: #ff6b35;
    font-size: 12px;
    opacity: 0.7;
}

/* Loaded image */
.message-image.loaded {
    max-width: 250px;
    max-height: 250px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Context Menu - Updated */
.context-menu {
    position: fixed;
    background: rgba(30, 30, 50, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 12px;
    padding: 6px;
    min-width: 160px;
    z-index: 1000;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    animation: contextFadeIn 0.2s ease;
    display: none;
}

@keyframes contextFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.context-menu-item {
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 8px;
    color: #ddd;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    font-family: 'CustomFont', 'Vazir', Arial, sans-serif;
}

.context-menu-item:hover {
    background: rgba(255, 107, 53, 0.2);
    color: white;
}

.context-menu-item svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.context-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

/* Settings Button in Header */
.settings-btn {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.settings-btn svg {
    width: 24px;
    height: 24px;
    fill: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.settings-btn:hover svg {
    fill: #ff6b35;
    transform: rotate(45deg);
}

/* Settings Dropdown */
.settings-dropdown {
    position: absolute;
    left: 0;
    top: 100%;
    background: rgba(30, 30, 50, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 12px;
    padding: 8px;
    min-width: 220px;
    z-index: 9999;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    display: none;
    animation: contextFadeIn 0.2s ease;
}

.settings-dropdown.active {
    display: block;
}

.settings-item {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ddd;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'CustomFont', 'Vazir', Arial, sans-serif;
    transition: all 0.2s ease;
}

.settings-item:hover {
    background: rgba(255, 107, 53, 0.1);
}

/* Toggle Switch */
.toggle-switch {
    width: 48px;
    height: 26px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.toggle-switch.active {
    background: #ff6b35;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active::after {
    left: 24px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
}

/* Download button in context menu */
.download-btn {
    color: #4CAF50 !important;
}

.settings-item {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ddd;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'CustomFont', 'Vazir', Arial, sans-serif;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
}

/* Responsive */
/* Responsive */
@media (max-width: 768px) {
    .chatroom-container {
        max-width: 100%;
        margin: 0;
        height: 100vh;
        height: 100dvh; /* برای موبایل‌های جدیدتر */
    }
    
        .scroll-bottom-btn {
        bottom: 90px;
        right: 12px;
        width: 36px;
        height: 36px;
    }
    
    #message-list li {
        max-width: 85%;
    }
    
    .nitro-chat-title {
        font-size: 24px;
    }
    
    .chat-header {
        padding: 12px 16px;
    }
    
    #chat-room {
        padding: 16px 12px 8px;
    }
    
    .input-box {
        padding: 8px 12px;
        padding-bottom: max(8px, env(safe-area-inset-bottom)); /* برای آیفون‌های ناچ‌دار */
    }
    
    .message-bubble {
        padding: 10px 14px;
    }
    
    #send-button, #photo-upload-button {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }
}
    
    #message-list li {
        max-width: 85%;
    }
    
    .nitro-chat-title {
        font-size: 24px;
    }
}
