:root {
  --main-ui-color: #444444;
  --room-box-bg: var(--main-ui-color);
  --classic-header-bg: var(--main-ui-color);
  --sidebar-header-bg: var(--main-ui-color);
  --voice-top-bar-bg: var(--main-ui-color);
  --bottom-tabs-bg: var(--main-ui-color);
  --unified-btn-bg: #333333;
  --unified-btn-hover-bg: #222222;
  --mic-icon-color: #ffffff;
  --line-icon-color: #ffffff;
  --font-family: Arial, sans-serif;
  --font-size: 15.2px;
  --font-weight: 700;
}

.room-box,
.classic-header,
.sidebar-header,
.voice-top-bar,
.bottom-tabs-bar {
  background-color: var(--main-ui-color) !important;
}

html, body {
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden; /* Prevent global scrollbars */
  width: 100%;
  max-width: 100vw;
  overscroll-behavior: none; /* Prevent pull-to-refresh */
  font-family: var(--font-family) !important;
  font-size: var(--font-size) !important;
  font-weight: var(--font-weight) !important;
  line-height: 1.4 !important;
  text-shadow: none !important;
}

#app {
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

#chat-shell {
  height: 100%;
  height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transform-origin: top center;
  transition: transform 0.2s ease-out;
}

#chat-ui {
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

#chat-ui.drag-over {
  position: relative;
}

#chat-ui.drag-over::after {
  content: "أفلت الملف هنا للرفع";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(40, 167, 69, 0.15);
  border: 4px dashed #28a745;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: #28a745;
  z-index: 9999;
  pointer-events: none;
  backdrop-filter: blur(2px);
}

#login-overlay {
  height: 100%;
  height: 100dvh;
  width: 100%;
  margin: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  overflow: hidden;
  background-color: var(--landing-bg-color, #f8f9fa);
  display: flex;
  justify-content: center;
  align-items: center;
}

#login-overlay > .col-12 {
  height: 100%;
  height: 100dvh;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  background: white;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
  overflow: hidden;
  border-right: 3px solid #c2c1c1;
  border-left: 3px solid #c2c1c1;
}

.landing-header {
  background-color: var(--main-ui-color, #212529) !important;
}

#connection-status-bar {
  background-color: var(--main-ui-color, #586572) !important;
}

.landing-middle-area {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
}

.landing-top-content {
  flex: 0 1 auto;
}

.small, small {
  font-size: var(--font-size) !important;
  font-family: var(--font-family) !important;
  font-weight: var(--font-weight) !important;
  line-height: 1.4 !important;
  text-shadow: none !important;
}

.story-circle {
  position: relative;
  display: inline-block;
}

.story-count-badge {
  position: absolute;
  top: 0;
  right: 0;
  background-color: red;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: bold;
}

/* Hide scrollbars but allow scrolling for specific containers */
* {
  scrollbar-width: none; /* Hide for Firefox globally */
}

::-webkit-scrollbar {
  width: 0px;
  height: 0px;
  background: transparent;
}

#messages-container {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

#messages-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.bg-purple { background-color: #6f42c1; }

.btn-dark {
  background-color: #444444;
  border: 1px solid #555555;
  color: white;
}

.btn-dark:hover {
  background-color: #333333;
}

.voice-top-bar .overflow-auto {
  scrollbar-width: none;
}
.voice-top-bar .overflow-auto::-webkit-scrollbar {
  display: none;
}

.chat-input-container {
  background-color: var(--chat-input-bg, #f8f9fa);
  padding: 4px;
  border-top: 1px solid #ddd;
  width: 100%;
  overflow: hidden;
}

input, textarea, select, button, .simple-setting-label, .classic-header, .classic-btn, .toggle-label {
  font-family: var(--font-family) !important;
  font-size: var(--font-size) !important;
  font-weight: var(--font-weight) !important;
  line-height: 1.4 !important;
  text-shadow: none !important;
}

.kiss-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  pointer-events: none;
  animation: fadeIn 0.5s ease-out;
}

.kiss-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.kiss-gif {
  width: 200px;
  height: auto;
  animation: kissPulse 1s ease-in-out infinite alternate;
}

.kiss-text-box {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 20px;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.kiss-sender {
  color: #ff4d4d;
}

@keyframes kissPulse {
  from { transform: scale(0.95); }
  to { transform: scale(1.1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.kiss-container.fade-out {
  opacity: 0;
  transition: opacity 1s ease-out;
}

.no-room-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background-color: #f8f9fa;
  padding: 2rem;
  text-align: center;
  margin: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.no-room-icon {
  font-size: 4rem;
  color: #6c757d;
  margin-bottom: 1.5rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.no-room-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #343a40;
  margin-bottom: 1rem;
}

.no-room-text {
  color: #6c757d;
  margin-bottom: 2rem;
  max-width: 400px;
}

.no-room-btn {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.no-room-btn:hover {
  background-color: #218838;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Chat Cleared Design */
.chat-cleared-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 1rem;
  text-align: center;
  margin: 0;
  animation: chatClearedFadeIn 0.5s ease-out;
  overflow: hidden;
}

.chat-cleared-avatar-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.chat-cleared-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 8px 20px rgba(245, 101, 101, 0.15);
  object-fit: cover;
}

.chat-cleared-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: #f56565;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  font-size: 0.9rem;
}

.chat-cleared-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #718096;
  margin-top: 0.2rem;
}

.chat-cleared-user {
  font-size: 1.2rem;
  font-weight: 800;
  color: #2d3748;
  margin-bottom: 0;
}

.chat-cleared-banner {
  max-width: 200px;
  max-height: 100px;
  object-fit: contain;
  margin-bottom: 0.5rem;
  border-radius: 8px;
}

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

.chat-input-disabled {
  background-color: #e9ecef !important;
  cursor: not-allowed;
  opacity: 0.7;
  text-align: center;
  font-style: italic;
}

.chat-input-disabled::placeholder {
  color: #6c757d;
}

.chat-input-field {
  border: 1px solid #000 !important;
  border-radius: 4px !important;
  height: 32px;
  min-width: 0; /* Important for flex items */
  font-family: var(--font-family) !important;
  font-size: var(--font-size) !important;
  font-weight: var(--font-weight) !important;
  line-height: 1.4 !important;
  text-shadow: none !important;
}

.btn-input-action {
  background-color: var(--unified-btn-bg, #343a40);
  border: 1px solid #555;
  color: var(--line-icon-color, white);
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.btn-input-action:hover:not(:disabled) {
  background-color: var(--unified-btn-hover-bg, #23272b);
}

.btn-input-action:disabled {
  background-color: #f8f9fa !important;
  border-color: #dee2e6 !important;
  cursor: not-allowed;
  opacity: 1;
}

.btn-input-action i {
  color: var(--line-icon-color, white);
}

.btn-input-action:disabled i {
  color: #adb5bd !important;
  opacity: 1;
}

.btn-send {
  background-color: var(--unified-btn-bg, #333333);
  border: 1px solid #555;
  color: white;
  height: 32px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
}

.btn-send:hover:not(:disabled) {
  background-color: #23272b;
  color: #fff !important;
}

.btn-send:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

/* Heart Bubble Animation */
.heart-bubble {
  position: fixed;
  pointer-events: none;
  font-size: 20px;
  color: #ff4d4d;
  transform: translateX(-50%);
  animation: heart-float 1s ease-out forwards;
  z-index: 9999;
}

.star-bubble {
  position: fixed;
  pointer-events: none;
  font-size: 20px;
  color: #ffc107;
  transform: translateX(-50%);
  animation: star-float 1s ease-out forwards;
  z-index: 9999;
}

@keyframes heart-float {
  0% {
    transform: translateY(0) translateX(-50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(-50%) scale(1.5);
    opacity: 0;
  }
}

@keyframes star-float {
  0% {
    transform: translateY(0) translateX(-50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(-50%) scale(1.5);
    opacity: 0;
  }
}

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

.bottom-tabs-bar {
    background-color: var(--bottom-tabs-bg, #444444);
    padding: 2px;
    display: flex;
    /* gap: 4px; */
    width: 100%;
    overflow: hidden;
    justify-content: flex-start;
}

.bottom-tabs-bar::-webkit-scrollbar {
  display: none;
}

.tab-btn {
    background-color: var(--unified-btn-bg, #333333);
    border: 1px solid #555;
    color: white;
    padding: 4px 10px;
    flex: none;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    /* border-radius: 3px; */
    /* transition: all 0.2s; */
    white-space: nowrap;
    overflow: hidden;
}

@media (max-width: 768px) {
  .tab-btn {
    padding: 3px 1px;
    flex: 1; /* Distribute width equally (percentage-based) on mobile */
    font-size: clamp(9px, 2vw + 3px, 13px);
    gap: 2px;
  }
  .tab-btn i, .tab-btn .fa, .tab-btn .fas, .tab-btn .far, .tab-btn .bi, .tab-btn svg {
    font-size: 0.7em;
  }
}

.tab-btn:hover, .tab-btn.active {
  background-color: var(--unified-btn-hover-bg, #222222);
  border-color: #777;
}

.tab-btn i {
  font-size: 0.9em;
}

/* Voice/Mic Bar Styles */
.voice-top-bar {
  background-color: var(--voice-top-bar-bg, #444444);
  color: white;
  min-height: 45px;
  padding-top: max(4px, env(safe-area-inset-top)) !important;
  width: 100%;
  overflow: hidden;
  position: relative;
  z-index: 100 !important;
}

.btn-voice-action {
  background: #28a745;
  color: white;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0px 6px 0px 6px;
  border: 1px solid #555;
  transition: all 0.2s;
}

.btn-voice-action.btn-danger {
  background: #dc3545 !important;
}

.btn-voice-action.btn-success {
  background: #28a745 !important;
}

.btn-voice-action i {
  font-size: 1.5rem;
}

.btn-mic {
  background: #ffffff;
  border: 1px solid #ddd;
  color: #555;
  width: 50px; /* Increased size */
  height: 48px; /* Increased size */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  position: relative;
  padding: 2px;
  overflow: hidden; /* Back to hidden to contain bars */
}

#btn-room-music {
  z-index: 10 !important;
  cursor: pointer !important;
  position: relative;
  overflow: hidden; /* To contain the square avatar and visualizer */
  padding: 0 !important; /* Remove padding to let image fill */
}

#btn-room-music.active {
  border-color: var(--unified-btn-bg);
  background-color: #fff;
}

.music-user-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0; /* Square as requested */
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
}

#music-queue-list {
  background: #fdfdfd;
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 4px !important;
  height: 4px !important;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f1f1 !important;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #ccc !important;
  border-radius: 10px !important;
}

.custom-scrollbar {
  scrollbar-width: thin !important;
  scrollbar-color: #ccc #f1f1f1 !important;
}

.hover-bg-light:hover {
  background-color: #f8f9fa;
}

.cursor-pointer {
  cursor: pointer;
}

/* Visualizer Bars */
.music-visualizer-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  padding-bottom: 4px;
  background: rgba(0,0,0,0.1); /* Lighter overlay */
  pointer-events: none;
}

.music-bar {
  width: 3px;
  background: rgba(0, 255, 0, 0.8); /* Semi-transparent vibrant green */
  border-radius: 2px 2px 0 0;
  animation: music-bar-dance 0.5s ease-in-out infinite alternate;
}

.music-bar:nth-child(1) { height: 20%; animation-delay: 0.1s; }
.music-bar:nth-child(2) { height: 35%; animation-delay: 0.3s; }
.music-bar:nth-child(3) { height: 25%; animation-delay: 0.2s; }
.music-bar:nth-child(4) { height: 40%; animation-delay: 0.4s; }

@keyframes music-bar-dance {
  from { height: 10%; }
  to { height: 45%; }
}

#btn-room-music.playing {
  animation: music-pulse 2s infinite;
  border-color: #00ff00 !important;
}

@keyframes music-pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(0, 255, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0); }
}

#roomMusicModal {
  z-index: 1200 !important;
  pointer-events: auto !important;
}

.swal2-container {
  z-index: 300000 !important;
  pointer-events: auto !important;
}

#roomMusicModal .modal-content {
  background-color: #ffffff !important;
  border-radius: 12px !important;
  overflow: hidden;
}

/* Professional Horizontal Call Bar */
.call-panel {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  z-index: 1000;
  width: 95%;
  max-width: 400px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Inter', sans-serif;
  border: 1px solid #333;
  cursor: grab;
  user-select: none;
}

.call-avatar-wrapper {
  position: relative;
  width: 45px;
  height: 45px;
  border-radius: 50%;
}

.call-avatar-wrapper.active-call-waves::before,
.call-avatar-wrapper.active-call-waves::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 50%;
  border: 2px solid #28a745;
  animation: sound-waves 2s linear infinite;
  pointer-events: none;
}

.call-avatar-wrapper.active-call-waves::after {
  animation-delay: 1s;
}

@keyframes sound-waves {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

.call-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #28a745;
}

.call-avatar.ringing {
  animation: pulse-green 1.5s infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

.call-info { flex-grow: 1; margin: 0 15px; text-align: right; }
.call-name { font-weight: 600; font-size: 0.95rem; }
.call-status { font-size: 0.8rem; color: #aaa; }
.call-timer { font-size: 0.9rem; color: #ff4d4d; font-weight: bold; }

.call-controls { display: flex; gap: 10px; }

.btn-call-sm {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: white;
}
.btn-accept { background-color: #28a745; }
.btn-reject { background-color: #dc3545; }
.btn-mute { background-color: #4a4a4a; }

  #roomMusicModal .modal-content {
    max-height: 85vh !important;
    display: flex;
    flex-direction: column;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
  }

  #roomMusicModal .modal-body {
    overflow-y: auto !important;
    flex: 1;
    padding: 0 !important;
  }

  #music-queue-list {
    max-height: 250px !important;
  }

  #music-search-results {
    max-height: 150px !important;
  }
}

.music-info-card {
  background: #f8f9fa;
  border: 1px solid #eee;
  border-radius: 10px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.super-icon-small {
  height: 18px;
  object-fit: contain;
}

.user-topic-badge {
  font-size: 10px;
  background: #e9ecef;
  color: #495057;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.room-user-count.active-mics {
  color: #dc3545;
  font-weight: bold;
}

#music-time-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #555;
}

#music-progress-bar {
  transition: width 0.3s linear;
}

.modal-backdrop {
  z-index: 1150 !important;
}

/* Professional Bar Visualizer */
.mic-visualizer {
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  padding: 0 4px;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-mic.speaking .mic-visualizer {
  opacity: 1;
}

.visualizer-bar {
  flex: 1;
  width: 3px;
  min-height: 2px;
  background: linear-gradient(to top, #28a745, #5cd67d);
  border-radius: 1px;
  transition: height 0.1s ease-out;
}

.btn-mic.speaking {
  border-color: #28a745 !important;
  background: #f0fff4;
}

@media (max-width: 767px) {
  .btn-mic {
    width: 50px;
    height: 50px;
  }
  .mic-container {
    gap: 2px !important;
  }
  .mic-content i {
    font-size: 1.5rem;
  }
}

.mic-number {
  position: absolute;
  top: 1px;
  left: 3px;
  font-size: 9px;
  font-weight: bold;
  color: #999;
  z-index: 2;
}

.mic-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.mic-content i {
  font-size: 2rem;
  color: var(--mic-icon-color, #555);
}

.mic-user-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.mic-user-name {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 8px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 1px 0;
}

.btn-mic:hover {
  background: #f0f0f0;
  color: #000;
}

.btn-mic.active {
  background: #e8f5e9;
  border-color: #28a745;
  color: #28a745;
}

.btn-mic.active .mic-number {
  color: #28a745;
}

.btn-mic.locked {
  background: #f8d7da !important;
  border-color: #f5c2c7 !important;
  color: #842029 !important;
  cursor: not-allowed !important;
  opacity: 0.7;
}

.btn-mic.locked .mic-content i {
  color: #842029 !important;
}

.mic-manage-btn {
  transition: transform 0.1s;
}

.mic-manage-btn:active {
  transform: scale(0.95);
}

@keyframes pulse-mic {
  0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* Profile Modals */
#userProfileModal {
  z-index: 1200 !important;
}
#passwordModal {
  z-index: 1300 !important;
}
#createRoomModal {
  z-index: 1300 !important;
}
#modPermissionsModal {
  z-index: 1400 !important;
}
/* Removed duplicate modal-backdrop */

.password-modal-dialog {
  max-width: 250px !important;
  margin: 1.75rem auto;
}

.create-room-modal-dialog {
  max-width: 400px !important;
  margin: 1.75rem auto;
}

/* Chat Message Styles */
@keyframes smooth-fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.message-row {
  display: flex;
  gap: 0;
  padding: 0;
  padding-right: 12px;
  background-color: #fff;
  align-items: stretch;
  position: relative;
  user-select: none;
  border-bottom: 1px solid rgba(0,0,0,0.03);
}

.message-row:hover {
  filter: brightness(0.98);
}

.message-row:nth-child(odd) {
  background-color: #ffffff;
}

.message-row:nth-child(even) {
  background-color: #ffffff;
}

.message-avatar {
  width: 50px;
  height: 50px;
  align-self: stretch;
  border: none;
  border-radius: 0 !important;
  object-fit: cover;
  flex-shrink: 0;
  background-color: #f8f9fa;
  margin-right: 3px;
}

.message-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 4px 0;
  overflow: hidden;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}

.message-username {
  font-family: var(--font-family) !important;
  font-size: var(--font-size) !important;
  font-weight: var(--font-weight) !important;
  line-height: 1.4 !important;
  color: #000033;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid #eee;
  padding: 0 4px;
  border-radius: 2px;
  width: fit-content;
  text-shadow: none !important;
}

.message-text {
  font-family: var(--font-family) !important;
  font-size: var(--font-size) !important;
  font-weight: var(--font-weight) !important;
  line-height: 1.4 !important;
  color: #000;
  word-break: break-word;
  text-shadow: none !important;
}

/* System-like highlights in messages */
.room-highlight {
  background-color: #1a2a3a; /* Dark background as in image */
  color: #ffffff !important;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 12px;
  display: inline-block;
  margin: 0 4px;
  font-weight: bold;
}
.room-box {
  background-color: var(--room-box-bg, #333);
  color: #fff !important;
  padding: 1px 5px;
  /* border-radius: 3px; */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-family) !important;
  font-size: var(--font-size) !important;
  font-weight: var(--font-weight) !important;
  line-height: 1.4 !important;
  /* border: 1px solid #000; */
  /* margin: 0 4px; */
  text-shadow: none !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.room-box i {
  color: #fff !important;
  font-size: 14px;
}

.system-user-message {
  background-color: #fff9f0 !important; /* Cream background as in image */
  animation: fadeInSlide 0.5s ease-out forwards;
}

@keyframes fadeInSlide {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.system-user-message .message-text {
  color: #000;
  font-family: var(--font-family) !important;
  font-size: var(--font-size) !important;
  font-weight: var(--font-weight) !important;
  line-height: 1.4 !important;
  text-shadow: none !important;
}

.message-actions {
  position: absolute;
  right: 4px;
  top: 2px;
  display: flex;
  flex-direction: row;
  gap: 1px;
  z-index: 10;
}

.btn-msg-action {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  color: white;
  font-size: 10px;
  cursor: pointer;
  border-radius: 2px;
  transition: transform 0.1s;
}

.reply-btn {
  background-color: #4b3082; /* Purple/Blue as in image */
}

.delete-btn {
  background-color: #cc3333; /* Red as in image */
}

.btn-msg-action:active {
  transform: scale(0.9);
}

.profile-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 5px;
  background: #ddd;
  border-top: 1px solid #ccc;
  direction: rtl;
}

.btn-profile-action {
  background: #f0f0f0;
  border: 1px solid #ccc;
  padding: 6px 8px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #000;
  text-decoration: none;
  border-radius: 0;
  font-weight: bold;
  width: 100%;
  transition: background 0.2s;
}

.btn-profile-action:hover {
  background: #e0e0e0;
  color: #000;
}

.btn-profile-action i {
  font-size: 16px;
  color: #333;
}

.btn-likes {
  background: #ff4444 !important;
  color: #fff !important;
  border-color: #cc0000 !important;
}

.btn-likes i {
  color: #fff !important;
}

.btn-ignore {
  color: #ff4444 !important;
  justify-content: center;
  gap: 8px;
}

.btn-ignore i {
  color: #ff4444 !important;
}

.profile-stats {
  padding: 15px 0;
  border-bottom: 1px solid #eee;
  text-align: center;
}

.profile-stat-item {
  display: inline-block;
}

.profile-stat-value {
  font-weight: bold;
  font-size: 24px;
  color: #4b3082;
  display: block;
}

.profile-stat-label {
  font-size: 14px;
  color: #666;
}

/* Quoted Message Styles */
.quoted-message {
  background-color: #f1f1f1;
  border-right: 3px solid #4b3082;
  padding: 6px 10px;
  margin-bottom: 6px;
  border-radius: 4px;
  font-size: 14px;
  color: #555;
  width: fit-content;
  max-width: 100%;
  position: relative;
  display: flex;
  flex-direction: row; /* Changed to row to show avatar next to text */
  gap: 8px;
  align-items: flex-start;
}

.quoted-avatar {
  width: 50px;
  height: 50px;
  border-radius: 3px;
  object-fit: cover;
}

.quoted-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.quoted-message::before {
  content: '\f10d'; /* quote-left */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  left: 8px;
  top: 5px;
  font-size: 10px;
  color: #ccc;
  opacity: 0.5;
}

.quoted-username {
  font-weight: bold;
  color: #4b3082;
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.reply-preview-container {
  background-color: #f8f9fa;
  padding: 8px 12px;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  border-right: 5px solid #4b3082;
  animation: slide-up 0.2s ease-out;
  gap: 10px;
}

.reply-preview-avatar {
  width: 50px;
  height: 50px;
  border-radius: 4px;
  object-fit: cover;
}

@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.reply-preview-content {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-grow: 1;
  padding-right: 8px;
}

/* Swipe indicator icon */
.swipe-indicator {
  position: absolute;
  left: -45px;
  top: 50%;
  transform: translateY(-50%) scale(0.6);
  color: #4b3082;
  font-size: 22px;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: rgba(75, 48, 130, 0.15);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  pointer-events: none;
}

.swipe-indicator.active {
  transform: translateY(-50%) scale(1.1);
  opacity: 1;
  background: rgba(75, 48, 130, 0.25);
  color: #4b3082;
}

.site-banner {
  max-height: 150px;
  width: 100%;
  object-fit: cover;
}

/* Name Banner Effect (Simulated) */
.name-banner {
  background-image: url('https://picsum.photos/seed/banner/200/30');
  background-size: contain;
  background-repeat: no-repeat;
  padding: 0 5px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  color: #333;
}

.list-group-item {
  transition: background 0.2s;
}

.list-group-item:hover {
  background-color: #f8f9fa;
}

/* Classic Admin Edit Section Styles */
.classic-admin-section {
  direction: rtl !important;
  background: #fff;
  padding: 5px !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.classic-admin-row {
  display: flex;
  align-items: stretch;
  border: 1px solid #ced4da;
  border-radius: 4px;
  min-height: 30px;
  background-color: #fff;
  overflow: hidden;
}

.classic-admin-label-btn, .classic-admin-label-text {
  background: #f8f9fa;
  color: #333;
  border: none;
  border-left: 1px solid #ced4da;
  padding: 0 12px;
  font-family: var(--font-family) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 90px;
  cursor: default;
  white-space: nowrap;
}

.classic-admin-input-container {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0;
  position: relative;
  background: #fff;
}

.classic-admin-input {
  width: 100%;
  height: 100%;
  border: none;
  padding: 0 10px;
  font-size: 14px;
  font-weight: bold;
  outline: none;
  font-family: var(--font-family) !important;
  background: transparent;
  color: #333;
}

.classic-admin-input:focus {
  background: #fff;
}

.classic-admin-action-btn {
  background: var(--unified-btn-bg, #333333);
  color: white;
  border: none;
  border-right: 1px solid #ced4da;
  padding: 0 15px;
  font-size: 14px;
  font-weight: bold;
  font-family: var(--font-family) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  min-width: 80px;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.classic-admin-action-btn:hover {
  background: var(--unified-btn-hover-bg, #222222);
}

.classic-admin-action-btn:active {
  background: var(--unified-btn-hover-bg, #222222);
  opacity: 0.9;
}

.classic-admin-action-btn.dark {
  background: var(--unified-btn-bg, #333333);
  color: white;
}

.classic-admin-action-btn.dark:hover {
  background: var(--unified-btn-hover-bg, #222222);
}

.classic-admin-action-btn i {
  font-size: 14px;
}

.classic-admin-action-btn.success-anim {
  background: #28a745 !important;
  color: #fff !important;
  animation: success-pulse 0.5s ease-out;
}

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

.classic-admin-action-btn .fa-check {
  color: #fff;
}

/* Sidebar Styles */
.sidebar-container {
  position: fixed;
  top: 0;
  right: -340px; /* Hidden by default */
  width: 340px;
  height: 100%;
  height: 100dvh;
  background: white;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  z-index: 1100 !important;
  transition: right 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #444444;
  overflow: hidden;
}

.sidebar-container.open {
  right: 0 !important;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1090 !important;
  display: none;
}

.sidebar-overlay.show {
  display: block !important;
}

.sidebar-header {
  padding: 0.3rem 0.6rem;
  background-color: var(--sidebar-header-bg, #555555);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 15px !important;
}

.sidebar-header h6 {
  font-size: 15px !important;
  margin: 0;
  font-weight: 700;
}

.sidebar-header.wall-header {
  background-color: var(--sidebar-header-bg, #555555);
}

.other-rooms-header, .current-room-header {
  background-color: var(--sidebar-header-bg, #555555) !important;
  color: #fff;
  text-align: center;
  padding: 4px 0;
  font-weight: bold;
  font-size: 15px;
}

.sidebar-close-btn {
  background: #e74c3c !important;
  color: white !important;
  border: none !important;
  width: 24px !important;
  height: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  opacity: 1 !important;
  transition: none !important;
}

.sidebar-close-btn:hover {
  background: #a93226 !important;
}

/* Sidebar Content Animations */

.sidebar-content-animate {
}

#sidebar-search-container {
  overflow: hidden;
  max-height: 100px;
  opacity: 1;
}

#sidebar-search-container.d-none {
  display: none !important; /* Keep d-none for logic, but we'll use a better way in JS if possible */
}

/* Better way: use a class for visibility instead of d-none if we want smooth height */
.sidebar-search-visible {
  max-height: 100px !important;
  opacity: 1 !important;
  padding: 0.3rem !important;
  border-bottom: 1px solid #dee2e6 !important;
}

.sidebar-search-hidden {
  max-height: 0 !important;
  opacity: 0 !important;
  padding: 0 !important;
  border-bottom: 0 !important;
  pointer-events: none;
}

.sidebar-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  font-size: 15px !important;
  opacity: 1;
  position: relative;
}

.sidebar-tab-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

#sidebar-wall-container {
  overflow: hidden !important;
  padding-bottom: 0 !important;
}

.sidebar-tab-content.d-none {
  display: none !important;
}

.sidebar-content.fade-out {
  opacity: 0;
}

.sidebar-content.fade-in {
}


#sidebar-search-input {
  font-size: 15px !important;
}

/* YouTube Search Modal - Classic & Professional */
.yt-search-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 450px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  z-index: 2000;
  display: none;
  overflow: hidden;
  direction: rtl;
  border: 1px solid #34495e;
}

.yt-modal-header {
  background: #34495e;
  color: #fff;
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 16px;
}

.yt-modal-close {
  background: #e74c3c;
  color: #fff;
  border: none;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: background 0.2s;
}

.yt-modal-close:hover {
  background: #c0392b;
}

.yt-modal-body {
  padding: 15px;
  background: #f9f9f9;
}

.yt-search-box {
  display: flex;
  gap: 5px;
  margin-bottom: 15px;
}

.yt-search-box input {
  flex-grow: 1;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  outline: none;
  font-size: 14px;
}

.yt-search-box input:focus {
  border-color: #34495e;
}

.yt-search-box button {
  background: #34495e;
  color: #fff;
  border: none;
  padding: 0 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.yt-search-box button:hover {
  opacity: 0.9;
}

.yt-results-list {
  max-height: 350px;
  overflow-y: auto;
  border: 1px solid #eee;
  background: #fff;
  border-radius: 4px;
}

.yt-result-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.2s;
}

.yt-result-item:last-child {
  border-bottom: none;
}

.yt-result-item:hover {
  background: #f0f7ff;
}

.yt-result-thumb {
  width: 90px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  margin-left: 12px;
  border: 1px solid #ddd;
}

.yt-result-info {
  flex-grow: 1;
  overflow: hidden;
}

.yt-result-title {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yt-result-channel {
  font-size: 12px;
  color: #777;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1999;
  display: none;
}

/* Removed duplicate sidebar-overlay */

.message-text img,
.quoted-text img,
.message-username img {
  vertical-align: middle;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.message-text img.smiley-img,
.quoted-text img.smiley-img,
.message-username img.smiley-img {
  max-width: 240px !important;
}

.message-text img.sticker-img,
.quoted-text img.sticker-img {
  width: 50px !important;
  height: 50px !important;
  max-width: 50px !important;
  max-height: 50px !important;
  object-fit: contain;
}

.message-text img:hover,
.quoted-text img:hover,
.message-username img:hover {
  opacity: 0.9;
}

/* Classic Notifications */
.classic-notification-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.2s;
  direction: rtl;
}

.classic-notification-item.unread {
  border-right: 4px solid var(--primary-color);
  background: #f0f7ff;
}

.classic-notification-item:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.notification-text {
  color: #333;
  font-weight: 500;
  line-height: 1.4;
}

.notification-time {
  font-size: 11px;
  color: #888;
  white-space: nowrap;
  margin-right: 10px;
}
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.show {
  display: block;
  opacity: 1;
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80dvh;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.lightbox.show .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 10000;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

@media only screen and (max-width: 700px){
  .lightbox-content {
    width: 100%;
  }
}

/* Classic Settings Styles */
.classic-settings-container {
  background-color: #eee;
  padding: 2px;
  font-family: var(--font-family);
  direction: rtl;
}

.classic-header {
  background-color: var(--classic-header-bg, #444);
  color: #fff;
  text-align: center;
  padding: 4px;
  font-weight: bold;
  border: 1px solid #000;
  margin-bottom: 2px;
  font-size: 14px;
  z-index: 100 !important;
  position: relative;
}

.classic-input {
  width: 100%;
  border: 1px solid #000;
  padding: 4px;
  margin-bottom: 4px;
  text-align: center;
  background-color: #fff;
  color: #000;
  font-size: 14px;
  outline: none;
}

.classic-color-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: 4px;
}

.classic-color-item {
  background-color: #2c3e50;
  color: #ecf0f1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border: 1px solid #1a252f;
  font-size: 13px;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.classic-color-item:hover {
  background-color: #34495e;
  border-color: #2c3e50;
}

.classic-color-box {
  width: 32px;
  height: 20px;
  border: 1px solid #000;
  cursor: pointer;
  padding: 0;
  background: none;
  border-radius: 2px;
  transition: transform 0.1s ease;
}

.classic-color-box:hover {
  transform: scale(1.1);
}

.classic-color-box::-webkit-color-swatch-wrapper {
  padding: 0;
}

.classic-color-box::-webkit-color-swatch {
  border: none;
  border-radius: 1px;
}

.simple-settings-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 10px;
}

.simple-setting-row {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
}

.simple-setting-label {
  background-color: var(--unified-btn-bg, #444);
  color: #fff;
  font-weight: bold;
  padding: 4px 6px;
  border: 1px solid #000;
  font-size: 14px;
  flex: 1;
  text-align: center;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.simple-color-preview {
  width: 30px;
  height: 30px;
  border: 1px solid #000;
  border-left: none;
  cursor: pointer;
  position: relative;
}

.simple-color-preview.transparent::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to top right, transparent 45%, #ff0000 45%, #ff0000 55%, transparent 55%);
}

.color-palette-popover {
  position: fixed;
  z-index: 100000;
  background: #fff;
  border: 1px solid #000;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(8, 24px);
  gap: 3px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  border-radius: 4px;
  max-height: 250px;
  overflow-y: auto;
}

.palette-color {
  width: 24px;
  height: 24px;
  border: 1px solid #ccc;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.palette-color:hover {
  border-color: #000;
  transform: scale(1.1);
  z-index: 1;
}

.palette-color.transparent {
  background: #fff;
  position: relative;
}

.palette-color.transparent::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to top right, transparent 45%, #ff0000 45%, #ff0000 55%, transparent 55%);
}

.classic-btn {
  width: 100%;
  padding: 4px 8px;
  border: 1px solid #000;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  position: relative;
}

.classic-btn-green {
  background-color: #5cb85c;
  color: #fff;
}

.classic-btn-red {
  background-color: #d9534f;
  color: #fff;
}

.classic-btn-red-black {
  background-color: #d9534f;
  color: #000;
}

.classic-btn-white {
  background-color: #fff;
  color: #000;
}

.classic-btn-dark {
  background-color: #444;
  color: #fff;
}

.classic-btn-pink {
  background: linear-gradient(to left, #f5f5f5, #d9534f);
  color: #000;
}

.classic-avatar-small {
  width: 22px;
  height: 22px;
  border: 1px solid #000;
  object-fit: cover;
}

.classic-btn i {
  font-size: 14px;
}

.classic-btn .btn-icon-left {
  position: absolute;
  left: 8px;
}

.classic-btn .btn-icon-right {
  position: absolute;
  right: 8px;
}


/* Room Card Styles */
.room-card {
  border: 1px solid #ddd;
  border-radius: 0;
  overflow: hidden;
  border-bottom: 1px solid #ddd;
  background: #fff;
  transition: transform 0.2s;
  cursor: pointer;
  margin-top: -1px; /* Remove double borders and white space between cards */
}

.room-card.active {
  border-left: 3px solid #007bff;
  border-right: 3px solid #007bff;
}

.room-card:hover {
  background-color: #f8f9fa;
}

.room-card .text-muted.small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.room-card-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 0;
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid #ddd;
  display: block;
}

.room-card-bg {
  height: 150px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.room-card-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
}

.room-card-bg > * {
  position: relative;
  z-index: 1;
}

.room-user-count {
  background-color: var(--unified-btn-bg, #343a40);
  color: white;
  padding: 2px 8px;
  border-radius: 0;
  font-size: 12px;
  font-weight: bold;
}

.room-user-count.active-mics {
  background-color: #dc3545 !important;
  color: white;
}

/* Emoji Picker */
.emoji-picker-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 250px;
  background: #fff;
  border-top: 2px solid #ddd;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  direction: rtl;
}

.emoji-picker-header {
  display: flex;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
  padding: 0 5px;
  align-items: center;
}

.picker-tab {
  border: none;
  background: none;
  padding: 10px 15px;
  font-weight: bold;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.picker-tab.active {
  color: #0d6efd;
  border-bottom-color: #0d6efd;
}

.btn-close-picker {
  margin-right: auto;
  border: none;
  background: none;
  color: #999;
  font-size: 18px;
  padding: 5px 10px;
  cursor: pointer;
}

.emoji-picker-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  align-content: start;
}

.emoji-picker-content.smiley-tab {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
}

.picker-item {
  cursor: pointer;
  transition: transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1px;
  border-radius: 2px;
}

.picker-item:hover {
  background: #f0f0f0;
  transform: scale(1.1);
}

.picker-item img {
  max-width: 240px !important;
  max-height: 20px !important;
  object-fit: contain;
  vertical-align: middle;
}

.picker-item.smiley img {
  max-width: 240px !important;
  max-height: 20px !important;
}

.picker-item.sticker img {
  width: 50px !important;
  height: 50px !important;
  max-width: 50px !important;
  max-height: 50px !important;
}

/* Wall Post Styles - Exact Image Match */
.wall-container {
  background-color: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--font-family) !important;
  position: relative;
  overflow: hidden;
}

.wall-posts-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  scrollbar-gutter: stable;
  position: relative;
  margin-top: 2px;
  -webkit-overflow-scrolling: touch;
}

.announcement-badge {
  float: left;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #dfdddd;
  color: #1900f7;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: bold;
  border: 1px solid #acaaab;
  margin-right: 5px;
  margin-left: 5px;
  vertical-align: middle;
}

.new-posts-alert {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #28a745;
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  display: none;
  animation: fadeInDown 0.3s ease;
  border: none;
}

.new-posts-alert:hover {
  background-color: #218838;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate(-50%, -10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.wall-post-card {
    display: flex;
    padding: 0;
    border-bottom: 1px solid #eee;
    background: #fff;
    min-height: 45px;
    gap: 2px;
    direction: ltr;
    contain: paint;
}

.wall-post-avatar {
  min-width: 52px;
  width: 52px;
  height: 46px;
  border-radius: 0;
  object-fit: cover;
  flex-shrink: 0;
  margin: 0;
}

.wall-post-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.wall-post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 4px;
}

.wall-post-username {
  color: #e67e22; /* Orange color from image */
  font-weight: bold;
  font-size: var(--font-size) !important;
  margin-bottom: 0;
  text-decoration: none;
  display: inline-block;
  background: #fff;
  padding: 0 5px;
  border-radius: 2px;
}

.wall-post-time {
  font-size: calc(var(--font-size) * 0.75) !important;
  color: #777;
  font-weight: bold;
  display: inline-flex !important;
  flex-direction: row !important;
  direction: rtl !important;
  align-items: center;
  gap: 1px;
}

.wall-post-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-end;
    margin-top: -5px;
    /* gap: 8px; */
    font-size: 15px;
    line-height: 1.3;
    color: #000000;
    word-break: break-word;
    /* margin-bottom: 4px; */
    font-weight: 700;
    position: relative;
}

.wall-post-media, .message-media {
    width: 100%;
}

.wall-post-text {
    flex: 1 1 auto;
    text-align: left;
    min-width: 0;
    text-align: justify;
    margin-right: 5px;
    font-size: var(--font-size) !important;
}



.wall-post-actions-row {
  display: flex;
  height: 22px;
  flex: 0 0 auto;
}

.wall-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  color: #fff;
  font-size: 11px;
  border: none;
  cursor: pointer;
  min-width: 24px;
  height: 20px;
  gap: 3px;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wall-action-btn:active {
  transform: scale(0.9);
}

.wall-btn-like {
  background-color: #d9534f; /* Red */
}

.wall-btn-like i.fas.animate-like {
  animation: like-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes like-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.wall-btn-comment {
  background-color: #2c3e50; /* Dark */
}

.wall-btn-delete {
  background-color: #d9534f; /* Red */
}

.wall-action-btn i {
  font-size: 11px;
  transition: all 0.2s ease;
}

.wall-action-btn span {
  font-weight: bold;
}

/* Classic Comment Modal */
.comment-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1038;
}

.comment-modal {
  width: 340px;
  max-width: 95%;
  background: #fff;
  border-radius: 0; /* Sharp corners */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  border: 1px solid #34495e;
}

.comment-modal-header {
  background: #34495e;
  color: #fff;
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  border-radius: 0;
}

.comment-modal-header .title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.comment-modal-header .close-btn {
  cursor: pointer;
  font-size: 18px;
  opacity: 0.9;
}

.comment-modal-header .close-btn:hover {
  opacity: 1;
}

.comment-modal-body {
  height: 380px;
  overflow-y: auto;
  background: #fff; /* Solid white background */
  padding: 0;
}

.comment-original-post {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e2e8f0;
  padding: 15px;
  margin-bottom: 15px;
  border-right: 4px solid #34495e;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.comment-item {
  display: flex;
  padding: 6px;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  gap: 8px;
  position: relative;
}

.comment-avatar {
  width: 52px;
  height: 46px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #eee;
}

.comment-main {
  flex-grow: 1;
  text-align: right;
  direction: rtl;
}

.comment-user-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 1px;
}

.comment-username {
  font-weight: bold;
  font-size: 13px;
  color: #333;
}

.comment-text {
  font-size: 13px;
  color: #444;
  line-height: 1.2;
}

.comment-time {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 10px;
  color: #aaa;
  display: inline-flex !important;
  flex-direction: row !important;
  direction: rtl !important;
  align-items: center;
  gap: 1px;
}

.comment-modal-footer {
  background: #e0e0e0; /* Classic gray footer */
  padding: 4px;
  display: flex;
  gap: 2px;
  align-items: center;
  border-top: 1px solid #ccc;
}

.comment-modal-input-group {
  display: flex;
  flex-grow: 1;
  background: #fff;
  border: 1px solid #999;
  align-items: center;
  padding: 0 2px;
  border-radius: 0;
}

.comment-smiley-btn {
  font-size: 16px;
  color: #666;
  cursor: pointer;
  padding: 2px 4px;
}

.comment-modal-input {
  flex-grow: 1;
  border: none;
  padding: 5px;
  font-size: 13px;
  outline: none;
  text-align: right;
  direction: rtl;
  background: transparent;
  box-shadow: none !important; /* Remove any glow */
}

.comment-send-btn {
  background: #34495e;
  color: #fff;
  border: none;
  width: 36px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 0;
}

.wall-post-form-container {
  background: #f0f2f5;
  padding: 4px;
  border-top: 1px solid #ccc;
  flex-shrink: 0;
}

.wall-post-input-group {
  display: flex;
  gap: 4px;
  align-items: center;
  background: #fff;
  border: 1px solid #999;
  padding: 2px;
}

.wall-post-input {
  flex-grow: 1;
  border: none;
  padding: 6px 10px;
  font-size: var(--font-size) !important;
  outline: none;
  background: transparent;
  resize: none;
  height: 32px;
  line-height: 20px;
}

.wall-post-btn-send {
  background-color: var(--unified-btn-bg, #555555);
  color: white;
  border: none;
  padding: 6px 15px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.wall-post-btn-send:hover {
  background-color: var(--unified-btn-hover-bg, #444444);
  color: #fff !important;
}

.wall-post-btn-icon {
  background: #f8f9fa;
  border: solid 1px #ccc;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  cursor: pointer;
}

.wall-post-btn-icon:hover {
  background: #e9ecef;
  color: #000;
}

/* Upload Progress Bar */
.wall-upload-progress-container {
  display: none;
  width: 100%;
  height: 18px;
  background: #f0f0f0;
  border-radius: 9px;
  margin-bottom: 5px;
  overflow: hidden;
  position: relative;
  border: 1px solid #ddd;
}

.wall-upload-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3498db, #2980b9);
  transition: width 0.3s ease;
}

.wall-upload-progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: bold;
  color: #333;
  text-shadow: 0 0 2px #fff;
}

/* Media Buttons Group - Classic Style */
.wall-media-buttons {
  display: flex;
  gap: 2px;
  margin-bottom: 5px;
  background: #f0f0f0;
  padding: 2px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.wall-media-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 5px;
  background-color: var(--unified-btn-bg, #2e2e2e);
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.1s;
}

.wall-media-btn:hover {
  background-color: var(--unified-btn-hover-bg, #e0e0e0);
  border-color: #bbb;
  color: #fff;
}

.wall-media-btn i {
  font-size: 12px;
  opacity: 0.8;
}

/* Empty State Styling */
.empty-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 300px;
  text-align: center;
  padding: 2rem;
}

.empty-state-icon {
  font-size: 4.5rem;
  color: #e9ecef;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

.empty-state-text {
  font-size: 1.2rem;
  font-weight: bold;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.empty-state-subtext {
  font-size: 0.9rem;
  color: #adb5bd;
}
.wall-media-preview-container {
  display: none;
  margin-bottom: 8px;
  padding: 8px;
  background: #f9f9f9;
  border: 1px dashed #ccc;
  border-radius: 6px;
  position: relative;
}

.wall-media-preview-content {
  max-height: 150px;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 8px;
  display: flex;
  justify-content: center;
  background: #000;
}

.wall-media-preview-content img,
.wall-media-preview-content video {
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
}

.wall-media-preview-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.wall-preview-btn {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.wall-preview-btn-confirm {
  background: #27ae60;
  color: white;
  border-color: #219150;
}

.wall-preview-btn-confirm:hover {
  background: #219150;
}

.wall-preview-btn-cancel {
  background: #f8f9fa;
  color: #333;
  border-color: #ccc;
}

.wall-preview-btn-cancel:hover {
  background: #e9ecef;
}

/* YouTube Search Modal */
.yt-search-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 400px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 25px rgba(0,0,0,0.3);
  z-index: 10000;
  padding: 15px;
  direction: rtl;
}

.yt-search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.yt-search-header h3 { margin: 0; font-size: 16px; }
.yt-close { cursor: pointer; font-size: 20px; color: #999; }

.yt-input-group {
  display: flex;
  gap: 5px;
  margin-bottom: 15px;
}

.yt-input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  outline: none;
}

.yt-btn-search {
  padding: 8px 15px;
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.yt-results {
  max-height: 250px;
  overflow-y: auto;
}

.yt-result-item {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.2s;
}

.yt-result-item:hover { background: #f9f9f9; }
.yt-result-item.selected { background: #e8f4fd; border-color: #3498db; }

.yt-thumb {
  width: 80px;
  height: 45px;
  object-fit: cover;
  border-radius: 4px;
}

.yt-info {
  flex: 1;
  font-size: 13px;
  overflow: hidden;
}

.yt-title {
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yt-channel { font-size: 11px; color: #777; }

.yt-footer {
  margin-top: 15px;
  display: flex;
  justify-content: flex-end;
}

.yt-btn-send {
  padding: 8px 20px;
  background: #27ae60;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.yt-btn-send:disabled { background: #ccc; cursor: not-allowed; }

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
}

/* Media Placeholders */
.media-placeholder {
  position: relative;
  width: fit-content;
  padding: 6px 12px;
  background: #f8f9fa;
  border-radius: 8px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid #e9ecef;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.media-placeholder:hover {
  border-color: #e67e22;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transform: translateY(-2px);
}

.media-placeholder .placeholder-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6) blur(1px);
  transition: all 0.3s ease;
}

.media-placeholder:hover .placeholder-thumb {
  filter: brightness(0.8) blur(0px);
  transform: scale(1.05);
}

.play-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.play-overlay i {
  font-size: 56px;
  color: #ff0000;
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  transition: transform 0.3s ease;
}

.media-placeholder:hover .play-overlay i {
  transform: scale(1.15);
}

.image-placeholder {
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
}

.placeholder-icon {
  position: relative;
  z-index: 2;
  color: #e67e22;
  display: flex;
  align-items: center;
}

.placeholder-icon i {
  font-size: 20px;
}

.media-placeholder span {
  position: relative;
  z-index: 2;
  font-weight: 600;
  font-size: 15px;
  color: #2c3e50;
}

.media-revealed {
  background: transparent !important;
  border: none !important;
  height: auto !important;
  min-height: 0 !important;
  width: 100% !important;
  padding: 0 !important;
  display: block !important;
  cursor: default !important;
  transform: none !important;
  box-shadow: none !important;
  transition: none !important;
  overflow: visible !important;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.media-revealed .placeholder-thumb,
.media-revealed .play-overlay,
.media-revealed .placeholder-icon,
.media-revealed .yt-left-side,
.media-revealed .yt-right-side,
.media-revealed span {
  display: none !important;
}

/* Horizontal YouTube Placeholder - Classic Design */
.youtube-horizontal-placeholder {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: #f0f0f0 !important;
  padding: 8px 12px !important;
  margin: 0px 5px !important;
  cursor: pointer !important;
  border: 1px solid #ddd !important;
  direction: ltr !important;
  width: 85% !important;
  max-width: 400px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: none !important;
}

.youtube-horizontal-placeholder:hover {
  background-color: #e8e8e8 !important;
  transform: none !important;
  box-shadow: none !important;
  border-color: #ddd !important;
}

.yt-left-side {
  margin-right: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  flex: none !important;
}

.yt-left-side i {
  font-size: 40px !important;
  color: #ff0000 !important;
  background: #fff !important;
  border-radius: 10px !important;
  line-height: 1 !important;
  filter: none !important;
  transition: none !important;
}

.youtube-horizontal-placeholder:hover .yt-left-side i {
  transform: none !important;
  filter: none !important;
}

.yt-right-side {
  width: 120px !important;
  height: 90px !important;
  background: #000 !important;
  border: 1px solid #ccc !important;
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: none !important;
}

.yt-right-side .placeholder-thumb {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  filter: none !important;
  transition: none !important;
  position: static !important;
}

.youtube-horizontal-placeholder:hover .yt-right-side .placeholder-thumb {
  transform: none !important;
  filter: none !important;
}

.yt-play-label {
  display: none !important;
}

.youtube-horizontal-placeholder::after {
  display: none !important;
}


.youtube-horizontal-placeholder.media-revealed {
  width: 100% !important;
  max-width: 100% !important;
  background-color: transparent !important;
  border: none !important;
  padding: 0 !important;
}

.message-image-preview {
  width: auto;
  max-width: 200px;
  height: 200px;
  object-fit: cover;
  cursor: pointer;
  display: block;
  margin-left: 0;
  margin-right: auto;
}

.quoted-media {
  display: block;
  margin-top: 5px;
}
.quoted-media img, .quoted-media video {
  max-width: 100%;
  max-height: 150px;
  border-radius: 4px;
}

/* Overlay Image */
.sidebar-header, .classic-header, .voice-top-bar, .bottom-tabs-bar, .other-rooms-header, .room-box, .btn-send, .wall-post-btn-send, .tab-btn, .wall-media-btn, .chat-input-container, .btn-input-action, .room-user-count, .simple-setting-label {
  background-image: var(--overlay-image, none) !important;
  background-repeat: repeat;
  background-position: top left;
}

.classic-settings-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.settings-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.settings-avatar-margin {
  margin-left: 5px;
}

.settings-footer {
  padding: 10px;
  border-top: 1px solid #000;
  background: #eee;
}

.profile-header-bg-custom {
  border-radius: 0;
  overflow: hidden;
  position: relative;
}
.profile-header-classic-custom {
  position: relative;
  z-index: 2;
  background: var(--status-bg, #444444) !important;
}
.profile-avatar-container {
  position: relative;
  width: 24px;
  height: 24px;
}
.profile-avatar-header-custom {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.profile-header-frame-custom {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.profile-header-flag-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  min-width: 30px;
}
.profile-header-flag-custom {
  width: 20px;
  height: 14px;
  margin-bottom: 2px;
  border-radius: 1px;
}
.profile-header-id-custom {
  font-size: 10px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
}
.profile-cover-custom {
  height: 160px;
  object-fit: cover;
}

/* --- Consolidated Styles from index.ejs --- */
:root {
  --primary-color: #0d6efd;
  --button-color: #0d6efd;
  --text-color: #000;
}
.btn-primary { background-color: var(--button-color) !important; border-color: var(--button-color) !important; }
.bg-dark { background-color: var(--primary-color) !important; }
.btn-outline-secondary:hover { background-color: #f8f9fa !important; color: inherit !important; }
.btn-outline-secondary:hover i { color: inherit !important; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.shake { animation: shake 0.2s ease-in-out 0s 2; }
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.pulse { animation: pulse 0.4s ease-in-out; }
.form-transition { transition: opacity 0.3s ease-in-out; }
.hidden-form { opacity: 0; visibility: hidden; position: absolute; }
.visible-form { opacity: 1; visibility: visible; position: relative; }

/* Tab Buttons Styling */
.nav-tab-btn {
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: #6c757d;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}
.nav-tab-btn:hover {
  background-color: #f8f9fa;
  color: #333;
}
.nav-tab-btn.active {
  background-color: #0d6efd;
  color: #fff;
  border-color: #0d6efd;
  box-shadow: 0 4px 6px rgba(13, 110, 253, 0.2);
}

/* Input Focus Glow */
.form-control:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 90%;
  max-width: 350px;
}
.custom-toast {
  background: #fff;
  border-right: 5px solid #dc3545;
  padding: 12px 15px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideDown 0.3s ease-out;
  direction: rtl;
}
@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
#adminModal .modal-content {
  border: none;
  border-radius: 0;
}
#adminModal .modal-body {
  background: #f8f9fa;
}
#createRoomModal .modal-header {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}
#admin-iframe {
  display: block;
  width: 100%;
  height: 100%;
}
/* Profile Actions Grid & Buttons */
.profile-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 1px;
  background: #cccccc;
  border-top: 1px solid #bbbbbb;
  direction: rtl;
}
.btn-profile-action {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 2px;
  height: 30px;
  background: #fdfdfd;
  border: none;
  border-radius: 0;
  color: #000;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.2s;
  text-decoration: none !important;
  width: 100%;
  padding: 2px;
  text-align: center;
  line-height: 1.1;
  flex-wrap: nowrap;
}
.btn-profile-action:hover {
  background: #eeeeee;
}
.btn-profile-action i {
  font-size: 14px;
  color: #444;
}
.btn-likes {
  background: #ff4d4d !important;
  color: #fff !important;
}
.btn-likes i {
  color: #fff !important;
}
.btn-ignore {
  color: #ff4d4d !important;
}
.btn-ignore i {
  color: #ff4d4d !important;
}
.btn-report {
  color: #333 !important;
}
.btn-report i {
  color: #333 !important;
}
/* Classic Profile Header */
.profile-header-classic {
  background: #333;
  color: #fff;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  direction: rtl;
  border-bottom: 1px solid #555;
}
.profile-header-info {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-grow: 1;
  justify-content: flex-start;
  direction: rtl;
}
.profile-header-avatar {
  width: 24px;
  height: 24px;
  border-radius: 2px;
  object-fit: cover;
}
.profile-header-banner {
  height: 20px;
  width: auto;
}
.profile-header-topic {
  font-size: 15px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-close-classic {
  background: #ff4444;
  border: none;
  color: #fff;
  width: 24px;
  height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.2s;
}
.btn-close-classic:hover {
  background: #cc0000;
}
/* Profile Status Box */
.profile-status-box {
  background: transparent;
  border: none;
  padding: 0;
  display: block;
  color: #000;
  font-size: 13px;
  border-radius: 0;
  margin-top: 0;
  width: 100%;
  text-align: center;
  font-weight: bold;
  line-height: 1.3;
}

.glass-status {
  background: var(--status-bg, rgba(0, 0, 0, 0.45)) !important;
  border-radius: 6px !important;
  padding: 3px 2px !important;
  color: #fff !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  display: inline-block !important;
  max-width: 100%;
  word-wrap: break-word;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  font-size: 14px;
}
.profile-avatar-frame {
  background: var(--status-bg, rgba(0, 0, 0, 0.4));
  padding: 6px;
}

@media (max-width: 576px) {
  #userProfileModal .modal-dialog {
    margin: 15px auto;
    max-width: calc(100% - 30px);
  }
}
#userProfileModal .modal-sm {
  max-width: 340px;
}

/* Alert Dialogs & Notifications */
.alert-container {
  direction: rtl;
  font-family: var(--font-family);
}

.alert-header {
  background-size: cover;
  background-position: center;
  padding: 15px;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  position: relative;
}

.alert-header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  border-radius: 8px 8px 0 0;
}

.alert-sender-info {
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-sender-details {
  text-align: right;
}

.alert-sender-label {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #2b3b4e;
  color: #fff;
  padding: 3px 25px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: bold;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  white-space: nowrap;
  border: 1px solid #000;
  text-shadow: none !important;
}

.alert-sender-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: bold;
  font-size: 15px;
  padding: 2px 8px;
  border-radius: 4px;
  text-shadow: none !important;
  -webkit-text-stroke: 0px !important;
}

.alert-container, .alert-container * {
  text-shadow: none !important;
  -webkit-text-stroke: 0px !important;
}

.alert-avatar-wrapper {
  z-index: 1;
}

.alert-avatar {
  width: 45px;
  height: 45px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.alert-body {
  background: #fff;
  padding: 20px;
  border: 1px solid #eee;
  border-top: none;
  border-radius: 0 0 8px 8px;
  text-align: right;
  font-size: 15px;
  color: #333;
  line-height: 1.6;
  word-break: break-word;
  min-height: 100px;
}

/* Send Alert Dialog (Classic/Simple) */
.send-alert-container, .send-alert-container * {
  text-shadow: none !important;
  -webkit-text-stroke: 0px !important;
}

.send-alert-container {
  font-family: var(--font-family);
}

.send-alert-header {
  background: #333;
  padding: 10px 15px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  margin: -1.25em -1.6em 15px -1.6em;
  direction: ltr;
}

.send-alert-name {
  color: #fff !important;
  font-weight: bold;
  font-size: 16px;
  letter-spacing: 0.5px;
  text-shadow: none !important;
  -webkit-text-stroke: 0px !important;
}

.send-alert-avatar-wrapper {
  flex-shrink: 0;
}

.send-alert-avatar {
  width: 45px;
  height: 45px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid #555;
}

.send-alert-body-label {
  direction: rtl;
  text-align: right;
  padding: 5px 0;
}

.send-alert-input-classic {
  border-color: #ccc !important;
  border-radius: 4px !important;
  min-height: 100px !important;
  direction: rtl !important;
}

/* Notification Item in Sidebar */
.sidebar-notification-item {
  background-size: cover;
  background-position: center;
  position: relative;
  border-bottom: 1px solid #eee;
  padding: 12px;
  min-height: 70px;
}

.sidebar-notification-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
}

.sidebar-notification-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}

.sidebar-notification-avatar {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #fff;
  margin-left: 10px;
}

.sidebar-notification-sender {
  font-size: 13px;
  font-weight: bold;
  display: inline-block;
  padding: 0 5px;
  border-radius: 3px;
  margin-bottom: 4px;
}

.sidebar-notification-text {
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}

.sidebar-notification-time {
  font-size: 11px;
  align-self: flex-start;
}

/* Games Lobby */
.game-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: var(--primary-color, #007bff);
}

.game-icon-container {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 8px;
}

/* Ludo Board Styles */
.ludo-game-container {
  background: #f0f2f5;
  border-radius: 8px;
  min-height: 100%;
}

.ludo-board-wrapper {
  width: 100%;
  aspect-ratio: 1/1;
  background: #fff;
  border: 2px solid #333;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

.ludo-board-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.dice-container {
  width: 40px;
  height: 40px;
  background: #fff;
  border: 2px solid #333;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
}

.dice {
  width: 30px;
  height: 30px;
  background: white;
  border-radius: 4px;
  position: relative;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
}

/* Ludo Colors */
.ludo-red { fill: #ff4d4d; }
.ludo-green { fill: #2ecc71; }
.ludo-yellow { fill: #f1c40f; }
.ludo-blue { fill: #3498db; }
.ludo-white { fill: #ffffff; }
.ludo-border { stroke: #333; stroke-width: 0.5; }

.ludo-piece {
  cursor: pointer;
  transition: transform 0.2s ease;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
}

.ludo-piece:hover {
  transform: scale(1.2);
}

.ludo-piece.can-move {
  animation: piece-bounce 0.6s infinite alternate;
}

@keyframes piece-bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-5px); }
}

.ludo-piece-element {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  z-index: 10;
  pointer-events: auto;
  cursor: default;
}

.ludo-piece-element.can-move {
  cursor: pointer;
  box-shadow: 0 0 10px var(--primary-color);
  animation: piece-pulse 1s infinite;
}

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

.player-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.active-turn {
  background-color: rgba(0, 123, 255, 0.1) !important;
  border-right: 3px solid #007bff !important;
}

.leaderboard-classic {
  border: 1.5px solid #dee2e6 !important;
  border-radius: 0;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.02);
}

.leaderboard-classic h6 {
  color: #495057;
  letter-spacing: 0.5px;
}

.leaderboard-classic .badge {
  font-size: 0.65rem;
  border-radius: 0;
}

.active-game-card:hover {
  transform: translateX(-2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.vs-badge-classic {
  box-shadow: 0 0 5px rgba(220, 53, 69, 0.3);
  z-index: 5;
  border: 1px solid rgba(255,255,255,0.5);
  text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}

.player-mini-profile img {
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.extra-small {
  font-size: 0.7rem !important;
}

.dice-face {
  font-size: 24px;
  font-weight: bold;
}

/* Stories Styles */
.stories-container {
  display: flex;
  overflow-x: auto;
  gap: 5px;
  padding: 10px;
  background: #f8f9fa;
  border-bottom: 1px solid #ddd;
}
.stories-container::-webkit-scrollbar {
  height: 4px;
}
.stories-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
.story-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #007bff;
  padding: 2px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}
.story-circle.viewed {
  border-color: #ccc;
}
.story-circle img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.story-add-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px dashed #007bff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  color: #007bff;
  font-size: 24px;
  background: #fff;
  position: relative;
}

.story-add-btn img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.story-add-btn .plus-icon {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #007bff;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 2px solid #fff;
}
.story-modal-content {
  background: #000;
  color: #fff;
  height: 80vh;
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.story-progress-bar {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  height: 3px;
  z-index: 10;
  display: flex;
  gap: 5px;
}
.story-progress-segment {
  flex: 1;
  background: rgba(255,255,255,0.3);
  height: 100%;
  border-radius: 2px;
  overflow: hidden;
}
.story-progress-fill {
  width: 0%;
  height: 100%;
  background: #fff;
}
.story-progress-segment.active .story-progress-fill {
  animation: storyProgress linear forwards;
}
.story-progress-segment.completed .story-progress-fill {
  width: 100%;
}
@keyframes storyProgress {
  from { width: 0%; }
  to { width: 100%; }
}
.story-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.story-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  text-align: center;
  width: 90%;
  word-wrap: break-word;
}
.story-header {
  position: absolute;
  top: 20px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  z-index: 10;
}
.story-header .story-user-avatar {
  height: 30px;
  width: 30px;
  border-radius: 50%;
  margin-left: 10px;
}

.story-header .story-super-icon {
  height: 18px;
  width: auto;
  margin-left: 4px;
  vertical-align: middle;
}
.story-viewers-btn {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  padding: 5px 15px;
  border-radius: 20px;
  cursor: pointer;
  z-index: 10;
}
.story-nav-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30%;
  z-index: 5;
  cursor: pointer;
}
.story-nav-btn.left { left: 0; }
.story-nav-btn.right { right: 0; }

/* Story Viewers List */
#story-viewers-list {
  position: absolute;
  bottom: 70px;
  left: 0;
  right: 0;
  height: 40%;
  background: #f8f9fa;
  color: #333;
  padding: 15px;
  z-index: 20;
  overflow-y: auto;
  transition: transform 0.3s ease-out;
  transform: translateY(100%);
  border-top: 1px solid #dee2e6;
}

.story-super-icon {
  height: 18px;
  width: auto;
  margin-left: 6px;
  vertical-align: middle;
}

#story-viewers-list.show {
  transform: translateY(0);
}

.story-viewer-item {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.story-viewer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-left: 16px;
  object-fit: cover;
}

.story-viewer-name {
  font-weight: 500;
  margin-left: 10px;
  font-size: var(--font-size) !important;
  font-family: var(--font-family) !important;
}

.story-viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.story-viewer-title {
  margin: 0;
  font-weight: bold;
}

/* Mic Context Menu - Dark Modern Design (Matching Image) */
.mic-context-menu {
  position: fixed;
  background: #333333;
  border: 1px solid #444444;
  border-radius: 4px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
  z-index: 10000;
  min-width: 120px;
  padding: 5px;
  margin: 0;
  font-family: var(--font-family);
  animation: fadeInClassic 0.1s ease-out;
  direction: rtl;
  transform: translateX(-50%) !important;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

@keyframes fadeInClassic {
  from { opacity: 0; transform: translate(-50%, -10px) !important; }
  to { opacity: 1; transform: translate(-50%, 0) !important; }
}

.mic-context-menu .menu-item {
  padding: 12px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s;
  color: #ffffff;
  font-size: 14px;
  font-weight: bold;
  background: #444444;
  border: 1px solid #555555;
  text-align: center;
}

.mic-context-menu .menu-item:hover {
  background: #555555;
}

.mic-context-menu .menu-item i {
  font-size: 14px;
  color: #bbb;
}

.mic-context-menu .menu-item:hover i {
  color: #ffffff;
}

.mic-context-menu .menu-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #333333;
  color: #888888;
  border-color: #444444;
}

.mic-context-menu .menu-item.disabled:hover {
  background: #333333;
  color: #888888;
}

.mic-context-menu .menu-item.danger {
  color: #ff4d4d;
}

.mic-context-menu .menu-item.danger:hover {
  background: #cc0000;
  color: #ffffff;
}

.mic-context-menu .menu-divider {
  height: 1px;
  background: #555555;
  margin: 2px 0;
}

.mic-context-menu .menu-volume {
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
}

.mic-context-menu .menu-volume i {
  color: #ffffff;
  font-size: 14px;
}

.mic-context-menu .menu-volume input[type="range"] {
  flex: 1;
  height: 6px;
  cursor: pointer;
  accent-color: #007bff;
  background: #555;
  border-radius: 3px;
  appearance: none;
}

.mic-context-menu .menu-volume input[type="range"]::-webkit-slider-runnable-track {
  background: #555;
  height: 6px;
  border-radius: 3px;
}

.mic-context-menu .menu-volume input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  background: #007bff;
  border-radius: 50%;
  margin-top: -4px;
}

/* Mic Mute Status */
.mic-mute-status {
  position: absolute;
  background: #dc3545ab;
  color: #ffffff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 10px;
  border: 2px solid white;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-mic {
  position: relative;
}

.current-music-title {
  text-align: center;
  font-weight: bold;
  margin-bottom: 1rem;
  padding: 0 10px;
  font-size: 14px;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* Toggle Switch Styles */
.classic-settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 2px;
}

.classic-settings-toggle-row .toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  margin: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: #28a745;
}

input:focus + .slider {
  box-shadow: 0 0 1px #28a745;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.slider.round {
  border-radius: 24px;
}

.slider.round:before {
  border-radius: 50%;
}


/* Private Chat Message Styles */
.private-msg-item {
  display: flex;
  align-items: stretch;
  padding: 0;
  margin-bottom: 0;
  border-radius: 0;
  background-color: #fff;
  border-bottom: 1px solid #eee;
  position: relative;
  transition: background-color 0.2s;
}

.private-msg-text {
  font-size: 15.2px !important;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-width: 430px;
}

.private-msg-body {
  flex-grow: 1;
  min-width: 0;
  text-align: left;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  padding: 8px !important;
}

.private-msg-header {
  margin-bottom: 4px;
}

.private-msg-avatar {
  width: 50px;
  height: 50px;
  object-fit: cover;
  cursor: pointer;
}

.private-msg-time {
  font-size: 0.7rem;
}

.private-msg-quote {
  background: rgba(0,0,0,0.03);
  border-right: 3px solid #3498db;
  padding: 4px 8px;
  margin-bottom: 6px;
  font-size: 0.85rem;
  border-radius: 2px;
}

.private-msg-audio {
  width: 240px;
  background: #f8f9fa;
  padding: 5px;
  border-radius: 8px;
  border: 1px solid #eee;
  margin-top: 4px;
}

.private-msg-file {
  align-self: flex-end;
  margin-top: 4px;
}



