:root {
  --tg-blue: #0088cc;
  --tg-bg: #80a67a;
  /* Classic muted Telegram wallpaper green */
  --sidebar-bg: #ffffff;
  --item-hover: #f4f4f5;
  --item-active: #eff7ff;
  --sent-bubble: #effdde;
  --recv-bubble: #ffffff;
  --text-main: #222222;
  --text-hint: #708499;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  --border-color: #f2f2f2;
}

* {
    user-select: none;
}

/* Date Separator Style */
.date-separator {
  text-align: center;
  margin: 20px 0;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.2);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  align-self: center;
}

/* Header Settings Bar */
.settings-bar {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: var(--sidebar-bg);
  border-bottom: 1px solid #ddd;
}

* {
  transition: background 0.1s ease;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f0f2f5;
  color: var(--text-main);
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* SIDEBAR */
#sidebar {
  width: 320px;
  background: var(--sidebar-bg);
  border-right: 1px solid #dfe5ec;
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.sidebar-header {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
}

#room-list {
  flex: 1;
  overflow-y: auto;
}

.room-item {
  padding: 12px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 0.5px solid #f2f2f2;
}

.room-item:hover {
  background: var(--item-hover);
}

.room-item.active {
  background: var(--item-active);
  border-left: 4px solid var(--tg-blue);
}

.room-item b {
  font-size: 15px;
  color: #000;
}

[data-theme="dark"] .room-item b {
  color: #fefefe;
}

/* MAIN CHAT AREA */
#main-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--tg-bg);
  position: relative;
  min-width: 0;
}

/* Doodle Wallpaper Pattern */
#main-chat::before {
  content: "";
  position: absolute;
  inset: 0;
  /*background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png'); */
  opacity: 0.12;
  pointer-events: none;
}

header {
  background: white;
  color: #000;
  padding: 12px 25px;
  font-weight: 600;
  font-size: 16px;
  box-shadow: var(--shadow);
  z-index: 5;
  display: flex;
  flex-direction: column;
}

#chat-window {
  flex: 1;
  overflow-y: auto;
  padding: 25px 50px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
}

/* AVATARS */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  font-size: 16px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

/* MESSAGES */
.msg {
  max-width: 85%;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msg.sent {
  align-self: flex-end;
  flex-direction: row-reverse;
  word-wrap: break-word;
}

.msg.received {
  align-self: flex-start;
  word-wrap: break-word;
}

.bubble {
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 14.5px;
  line-height: 1.15;
  box-shadow: var(--shadow);
  position: relative;
  min-width: 40px;
}

/* Add this to your style.css */
.bubble .text {
  /* Existing styles for the text inside the bubble */

  /* NEW RULE: This tells the browser to respect newlines (\n) 
  and wrap long lines when necessary. */
  white-space: pre-wrap;
  max-width: 50dvw;
  user-select:text;
}

/* Bubble Tails */
/*.bubble::after {*/
/*    content: "";*/
/*    position: absolute;*/
/*    bottom: 0;*/
/*    width: 10px;*/
/*    height: 10px;*/
/*}*/
.sent .bubble {
  background: var(--sent-bubble);
  border-bottom-right-radius: 4px;
}

.sent .bubble::after {
  right: -5px;
  background: radial-gradient(circle at 100% 100%, transparent 10px, var(--sent-bubble) 10px);
}

.received .bubble {
  background: var(--recv-bubble);
  border-bottom-left-radius: 4px;
}

.received .bubble::after {
  left: -5px;
  background: radial-gradient(circle at 0% 100%, transparent 10px, var(--recv-bubble) 10px);
}

.u-name {
  font-size: 12px;
  color: var(--tg-blue);
  font-weight: bold;
  display: block;
  margin-bottom: 2px;
}


/* REPLACEMENT FOR input#msg-input */
textarea#msg-input {
  flex: 1;
  background: #f1f4f7;
  border: 1px solid transparent;

  /* Adjust padding for multiline text */
  padding: 10px 18px;

  border-radius: 25px;
  outline: none;
  font-size: 15px;
  transition: 0.2s;

  /* Ensure it works like an input but can grow vertically */
  min-height: 20px;
  /* Minimum height for one line of text + padding */
  height: 44px;
  /* Set initial display height */
  resize: none;
  /* Prevent manual browser resizing */
  font-family: inherit;
  /* Ensure font matches the rest of the app */
  box-sizing: border-box;
  /* Crucial for padding/border calculation */

  /* Remove vertical scrollbar unless needed */
  overflow-y: auto;
  max-height: 150px;
  /* Stop growth after 3-4 lines */
}

[data-theme="dark"] textarea#msg-input {
  background: #242f3d;
  /* A dark gray background for the input box */
  color: var(--text-main);
  /* Ensure text is white */
}

/* When focused, make it slightly lighter */
[data-theme="dark"] textarea#msg-input:focus {
  background: #2c394a;
}

/* REPLACEMENT FOR input#msg-input:focus */
textarea#msg-input:focus {
  background: #fff;
  border-color: var(--tg-blue);
  box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1);
}

/* Add this to your style.css */

/* Target the placeholder text itself */
textarea#msg-input::-webkit-input-placeholder {
  /* Chrome/Safari */
  color: var(--text-hint);
  /* Use a standard variable or light grey color */
  opacity: 0.8;
}

textarea#msg-input:-moz-placeholder {
  /* Firefox 18- */
  color: var(--text-hint);
  opacity: 0.8;
}

textarea#msg-input::-moz-placeholder {
  /* Firefox 19+ */
  color: var(--text-hint);
  opacity: 0.8;
}

textarea#msg-input:-ms-input-placeholder {
  /* IE */
  color: var(--text-hint);
  opacity: 0.8;
}

/* MODALS */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.card {
  background: white;
  padding: 30px;
  border-radius: 20px;
  width: 320px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.card h3 {
  margin: 0 0 20px;
  font-size: 20px;
  color: var(--tg-blue);
}

.card input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #f9f9f9;
}

.btn-primary {
  background: var(--tg-blue);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  width: 100%;
}

.btn-primary:hover {
  filter: brightness(1.1);
}

/* Sidebar Last Msg & Badge */
.room-meta {
  flex: 1;
  min-width: 0;
}

.last-msg {
  font-size: 12px;
  color: var(--text-hint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  width: 100%;
}

.badge {
  background: #31ad45;
  color: white;
  font-size: 10px;
  font-weight: bold;
  min-width: 10px;
  text-align: center;
  padding: 4px 6px;
  border-radius: 50%;
  margin: 0px 18px 0 0;
}

/* Header Avatar logic */
.header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Improved Dark Mode variables and application */
[data-theme="dark"] {
  --tg-bg: #0e1621;
  /* Main Chat Wallpaper Background */
  --sidebar-bg: #17212b;
  /* Sidebar/Modal Card Background */
  --item-hover: #212c37;
  /* Item hover color (darker than background) */
  --item-active: #334455;
  /* Active room selection color */
  --sent-bubble: #2b5278;
  --recv-bubble: #182533;
  --text-main: #ffffff;
  --text-hint: #708499;
  --border-color: #313d4b;
  /* New: A standard dark border color */
}

/* Ensure Headers and Footers switch in dark mode */
[data-theme="dark"] header,
[data-theme="dark"] footer,
[data-theme="dark"] .sidebar-header,
[data-theme="dark"] .card {
  background-color: var(--sidebar-bg) !important;
  color: var(--text-main) !important;
}

/* Emoji Grid for the Modal */
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.emoji-opt {
  font-size: 30px;
  cursor: pointer;
  padding: 5px;
  border-radius: 10px;
  transition: 0.2s;
  border: 2px solid transparent;
}

.emoji-opt.selected {
  border-color: var(--tg-blue);
  background: rgba(0, 136, 204, 0.1);
}

/* Circular, Classy Buttons */
.icon-btn {
  background: #f1f4f7;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-btn:hover {
  background: #e2e8f0;
  transform: scale(1.05);
}

[data-theme="dark"] .icon-btn {
  background: #242f3d;
}

[data-theme="dark"] .icon-btn:hover {
  background: #2c394a;
}

/* My Profile Avatar in Sidebar (The trigger) */
#my-avatar-trigger {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--tg-blue);
  border: 2px solid transparent;
  transition: 0.2s;
}

#my-avatar-trigger:hover {
  border-color: var(--tg-blue);
  opacity: 0.8;
}

/* Skeleton Container */
.skeleton-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* The Shimmer Animation */
@keyframes shimmer {
  0% {
    background-position: -450px 0;
  }

  100% {
    background-position: 450px 0;
  }
}

.skeleton {
  background: var(--recv-bubble);
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.05) 20%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0) 100%);
  background-repeat: no-repeat;
  background-size: 450px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 15px;
  height: 45px;
  position: relative;
}

/* Skeleton Bubble Sizes */
.sk-recv {
  width: 60%;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.sk-sent {
  width: 40%;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
  opacity: 0.6;
}

/* Dark mode adjustment for skeleton */
[data-theme="dark"] .skeleton {
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.05) 20%, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0) 100%);
}

/* Small bar inside the bubble to show it's a reply */
.reply-preview {
  background: rgba(0, 0, 0, 0.05);
  border-left: 3px solid var(--tg-blue);
  padding: 5px 8px;
  border-radius: 4px;
  margin-bottom: 5px;
  font-size: 12px;
  cursor: pointer;
}

[data-theme="dark"] .reply-preview {
  background: rgba(255, 255, 255, 0.1);
}

/* The bar above the footer when you are currently typing a reply */
#reply-bar {
  display: none;
  background: var(--sidebar-bg);
  padding: 8px 20px;
  border-top: 1px solid var(--border);
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.room-item {
  position: relative;
}

.leave-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 0, 0, 0.1);
  color: #ff4d4d;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Floating Scroll Badge */
#scroll-badge {
  position: absolute;
  bottom: 85px;
  /* Sits right above the footer */
  right: 25px;
  background: var(--tg-blue);
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  display: none;
  /* Hidden by default */
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-size: 13px;
  font-weight: bold;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#scroll-badge:hover {
  filter: brightness(1.1);
}

.bubble {
  transition: transform 0.2s ease;
  touch-action: pan-y;
  /* Prevents vertical scroll interference */
}

/* Highlight effect when jumping to a message */
@keyframes highlightMsg {
  0% {
    background: var(--tg-blue);
  }

  100% {
    background: var(--recv-bubble);
  }
}

.highlight-flash {
  animation: highlightMsg 3s ease;
}

footer .icon-btn:last-child {
  transform: rotate(0deg);
  /* Tilts the arrow for a "Telegram" look */
  padding-left: 5px;
  /* Centers the arrow better */
}

footer .icon-btn:last-child:hover {
  transform: rotate(0deg) scale(1.1);
}

/* Custom Alert Animation */
#alert-modal .card {
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#alert-modal.active {
  display: flex;
}

#alert-modal.active .card {
  transform: scale(1);
  opacity: 1;
}

/* Red style for errors */
#alert-modal.error h3 {
  color: #ff4d4d;
}

#alert-modal.error .btn-primary {
  background: #ff4d4d;
}



/* --- New Global Classes for Mobile Hiding/Showing --- */
.mobile-only {
  display: none !important;
}

/* 1. Mobile Layout Definition */
@media (max-width: 768px) {

  /* 1. Reset Body to prevent horizontal scrolling */
  body {
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    /* <--- CRITICAL: Kills the horizontal scroll */
    position: fixed;
    /* Locks the body viewport */
  }

  /* 2. Both panels become full-screen FIXED overlays */
  #sidebar,
  #main-chat {
    position: fixed;
    /* <--- Change 'absolute' to 'fixed' */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    /* Snappier animation */
  }

  /* 3. Initial State: Sidebar is front and center */
  #sidebar {
    transform: translateX(0);
    z-index: 10;
  }

  /* 4. Initial State: Chat is hidden off-screen to the RIGHT */
  #main-chat {
    transform: translateX(100%);
    z-index: 20;
  }

  /* 5. Active State: Chat slides IN, Sidebar slides OUT */
  body.chat-active #sidebar {
    transform: translateX(-30%);
    /* Moves sidebar left for parallax effect */
  }

  body.chat-active #main-chat {
    transform: translateX(0);
    /* Moves chat into view */
  }

  /* 6. Utilities */
  .mobile-only {
    display: flex !important;
  }

  /* Adjust padding for touch screens */
  #chat-window {
    padding: 15px;
  }

  .sidebar-header {
    padding: 15px;
  }
}



.emoji-option:hover {
  transform: scale(1.1);
}


/* --- NEW CSS FOR UNLOCK/DIAL PAD MODAL --- */

/* Logic to show only one view at a time */
.setup-view,
.unlock-view {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

#name-modal.setup-mode .setup-view {
  display: flex;
}

#name-modal.unlock-mode .unlock-view {
  display: flex;
}


/* Styling for the Unlock View elements */
#unlock-avatar {
  width: 70px;
  height: 70px;
  font-size: 40px;
  margin-bottom: 15px;
  background: var(--tg-blue);
}

#unlock-pass-display {
  height: 30px;
  margin-bottom: 20px;
  font-size: 30px;
  letter-spacing: 10px;
  color: var(--text-main);
}

/* Dial Pad Grid */
.dial-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  width: 100%;
  margin-bottom: 25px;
}

.dial-btn {
  background: var(--item-hover);
  border: none;
  border-radius: 50%;
  /* Circular buttons */
  height: 65px;
  width: 65px;
  justify-self: center;
  /* Center button in grid cell */
  font-size: 24px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.dial-btn:hover {
  background-color: #e0e0e0;
}

[data-theme="dark"] .dial-btn:hover {
  background-color: #2c394a;
}

.dial-btn:active {
  background-color: var(--tg-blue) !important;
  color: white;
}

/* ADD THIS CSS to style.css */
.profile-actions {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--item-hover);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.btn-secondary {
  background: var(--item-hover);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  width: 100%;
}

.import-section textarea {
  width: 100%;
  min-height: 60px;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #f9f9f9;
  margin-bottom: 10px;
  font-size: 12px;
}

/* Add this CSS block to the end of your style.css */

/* Hide chat-specific UI elements by default */
#main-chat.no-room header,
#main-chat.no-room footer,
#main-chat.no-room #reply-bar,
#main-chat.no-room #scroll-badge {
  display: none !important;
}

/* Ensure the chat window content is centered/styled for the welcome message */
#main-chat.no-room #chat-window {
  padding: 0;
  justify-content: center;
  /* Center the welcome message vertically */
  align-items: center;
  /* Center the welcome message horizontally */
  background: transparent;
  /* Let the main-chat background show through */
}

/* Add this to style.css */

#export-btn {
  display: none;
}

/* Add this CSS to your style.css */

/* Green style for success */
#alert-modal.success h3 {
  color: #31ad45;
  /* A pleasant green color */
}

#alert-modal.success .btn-primary {
  background: #31ad45;
}

/* Styling for the new last message time */
.last-time {
  font-size: 12px;
  color: var(--text-hint);
  flex-shrink: 0;
  /* Prevents text from being compressed */
  margin-left: 10px;
  font-weight: normal !important;
}

/* Ensure room-meta handles the two lines of text better */
.room-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  /* Make room-meta a flex container */
  flex-direction: column;
  gap: 3px;
  /* Small gap between name/time and last message */
}

.room-meta>div {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* In style.css */

.room-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* Reduced gap */
  margin-right: 15px;
  /* Add margin to prevent text touching the badge/time */
}

/* New row to align name and time */
.room-meta .name-time-row {
  display: flex;
  justify-content: space-between;
  /* Pushes name to left, time to right */
  width: 100%;
  align-items: center;
}

/* Ensure room name is not bold when not active */
.room-item b {
  font-size: 15px;
  color: var(--text-main);
}


/* B. Adjust the Badge Position */

/* Find the existing badge style and update its margin */
.badge {
  /* ... (existing styles) ... */
  margin: 0;
  /* Remove top margin */
  align-self: flex-start;
  /* Aligns badge to the top */
  margin-right: 20px;
  margin-top: 10px;
  margin-left: -30px;
}

/* C. Fix the Leave Button Positioning */

/* Since we moved the leave button outside the room-meta, 
we need to adjust its positioning slightly to prevent layout shift */
.leave-btn {
  /* Keep existing absolute positioning relative to .room-item */
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  /* ... (rest of styles are fine) ... */
  z-index: 5;
  /* Ensure it's clickable over the time/badge */
}

/* D. Fine-tune alignment for all elements in room-item */
.room-item {
  /* Ensure room item is a proper flex container for the avatar, meta, badge, and button */
  padding: 12px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 0.5px solid var(--border-color);
  position: relative;
  /* Crucial for the leave-btn absolute positioning */
}

.name-time-row .last-time {
  margin-top: 11px;
  margin-right: 10px;

}




footer {
    width: 100%;
    box-sizing: border-box;
  padding: 10px 20px;
  background: white;
  display: flex;
  flex-direction: column; /* Stack picker on top of input */
  gap: 8px;
  align-items: center;
  z-index: 5;
}

#emoji-picker {
  display: none; /* Hidden by default, shown via JS when room is active */
  position: static; /* Remove absolute positioning */
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto; /* Horizontal scroll */
  white-space: nowrap; /* Keep emojis in one line */
  padding: 1px 0;
  background: transparent;
  box-shadow: none;
  border: none;
  border-bottom: 1px solid var(--item-hover);
  gap: 0px;
  scrollbar-width: none; /* Hide scrollbar Firefox */
  -ms-overflow-style: none; /* Hide scrollbar IE */
  -webkit-overflow-scrolling: touch; /* Smooth scroll on mobile */
}

/* Hide scrollbar Chrome/Safari */
#emoji-picker::-webkit-scrollbar {
  display: none;
}
#emoji-picker {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.emoji-option {
display: inline-block;
  font-size: 18px;
  padding: 5px 10px;
  cursor: pointer;
  transition: transform 0.1s;
}


/* Ensure the message input row also stretches properly */
footer > div:last-child {
  display: flex;
  width: 100%;
  gap: 10px;
  align-items: center;
}




/* Dark Mode Adjustments */
[data-theme="dark"] footer {
  background-color: var(--sidebar-bg);
}
[data-theme="dark"] #emoji-picker {
  border-bottom-color: var(--border-color);
}

#qrcode-container canvas, #qrcode-container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}