/* Live Chat Popup Styles */
.lc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
  display: flex;
  align-items: center;
  justify-content: center;
}
[data-theme="light"] .lc-overlay {
  background: rgba(0,0,0,.35);
}
.lc-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lc-popup {
  position: fixed;
  top: 20px;
  right: 24px;
  bottom: 20px;
  width: min(420px, calc(100vw - 48px));
  height: auto;
  background: var(--surface, #1e1136);
  border-radius: 20px;
  border: 1px solid var(--border, rgba(255,255,255,.08));
  box-shadow: 0 24px 72px rgba(0,0,0,.38), 0 4px 16px rgba(0,0,0,.16);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px) scale(.985);
  transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .22s ease, visibility .22s;
}
[data-theme="light"] .lc-popup {
  box-shadow: 0 24px 72px rgba(22,30,50,.2), 0 4px 16px rgba(22,30,50,.08);
}
.lc-popup.active {
  transform: translateX(0) scale(1);
  opacity: 1;
  visibility: visible;
}

/* Token ungu lebih terang khusus lingkup live chat */
.lc-popup,
.lc-context-menu,
.lc-image-lightbox,
.lc-image-reactions {
  --purple: #8b5cf6;
  --purple-light: #a78bfa;
  --purple-dark: #6d28d9;
}
.lc-popup input,
.lc-popup textarea {
  --purple: #8b5cf6;
  --purple-light: #a78bfa;
}

.lc-header {
  min-height: 68px;
  padding: 15px 18px;
  background: linear-gradient(120deg, rgba(63,109,245,.16), rgba(139,92,246,.12)), var(--bg, #100821);
  color: var(--text, #f5f3fb);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border, rgba(255,255,255,.08));
}
.lc-header h3 {
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}
.lc-header-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--surface-2, rgba(255,255,255,.06));
  border: none;
  border-radius: 10px;
  color: var(--text-mute, rgba(255,255,255,.4));
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px;
  transition: color .15s;
}
.lc-header-close:hover { color: var(--text, #f5f3fb); }

.lc-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.lc-body::-webkit-scrollbar { width: 4px; }
.lc-body::-webkit-scrollbar-thumb { background: var(--purple, #7c3aed); border-radius: 4px; }

/* Panel */
.lc-panel {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex: 1;
}
.lc-panel::-webkit-scrollbar { width: 4px; }
.lc-panel::-webkit-scrollbar-thumb { background: var(--purple, #7c3aed); border-radius: 4px; }
.lc-panel-header {
  padding: 16px 18px 12px;
  flex-shrink: 0;
}
.lc-panel-title {
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--purple-light, #9d5cf5);
}
.lc-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 14px;
}
.lc-game-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--surface-2, rgba(255,255,255,.04));
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 14px;
  transition: background .15s, border-color .15s;
}
[data-theme="light"] .lc-game-card {
  background: #fff;
}
.lc-game-card:hover {
  background: var(--surface-3, rgba(255,255,255,.08));
  border-color: var(--purple, #7c3aed);
}
[data-theme="light"] .lc-game-card:hover {
  border-color: var(--purple, #7c3aed);
}
.lc-game-avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--surface-3, rgba(255,255,255,.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dim, rgba(255,255,255,.6));
  flex-shrink: 0;
  overflow: hidden;
}
[data-theme="light"] .lc-game-avatar {
  background: var(--surface-2, rgba(0,0,0,.04));
  color: var(--text-dim, rgba(0,0,0,.5));
}
.lc-game-avatar.has-photo {
  padding: 0;
}
.lc-game-info {
  flex: 1;
  min-width: 0;
}
.lc-game-name {
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text, #f5f3fb);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lc-game-admin {
  font-size: 11px;
  line-height: 1.3;
}
.lc-game-admin.active {
  color: var(--purple-light, #9d5cf5);
}
.lc-game-admin.inactive {
  color: var(--text-mute, rgba(255,255,255,.35));
}
[data-theme="light"] .lc-game-admin.inactive {
  color: var(--text-mute, rgba(0,0,0,.35));
}
.lc-panel-divider {
  height: 1px;
  background: var(--border, rgba(255,255,255,.08));
  margin: 2px 18px 10px;
}
.lc-panel-section-title {
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-mute, rgba(255,255,255,.35));
  padding: 0 18px 8px;
}
.lc-conv-list {
  padding: 0 0 8px;
}
.lc-conv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  cursor: pointer;
  transition: background .15s;
}
.lc-conv-item:hover {
  background: var(--surface-2, rgba(255,255,255,.04));
}
.lc-conv-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-3, rgba(255,255,255,.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mute, rgba(255,255,255,.35));
  flex-shrink: 0;
  overflow: hidden;
}
[data-theme="light"] .lc-conv-avatar {
  background: var(--surface-2, rgba(0,0,0,.04));
  color: var(--text-mute, rgba(0,0,0,.35));
}
.lc-conv-info {
  flex: 1;
  min-width: 0;
}
.lc-conv-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #f5f3fb);
  margin-bottom: 1px;
}
.lc-conv-preview {
  font-size: 11.5px;
  color: var(--text-mute, rgba(255,255,255,.4));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lc-conv-meta {
  text-align: right;
  flex-shrink: 0;
}
.lc-conv-time {
  font-size: 10px;
  color: var(--text-mute, rgba(255,255,255,.25));
  margin-bottom: 4px;
}
.lc-conv-badge {
  display: inline-block;
  background: var(--purple, #7c3aed);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 5px;
  line-height: 18px;
  text-align: center;
}
.lc-conv-empty {
  padding: 16px 18px 20px;
  text-align: center;
  color: var(--text-mute, rgba(255,255,255,.2));
  font-size: 12px;
}

/* Notification enable row */
.lc-notif-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 18px 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2, rgba(255,255,255,.05));
  border: 1px solid var(--border, rgba(255,255,255,.08));
}
.lc-notif-row > svg {
  color: var(--purple-light, #9d5cf5);
  flex-shrink: 0;
}
.lc-notif-info {
  flex: 1;
  min-width: 0;
}
.lc-notif-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text, #f5f3fb);
}
.lc-notif-sub {
  font-size: 10.5px;
  color: var(--text-mute, rgba(255,255,255,.4));
  line-height: 1.3;
}
.lc-notif-btn {
  flex-shrink: 0;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  transition: all .15s;
}
.lc-notif-btn:hover {
  filter: brightness(1.1);
}
.lc-notif-btn:disabled {
  background: var(--surface-3, rgba(255,255,255,.10));
  color: var(--text-mute, rgba(255,255,255,.35));
  cursor: default;
}
.lc-notif-btn.is-on {
  background: rgba(16,185,129,.18);
  color: #34d399;
  border: 1px solid rgba(16,185,129,.4);
}
[data-theme="light"] .lc-notif-btn.is-on {
  background: rgba(16,185,129,.12);
  color: #059669;
}
[data-theme="light"] .lc-notif-sub {
  color: rgba(0,0,0,.5);
}
[data-theme="light"] .lc-notif-title {
  color: rgba(0,0,0,.85);
}

/* Chat Room */
.lc-chat {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.lc-chat-header {
  position: relative;
  padding: 14px 16px;
  background: var(--surface, #1e1136);
  border-bottom: 1px solid var(--border, rgba(255,255,255,.08));
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.lc-chat-back {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border, rgba(255,255,255,.1));
  border-radius: 10px;
  background: var(--surface-2, rgba(255,255,255,.04));
  color: var(--text, #f5f3fb);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s, color .15s;
}
[data-theme="light"] .lc-chat-back {
  background: rgba(0,0,0,.04);
}
.lc-chat-back:hover {
  background: var(--surface-3, rgba(255,255,255,.08));
  border-color: var(--purple, #7c3aed);
  color: var(--purple-light, #9d5cf5);
}
.lc-chat-title-row {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lc-chat-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.lc-chat-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border, rgba(255,255,255,.12));
  display: block;
}
.lc-chat-avatar-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--purple, #7c3aed), var(--purple-light, #9d5cf5));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.lc-avatar-status {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--bg, #100821);
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,.45);
  animation: lcPulse 2.4s infinite;
}
[data-theme="light"] .lc-avatar-status {
  border-color: var(--surface, #fff);
}
.lc-avatar-status.offline {
  background: var(--text-mute, rgba(255,255,255,.35));
  box-shadow: none;
  animation: none;
}
.lc-chat-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lc-chat-title {
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #f5f3fb);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lc-live-pulse { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.55); animation: lcPulse 2s infinite; flex-shrink: 0; }
@keyframes lcPulse { 70% { box-shadow: 0 0 0 7px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.lc-chat-served {
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-dim, rgba(255,255,255,.5));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lc-chat-served strong {
  color: var(--purple-light, #9d5cf5);
  font-weight: 700;
}
.lc-chat-presence {
  color: var(--text-mute, rgba(255,255,255,.38));
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lc-chat-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lc-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.lc-status-pill.is-online {
  color: #34d399;
  background: rgba(52,211,153,.12);
  border-color: rgba(52,211,153,.28);
}
.lc-status-pill.is-offline {
  color: var(--text-mute, rgba(255,255,255,.4));
  background: var(--surface-2, rgba(255,255,255,.04));
  border-color: var(--border, rgba(255,255,255,.1));
}
[data-theme="light"] .lc-status-pill.is-offline {
  color: rgba(0,0,0,.45);
  background: rgba(0,0,0,.04);
}
.lc-status-pill .lc-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.lc-status-pill.is-online .lc-pulse-dot {
  animation: lcPulse 2s infinite;
}

/* Messages */
.lc-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position:relative;
  background:linear-gradient(180deg, color-mix(in srgb, var(--bg,#100821) 94%, var(--purple,#7c3aed)) 0%, var(--bg,#100821) 42%);
}
.lc-chat-ambience { position:absolute; inset:0; pointer-events:none; opacity:0; }
.lc-messages::-webkit-scrollbar { width: 4px; }
.lc-messages::-webkit-scrollbar-thumb { background: var(--purple, #7c3aed); border-radius: 4px; }

.lc-msg {
  max-width: 80%;
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  transition: background .3s;
  animation:lcMessageIn .22s ease-out both;
  z-index:1;
}
@keyframes lcMessageIn { from { opacity:0; transform:translateY(7px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }
.lc-msg-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.lc-msg-admin {
  align-self: flex-start;
}
.lc-msg-system {
  align-self: center;
  max-width: 100%;
}

.lc-msg-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Chevron / anchor button */
.lc-msg-anchor {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-mute, rgba(255,255,255,.2));
  background: transparent;
  flex-shrink: 0;
  align-self: center;
  transition: background .15s, color .15s;
  opacity: 0;
  user-select: none;
}
.lc-msg:hover .lc-msg-anchor,
.lc-msg-has-menu .lc-msg-anchor {
  opacity: 1;
}
.lc-msg-anchor:hover {
  background: var(--surface-3, rgba(255,255,255,.1));
  color: var(--purple-light, #9d5cf5);
}
[data-theme="light"] .lc-msg-anchor:hover {
  background: rgba(0,0,0,.06);
}
.lc-msg-anchor svg { pointer-events: none; }

/* Bubbles */
.lc-msg-bubble {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
  box-shadow:0 3px 12px rgba(0,0,0,.08);
  transition:transform .16s ease, box-shadow .16s ease;
}
.lc-msg:hover .lc-msg-bubble { transform:translateY(-1px); box-shadow:0 7px 18px rgba(0,0,0,.14); }
.lc-msg-user .lc-msg-bubble {
  background: #2563eb;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.lc-msg-admin .lc-msg-bubble {
  background: var(--surface-2, rgba(255,255,255,.06));
  color: var(--text, #f5f3fb);
  border-bottom-left-radius: 4px;
}
[data-theme="light"] .lc-msg-admin .lc-msg-bubble {
  background: var(--surface-2, rgba(0,0,0,.05));
}
.lc-msg-system .lc-msg-bubble {
  background: color-mix(in srgb, var(--purple, #7c3aed) 8%, transparent);
  color: var(--text, #f5f3fb);
  font-size: 12px;
  text-align: center;
  border: 1px solid color-mix(in srgb, var(--purple, #7c3aed) 15%, transparent);
  padding: 10px 16px;
}

.lc-msg-time {
  font-size: 10px;
  color: var(--text-mute, rgba(255,255,255,.25));
  margin-top: 4px;
}
.lc-msg-user .lc-msg-time { text-align: right; }

.lc-msg-media {
  max-width: 100%;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 4px;
}
.lc-image-trigger {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.lc-msg-media img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
}
.lc-msg-media video {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
}
.lc-msg-media video:fullscreen,
.lc-msg-media video:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-height: none;
  object-fit: contain;
  background: #000;
}
.lc-video-wrap {
  position: relative;
}
.lc-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lc-video-play svg {
  width: 20px;
  height: 20px;
  fill: #fff;
  margin-left: 2px;
}
.lc-video-play:hover {
  background: rgba(124, 58, 237, 0.85);
  transform: translate(-50%, -50%) scale(1.08);
}
.lc-video-play.is-hidden {
  display: none;
}
.lc-msg-gallery {
  display: grid;
  gap: 3px;
  margin-bottom: 4px;
  width: 100%;
  max-width: 200px;
}
.lc-grid-1 { grid-template-columns: minmax(0, 1fr); }
.lc-grid-2, .lc-grid-3, .lc-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lc-msg-gallery .lc-gallery-item {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #0a0a12;
  cursor: zoom-in;
}
.lc-msg-gallery .lc-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lc-grid-1 .lc-gallery-item { display: block; }
.lc-grid-1 .lc-gallery-item img { height: auto; max-height: 120px; }
.lc-grid-2 .lc-gallery-item,
.lc-grid-3 .lc-gallery-item,
.lc-grid-4 .lc-gallery-item { aspect-ratio: 1 / 1; max-height: 96px; }
.lc-gallery-more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  pointer-events: none;
}
.lc-lightbox-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lc-lightbox-stage img {
  max-width: 72%;
  max-height: 72%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  cursor: default;
}
.lc-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.lc-lightbox-nav.prev { left: 10px; }
.lc-lightbox-nav.next { right: 10px; }
.lc-lightbox-nav:hover { background: rgba(255, 255, 255, 0.25); }
.lc-lightbox-counter {
  position: absolute;
  bottom: 92px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  z-index: 2;
}
.lc-lightbox-thumbs {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.55);
  max-width: 88%;
  overflow-x: auto;
  z-index: 2;
}
.lc-lightbox-thumbs .lc-thumb {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}
.lc-lightbox-thumbs .lc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lc-lightbox-thumbs .lc-thumb.active { border-color: #a78bfa; }

.lc-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 6, 16, .92);
  cursor: zoom-out;
}
.lc-image-lightbox img {
  max-width: 72%;
  max-height: 72%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
  cursor: default;
}
.lc-image-lightbox-tools {
  position: fixed;
  top: 16px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 1;
}
.lc-image-lightbox-tools button,
.lc-image-lightbox-tools a {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  display: grid;
  place-items: center;
  text-decoration: none;
  cursor: pointer;
}
.lc-image-lightbox-tools svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lc-image-lightbox-tools [data-action="close"] { font-size: 30px; line-height: 1; }
.lc-image-lightbox-tools button:hover,
.lc-image-lightbox-tools button:focus-visible,
.lc-image-lightbox-tools a:hover,
.lc-image-lightbox-tools a:focus-visible { background: rgba(255, 255, 255, .25); }
.lc-image-lightbox-tools .is-active { color: #facc15; }
.lc-image-reactions { position: absolute; top: 48px; right: 44px; display: flex; gap: 4px; padding: 6px; border-radius: 14px; background: rgba(33, 26, 47, .96); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.lc-image-reactions button { font-size: 18px; background: transparent; }

/* Message highlight animation */
@keyframes lcHighlight {
  0% { background: rgba(124,58,237,.3); }
  100% { background: transparent; }
}
.lc-msg-highlight {
  animation: lcHighlight 2s ease-out;
  border-radius: 8px;
}

/* Quote block inside reply bubbles */
.lc-msg-quote {
  display: flex;
  flex-direction: row;
  gap: 6px;
  padding: 6px 8px;
  margin-bottom: 4px;
  background: rgba(0,0,0,.15);
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  max-width: 280px;
}
[data-theme="light"] .lc-msg-quote {
  background: rgba(0,0,0,.04);
}
.lc-msg-quote:hover {
  background: rgba(0,0,0,.22);
}
[data-theme="light"] .lc-msg-quote:hover {
  background: rgba(0,0,0,.07);
}
.lc-quote-bar {
  width: 3px;
  flex-shrink: 0;
  border-radius: 2px;
  background: var(--purple, #7c3aed);
  min-height: 100%;
  align-self: stretch;
}
.lc-quote-content {
  min-width: 0;
  flex: 1;
}
.lc-quote-sender {
  font-size: 11px;
  font-weight: 600;
  color: var(--purple-light, #9d5cf5);
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lc-quote-text {
  font-size: 11px;
  color: var(--text-dim, rgba(255,255,255,.5));
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}
[data-theme="light"] .lc-quote-text {
  color: var(--text-dim, rgba(0,0,0,.5));
}
.lc-quote-media {
  font-style: italic;
  opacity: .7;
}

/* Context Menu (WhatsApp-style) */
.lc-context-menu {
  position: fixed;
  /* Menu di-render ke body; harus berada di atas popup (10001), bukan di belakangnya. */
  z-index: 10002;
  min-width: 130px;
  background: var(--surface, #1e1136);
  border: 1px solid var(--border, rgba(255,255,255,.1));
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  padding: 4px 0;
  animation: lcMenuIn .12s ease-out;
}
[data-theme="light"] .lc-context-menu {
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
@keyframes lcMenuIn {
  from { opacity: 0; transform: scale(.92) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.lc-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  background: none;
  border: none;
  color: var(--text, #f5f3fb);
  font-size: 12.5px;
  font-family: var(--font-body, 'Inter', sans-serif);
  cursor: pointer;
  text-align: left;
  transition: background .1s;
}
[data-theme="light"] .lc-menu-item {
  color: #1a1a2e;
}
.lc-menu-item:hover {
  background: var(--surface-2, rgba(255,255,255,.06));
}
[data-theme="light"] .lc-menu-item:hover {
  background: rgba(0,0,0,.04);
}
.lc-menu-danger {
  color: #f87171;
}
.lc-menu-danger:hover {
  background: rgba(248,113,113,.1);
}
.lc-menu-item:disabled { opacity:.45; cursor:not-allowed; }
.lc-reaction-picker { position:absolute; right:calc(100% + 6px); top:36px; white-space:nowrap; padding:7px 9px; border-radius:10px; background:var(--surface,#1e1136); border:1px solid var(--border,rgba(255,255,255,.1)); box-shadow:0 8px 24px rgba(0,0,0,.35); cursor:pointer; font-size:18px; letter-spacing:3px; }

/* Reply Preview (above composer) */
.lc-reply-preview {
  border-top: 1px solid var(--border, rgba(255,255,255,.08));
  background: var(--bg, #100821);
  padding: 8px 14px;
  flex-shrink: 0;
}
.lc-reply-preview-inner {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: stretch;
  background: var(--surface-2, rgba(255,255,255,.04));
  border-radius: 8px;
  padding: 8px 10px;
  max-height: 72px;
}
[data-theme="light"] .lc-reply-preview-inner {
  background: rgba(0,0,0,.04);
}
.lc-reply-preview-bar {
  width: 3px;
  flex-shrink: 0;
  border-radius: 2px;
  background: var(--purple, #7c3aed);
}
.lc-reply-preview-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.lc-reply-preview-sender {
  font-size: 11px;
  font-weight: 600;
  color: var(--purple-light, #9d5cf5);
  margin-bottom: 2px;
}
.lc-reply-preview-text {
  font-size: 11.5px;
  color: var(--text-dim, rgba(255,255,255,.45));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-theme="light"] .lc-reply-preview-text {
  color: var(--text-dim, rgba(0,0,0,.45));
}
.lc-reply-preview-close {
  background: none;
  border: none;
  color: var(--text-mute, rgba(255,255,255,.3));
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
  align-self: flex-start;
  line-height: 1;
  transition: color .15s;
}
[data-theme="light"] .lc-reply-preview-close {
  color: var(--text-mute, rgba(0,0,0,.3));
}
.lc-reply-preview-close:hover {
  color: var(--text, #f5f3fb);
}

/* Composer */
.lc-composer {
  padding: 10px 14px;
  background: var(--bg, #100821);
  border-top: 1px solid var(--border, rgba(255,255,255,.08));
  display: flex;
  align-items: flex-end;
  gap: 8px;
  box-shadow:0 -10px 30px rgba(0,0,0,.08);
  flex-shrink: 0;
}
.lc-composer-input {
  flex: 1;
  background: var(--surface, #1e1136);
  border: 1px solid var(--border, rgba(255,255,255,.1));
  border-radius: 20px;
  padding: 8px 14px;
  color: var(--text, #f5f3fb);
  font-size: 13px;
  resize: none;
  max-height: 80px;
  overflow-y: auto;
  scrollbar-width: none;
  outline: none;
  font-family: var(--font-body, 'Inter', sans-serif);
}
.lc-composer-input::-webkit-scrollbar { display: none; }
.lc-composer-input::placeholder {
  color: var(--text-mute, rgba(255,255,255,.3));
}
.lc-composer-input:focus {
  border-color: var(--purple, #7c3aed);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--purple,#7c3aed) 18%, transparent);
}
.lc-composer-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: filter .15s;
}
.lc-composer-btn:hover {
  filter: brightness(1.15);
}
.lc-composer-btn:disabled {
  opacity: .3;
  cursor: not-allowed;
  filter: none;
}
.lc-composer-attach {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border, rgba(255,255,255,.1));
  background: transparent;
  color: var(--text-dim, rgba(255,255,255,.4));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.lc-composer-attach:hover {
  background: var(--surface-2, rgba(255,255,255,.06));
}

.lc-attach-wrap {
  position: relative;
  flex-shrink: 0;
}
.lc-attach-wrap .lc-composer-attach {
  border: 1px solid var(--border, rgba(255,255,255,.1));
  background: transparent;
}
.lc-attach-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 214px;
  padding: 6px;
  background: var(--surface-2, #1e1136);
  border: 1px solid var(--border, rgba(255,255,255,.1));
  border-radius: 14px;
  box-shadow: 0 16px 40px -10px rgba(0,0,0,.6);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}
.lc-attach-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.lc-attach-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: none;
  background: none;
  border-radius: 9px;
  color: var(--text, #f5f3fb);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body, 'Inter', sans-serif);
  text-align: left;
  cursor: pointer;
  transition: background .15s ease;
}
.lc-attach-item:hover {
  background: rgba(255,255,255,.08);
}
.lc-attach-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lc-attach-doc .lc-attach-icon { background: rgba(139,92,246,.16); color: #a78bfa; }
.lc-attach-photo .lc-attach-icon { background: rgba(59,130,246,.16); color: #60a5fa; }
.lc-attach-camera .lc-attach-icon { background: rgba(236,72,153,.16); color: #f472b6; }
.lc-attach-audio .lc-attach-icon { background: rgba(249,115,22,.16); color: #fb923c; }

/* Voice Note (record + player) */
.lc-composer-mic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border, rgba(255,255,255,.1));
  background: transparent;
  color: var(--text-dim, rgba(255,255,255,.4));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.lc-composer-mic:hover {
  background: var(--surface-2, rgba(255,255,255,.06));
  color: var(--purple, #7c3aed);
}
.lc-rec-bar {
  flex: 1;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 8px;
  border-radius: 20px;
  background: var(--surface, #1e1136);
  border: 1px solid var(--border, rgba(255,255,255,.1));
  color: var(--text, #f5f3fb);
  font-size: 12px;
  min-width: 0;
}
.lc-rec-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
  animation: lcRecPulse 1.2s ease-in-out infinite;
}
@keyframes lcRecPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.8); }
}
.lc-rec-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 34px;
  flex-shrink: 0;
}
.lc-rec-hint {
  color: var(--text-mute, rgba(255,255,255,.3));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.lc-rec-spacer { flex: 1; }
.lc-rec-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: filter .15s;
}
.lc-rec-btn svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.lc-rec-cancel { background: rgba(239,68,68,.85); }
.lc-rec-send { background: #2563eb; }
.lc-rec-btn:hover { filter: brightness(1.15); }

.lc-voice {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 240px;
  min-width: 170px;
  padding: 6px 12px;
  border-radius: 14px;
  background: var(--surface-2, rgba(0,0,0,.22));
  cursor: pointer;
  user-select: none;
}
.lc-voice-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lc-voice-btn svg { width: 14px; height: 14px; fill: #fff; }
.lc-voice-btn:not(.is-playing) svg { transform: translateX(1px); }
.lc-voice-btn.is-playing svg { transform: none; }
.lc-voice-progress {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.16);
  overflow: hidden;
  min-width: 40px;
}
.lc-voice-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--purple, #8b5cf6);
  border-radius: 2px;
  transition: width .12s linear;
}
.lc-voice-time {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim, rgba(255,255,255,.55));
  flex-shrink: 0;
}

/* Inline Media Preview */
/* Media Editor (WhatsApp-style pre-send) */
.lc-media-editor {
  position: absolute; inset: 0; z-index: 50;
  background: var(--bg, #100821);
  display: flex; flex-direction: column;
}
.lc-media-main {
  flex: 1; position: relative; display: flex; align-items: center; justify-content: center;
  background: #0A0618; overflow: hidden; min-height: 0;
}
.lc-media-main img, .lc-media-main video {
  max-width: 100%; max-height: 100%; object-fit: contain; display: block;
}
.lc-media-close {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: rgba(0,0,0,.55); color: #fff; font-size: 16px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); transition: background .2s;
}
.lc-media-close:hover { background: rgba(239,68,68,.7); }
.lc-media-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(0,0,0,.45); color: #fff; font-size: 14px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); transition: background .2s;
}
.lc-media-nav:hover { background: rgba(0,0,0,.7); }
.lc-media-nav.prev { left: 10px; }
.lc-media-nav.next { right: 10px; }
.lc-media-counter {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px; backdrop-filter: blur(6px);
}
.lc-media-caption-bar {
  padding: 10px 14px; background: var(--surface, #1a1035); border-top: 1px solid var(--border, rgba(255,255,255,.08));
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.lc-media-caption-input {
  flex: 1; background: var(--bg-input, rgba(255,255,255,.06)); border: 1px solid var(--border, rgba(255,255,255,.08)); border-radius: 20px;
  padding: 8px 14px; color: var(--text, #f5f3fb); font-size: 13px; font-family: 'Poppins', sans-serif;
  outline: none; resize: none; max-height: 60px;
}
.lc-media-caption-input:focus { border-color: var(--purple, #7c3aed); }
.lc-media-caption-input::placeholder { color: var(--text-mute, rgba(255,255,255,.35)); }
.lc-media-thumbs {
  padding: 10px 14px; background: var(--surface, #1a1035); border-top: 1px solid var(--border, rgba(255,255,255,.08));
  display: flex; gap: 8px; align-items: center; overflow-x: auto; flex-shrink: 0;
  scrollbar-width: thin;
}
.lc-media-thumbs::-webkit-scrollbar { height: 4px; }
.lc-media-thumbs::-webkit-scrollbar-thumb { background: var(--purple, #7c3aed); border-radius: 4px; }
.lc-media-thumb {
  width: 56px; height: 56px; border-radius: 8px; flex-shrink: 0;
  overflow: hidden; position: relative; cursor: pointer;
  border: 2px solid transparent; transition: border-color .2s;
}
.lc-media-thumb.active { border-color: var(--purple, #7c3aed); }
.lc-media-thumb img, .lc-media-thumb video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.lc-media-thumb-remove {
  position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px; border-radius: 50%; border: none;
  background: rgba(0,0,0,.65); color: #fff; font-size: 10px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0; opacity: 0; transition: opacity .15s;
}
.lc-media-thumb:hover .lc-media-thumb-remove { opacity: 1; }
.lc-media-add {
  width: 56px; height: 56px; border-radius: 8px; flex-shrink: 0;
  border: 2px dashed var(--purple, #7c3aed); background: transparent;
  color: var(--purple, #7c3aed); font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; opacity: .6;
}
.lc-media-add:hover { opacity: 1; }
.lc-media-footer {
  padding: 10px 14px; background: var(--surface, #1a1035); border-top: 1px solid var(--border, rgba(255,255,255,.08));
  display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-shrink: 0;
}
.lc-media-send-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 20px; border-radius: 20px; border: none;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff; font-size: 13px; font-weight: 600; font-family: 'Poppins', sans-serif;
  cursor: pointer; transition: all .2s;
}
.lc-media-send-btn:hover { transform: translateY(-1px); filter: brightness(1.1); }
.lc-media-send-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.lc-media-send-count {
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(255,255,255,.25); font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Login Prompt */
.lc-login-prompt {
  padding: 40px 20px;
  text-align: center;
}
.lc-login-prompt h4 {
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: 16px;
  color: var(--text, #f5f3fb);
  margin-bottom: 8px;
}
.lc-login-prompt p {
  font-size: 13px;
  color: var(--text-dim, rgba(255,255,255,.5));
  margin-bottom: 16px;
}
.lc-login-btn {
  display: inline-block;
  padding: 10px 24px;
  background: #2563eb;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: filter .15s;
}
.lc-login-btn:hover {
  filter: brightness(1.15);
}

/* FAB Button */
.lc-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: transform .2s;
}
.lc-fab:hover {
  transform: scale(1.1);
}
.lc-fab > img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
  animation: lc-fab-wiggle 4.8s ease-in-out infinite;
}
@keyframes lc-fab-wiggle {
  0%, 91%, 100% { transform: rotate(0) translateX(0); }
  92% { transform: rotate(-5deg) translateX(-2px); }
  93% { transform: rotate(5deg) translateX(2px); }
  94% { transform: rotate(-4deg) translateX(-1px); }
  95% { transform: rotate(0) translateX(0); }
}
.lc-fab-greeting {
  position: fixed;
  z-index: 9998;
  right: 100px;
  bottom: 38px;
  max-width: min(220px, calc(100vw - 130px));
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 15px 15px 5px 15px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  box-shadow: 0 8px 24px rgba(20,15,55,.3);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  pointer-events: none;
  transform-origin: right bottom;
  animation: lc-greeting-pop .45s cubic-bezier(.2,.8,.25,1) both;
  transition: opacity .18s ease, transform .18s ease;
}
.lc-fab-greeting::after {
  content: '';
  position: absolute;
  right: -5px;
  bottom: 7px;
  width: 9px;
  height: 9px;
  border-right: 1px solid rgba(255,255,255,.14);
  border-bottom: 1px solid rgba(255,255,255,.14);
  background: #0b8fd8;
  transform: rotate(-45deg);
}
.lc-fab-greeting.is-changing {
  opacity: 0;
  transform: translateY(4px) scale(.96);
}
#lc-popup.active ~ #lc-fab-greeting {
  opacity: 0;
  transform: translateY(5px) scale(.96);
}
@keyframes lc-greeting-pop {
  from { opacity: 0; transform: translateY(8px) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 640px) {
  .lc-fab-greeting { right: 84px; bottom: 28px; padding: 9px 12px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .lc-fab > img { animation: none; }
  .lc-fab-greeting { animation: none; transition: none; }
}
.lc-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #f87171;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Empty State */
.lc-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-mute, rgba(255,255,255,.25));
  font-size: 13px;
}

/* Session Ended */
.lc-session-ended {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 28px;
  box-sizing: border-box;
}
.lc-ended-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,193,84,.14);
  border: 1px solid rgba(255,193,84,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffc154;
  margin-bottom: 18px;
}
.lc-ended-icon svg { width: 32px; height: 32px; }
.lc-ended-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary, #fff);
  margin-bottom: 8px;
}
.lc-ended-sub {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-mute, rgba(255,255,255,.55));
  max-width: 320px;
  margin-bottom: 22px;
}
.lc-new-session-btn {
  appearance: none;
  border: none;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 6px 16px rgba(37,99,235,.28);
}
.lc-new-session-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37,99,235,.36);
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .lc-popup {
    top: auto;
    right: 12px;
    bottom: 12px;
    width: min(440px, calc(100vw - 24px));
    height: min(760px, calc(100dvh - 24px), 88vh);
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
    transform: translateY(16px) scale(.985);
  }
  .lc-popup.active {
    transform: translateY(0) scale(1);
  }
  .lc-chat-header {
    padding: 12px;
  }
  .lc-fab {
    bottom: 16px;
    right: 16px;
    width: 58px;
    height: 58px;
  }
  .lc-panel-grid {
    gap: 8px;
    padding: 0 12px 12px;
  }
  .lc-game-card {
    padding: 10px;
    border-radius: 12px;
  }
  .lc-game-avatar {
    width: 42px;
    height: 42px;
    font-size: 13px;
  }
  .lc-game-name {
    font-size: 11.5px;
  }
  .lc-game-admin {
    font-size: 10.5px;
  }
  .lc-msg {
    max-width: 88%;
  }
  .lc-msg-anchor {
    opacity: 1;
  }
  .lc-context-menu {
    min-width: 120px;
  }
  .lc-media-close { width: 28px; height: 28px; font-size: 13px; top: 8px; left: 8px; }
  .lc-media-main { max-height: 50vh; }
  .lc-media-main img, .lc-media-main video { max-height: 50vh; }
  .lc-media-nav { width: 30px; height: 30px; font-size: 12px; }
  .lc-media-counter { font-size: 10px; padding: 3px 8px; top: 10px; right: 10px; }
  .lc-media-caption-bar { padding: 8px 10px; }
  .lc-media-caption-input { padding: 6px 12px; font-size: 12px; }
  .lc-media-thumbs { padding: 8px 10px; gap: 6px; }
  .lc-media-thumb { width: 44px; height: 44px; border-radius: 6px; }
  .lc-media-add { width: 44px; height: 44px; border-radius: 6px; font-size: 18px; }
  .lc-media-footer { padding: 8px 10px; }
  .lc-media-send-btn { padding: 6px 14px; font-size: 12px; }
  .lc-media-send-count { width: 18px; height: 18px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .lc-popup {
    transition: opacity .15s ease, visibility .15s;
  }
}
@media (max-width: 400px) {
  .lc-panel-grid {
    grid-template-columns: 1fr;
  }
  .lc-status-pill {
    display: none;
  }
}
@keyframes lcToastIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.lc-msg-loading {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px; padding: 10px 14px;
  min-width: 140px;
}
.lc-loading-thumb {
  font-size: 20px; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08); border-radius: 8px;
}
.lc-loading-spinner {
  display: flex; gap: 3px; align-items: center;
}
.lc-loading-spinner div {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,0.5);
  animation: lcDotBounce 1.2s infinite ease-in-out;
}
.lc-loading-spinner div:nth-child(2) { animation-delay: 0.15s; }
.lc-loading-spinner div:nth-child(3) { animation-delay: 0.3s; }
@keyframes lcDotBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}
.lc-msg-loading span {
  font-size: 11px; color: rgba(255,255,255,0.5);
  font-family: 'Poppins', sans-serif;
}

/* Guest Name Form */
.lc-name-form {
  padding: 40px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}
.lc-name-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: var(--purple, #7c3aed);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(124,58,237,.35);
}
.lc-name-title {
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text, #f5f3fb);
  margin-bottom: 6px;
}
.lc-name-sub {
  font-size: 13px;
  color: var(--text-dim, rgba(255,255,255,.5));
  margin-bottom: 20px;
}
.lc-name-input {
  width: 100%;
  max-width: 320px;
  padding: 12px 16px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  color: var(--text, #f5f3fb);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border, rgba(255,255,255,.12));
  border-radius: 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  margin-bottom: 12px;
}
.lc-name-input::placeholder { color: var(--text-mute, rgba(255,255,255,.4)); }
.lc-name-input:focus {
  border-color: var(--purple, #8b5cf6);
  box-shadow: 0 0 0 3px rgba(139,92,246,.2);
}
.lc-name-error {
  width: 100%;
  max-width: 320px;
  font-size: 12px;
  color: #f87171;
  text-align: left;
  margin-bottom: 10px;
}
.lc-name-btn {
  min-width: 160px;
  padding: 12px 28px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: filter .15s, transform .1s;
}
.lc-name-btn:hover { filter: brightness(1.12); }
.lc-name-btn:active { transform: scale(.98); }
[data-theme="light"] .lc-name-input {
  background: rgba(0,0,0,.04);
  color: #1f2430;
}
[data-theme="light"] .lc-name-sub {
  color: rgba(0,0,0,.55);
}

@media (max-width: 860px) {
  .lc-fab { bottom: calc(var(--mobile-nav-height, 68px) + 16px); }
  .lc-fab-greeting { bottom: calc(var(--mobile-nav-height, 68px) + 28px); }
  .lc-popup {
    top: auto;
    bottom: calc(var(--mobile-nav-height, 68px) + 12px);
    height: min(760px, calc(100dvh - var(--mobile-nav-height, 68px) - 24px));
    max-height: calc(100dvh - var(--mobile-nav-height, 68px) - 24px);
  }
  body:has(.gd-mobile-bar) .lc-fab { bottom: calc(var(--mobile-nav-height, 68px) + 82px); }
  body:has(.gd-mobile-bar) .lc-fab-greeting { bottom: calc(var(--mobile-nav-height, 68px) + 94px); }
  body:has(.mobile-menu.open) .lc-fab,
  body:has(.mobile-menu.open) .lc-fab-greeting { visibility: hidden; }
}
