:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-soft: #f7f7fb;
  --panel-selected: #f1f0ff;
  --border: #e7e7ef;
  --muted: #8b8b9a;
  --text: #15151f;
  --subtle: #5f6070;
  --primary: #6258f6;
  --primary-dark: #4b42db;
  --incoming: #f0f0f2;
  --success: #49c889;
  --warning-bg: #fff3df;
  --warning: #e97820;
  --green-bg: #dff8e9;
  --green: #21a464;
  --blue-bg: #eaf7ff;
  --blue: #2475bd;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    fill 0.5s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* The theme toggle drives its own circular reveal via the View Transitions API
   (see toggleTheme() in app.js); disable the browser's default cross-fade so
   only that custom clip-path animation plays. */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 2;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  color: var(--text);
  background: var(--bg);
}

body.modal-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 88px 350px minmax(420px, 1fr) 360px;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
}

.app-shell.view-home {
  grid-template-columns: 88px minmax(0, 1fr);
}

.app-shell.view-home .topic-panel,
.app-shell.view-home .chat-panel,
.app-shell.view-home .directory-panel {
  display: none;
}

.app-shell.view-home .home-panel {
  display: block;
}

.app-shell:not(.view-home) .home-panel {
  display: none;
}

.app-shell img {
  cursor: zoom-in;
}

.icon-rail,
.home-panel,
.topic-panel,
.chat-panel,
.directory-panel {
  min-height: 0;
}

.home-panel {
  min-width: 0;
  overflow: hidden;
  background: #edeef1;
}

.home-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #edeef1;
}

.icon-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 16px 14px;
  border-right: 1px solid var(--border);
}

.app-logo {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  color: #fff;
  background: var(--primary);
  font-size: 22px;
  font-weight: 800;
  overflow: hidden;
}

.app-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: 100%;
}

.rail-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
}

.rail-button.active {
  color: #fff;
  background: var(--primary);
}

.rail-button:hover {
  background: var(--panel-selected);
}

.rail-button.active:hover {
  background: var(--primary);
}

.rail-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.rail-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: auto;
}

#theme-toggle {
  position: relative;
}

#theme-toggle svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transition: opacity 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#theme-toggle .icon-sun {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-110deg) scale(0.4);
}

#theme-toggle .icon-moon {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

:root[data-theme="dark"] #theme-toggle .icon-sun {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

:root[data-theme="dark"] #theme-toggle .icon-moon {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(110deg) scale(0.4);
}

.palette-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel-soft);
  font-size: 12px;
  font-weight: 700;
}

.palette-hint:hover {
  color: var(--text);
  border-color: var(--primary);
}

.palette-hint kbd {
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--subtle);
  background: var(--panel);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 11px;
}

.topic-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.panel-header,
.chat-header {
  display: flex;
  align-items: center;
  min-height: 80px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.panel-header {
  justify-content: space-between;
}

.header-title,
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-size: 22px;
  line-height: 1.15;
}

h3 {
  font-size: 15px;
  line-height: 1.2;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #4d4e5a;
  background: #eef1f6;
  font-size: 12px;
  font-weight: 800;
}

.topic-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 20px 16px 24px;
  overflow-y: auto;
}

.topic-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 8px;
  text-align: left;
  color: var(--text);
  background: transparent;
}

.topic-item:hover,
.topic-item.active {
  background: var(--panel-selected);
}

.avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #272733, #6258f6);
  font-size: 15px;
  font-weight: 800;
}

.avatar-large {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.avatar-image {
  overflow: hidden;
  background: #f0f0f2;
}

.avatar-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  cursor: zoom-in;
}

.topic-item .avatar-image {
  background: #ffffff;
}

.avatar-cover img {
  object-fit: cover;
  object-position: 50% 18%;
}

.topic-copy {
  min-width: 0;
}

.topic-copy strong,
.file-name,
.contact-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.topic-copy p,
.file-meta,
.contact-role {
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-time {
  color: #a0a0a8;
  font-size: 13px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-bg);
  font-size: 12px;
  font-weight: 800;
}

.chip:nth-child(2n) {
  color: var(--blue);
  background: var(--blue-bg);
}

.chip:nth-child(3n) {
  color: var(--warning);
  background: var(--warning-bg);
}

.empty-state {
  padding: 24px;
  color: var(--muted);
  font-size: 14px;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  gap: 16px;
}

.chat-header p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.online-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
}

.message-area {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
}

.message-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  overflow-y: auto;
}

.scroll-toggle {
  position: absolute;
  right: 22px;
  bottom: 22px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 12px 30px rgba(57, 50, 169, 0.25);
}

.scroll-toggle[hidden] {
  display: none;
}

.scroll-toggle svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  transition: transform 160ms ease, fill 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-toggle-up svg {
  transform: rotate(180deg);
}

.message-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  max-width: 78%;
}

.message-row:not(.message-row-clustered) {
  margin-top: 8px;
}

.message-row:first-child {
  margin-top: 0;
}

.message-row-clustered.incoming {
  margin-left: 54px;
}

.message-row-clustered.outgoing {
  margin-right: 54px;
}

.message-row.outgoing {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-row.incoming {
  align-self: flex-start;
}

.message-bubble {
  max-width: min(560px, 100%);
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text);
  background: var(--incoming);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.message-attachments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.message-image {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.65);
}

.message-image img {
  display: block;
  width: 100%;
  max-height: 260px;
  cursor: zoom-in;
  object-fit: contain;
  transition: opacity 160ms ease, transform 160ms ease, background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.message-image:hover img {
  opacity: 0.92;
  transform: scale(1.01);
}

.message-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.message-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--primary);
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.message-links a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.message-file {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 30px;
  gap: 12px;
  align-items: center;
  min-width: min(100%, 280px);
  padding: 10px;
  border-radius: 8px;
  color: inherit;
  background: rgba(255, 255, 255, 0.76);
  text-decoration: none;
}

.message-file:hover .message-file-meta strong {
  color: var(--primary);
}

.message-file-icon,
.message-file-download {
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.message-file-icon {
  width: 44px;
  height: 44px;
  color: #ff6b6b;
  background: #fff1f1;
  font-size: 12px;
  font-weight: 900;
}

.message-file-meta {
  min-width: 0;
}

.message-file-meta strong,
.message-file-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-file-meta strong {
  font-size: 13px;
}

.message-file-meta small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.message-file-download {
  width: 30px;
  height: 30px;
  color: var(--primary);
  border: 1px solid #d7d3ff;
  border-radius: 50%;
}

.message-file-download svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.message-row.outgoing .message-image {
  background: rgba(255, 255, 255, 0.15);
}

.message-row.outgoing .message-links a,
.message-row.outgoing .message-file {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.message-row.outgoing .message-file-meta small,
.message-row.outgoing .message-file-download {
  color: rgba(255, 255, 255, 0.82);
}

.message-row.outgoing .message-file-download {
  border-color: rgba(255, 255, 255, 0.36);
}

.message-row.outgoing .message-bubble {
  color: #fff;
  background: var(--primary);
}

.typing-bubble {
  padding: 14px 16px;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing-bounce 1.1s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing-bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 18px 24px 24px;
}

.composer input {
  height: 48px;
  min-width: 0;
  border: 1px solid #d9deec;
  border-radius: 10px;
  padding: 0 18px;
  outline: 0;
  color: var(--text);
}

.composer input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(98, 88, 246, 0.12);
}

.send-button,
.download-button {
  border: 0;
  background: transparent;
}

.send-button {
  min-width: 68px;
  height: 42px;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.directory-panel {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  overflow: hidden;
}

.directory-section,
.files-section {
  padding: 26px 16px 22px;
}

.files-section {
  min-height: 0;
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.profile-card {
  margin-top: 20px;
}

.profile-top {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  padding: 0 10px;
}

.contact-list {
  display: grid;
  gap: 10px;
  padding: 0 10px;
}

.contact-link,
.contact-line {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 32px;
  color: var(--subtle);
  text-decoration: none;
  font-size: 13px;
}

.contact-link:hover {
  color: var(--primary);
}

.contact-icon,
.file-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--primary);
  background: #f0efff;
  font-size: 11px;
  font-weight: 900;
}

.contact-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.files-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 395px);
  margin-top: 18px;
  padding: 0 10px 12px;
  overflow-y: auto;
}

.file-item {
  display: grid;
  grid-template-columns: 48px 1fr 34px;
  gap: 14px;
  align-items: center;
  min-height: 64px;
}

.file-icon {
  width: 48px;
  height: 48px;
  color: #ff6b6b;
  background: #fff1f1;
  font-size: 13px;
}

.file-icon.image {
  color: #28bd72;
  background: #effbf5;
}

.download-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #d7d3ff;
  border-radius: 50%;
  color: var(--primary);
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
}

.download-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.download-button.disabled {
  pointer-events: none;
  opacity: 0.35;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(12, 12, 18, 0.82);
}

.image-modal[hidden] {
  display: none;
}

.image-modal-frame {
  display: grid;
  place-items: center;
  max-width: min(1120px, 100%);
  max-height: 100%;
}

.image-modal-img {
  display: block;
  max-width: min(100%, calc(100vw - 56px));
  max-height: calc(100vh - 56px);
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.image-modal-close {
  position: fixed;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.image-modal-close:hover,
.image-modal-close:focus-visible {
  background: rgba(255, 255, 255, 0.26);
  outline: 0;
}

.command-palette {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 12vh 20px 20px;
  background: rgba(12, 12, 18, 0.5);
}

.command-palette[hidden] {
  display: none;
}

.command-palette-frame {
  width: min(560px, 100%);
  max-height: min(60vh, 520px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 30px 90px rgba(10, 10, 20, 0.35);
}

.command-palette-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.command-palette-input-row svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: var(--muted);
}

.command-palette-input-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.command-palette-input-row kbd {
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
}

.command-palette-results {
  overflow-y: auto;
  padding: 8px;
}

.palette-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  text-align: left;
  color: var(--text);
  background: transparent;
}

.palette-item.active,
.palette-item:hover {
  background: var(--panel-selected);
}

.palette-item-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #272733, #6258f6);
  font-size: 13px;
  font-weight: 800;
}

.palette-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.palette-item-copy {
  min-width: 0;
}

.palette-item-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.palette-item-copy span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.palette-item-kind {
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel-soft);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.command-palette-empty {
  padding: 24px 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.image-modal-close svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 72px 300px minmax(360px, 1fr);
  }

  .app-shell.view-home {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .directory-panel {
    display: none;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .app-shell {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .app-shell.view-home {
    height: 100vh;
    overflow: hidden;
  }

  .icon-rail {
    flex-direction: row;
    justify-content: space-between;
    min-height: 72px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .rail-actions {
    flex-direction: row;
    width: auto;
    margin-top: 0;
  }

  .rail-nav {
    flex: 0 1 auto;
    flex-direction: row;
    gap: 10px;
  }

  .topic-panel {
    max-height: 360px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .home-panel {
    flex: 1;
    min-height: 0;
  }

  .chat-panel {
    min-height: 620px;
  }

  .directory-panel {
    display: flex;
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .files-list {
    max-height: none;
  }

  .message-row {
    max-width: 92%;
  }
}

@media (max-width: 560px) {
  .panel-header,
  .chat-header {
    padding: 16px;
  }

  .topic-list,
  .message-list {
    padding-inline: 14px;
  }

  .composer {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .send-button {
    justify-self: end;
  }
}

:root[data-theme="dark"] {
  --bg: #0f0f16;
  --panel: #16161f;
  --panel-soft: #1c1c27;
  --panel-selected: #262637;
  --border: #2a2a38;
  --muted: #8b8b9e;
  --text: #f1f1f7;
  --subtle: #b4b4c4;
  --incoming: #232332;
  --warning-bg: #3a2a12;
  --green-bg: #103524;
  --blue-bg: #0f2a3a;
}

:root[data-theme="dark"] .home-panel,
:root[data-theme="dark"] .home-frame {
  background: #0f0f16;
}

:root[data-theme="dark"] .count-pill {
  color: var(--subtle);
  background: var(--panel-soft);
}

:root[data-theme="dark"] .avatar-image,
:root[data-theme="dark"] .topic-item .avatar-image {
  background: var(--panel-soft);
}

:root[data-theme="dark"] .composer input {
  border-color: var(--border);
  background: var(--panel-soft);
}

:root[data-theme="dark"] .message-links a {
  color: #fff;
  background: var(--panel-soft);
}

:root[data-theme="dark"] .message-file {
  background: var(--panel-soft);
}

:root[data-theme="dark"] .message-image {
  background: rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] .message-row.outgoing .message-image {
  background: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .scroll-toggle {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

:root[data-theme="dark"] .image-modal {
  background: rgba(0, 0, 0, 0.88);
}
