/* ==============================================================================
   TELEGRAM DESKTOP (AYUGRAM THEME) - AUTHENTIC STYLING FROM SCREENSHOTS
   ============================================================================== */

:root {
  --bg-nav: #18222d;
  --bg-chat-list: #ffffff;
  --bg-chat-header: #ffffff;
  --bg-chat-wallpaper: #95c792;
  --bg-bubble-in: #ffffff;
  --bg-bubble-out: #eeffde;
  --bg-composer: #ffffff;
  --bg-panel: #f4f6f8;
  --bg-card: #ffffff;
  --border-light: #e3e6e9;

  --accent-blue: #2481cc;
  --accent-blue-hover: #3390ec;
  --star-gold: #f5a623;
  --star-gold-gradient: linear-gradient(135deg, #ffd700 0%, #ff9800 100%);

  --text-main: #111111;
  --text-muted: #707579;
  --text-time-in: #8c9094;
  --text-time-out: #4fae4e;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-width: 62px;
  --list-width: 290px;
  --panel-width: 370px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  width: 100%;
  height: 100%;
  height: var(--app-height, 100dvh);
  max-height: var(--app-height, 100dvh);
  overflow: hidden;
  background-color: #ffffff;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.4;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

input, textarea, button {
  font-family: inherit;
  font-size: inherit;
}

/* Telegram Slim Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.app-layout {
  display: flex;
  width: 100%;
  height: 100%;
  height: var(--app-height, 100dvh);
  max-height: var(--app-height, 100dvh);
  position: relative;
  overflow: hidden;
}

/* ==============================================================================
   1. EXTREME LEFT VERTICAL ICON STRIP (NAV BAR)
   ============================================================================== */

.left-icon-nav {
  width: var(--nav-width);
  min-width: var(--nav-width);
  background-color: var(--bg-nav);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  gap: 12px;
  z-index: 20;
}

.nav-icon-btn {
  background: transparent;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background-color 0.15s ease;
}
.nav-icon-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.nav-svg {
  width: 22px;
  height: 22px;
  fill: #8596a6;
  transition: fill 0.15s ease;
}
.nav-icon-btn:hover .nav-svg,
.nav-tab:hover .nav-svg,
.nav-tab.active .nav-svg {
  fill: #ffffff;
}

.nav-dot-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  background-color: #00c4b4;
  border-radius: 50%;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 6px 0;
  width: 100%;
}

.nav-tab-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-pill-badge {
  position: absolute;
  top: -4px;
  right: -10px;
  background: var(--accent-blue);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 9px;
}

.nav-tab-label {
  font-size: 10.5px;
  color: #8596a6;
  font-weight: 500;
}
.nav-tab.active .nav-tab-label {
  color: #ffffff;
}

/* ==============================================================================
   2. CHAT LIST COLUMN
   ============================================================================== */

.chat-list-column {
  width: var(--list-width);
  min-width: var(--list-width);
  background: var(--bg-chat-list);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.chat-list-header {
  height: 56px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #f1f1f1;
}

.search-input-pill {
  flex: 1;
  height: 36px;
  background: #f1f2f4;
  border-radius: 18px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
}

.search-icon-svg {
  width: 17px;
  height: 17px;
  fill: var(--text-muted);
}

.search-input-pill input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  width: 100%;
  font-size: 13.5px;
}
.search-input-pill input::placeholder {
  color: var(--text-muted);
}

.chat-list-scroll {
  flex: 1;
  overflow-y: auto;
}

.chat-row-item {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  gap: 12px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  position: relative;
}
.chat-row-item:hover {
  background-color: #f4f6f8;
}
.chat-row-item.active {
  background-color: #3390ec !important;
}

.avatar-round {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 17px;
  color: #ffffff;
  background: linear-gradient(135deg, #65aadd, #2b5278);
  overflow: hidden;
}
.avatar-round.color-0 { background: linear-gradient(135deg, #e17076, #ff885e); }
.avatar-round.color-1 { background: linear-gradient(135deg, #7bc862, #40a7e3); }
.avatar-round.color-2 { background: linear-gradient(135deg, #e57d55, #f5a623); }
.avatar-round.color-3 { background: linear-gradient(135deg, #65aadd, #2b5278); }
.avatar-round.color-4 { background: linear-gradient(135deg, #a695e7, #7b59ec); }
.avatar-round.color-5 { background: linear-gradient(135deg, #ee7aae, #c359ec); }

.chat-row-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chat-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.chat-row-name {
  font-weight: 500;
  font-size: 14.5px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-row-time {
  font-size: 12px;
  color: var(--text-muted);
}

.chat-row-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-row-preview {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-row-item.active .chat-row-name,
.chat-row-item.active .chat-row-time,
.chat-row-item.active .chat-row-preview {
  color: #ffffff !important;
}

.unread-count-pill {
  background: var(--accent-blue);
  color: #fff;
  border-radius: 12px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.chat-row-item.active .unread-count-pill {
  background: #ffffff;
  color: var(--accent-blue);
}

/* ==============================================================================
   3. MIDDLE COLUMN: ACTIVE CHAT VIEWPORT
   ============================================================================== */

.active-chat-column {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.no-chat-state {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #8bb886;
  background-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.08) 0%, transparent 70%);
}

.no-chat-badge {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  padding: 8px 18px;
  border-radius: 16px;
  color: #ffffff;
  font-size: 13.5px;
}

.chat-viewport {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  position: relative;
}

.chat-top-header {
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-chat-header);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
}

.chat-user-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.chat-user-meta .avatar-round {
  width: 40px;
  height: 40px;
  min-width: 40px;
  font-size: 15px;
}

.chat-meta-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-main);
}

.chat-meta-status {
  font-size: 12.5px;
  color: var(--text-muted);
}

.chat-header-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-action-icon {
  background: transparent;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.header-action-icon:hover {
  background-color: #f1f2f4;
}
.header-action-icon svg {
  width: 20px;
  height: 20px;
  fill: #707579;
}

.stars-counter-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(245, 166, 35, 0.4);
  color: #d48806;
  padding: 4px 11px;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  transition: transform 0.15s ease;
}
.stars-counter-pill:hover {
  transform: scale(1.04);
}

/* Chat Wallpaper & History */
.chat-history-scroll {
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  position: relative;
  overflow-y: scroll;
  overflow-x: hidden;
  background-color: #8cb887;
  display: block;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

.chat-history-scroll::-webkit-scrollbar {
  width: 6px;
}
.chat-history-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.chat-history-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 3px;
}
.chat-history-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.4);
}

.telegram-doodle-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0.18;
  background-image: radial-gradient(#ffffff 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 0;
}

.messages-stack {
  display: flex;
  flex-direction: column;
  padding: 16px 28px;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-height: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.messages-stack::before {
  content: "";
  display: block;
  margin-top: auto;
}

.date-separator-pill {
  align-self: center;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin: 8px 0;
}

/* BUBBLES MATCHING TELEGRAM DESKTOP */
.msg-bubble-wrap {
  display: flex;
  flex-direction: column;
  max-width: 540px;
  min-width: 60px;
}
.msg-bubble-wrap.incoming {
  align-self: flex-start;
  margin-left: 0;
}
.msg-bubble-wrap.outgoing {
  align-self: flex-end;
  margin-right: 0;
}
.msg-bubble-wrap.channel-post {
  align-self: flex-start;
  max-width: 680px;
  margin-left: 0;
}

.msg-bubble {
  position: relative;
  padding: 7px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.38;
  word-break: break-word;
  user-select: text;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
}

.msg-bubble.incoming,
.msg-bubble.channel-post {
  background-color: var(--bg-bubble-in);
  color: #000000;
  border-bottom-left-radius: 4px;
}

.msg-bubble.outgoing:not(.channel-post) {
  background-color: var(--bg-bubble-out);
  color: #000000;
  border-bottom-right-radius: 4px;
}

.msg-sender-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 2px;
}

.msg-meta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  float: right;
  margin-left: 8px;
  margin-top: 3px;
  font-size: 11px;
}

.msg-bubble.incoming .msg-meta { color: var(--text-time-in); }
.msg-bubble.outgoing .msg-meta { color: var(--text-time-out); font-weight: 600; }

/* TELEGRAM STAR GIFT CARD IN CHAT */
.pepe-gift-chat-card {
  width: 280px;
  border-radius: 14px;
  background: #ffffff;
  border: 1.5px solid rgba(255, 193, 7, 0.8);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.pepe-card-badge {
  background: var(--star-gold-gradient);
  color: #1a1500;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.pepe-card-img-wrap {
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.pepe-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pepe-card-title {
  font-weight: 700;
  font-size: 15.5px;
  color: #111;
}

.pepe-card-price {
  font-size: 13px;
  color: #e67e22;
  font-weight: 600;
  margin-bottom: 6px;
}

.pepe-card-msg {
  background: #f4f6f8;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: #333;
  margin-bottom: 8px;
  font-style: italic;
  width: 100%;
}

.pepe-card-btn {
  background: #3390ec;
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
}

/* Composer Bottom Bar */
.chat-bottom-composer {
  background: var(--bg-composer);
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  padding: 8px 24px;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  min-height: 52px;
  position: relative;
  z-index: 25;
}

.composer-main-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.composer-btn {
  background: transparent;
  border: none;
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}
.composer-btn svg {
  width: 22px;
  height: 22px;
  fill: #707579;
}
.composer-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}
.composer-btn:hover svg {
  fill: var(--accent-blue);
}

.composer-text-box {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  background: transparent;
}

#composer-textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  resize: none;
  font-size: 14.5px;
  line-height: 20px;
  max-height: 120px;
  padding: 8px 6px;
  box-sizing: border-box;
}
#composer-textarea::placeholder {
  color: #a2a8af;
}

.btn-send-plane {
  background: #3390ec !important;
  color: #ffffff;
}
.btn-send-plane svg {
  fill: #ffffff !important;
}
.btn-send-plane:hover {
  background: #2883db !important;
}

/* ==============================================================================
   4. RIGHT SLIDING PANEL (INFORMATION & GIFTS - SCREENSHOT 1 & 4)
   ============================================================================== */

.right-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--panel-width);
  background-color: var(--bg-panel);
  border-left: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1);
  z-index: 25;
}

.right-drawer-panel.open {
  transform: translateX(0);
}

.panel-header {
  height: 56px;
  background: #ffffff;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
  border-bottom: 1px solid var(--border-light);
}

.icon-btn-round {
  background: transparent;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn-round svg {
  width: 20px;
  height: 20px;
  fill: #707579;
}
.icon-btn-round:hover {
  background: #f1f2f4;
}

.panel-header-title {
  font-weight: 600;
  font-size: 16.5px;
  color: var(--text-main);
  flex: 1;
}

.panel-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-hero-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.profile-avatar-big {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e17076, #ff885e);
  color: #fff;
  font-size: 34px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.profile-meta-title {
  font-size: 17px;
  font-weight: 600;
  color: #000;
}

.profile-meta-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.info-card-block {
  background: #ffffff;
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.info-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f4f6f8;
}
.info-line:last-child { border-bottom: none; }

.info-line-icon {
  font-size: 16px;
  width: 24px;
  text-align: center;
  color: var(--text-muted);
}

.info-line-val {
  font-size: 14px;
  color: #000;
  font-weight: 500;
  user-select: text;
}

.info-line-lbl {
  font-size: 11.5px;
  color: var(--text-muted);
}

.profile-stars-box {
  background: #ffffff;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.stars-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}

.stars-box-val {
  color: #e67e22;
  font-weight: 700;
}

.tg-btn-gold {
  width: 100%;
  background: var(--star-gold-gradient);
  border: none;
  color: #1a1500;
  font-weight: 700;
  padding: 9px;
  border-radius: 8px;
  cursor: pointer;
}

.tg-btn-primary {
  background: #3390ec;
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
}
.tg-btn-primary:hover {
  background: #2481cc;
}

/* ==============================================================================
   3-COLUMN TELEGRAM GIFTS GRID (EXACTLY MATCHING SCREENSHOT 1 & 4)
   ============================================================================== */

.gifts-section-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gifts-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.gifts-title-text {
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.gifts-counter-tag {
  background: #e2e5e8;
  color: #555;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.tg-gift-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}

.tg-gift-tile {
  background: #ffffff;
  border-radius: 16px;
  aspect-ratio: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  overflow: hidden;
}

.tg-gift-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14);
}

.gift-pepe-backdrop {
  position: absolute;
  width: 72%;
  height: 72%;
  border-radius: 50%;
  z-index: 1;
  transition: transform 0.2s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
}
.tg-gift-tile:hover .gift-pepe-backdrop {
  transform: scale(1.08);
}

.gift-tile-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  z-index: 3;
}

.gift-tile-badge.anon-badge {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
}

.gift-tile-img {
  width: 74%;
  height: 74%;
  object-fit: contain;
  transition: transform 0.2s ease;
  position: relative;
  z-index: 2;
}
.tg-gift-tile:hover .gift-tile-img {
  transform: scale(1.1);
}

.gift-tile-col-tag {
  position: absolute;
  bottom: 5px;
  right: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #555;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  padding: 1px 5px;
  border-radius: 4px;
  z-index: 3;
}

.gift-tile-badge-hidden {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(30, 30, 30, 0.8);
  color: #fff;
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 8px;
  z-index: 4;
  backdrop-filter: blur(4px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  letter-spacing: 0.2px;
}

.tg-gift-tile.gift-tile-is-hidden {
  opacity: 0.65;
  border: 1px dashed rgba(0, 0, 0, 0.25);
}

.inspect-pepe-bg-circle {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* ==============================================================================
   5. HAMBURGER MENU & MULTI-ACCOUNT (MATCHING SCREENSHOT 2)
   ============================================================================== */

.hamburger-drawer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 290px;
  background: #ffffff;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.15);
}
.hamburger-drawer.open {
  transform: translateX(0);
}

.drawer-shade {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 990;
  display: none;
}
.drawer-shade.active { display: block; }

.menu-user-summary {
  padding: 16px;
  background: #ffffff;
  border-bottom: 1px solid #f1f1f1;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.menu-avatar {
  width: 50px;
  height: 50px;
  font-size: 20px;
}

.menu-user-details {
  flex: 1;
}

.menu-user-name {
  font-size: 16px;
  font-weight: 600;
  color: #000;
}

.menu-user-role-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.menu-user-role-text {
  font-size: 12.5px;
  color: var(--accent-blue);
}

.chevron-arrow {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.menu-user-summary.open .chevron-arrow {
  transform: rotate(180deg);
}

/* Dropdown list of accounts */
.accounts-dropdown-box {
  background: #f7f9fa;
  border-bottom: 1px solid #e9ecef;
  padding: 6px 0;
  display: flex;
  flex-direction: column;
}

.account-row-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  gap: 12px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.account-row-item:hover {
  background-color: #edf1f4;
}
.account-row-item.active {
  background-color: #e3effa;
}

.account-row-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}

.account-row-name {
  font-size: 13.5px;
  font-weight: 500;
  color: #000;
  flex: 1;
}

.account-active-badge {
  color: var(--accent-blue);
  font-weight: bold;
}

.add-account-row {
  border-top: 1px solid #e5e9ec;
  margin-top: 4px;
  padding-top: 8px;
}

.add-account-circle-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e1f0fa;
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
}

.menu-nav-links {
  padding: 10px 0;
  display: flex;
  flex-direction: column;
}

.menu-nav-item {
  display: flex;
  align-items: center;
  padding: 11px 20px;
  gap: 16px;
  font-size: 14px;
  color: #111;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.menu-nav-item:hover {
  background-color: #f4f6f8;
}

.menu-nav-icon {
  font-size: 17px;
  width: 22px;
}

.menu-pill-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-blue);
}
.menu-pill-count.gold {
  color: #e67e22;
}

.menu-separator {
  height: 1px;
  background: #f1f2f4;
  margin: 6px 0;
}

.logout-link {
  color: #e53935;
}

/* ==============================================================================
   MODALS
   ============================================================================== */

.modal-dim-wrap {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2500;
}

.modal-box {
  background: #ffffff;
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gallery-top-bar {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid #f1f1f1;
  gap: 10px;
}

.gallery-title {
  font-weight: 600;
  font-size: 16.5px;
  color: #000;
  flex: 1;
}

.gallery-scroll-area {
  padding: 16px;
  max-height: 520px;
  overflow-y: auto;
}

/* Send Gift Modal */
.gift-send-body,
.gift-inspect-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.inspect-pepe-stage {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.inspect-pepe-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.inspect-pepe-pill {
  position: absolute;
  bottom: 0;
  background: var(--star-gold-gradient);
  color: #1a1500;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.inspect-title {
  font-size: 18px;
  font-weight: 700;
  color: #000;
  margin-bottom: 4px;
}

.inspect-stars-tag {
  color: #e67e22;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 12px;
}

.inspect-info-list {
  background: #f7f9fa;
  border-radius: 10px;
  padding: 12px;
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.inspect-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.inspect-lbl { color: var(--text-muted); }
.inspect-val { font-weight: 500; color: #000; }
.inspect-val.italic { font-style: italic; color: #555; }

.inspect-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-gift-action-hide {
  width: 100%;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #333;
  font-weight: 600;
  padding: 9px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.16s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13.5px;
}

.btn-gift-action-hide:hover {
  background: rgba(0, 0, 0, 0.08);
}

.btn-gift-action-hide.unhide {
  background: rgba(51, 144, 236, 0.1);
  border-color: rgba(51, 144, 236, 0.28);
  color: #2481cc;
}

.btn-gift-action-hide.unhide:hover {
  background: rgba(51, 144, 236, 0.18);
}

.send-input-block {
  width: 100%;
  text-align: left;
  margin-bottom: 12px;
}
.send-input-block label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: block;
}
.send-input-block input {
  width: 100%;
  background: #f1f2f4;
  border: 1px solid #e0e4e8;
  border-radius: 8px;
  padding: 9px 12px;
  outline: none;
}

.custom-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-bottom: 16px;
  font-size: 13px;
  color: #333;
}
.custom-checkbox-row input { display: none; }
.checkbox-box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #f1f2f4;
  border: 1.5px solid #c0c4c8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.custom-checkbox-row input:checked + .checkbox-box {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}
.custom-checkbox-row input:checked + .checkbox-box::after {
  content: "✓";
  color: #fff;
  font-weight: bold;
}

/* Stars Shop Modal */
.stars-shop-body {
  padding: 16px;
}

.shop-hero-badge {
  text-align: center;
  margin-bottom: 16px;
}

.shop-star-glyph { font-size: 34px; }
.shop-title-text { font-size: 17px; font-weight: 700; color: #000; }
.shop-sub-text { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }

.shop-grid-packs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.pack-card-tile {
  background: #f7f9fa;
  border: 1.5px solid #e5e9ec;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}
.pack-card-tile:hover {
  border-color: #f5a623;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.15);
}

.pack-card-tile.featured-pack {
  border-color: #f5a623;
  background: #fffdf8;
}

.featured-ribbon {
  position: absolute;
  top: -8px;
  background: var(--star-gold-gradient);
  color: #1a1500;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 8px;
}

.pack-stars-amount {
  font-size: 16.5px;
  font-weight: 700;
  color: #e67e22;
  margin-bottom: 8px;
}

.pack-price-tag {
  background: var(--accent-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  width: 100%;
  text-align: center;
}

/* User Search */
.search-modal-content {
  padding: 16px;
}
.clean-search-input {
  width: 100%;
  background: #f1f2f4;
  border: 1px solid #e0e4e8;
  border-radius: 8px;
  padding: 9px 12px;
  outline: none;
}
.users-found-list {
  max-height: 260px;
  overflow-y: auto;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.user-search-row {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  gap: 10px;
  cursor: pointer;
}
.user-search-row:hover { background: #f1f2f4; }

.quick-chips-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.pill-chip-btn {
  background: #e9ecef;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

/* Auth Full Screen */
.auth-full-screen {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.auth-center-dialog {
  width: 90%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}
.auth-round-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #2481cc;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.auth-round-logo svg {
  width: 44px;
  height: 44px;
  fill: #fff;
}
.auth-heading { font-size: 22px; font-weight: 600; margin-bottom: 6px; }
.auth-sub-heading { font-size: 13.5px; color: var(--text-muted); margin-bottom: 22px; }

.auth-flow-step {
  width: 100%;
  display: flex;
  flex-direction: column;
}
.auth-input-field {
  width: 100%;
  margin-bottom: 16px;
}
.auth-input-field input {
  width: 100%;
  background: #f1f2f4;
  border: 1.5px solid transparent;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  outline: none;
}
.auth-input-field input:focus { border-color: var(--accent-blue); }

.auth-submit-btn { width: 100%; padding: 12px; font-size: 14.5px; }

.auth-target-email-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13.5px;
}
.text-link-btn {
  background: none;
  border: none;
  color: var(--accent-blue);
  cursor: pointer;
  text-decoration: underline;
}

.auth-dismiss-btn {
  position: absolute;
  top: -12px;
  right: 0;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
}

.auth-server-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f2f4;
  border: 1px solid #e0e4e8;
  padding: 8px 14px;
  border-radius: 20px;
  margin-top: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 12px;
}
.auth-server-bar:hover {
  background: #e9ecef;
  border-color: #ced4da;
  transform: translateY(-1px);
}

.server-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5252;
}
.server-status-dot.connected {
  background: #4cd137;
  box-shadow: 0 0 6px rgba(76, 209, 55, 0.6);
}

.server-status-text {
  font-weight: 500;
  color: #333;
}
.server-status-change {
  color: var(--accent-blue);
  font-weight: 600;
  margin-left: 4px;
}

.auth-alert-error {
  margin-top: 14px;
  background: #ffebee;
  border: 1px solid #ef9a9a;
  color: #c62828;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  width: 100%;
}

.tg-floating-toast {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 9px 18px;
  border-radius: 18px;
  font-size: 13px;
  z-index: 200;
}

/* ==============================================================================
   ATTACHMENTS & MEDIA STYLES (IMAGES, VIDEOS, AUDIO, FILES)
   ============================================================================== */
.chat-media-wrap {
  margin: 4px 0;
  border-radius: 8px;
  overflow: hidden;
  max-width: 360px;
}

.chat-media-img {
  max-width: 100%;
  max-height: 320px;
  border-radius: 8px;
  display: block;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
  object-fit: cover;
}
.chat-media-img:hover {
  filter: brightness(0.96);
  transform: scale(1.01);
}

.chat-media-video {
  max-width: 100%;
  max-height: 320px;
  border-radius: 8px;
  display: block;
  background: #000;
}

.chat-media-audio {
  width: 100%;
  min-width: 240px;
  margin-top: 4px;
}

.chat-file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
  color: inherit;
  margin: 4px 0;
  max-width: 320px;
}
.chat-file-card:hover {
  background: rgba(0, 0, 0, 0.09);
}
.outgoing .chat-file-card {
  background: rgba(255, 255, 255, 0.18);
}
.outgoing .chat-file-card:hover {
  background: rgba(255, 255, 255, 0.28);
}

.chat-file-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

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

.chat-file-name {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-file-size {
  font-size: 11.5px;
  opacity: 0.75;
}

.chat-file-download {
  margin-left: auto;
  font-size: 16px;
  opacity: 0.8;
}

/* Global search sections in sidebar */
.search-section-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 16px 4px 16px;
  letter-spacing: 0.5px;
}

/* Lightbox preview for full images */
.media-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  cursor: zoom-out;
}
.media-lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  cursor: default;
}
.media-lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}

/* Channel read-only bar */
.channel-readonly-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.2px;
}

/* Sticker & Emoji Popover */
.sticker-popover-box {
  position: absolute;
  bottom: 68px;
  right: 18px;
  width: 340px;
  height: 380px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  backdrop-filter: blur(16px);
}
.sticker-popover-tabs {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0,0,0,0.15);
}
.sticker-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sticker-tab-btn.active {
  background: var(--tg-primary);
  color: #fff;
}
.sticker-popover-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
}
.sticker-popover-close:hover {
  color: var(--text-primary);
}
.sticker-popover-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}
.sticker-section-caption {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.stickers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.sticker-grid-item {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255,255,255,0.03);
  transition: transform 0.12s ease, background 0.12s ease;
}
.sticker-grid-item:hover {
  transform: scale(1.12);
  background: rgba(255,255,255,0.08);
}
.sticker-grid-item img {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
  border-radius: 6px;
}
.sticker-grid-item .sticker-emoji-glyph {
  font-size: 34px;
}
.emojis-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}
.emoji-grid-item {
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.1s ease;
}
.emoji-grid-item:hover {
  transform: scale(1.25);
  background: rgba(255,255,255,0.08);
}

/* Chat sticker message display */
.chat-sticker-wrap {
  display: inline-block;
  padding: 4px;
  background: transparent !important;
}
.chat-sticker-img {
  max-width: 180px;
  max-height: 180px;
  border-radius: 12px;
  display: block;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.chat-sticker-emoji {
  font-size: 64px;
  line-height: 1;
  display: block;
}

/* Gift Picker Pills inside Send Gift Modal */
.gift-picker-pills {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.gift-picker-pill {
  flex: 1;
  padding: 8px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  text-align: center;
}
.gift-picker-pill:hover {
  background: rgba(255,255,255,0.08);
}
.gift-picker-pill.active {
  background: linear-gradient(135deg, #ffd700, #ff9f43);
  color: #1a1500;
  border-color: #ffd700;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.35);
}

.msg-checkmarks {
  display: inline-block;
  margin-left: 3px;
  font-size: 11px;
  letter-spacing: -1px;
  color: #4fae4e;
}

/* ==============================================================================
   SETTINGS MODAL & ACTIVE DEVICES
   ============================================================================== */

.settings-modal-box {
  width: 580px;
  max-width: 95vw;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
}

.settings-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f2f4;
}

.settings-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #111418;
}

.settings-body-layout {
  display: flex;
  min-height: 380px;
}

.settings-nav-sidebar {
  width: 170px;
  border-right: 1px solid #f1f2f4;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #f9fbfd;
}

.settings-tab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: #707579;
  transition: all 0.15s ease;
}

.settings-tab-btn:hover {
  background: rgba(0,0,0,0.05);
  color: #111418;
}

.settings-tab-btn.active {
  background: #3390ec;
  color: #ffffff;
}

.settings-tab-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  max-height: 480px;
}

.settings-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #111418;
  margin-bottom: 4px;
}

.settings-section-subtitle {
  font-size: 12.5px;
  color: #707579;
  margin-bottom: 16px;
  line-height: 1.4;
}

.devices-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.device-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #eef0f3;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.device-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #e8f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.device-info {
  flex: 1;
  min-width: 0;
}

.device-title {
  font-size: 14px;
  font-weight: 600;
  color: #111418;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.device-current-badge {
  font-size: 11px;
  font-weight: 700;
  color: #2b8830;
  background: rgba(43, 136, 48, 0.12);
  padding: 2px 7px;
  border-radius: 10px;
}

.device-geo {
  font-size: 12.5px;
  color: #707579;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.terminate-sessions-wrap {
  padding-top: 10px;
  border-top: 1px solid #f1f2f4;
}

.btn-terminate-sessions {
  width: 100%;
  padding: 10px 16px;
  background: #fff1f0;
  border: 1px solid #ffa39e;
  color: #cf1322;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-terminate-sessions:hover {
  background: #ffccc7;
}

.settings-info-card {
  background: #f9fbfd;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
}
.settings-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Stars Top-Up Modal */
.stars-topup-box {
  width: 440px;
  max-width: 95vw;
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

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

.stars-topup-title {
  font-size: 18px;
  font-weight: 700;
  color: #d48806;
}

.stars-topup-desc {
  font-size: 13px;
  color: #707579;
  margin-bottom: 20px;
}

.stars-topup-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stars-pack-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid #ffd591;
  background: #fffbe6;
  cursor: pointer;
  transition: all 0.15s ease;
}

.stars-pack-btn:hover {
  background: #ffe58f;
  transform: translateY(-1px);
}

.pack-stars {
  font-size: 16px;
  font-weight: 700;
  color: #d48806;
}

.pack-name {
  font-size: 12.5px;
  color: #8c6b1f;
}

/* ==============================================================================
   MESSAGE ACTIONS (EDIT & DELETE) & PROFILE EDIT & REDESIGNED GIFTS
   ============================================================================== */
.msg-bubble-wrap {
  position: relative;
}
.msg-actions-popup {
  position: absolute;
  top: -12px;
  right: 12px;
  display: none;
  background: #ffffff;
  border: 1px solid #dfe1e5;
  border-radius: 20px;
  padding: 2px 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 10;
  gap: 4px;
}
.msg-bubble-wrap.incoming .msg-actions-popup {
  left: 12px;
  right: auto;
}
.msg-bubble-wrap:hover .msg-actions-popup {
  display: flex;
  align-items: center;
}
.msg-action-btn {
  background: none;
  border: none;
  font-size: 13px;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s ease;
  line-height: 1;
}
.msg-action-btn:hover {
  background: #f0f2f5;
  transform: scale(1.15);
}
.msg-edited-tag {
  font-size: 10.5px;
  opacity: 0.75;
  margin-right: 4px;
  font-style: italic;
}

/* Composer Editing Message Bar */
.composer-action-bar {
  display: flex;
  align-items: center;
  background: #f4f6f8;
  border-top: 1px solid #e1e4e8;
  padding: 6px 14px;
  gap: 10px;
  font-size: 12.5px;
}
.editing-bar-icon {
  font-size: 16px;
}
.editing-bar-content {
  flex: 1;
  min-width: 0;
}
.editing-bar-title {
  font-weight: 600;
  color: var(--tg-primary);
  font-size: 12px;
}
.editing-bar-text {
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}
.editing-bar-cancel {
  background: none;
  border: none;
  font-size: 16px;
  color: #888;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 50%;
}
.editing-bar-cancel:hover {
  color: #111;
  background: #e2e5e9;
}

/* Edit Profile Settings Tab */
.settings-edit-profile-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}
.settings-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.settings-field-label {
  font-size: 13px;
  font-weight: 600;
  color: #222;
}
.settings-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  background: #fafbfc;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.settings-input:focus {
  border-color: var(--tg-primary);
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(43, 130, 246, 0.2);
}
.settings-username-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.username-at-prefix {
  position: absolute;
  left: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #8c8c8c;
}
.settings-username-input-wrap .settings-input {
  padding-left: 30px;
}
.settings-field-hint {
  font-size: 11.5px;
  color: #8c8c8c;
  margin-top: 2px;
}

/* Redesigned Gift Modal */
.gift-recipient-toggle {
  display: flex;
  background: #f0f2f5;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 14px;
  gap: 4px;
}
.gift-toggle-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all 0.15s ease;
}
.gift-toggle-btn.active {
  background: #ffffff;
  color: #111;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.gift-recipient-box {
  background: #f7f9fa;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gift-recipient-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #444;
}
.gift-recipient-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.recipient-at {
  position: absolute;
  left: 12px;
  font-size: 14px;
  color: #888;
  font-weight: 600;
}
.gift-recipient-input-wrap input {
  width: 100%;
  padding: 9px 12px 9px 28px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 13.5px;
  background: #ffffff;
  box-sizing: border-box;
}
.gift-recipient-input-wrap input:focus {
  border-color: var(--tg-primary);
  outline: none;
}
.recipient-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.recipient-chip-btn {
  background: #eef2f6;
  border: 1px solid #dbe2ea;
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.15s ease;
}
.recipient-chip-btn:hover, .recipient-chip-btn.active {
  background: var(--tg-primary);
  color: #ffffff;
  border-color: var(--tg-primary);
}

/* ==============================================================================
   MOBILE RESPONSIVE & CHANNEL EXTENSIONS
   ============================================================================== */

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.mobile-back-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  fill: var(--text-muted);
  color: var(--text-muted);
  padding: 0;
  margin-right: 4px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  z-index: 20;
}
.mobile-back-btn:hover,
.mobile-back-btn:active {
  background: rgba(0, 0, 0, 0.08);
  fill: var(--text-main);
  color: var(--text-main);
}
.mobile-back-btn svg {
  width: 24px;
  height: 24px;
  pointer-events: none;
  fill: currentColor;
}

.mobile-hamburger-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  fill: var(--text-muted);
  margin-right: 6px;
}
.mobile-hamburger-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  fill: var(--text-main);
}
.mobile-hamburger-btn svg {
  width: 22px;
  height: 22px;
}

/* Channel Header Subscribe Button */
.channel-header-sub-btn {
  padding: 6px 14px;
  border-radius: 16px;
  background: var(--accent-blue);
  color: #ffffff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.channel-header-sub-btn:hover {
  background: var(--accent-blue-hover);
}
.channel-header-sub-btn.subscribed {
  background: #f1f2f4;
  color: var(--text-main);
}

/* Channel Bottom Action Bar (when regular user views channel) */
.channel-action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 0 16px;
}
.channel-action-btn {
  width: 100%;
  max-width: 360px;
  height: 40px;
  background: var(--accent-blue);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}
.channel-action-btn:hover {
  background: var(--accent-blue-hover);
}
.channel-action-btn.subscribed {
  background: #eef2f6;
  color: #2b3948;
}

/* Channel Members Modal */
.channel-members-box {
  width: 90%;
  max-width: 440px;
  max-height: 80vh;
}
.channel-members-body {
  padding: 12px;
  overflow-y: auto;
  max-height: 460px;
}
.channel-members-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.channel-member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.15s;
}
.channel-member-row:hover {
  background: #f4f6f8;
}
.channel-member-info {
  flex: 1;
  min-width: 0;
}
.channel-member-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.channel-member-user {
  font-size: 12px;
  color: var(--text-muted);
}
.channel-member-date {
  font-size: 11.5px;
  color: #999;
}

/* ==============================================================================
   RESPONSIVE DESIGN & MOBILE ORIENTATION SUPPORT
   ============================================================================== */

/* Mobile view: Phones in portrait/landscape, and tablets <= 768px */
@media (max-width: 768px), (max-height: 520px) and (orientation: landscape) {
  :root {
    --nav-width: 0px;
    --list-width: 100%;
    --panel-width: 100%;
  }

  .left-icon-nav {
    display: none !important;
  }

  .mobile-hamburger-btn {
    display: inline-flex !important;
  }

  .chat-list-column {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }

  .active-chat-column {
    display: none !important;
    width: 100% !important;
    min-width: 100% !important;
  }

  body.mobile-chat-open {
    overflow: hidden !important;
    width: 100% !important;
    height: 100% !important;
    height: var(--app-height, 100dvh) !important;
  }

  body.mobile-chat-open .chat-list-column {
    display: none !important;
  }

  body.mobile-chat-open .active-chat-column {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 100% !important;
    height: 100% !important;
    height: var(--app-height, 100dvh) !important;
    max-height: 100% !important;
    position: relative !important;
    overflow: hidden !important;
  }

  /* Hide large stars pill on mobile chat header to prevent squishing header texts */
  .chat-header-icons #btn-stars-pill {
    display: none !important;
  }

  .chat-top-header {
    padding: 0 10px !important;
  }

  .chat-header-left {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
    gap: 6px !important;
  }

  .chat-user-meta {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
    gap: 8px !important;
  }

  .chat-meta-texts {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
    max-width: none !important;
  }

  .chat-meta-name {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 14.5px !important;
  }

  .chat-meta-status {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 11.5px !important;
  }

  body.mobile-chat-open .mobile-back-btn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    flex-shrink: 0 !important;
    margin-right: 2px !important;
    z-index: 100 !important;
  }

  .messages-stack {
    padding: 12px 14px !important;
  }

  .msg-bubble-wrap {
    max-width: 86% !important;
  }

  .chat-bottom-composer {
    padding: 6px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    flex-shrink: 0 !important;
    min-height: 52px !important;
    background: #ffffff !important;
    border-top: 1px solid var(--border-light, #e3e6e9) !important;
    position: relative !important;
    bottom: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    z-index: 30 !important;
  }

  .composer-main-row {
    gap: 8px !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
  }

  .composer-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
  }

  #composer-textarea {
    font-size: 15px !important;
    padding: 6px 8px !important;
  }

  .modal-box {
    width: 95% !important;
    max-width: 95% !important;
    border-radius: 14px !important;
    max-height: 92vh !important;
  }

  .gifts-gallery-box {
    width: 96% !important;
    max-width: 96% !important;
  }

  .tg-gift-grid-3col {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}

/* Desktop & Laptop Screens (> 768px width AND > 520px height) */
@media (min-width: 769px) and (min-height: 521px) {
  .left-icon-nav {
    width: var(--nav-width) !important;
    min-width: var(--nav-width) !important;
    display: flex !important;
  }

  .chat-list-column {
    width: var(--list-width) !important;
    min-width: var(--list-width) !important;
    display: flex !important;
  }

  .active-chat-column {
    display: flex !important;
    flex: 1 !important;
  }

  .mobile-back-btn {
    display: none !important;
  }

  .mobile-hamburger-btn {
    display: none !important;
  }
}

/* ==============================================================================
   CREATE CHAT MODAL & DEVICE SESSIONS STYLES
   ============================================================================== */

.create-chat-box {
  width: 92%;
  max-width: 460px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.22);
  overflow: hidden;
}

.create-chat-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.create-chat-avatar-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
}

.create-chat-avatar-preview {
  width: 64px;
  height: 64px;
  min-width: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
  background-size: cover;
  background-position: center;
}

.create-chat-avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-chat-upload-avatar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-chat-upload-avatar:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.avatar-hint {
  font-size: 11.5px;
  color: #94a3b8;
}

.form-group-tg {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label-tg {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.form-input-tg {
  width: 100%;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  color: #0f172a;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.form-input-tg:focus {
  border-color: #3b82f6;
  background: #ffffff;
}

.input-at-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-at-prefix {
  position: absolute;
  left: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #94a3b8;
  pointer-events: none;
}

.input-at {
  padding-left: 28px !important;
}

.form-hint-tg {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.35;
}

.create-chat-buttons {
  margin-top: 8px;
}

.btn-create-chat-submit {
  width: 100%;
  padding: 12px;
  background: var(--accent-blue, #2481cc);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-create-chat-submit:hover {
  background: var(--accent-blue-hover, #3390ec);
}

.btn-terminate-dev {
  background: transparent;
  border: 1px solid #ffa39e;
  color: #cf1322;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-terminate-dev:hover {
  background: #fff1f0;
}

/* Toggle Hide Gifts in Profile */
.btn-toggle-hide-gifts {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #f1f4f8;
  border: 1px solid #d0d7de;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-toggle-hide-gifts:hover {
  background: #e2e8f0;
}

.btn-toggle-hide-gifts.hidden-active {
  background: #fff1f0;
  border-color: #ffa39e;
  color: #cf1322;
}

.gifts-hidden-notice {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  text-align: center;
  background: #ffffff;
  border-radius: 12px;
  border: 1.5px dashed #cbd5e1;
  color: #64748b;
  margin: 8px 0;
}

.hidden-lock-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.hidden-title {
  font-weight: 600;
  font-size: 14px;
  color: #1e293b;
  margin-bottom: 4px;
}

.hidden-desc {
  font-size: 12px;
  color: #64748b;
  max-width: 240px;
  line-height: 1.35;
}

/* ==============================================================================
   CALLS SYSTEM: TELEGRAM-STYLE AUDIO & VIDEO CALLS
   ============================================================================== */

.call-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 15, 29, 0.92);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInCall 0.25s ease-out;
}

@keyframes fadeInCall {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.call-container {
  position: relative;
  width: 90%;
  max-width: 440px;
  height: 600px;
  max-height: 90vh;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 40px 24px 32px;
  overflow: hidden;
  color: #ffffff;
}

.call-video-wrap {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 1;
  background: #000;
}

.call-remote-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.call-local-video {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 110px;
  height: 160px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 2;
  background: #111;
}

.call-user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 2;
  margin-top: 20px;
}

.call-avatar-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.call-avatar-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(51, 144, 236, 0.3);
  animation: callPulse 1.8s infinite ease-out;
}

@keyframes callPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.35); opacity: 0.2; }
  100% { transform: scale(1.6); opacity: 0; }
}

.call-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3390ec, #1a6cb3);
  color: #fff;
  font-size: 44px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.call-peer-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.call-peer-handle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 12px;
}

.call-status {
  font-size: 14.5px;
  color: #60a5fa;
  font-weight: 500;
}

.call-timer {
  font-size: 16px;
  color: #4ade80;
  font-weight: 600;
  letter-spacing: 1px;
}

.call-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 3;
  width: 100%;
  margin-bottom: 10px;
}

.call-ctrl-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.call-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.call-ctrl-btn.active-off {
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
}

.call-ctrl-btn.call-hangup-btn {
  width: 64px;
  height: 64px;
  background: #ef4444;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.45);
}

.call-ctrl-btn.call-hangup-btn:hover {
  background: #dc2626;
  transform: scale(1.06);
}

.ctrl-svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

/* Incoming Call Banner Dialog */
.incoming-call-dialog {
  position: fixed;
  top: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 16px 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(51, 144, 236, 0.25);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 2100;
  color: #fff;
  animation: slideInDown 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes slideInDown {
  from { transform: translateY(-40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.incoming-call-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #3390ec;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.incoming-call-info {
  display: flex;
  flex-direction: column;
}

.incoming-call-name {
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
}

.incoming-call-sub {
  font-size: 12.5px;
  color: #94a3b8;
}

.incoming-call-actions {
  display: flex;
  gap: 10px;
  margin-left: 8px;
}

.btn-incoming-accept {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #22c55e;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
  transition: transform 0.16s ease, background 0.16s ease;
}

.btn-incoming-accept:hover {
  background: #16a34a;
  transform: scale(1.08);
}

.btn-incoming-accept svg,
.btn-incoming-decline svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.btn-incoming-decline {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #ef4444;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
  transition: transform 0.16s ease, background 0.16s ease;
}

.btn-incoming-decline:hover {
  background: #dc2626;
  transform: scale(1.08);
}

@media (max-width: 600px) {
  .incoming-call-dialog {
    top: 16px;
    left: 16px;
    right: 16px;
  }
}

/* Call Window Top Header (Minimize & E2EE Emojis) */
.call-top-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 4;
  margin-bottom: 8px;
}

.call-top-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s ease;
}
.call-top-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}
.call-top-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.call-encryption-emojis {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5px 12px;
  border-radius: 16px;
  cursor: default;
  user-select: none;
}
.enc-emoji {
  font-size: 17px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
  transition: transform 0.15s ease;
}
.enc-emoji:hover {
  transform: scale(1.2);
}

.call-top-spacer {
  width: 36px;
  height: 36px;
}

/* Floating Minimized Call Bar (Telegram Call Pill) */
.floating-call-bar {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(34, 197, 94, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(34, 197, 94, 0.2);
  border-radius: 24px;
  padding: 6px 8px 6px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2200;
  color: #fff;
  cursor: pointer;
  animation: slideInDown 0.25s ease-out;
  max-width: 90vw;
}
.floating-call-bar:hover {
  border-color: rgba(34, 197, 94, 0.7);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(34, 197, 94, 0.35);
}
.floating-call-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.floating-call-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: greenPulse 1.4s infinite;
}
@keyframes greenPulse {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(0.9); opacity: 1; }
}
.floating-call-icon {
  font-size: 15px;
}
.floating-call-details {
  display: flex;
  flex-direction: column;
}
.floating-call-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.floating-call-timer {
  font-size: 11px;
  color: #4ade80;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.floating-call-right {
  display: flex;
  align-items: center;
}
.floating-call-action-btn.hangup {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #ef4444;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.floating-call-action-btn.hangup:hover {
  background: #dc2626;
  transform: scale(1.1);
}
.floating-call-action-btn.hangup svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Telegram Call History Bubble */
.tg-call-bubble {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 2px;
  min-width: 200px;
}
.tg-call-bubble-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.tg-call-bubble-icon.success {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}
.tg-call-bubble-icon.missed {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.tg-call-bubble-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.tg-call-bubble-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
}
.tg-call-bubble-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}
.tg-call-callback-btn {
  background: var(--tg-primary, #3390ec);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s ease, opacity 0.14s ease;
}
.tg-call-callback-btn:hover {
  opacity: 0.92;
  transform: scale(1.03);
}

/* ==============================================================================
   STARTUP SPLASH SCREEN WITH PEPE
   ============================================================================== */
.gravity-splash-screen {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #17212b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  user-select: none;
}
.gravity-splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: splashPop 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes splashPop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.splash-logo-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.splash-glow-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(82, 136, 193, 0.4) 0%, rgba(82, 136, 193, 0) 70%);
  animation: splashPulse 2.2s infinite ease-in-out;
}
@keyframes splashPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
}
.splash-pepe-img {
  width: 108px;
  height: 108px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  border: 3px solid rgba(82, 136, 193, 0.55);
  position: relative;
  z-index: 2;
}
.splash-title {
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
  letter-spacing: 0.6px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.splash-subtitle {
  font-size: 13.5px;
  color: #7f91a4;
  margin-bottom: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.splash-loader-bar {
  width: 130px;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.splash-loader-progress {
  width: 40%;
  height: 100%;
  background: #5288c1;
  border-radius: 3px;
  position: absolute;
  animation: splashLoaderAnim 1.3s infinite ease-in-out;
}
@keyframes splashLoaderAnim {
  0% { left: -40%; width: 30%; }
  50% { left: 35%; width: 50%; }
  100% { left: 100%; width: 30%; }
}


