:root {
  --primary: #1d5b8c;
  --secondary: #157f6b;
  --header-bg: #1e293b;
  --bottom-bar-bg: #172033;
  --accent: #d97706;
  --chat-bg: #f4f6f9;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border-soft: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --user-font-scale: 1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Tahoma', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  background: linear-gradient(160deg, #e6ecf2 0%, #dce4ee 100%);
  color: var(--text-main);
  direction: rtl;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Eye-Comfort Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.32);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.55);
}

.app-shell {
  max-width: 560px;
  margin: 0 auto;
  height: 100dvh;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
  border-left: 1px solid rgba(203, 213, 225, 0.6);
  border-right: 1px solid rgba(203, 213, 225, 0.6);
  position: relative;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

/* ==========================================
   ENTRY SCREEN (LOGIN / REGISTER / GUEST)
   ========================================== */
#entry-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  background: var(--chat-bg);
}

.entry-top-bar {
  background: var(--header-bg);
  color: #f8fafc;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.2px;
}

.entry-top-bar a {
  color: #fde68a;
  text-decoration: none;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background 0.18s;
}

.entry-top-bar a:hover {
  background: rgba(255, 255, 255, 0.18);
}

.site-banner-box {
  width: 100%;
  background: #172536;
  line-height: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.entry-nav-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: var(--header-bg);
  padding: 7px 8px;
}

.entry-nav-links button {
  background: rgba(255, 255, 255, 0.07);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 7px 4px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.18s ease;
}

.entry-nav-links button:hover {
  background: var(--primary);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Returning Visitor/Member Saved Profile Banner */
.returning-guest-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(135deg, #f0f9ff 0%, #ecfdf5 100%);
  border-bottom: 1px solid #bae6fd;
  padding: 8px 12px;
}

.returning-guest-info {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.returning-guest-info img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
  border: 1.5px solid #38bdf8;
  flex-shrink: 0;
}

.login-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border-soft);
}

.login-tab {
  padding: 11px 6px;
  text-align: center;
  font-size: 13px;
  font-weight: bold;
  color: var(--text-muted);
  background: var(--surface-soft);
  border: none;
  border-left: 1px solid var(--border-soft);
  cursor: pointer;
  transition: all 0.18s ease;
}

.login-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: inset 0 -3px 0 var(--primary);
}

.login-form-box {
  background: var(--surface);
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-soft);
}

.form-row {
  display: flex;
  gap: 7px;
  margin-bottom: 8px;
}

.form-input, .form-select {
  width: 100%;
  padding: 9px 11px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  background: var(--surface);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 91, 140, 0.12);
}

.btn-enter {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.18s, transform 0.1s;
}

.btn-enter:hover {
  filter: brightness(1.08);
}

.btn-enter:active {
  transform: scale(0.98);
}

.stealth-check-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.entry-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--secondary);
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
}

.entry-status-bar .badge-connected {
  padding: 7px 12px;
}

.entry-status-bar .badge-title {
  background: var(--header-bg);
  padding: 7px 14px;
  border-radius: 6px 6px 0 0;
}

.entry-status-bar .badge-count {
  padding: 7px 12px;
}

.online-preview-list {
  flex: 1;
  overflow-y: auto;
  background: var(--surface);
}

/* ==========================================
   USER ROW CARD (USED IN ENTRY & DRAWER)
   ========================================== */
.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #eef2f6;
  cursor: pointer;
  transition: background 0.15s;
}

.user-row:hover {
  background: #f1f5f9;
}

.user-row-avatar {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  object-fit: cover;
  border: 1.5px solid #e2e8f0;
  flex-shrink: 0;
  background: #f8fafc;
}

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

.user-row-name-line {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.user-name-text {
  font-weight: 800;
  font-size: 14px;
}

.user-name-banner {
  max-height: 28px;
  max-width: 175px;
  object-fit: contain;
  vertical-align: middle;
  border-radius: 4px;
}

.user-rank-badge-img {
  width: 21px;
  height: 21px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
}

.user-gift-inline-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
}

.user-row-status {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.user-row-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.flag-badge {
  font-size: 16px;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.flag-badge small { font-size: 9px; line-height: 1.1; white-space: nowrap; }

/* ==========================================
   MAIN CHAT SCREEN
   ========================================== */
#chat-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--chat-bg);
}

/* Top 5 Voice Mics Bar */
.mics-bar {
  display: grid;
  grid-template-columns: 44px repeat(5, 1fr);
  gap: 5px;
  background: var(--header-bg);
  padding: 6px 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-speaker-mute {
  background: var(--secondary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s;
}

.btn-speaker-mute.muted {
  background: #dc2626;
}

.mic-slot {
  background: rgba(255, 255, 255, 0.96);
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  height: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  padding: 2px;
  transition: all 0.15s ease;
}

.mic-slot:hover {
  border-color: #94a3b8;
}

.mic-slot.active {
  border-color: #10b981;
  background: #ecfdf5;
}

.mic-slot.speaking {
  box-shadow: 0 0 0 2px #10b981;
}

.mic-slot img {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  object-fit: cover;
}

.mic-slot span {
  font-size: 9px;
  font-weight: bold;
  color: var(--text-main);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-subheader {
  background: var(--primary);
  color: #f8fafc;
  padding: 5px 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Split-screen Private Chat Panel */
#private-split-panel {
  background: var(--surface);
  border-bottom: 2px solid var(--primary);
  display: flex;
  flex-direction: column;
  height: 44%;
  min-height: 210px;
  z-index: 20;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

#private-split-panel.maximized {
  position: absolute;
  inset: 0 0 48px 0;
  height: auto;
  z-index: 40;
}

.private-header {
  background: var(--header-bg);
  color: #fff;
  padding: 7px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.private-peer-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: bold;
}

.private-peer-info img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
}

.private-win-controls {
  display: flex;
  gap: 5px;
}

.private-win-controls button {
  border: none;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  color: #fff;
}

.btn-win-max { background: #0284c7; }
.btn-win-close { background: #dc2626; }

.private-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  background: var(--chat-bg);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.pm-bubble {
  max-width: 82%;
  padding: 8px 11px;
  border-radius: 11px;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.pm-bubble.mine {
  align-self: flex-start;
  background: #e0f2fe;
  color: #0c4a6e;
  border: 1px solid #bae6fd;
}

.pm-bubble.theirs {
  align-self: flex-end;
  background: var(--surface);
  border: 1px solid var(--border-soft);
}

.private-input-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: var(--surface-soft);
  border-top: 1px solid var(--border-soft);
}

.btn-pm-call {
  background: #15803d;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 14px;
}

.btn-pm-media {
  background: #334155;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 9px;
  cursor: pointer;
  font-size: 14px;
}

/* Main Messages Feed (Eye-Comfort Spacing & Soft Borders) */
.messages-feed {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: calc(13px * var(--user-font-scale));
}

.msg-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: var(--surface);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #e6ebf1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  position: relative;
  transition: border-color 0.15s;
}

.msg-item:hover {
  border-color: #cbd5e1;
}

.msg-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  cursor: pointer;
  flex-shrink: 0;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
}

.msg-body {
  flex: 1;
  min-width: 0;
}

.msg-header {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.msg-sender {
  font-weight: bold;
  cursor: pointer;
}

.msg-time {
  font-size: 10px;
  color: #94a3b8;
  margin-right: auto;
}

.msg-delete-btn {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: 5px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
}

.msg-text {
  line-height: 1.5;
  word-break: break-word;
}

.inline-emoji {
  font-size: 18px;
  vertical-align: middle;
}

.inline-sticker {
  max-height: 34px;
  vertical-align: middle;
}

.room-pill-btn {
  display: inline-block;
  background: var(--header-bg);
  color: #ffffff;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  margin-right: 4px;
}

.system-punish-card {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
}

/* Global Announcement: light sky background, blue text, optional contained image */
.global-ann-card {
  position: relative;
  border-radius: 12px;
  padding: 12px 13px 30px;
  color: #1e40af;
  background: #eff9ff;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.08);
  border: 1.5px solid var(--announcement-accent, #7c3aed);
  overflow: hidden;
  flex: 0 0 auto;
  min-height: min-content;
}
.global-ann-header { display:flex; align-items:center; gap:8px; margin-bottom:7px; color:#1e40af; }
.global-ann-avatar { width:30px; height:30px; border-radius:8px; border:1px solid rgba(30,64,175,.18); object-fit:cover; flex:0 0 auto; }
.global-ann-text { font-size:13.5px; font-weight:bold; line-height:1.6; color:#1e40af; white-space:pre-wrap; overflow-wrap:anywhere; }
.global-ann-image-wrap { display:flex; justify-content:center; align-items:center; width:100%; margin:8px 0; padding:5px; border-radius:9px; background:rgba(255,255,255,.65); }
.global-ann-image { display:block; max-width:100%; max-height:260px; width:auto; height:auto; object-fit:contain; border-radius:7px; }
.global-ann-label { position:absolute; bottom:7px; left:10px; color:#dc2626; font-size:11px; font-weight:900; letter-spacing:.2px; }

/* Emoji Picker Popup */
.emoji-popover {
  position: absolute;
  bottom: 96px;
  right: 8px;
  left: 8px;
  max-height: 225px;
  overflow-y: auto;
  background: var(--surface);
  border: 1.5px solid var(--primary);
  border-radius: 12px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  z-index: 45;
  box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.18);
}

.emoji-cell {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 5px 3px;
  text-align: center;
  cursor: pointer;
  background: var(--surface-soft);
  transition: background 0.15s;
}

.emoji-cell:hover {
  background: #e0f2fe;
}

.emoji-cell span.e-char {
  font-size: 20px;
  display: block;
}

.emoji-cell img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.emoji-cell small {
  font-size: 9px;
  color: var(--text-muted);
  display: block;
}

/* Bottom Chat Input Bar */
.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: #eef2f6;
  border-top: 1px solid #cbd5e1;
}

.btn-leave-room {
  background: var(--header-bg);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 14px;
}

.btn-emoji-toggle {
  background: #fef08a;
  border: 1px solid #eab308;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.chat-text-input {
  flex: 1;
  padding: 8px 11px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  background: #ffffff;
}

.chat-text-input:focus {
  border-color: var(--primary);
}

.btn-send-msg {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

/* Bottom 5-Tab Navigation Bar */
.bottom-nav-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--bottom-bar-bg);
  color: #f8fafc;
  height: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-tab-btn {
  background: transparent;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  transition: background 0.15s, color 0.15s;
}

.nav-tab-btn.active {
  background: var(--primary);
  color: #fde68a;
}

.nav-badge {
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
}

.nav-badge.gold {
  background: #f59e0b;
  color: #0f172a;
}

/* ==========================================
   SLIDE-OVER DRAWERS
   ========================================== */
.drawer-overlay {
  position: absolute;
  inset: 0 0 48px 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 30;
  display: flex;
  justify-content: flex-start;
}

.drawer-panel {
  width: 86%;
  max-width: 440px;
  height: 100%;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  box-shadow: -6px 0 24px rgba(15, 23, 42, 0.22);
  animation: slideInRight 0.18s ease-out;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-header {
  background: var(--header-bg);
  color: #fff;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: bold;
  font-size: 14px;
}

.btn-drawer-close {
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-weight: bold;
  cursor: pointer;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 11px;
}

/* Rooms Drawer Cards */
.room-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  background: var(--surface-soft);
  transition: all 0.16s ease;
}

.room-card:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

/* Clearly mark the room the member is currently in. */
.room-card.room-card-current {
  border: 2px solid #1685d7;
  background: linear-gradient(135deg, #e5f3ff, #f4faff);
  box-shadow: 0 0 0 2px rgba(22, 133, 215, 0.13), 0 5px 14px rgba(22, 133, 215, 0.12);
}
.room-card.room-card-current:hover {
  border-color: #0b70bd;
  background: linear-gradient(135deg, #d9edff, #edf8ff);
}

.room-cap-badge {
  background: var(--header-bg);
  color: #fff;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: bold;
}

/* Wall Drawer */
.wall-post-card {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 11px;
  margin-bottom: 10px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.wall-post-img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 7px;
}

.wall-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid #f1f5f9;
}

.wall-btn {
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  font-weight: bold;
}

/* Settings Drawer */
.settings-group {
  margin-bottom: 10px;
}

.settings-group label {
  display: block;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 4px;
  color: var(--text-main);
}

.settings-btn {
  width: 100%;
  padding: 9px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 6px;
}

/* ==========================================
   MODALS (USER PROFILE CARD, GIFT GALLERY, POPUP ALERT)
   ========================================== */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(2px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.profile-card-modal {
  width: 100%;
  max-width: 410px;
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.32);
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
}

.profile-card-top {
  background: var(--header-bg);
  color: #fff;
  padding: 9px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-cover-area {
  position: relative;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #1e293b;
}

.profile-cover-blur {
  position: absolute;
  inset: -15px;
  width: calc(100% + 30px);
  height: calc(100% + 30px);
  object-fit: cover;
  filter: blur(13px) brightness(0.68);
}

.profile-main-avatar {
  position: relative;
  z-index: 2;
  width: 130px;
  height: 130px;
  border-radius: 16px;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.profile-card-body {
  padding: 13px;
  overflow-y: auto;
}

.profile-status-text {
  text-align: center;
  font-size: 13px;
  font-weight: bold;
  color: var(--text-main);
  margin-bottom: 10px;
}

.profile-meta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  padding: 7px 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: bold;
}

.profile-gifts-showcase {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 9px;
  padding: 8px 10px;
  margin-bottom: 10px;
}

.profile-gifts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.profile-gift-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 3px 7px;
}

.profile-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.p-act-btn {
  padding: 8px 6px;
  border: 1px solid #cbd5e1;
  background: var(--surface);
  border-radius: 8px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
}

.p-act-btn:hover {
  background: #f1f5f9;
}

.p-act-btn.like { color: #dc2626; }
.p-act-btn.ignore { color: #b91c1c; }

.mod-actions-section {
  border-top: 1.5px dashed #cbd5e1;
  padding-top: 10px;
  margin-top: 6px;
}

.mod-actions-title {
  font-size: 11px;
  font-weight: bold;
  color: var(--text-muted);
  margin-bottom: 7px;
  text-align: center;
}

.mod-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.mod-btn {
  padding: 8px 7px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  color: #fff;
  background: #334155;
  transition: filter 0.15s;
}

.mod-btn:hover {
  filter: brightness(1.08);
}

.mod-btn.warn { background: #d97706; }
.mod-btn.danger { background: #dc2626; }
.mod-btn.royal { background: #1d4ed8; }
.mod-btn.emerald { background: #047857; }

/* Huge Categorized Gift Gallery Modal */
.gift-filter-pills {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.gift-pill {
  border: 1px solid #cbd5e1;
  background: var(--surface-soft);
  color: var(--text-main);
  padding: 5px 10px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
}

.gift-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.gift-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.gift-item-card {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 9px 6px;
  text-align: center;
  cursor: pointer;
  background: var(--surface-soft);
  transition: all 0.15s ease;
  position: relative;
}

.gift-item-card:hover {
  border-color: var(--accent);
  background: #fffbeb;
  transform: translateY(-1px);
}

.gift-anim-tag {
  position: absolute;
  top: 4px;
  left: 4px;
  background: #fef3c7;
  color: #b45309;
  font-size: 9px;
  font-weight: bold;
  padding: 1px 5px;
  border-radius: 6px;
}

/* Alert Popup Box */
.alert-popup-box {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.35);
  border: 1.5px solid var(--header-bg);
}

.alert-popup-header {
  background: var(--header-bg);
  color: #fff;
  padding: 8px 13px;
  font-weight: bold;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.alert-popup-content {
  padding: 14px;
  text-align: center;
}

/* Toast Notification */
.toast-banner {
  position: absolute;
  top: 54px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  z-index: 90;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.28);
  white-space: nowrap;
}

/* Requested profile and room-card image refinements */
.profile-main-avatar { width: 184px; height: 184px; border-radius: 22px; object-fit: contain; background: rgba(255,255,255,.08); padding: 3px; }
.profile-cover-area { height: 188px; }
.room-card-image { width: 54px; height: 54px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.room-card-image-animated { animation: room-image-float 3.2s ease-in-out infinite; }
@keyframes room-image-float { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-2px) scale(1.03); } }
.wall-comments { margin-top: 6px; }

.wall-youtube-embed { position:relative; width:100%; aspect-ratio:16/9; margin-top:8px; overflow:hidden; border-radius:9px; background:#000; }
.wall-youtube-embed iframe { width:100%; height:100%; border:0; }

.room-shared-youtube { margin: 6px 10px; padding: 8px; border-radius: 12px; background: rgba(15,23,42,.06); border: 1px solid rgba(100,116,139,.22); }
.room-shared-youtube-head { display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:12px; font-weight:700; margin-bottom:6px; }
.room-shared-youtube-head button { border:0; border-radius:8px; padding:4px 9px; cursor:pointer; background:#fee2e2; color:#b91c1c; }
/* Locked shared-player surface: viewers can watch but cannot interact with YouTube controls/gestures. */
.room-shared-youtube-player { position:relative; width:100%; overflow:hidden; border-radius:9px; background:#000; }
.room-shared-youtube-player iframe { display:block; width:100%; aspect-ratio:16/9; border:0; border-radius:9px; pointer-events:none; }
.room-shared-youtube-interaction-lock { position:absolute; inset:0; z-index:2; touch-action:none; user-select:none; -webkit-user-select:none; }

.user-row { position:relative; }
.user-private-indicator { position:absolute; left:0; top:9px; bottom:9px; width:4px; border-radius:4px; }
.user-private-indicator.open { background:#16a34a; }
.user-private-indicator.closed { background:#dc2626; }
.user-private-indicator.away { background:#f59e0b; }

/* Requested room image permission media display */
.room-media-image-wrap { margin: 6px 0 2px; max-width: min(78vw, 360px); }
.room-media-image { display:block; width:auto; max-width:100%; max-height:320px; border-radius:12px; object-fit:contain; border:1px solid rgba(100,116,139,.22); }

/* Bug-fix batch: preserve composer controls when shared-room media is active */
.chat-input-bar { flex-wrap: nowrap; min-height: 52px; position: relative; z-index: 5; }
.chat-input-bar > button, .chat-input-bar > label { flex: 0 0 auto; }
.chat-input-bar .chat-text-input { min-width: 0; flex: 1 1 0; }
#room-shared-youtube-button { flex: 0 0 35px; }
.wall-comment-compose { display:flex; gap:6px; margin-top:8px; }
.wall-comment-compose input { min-width:0; flex:1; border:1px solid var(--border-soft); border-radius:8px; padding:8px; font-size:13px; }
.wall-comment-compose button { border:0; border-radius:8px; padding:7px 12px; background:var(--primary); color:#fff; font-weight:700; cursor:pointer; }
.toast-banner { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); max-width:min(90vw,460px); white-space:normal; text-align:center; padding:14px 20px; border-radius:14px; z-index:10000; }

/* Advanced profile color mixer */
.advanced-color-card{border:1px solid rgba(100,116,139,.24);border-radius:12px;padding:9px;background:rgba(148,163,184,.06)}
.advanced-color-row{display:flex;align-items:center;gap:8px;margin:5px 0}
.advanced-color-row input[type=color]{width:48px;height:38px;padding:2px;border-radius:8px}
.advanced-color-row span{font-size:11px;color:var(--muted,#64748b)}
.advanced-color-sub{display:flex;justify-content:space-between;font-size:11px;margin:4px 0}
.advanced-color-card input[type=range]{width:100%;accent-color:var(--primary,#2563eb);margin:2px 0}
.advanced-color-preview{padding:7px 9px;border-radius:7px;margin-top:5px;border:1px solid rgba(100,116,139,.3);font-weight:700;text-align:center}

/* Simplified stacked profile color controls */
.profile-color-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid rgba(100,116,139,.22);border-radius:10px;padding:9px 11px;background:rgba(148,163,184,.05)}
.profile-color-row label{font-size:13px;font-weight:700;margin:0;flex:1}
.profile-color-row input[type=color]{width:48px;height:38px;border:1px solid rgba(100,116,139,.3);border-radius:8px;padding:2px;background:transparent;flex:none}

/* Requested readability and mobile keyboard layout adjustments */
.app-shell { height: var(--chat-viewport-height, 100dvh); min-height: 0; }
#chat-screen { min-height: 0; }
.messages-feed { min-height: 0; font-size: calc(14.5px * var(--user-font-scale)); }
.msg-header { gap: 6px; }
.msg-sender, .msg-header .user-name-text { font-size: calc(14px * var(--user-font-scale)); font-weight: 800; }
.msg-text { font-size: calc(14.5px * var(--user-font-scale)); line-height: 1.65; font-weight: 600; }
.drawer-panel, .drawer-body { min-height: 0; }
#drawer-wall.wall-drawer-layout { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 0; }
#drawer-wall.wall-drawer-layout.hidden { display: none !important; }
.wall-posts-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 10px 11px; overscroll-behavior: contain; }
.wall-composer { flex: 0 0 auto; position: sticky; bottom: 0; z-index: 4; background: var(--surface); border-top: 1px solid #cbd5e1; padding: 9px 10px calc(9px + env(safe-area-inset-bottom)); box-shadow: 0 -3px 12px rgba(15,23,42,.06); }
.wall-composer textarea { display: block; width: 100%; min-height: 58px; resize: vertical; font-size: 15px; font-weight: 600; }
.wall-composer-toolbar { display: flex; align-items: center; gap: 8px; margin-top: 7px; min-width: 0; }
.wall-icon-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.wall-icon-btn { width: 39px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #cbd5e1; border-radius: 9px; background: #e2e8f0; color: #1e293b; font-size: 20px; cursor: pointer; flex: 0 0 auto; }
.wall-icon-btn:active { transform: scale(.96); }
.wall-compose-status { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #059669; font-size: 11px; }
.wall-publish-btn { flex: 0 0 auto; padding: 7px 13px !important; }
.alert-pop-sender-wrap { display: flex; align-items: center; gap: 7px; min-width: 0; }
.alert-pop-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; min-width: 0; font-size: 14px; font-weight: 800; }
.alert-pop-identity .user-name-banner { max-height: 28px; max-width: 170px; object-fit: contain; }
.alert-pop-identity .user-rank-badge-img { width: 24px; height: 24px; object-fit: contain; }
@media (max-width: 420px) {
  .wall-composer-toolbar { gap: 5px; }
  .wall-icon-actions { gap: 4px; }
  .wall-icon-btn { width: 36px; height: 36px; font-size: 18px; }
  .wall-publish-btn { padding: 6px 10px !important; }
  .wall-compose-status { font-size: 10px; }
  .messages-feed { padding: 7px; }
  .msg-item { padding: 8px; gap: 7px; }
  .msg-avatar { width: 46px; height: 46px; }
}

.user-row-name-line .user-name-text { font-size: 14px; font-weight: 800; }
.wall-post-card > div:nth-child(2) { font-size: 14.5px !important; font-weight: 600; line-height: 1.65 !important; }
/* Shared-room music: owner/site administration controls only */
.room-shared-youtube-controls { display:flex; align-items:center; justify-content:center; gap:6px; flex-wrap:nowrap; margin:0 0 7px; }
.room-shared-youtube-controls button { border:1px solid rgba(100,116,139,.25); border-radius:8px; padding:5px 10px; cursor:pointer; font-weight:700; background:rgba(15,23,42,.08); color:inherit; white-space:nowrap; }
.room-shared-youtube-controls button:last-child { background:#fee2e2; color:#b91c1c; }

/* Royal chat visual refinement: calmer surfaces, consistent touch states, and modern picker */
:root { --surface-soft:#f5f8fc; --border-soft:#dbe4ef; }
.mics-bar { padding:7px 8px; gap:6px; box-shadow:0 2px 10px rgba(0,0,0,.08); }
.mic-slot, .btn-speaker-mute { border-radius:10px; }
.room-subheader { padding:7px 12px; font-weight:800; letter-spacing:.1px; }
.messages-feed { gap:7px; padding:9px; scroll-behavior:smooth; overscroll-behavior:contain; }
.msg-item { border-radius:13px; padding:9px 11px; box-shadow:0 2px 5px rgba(15,23,42,.035); }
.msg-avatar { border-radius:12px; }
.chat-input-bar { padding:8px; gap:7px; background:linear-gradient(180,#f4f7fb,#eaf0f6); padding-bottom:calc(8px + env(safe-area-inset-bottom)); }
.chat-text-input { min-height:40px; border-radius:12px; padding:9px 12px; box-shadow:inset 0 1px 2px rgba(15,23,42,.035); }
.btn-send-msg, .btn-leave-room { border-radius:11px; min-height:38px; transition:transform .12s, filter .12s; }
.btn-send-msg:active, .btn-leave-room:active, .nav-tab-btn:active, .btn-emoji-toggle:active { transform:scale(.96); filter:brightness(.96); }
.bottom-nav-bar { height:54px; flex-shrink:0; box-shadow:0 -3px 12px rgba(15,23,42,.09); }
.nav-tab-btn { min-width:0; padding:4px 2px; font-size:12px; }
.nav-tab-btn.active { box-shadow:inset 0 3px 0 rgba(255,255,255,.25); }
.drawer-overlay { backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px); }
.drawer-panel { border-radius:0 16px 16px 0; overflow:hidden; }
.drawer-header { padding:13px 15px; }
.drawer-body { padding:12px; scroll-behavior:smooth; overscroll-behavior:contain; }
.room-card, .settings-group, .profile-color-row { border-radius:13px; }

/* Custom full-spectrum color picker */
.chat-color-modal { position:fixed; inset:0; z-index:10030; display:flex; align-items:center; justify-content:center; padding:16px; background:rgba(8,14,24,.62); backdrop-filter:blur(5px); -webkit-backdrop-filter:blur(5px); }
.chat-color-modal.hidden { display:none !important; }
.chat-color-panel { width:min(100%,430px); max-height:min(92dvh,720px); overflow:auto; background:#202630; color:#f8fafc; border:1px solid rgba(255,255,255,.12); border-radius:20px; padding:17px; box-shadow:0 20px 55px rgba(0,0,0,.38); direction:rtl; }
.chat-color-title { font-size:19px; font-weight:900; margin-bottom:12px; }
.chat-color-sv { height:190px; border-radius:12px; position:relative; overflow:hidden; touch-action:none; cursor:crosshair; background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,var(--picker-hue,#f00)); border:1px solid rgba(255,255,255,.18); }
.chat-color-cursor { position:absolute; width:16px;height:16px;border:2px solid white;border-radius:50%;box-shadow:0 0 0 1px #111;transform:translate(-50%,-50%);pointer-events:none; }
.chat-color-hue { width:100%;height:18px;margin:12px 0;border-radius:999px;appearance:none;outline:none;background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red); }
.chat-color-hue::-webkit-slider-thumb { appearance:none;width:22px;height:22px;border-radius:50%;border:2px solid white;box-shadow:0 0 0 1px #111;background:transparent; }
.chat-color-preview-row { display:flex;align-items:center;gap:10px;margin:10px 0; }
.chat-color-preview { width:44px;height:38px;border:1px solid rgba(255,255,255,.35);border-radius:10px;flex:0 0 auto; }
.chat-color-code { direction:ltr; text-align:left; flex:1; min-width:0; background:#111821;color:#f8fafc;border:1px solid #465264;border-radius:10px;padding:9px 11px;font:600 14px monospace; }
.chat-color-actions { display:flex;gap:8px;margin-top:12px; }
.chat-color-actions button { flex:1;border:0;border-radius:10px;padding:10px;font-weight:800;cursor:pointer; }
.chat-color-apply { background:#1683cf;color:white; } .chat-color-cancel { background:#384353;color:#e2e8f0; }
.chat-color-presets { display:grid;grid-template-columns:repeat(8,1fr);gap:7px;margin-top:10px; }
.chat-color-swatch { aspect-ratio:1;border:1px solid rgba(255,255,255,.35);border-radius:8px;cursor:pointer;min-width:0; }
.chat-color-label { font-size:11px;color:#b9c4d3;margin-top:4px; }
@media(max-width:380px){.chat-color-panel{padding:13px}.chat-color-sv{height:165px}.chat-color-presets{gap:5px}}

/* Focused visual polish: responsive touch, cards, popups, and room surfaces */
button,.wall-btn,.tab-btn,.btn-emoji-toggle,.member-item,.room-item{transition:transform .14s ease,filter .16s ease,background-color .16s ease,box-shadow .16s ease;}
button:active,.wall-btn:active,.tab-btn:active{transform:scale(.975);}
input,textarea,select{transition:border-color .15s ease,box-shadow .15s ease;}
input:focus,textarea:focus,select:focus{outline:none;box-shadow:0 0 0 3px rgba(59,130,246,.12);}
img{max-width:100%;}
.modal,.popup,.profile-modal,.chat-color-modal{overscroll-behavior:contain;}
@media(max-width:600px){
  .chat-color-panel{width:min(100%,430px);padding:14px;border-radius:18px;}
  .chat-color-sv{height:172px;}
  .chat-color-presets{grid-template-columns:repeat(6,1fr);}
  .chat-color-preview-row{flex-wrap:wrap;}
  .chat-color-code{min-width:120px;}
}

.chat-image-fallback{display:inline-flex;align-items:center;justify-content:center;min-height:74px;min-width:140px;padding:12px;border-radius:12px;background:rgba(100,116,139,.14);border:1px dashed rgba(100,116,139,.35);color:#64748b;font-size:12px;}

/* Compact responsive embeds for shared social video links (YouTube/TikTok). */
.social-video-embed { position:relative; width:100%; margin:8px 0; overflow:hidden; border-radius:12px; background:#0b0f16; }
.social-video-embed iframe { display:block; width:100%; height:100%; border:0; }
.social-video-youtube { aspect-ratio:16/9; }
.social-video-tiktok { width:min(100%, 360px); aspect-ratio:9/16; margin-inline:auto; }
.wall-post-content .social-video-tiktok { width:min(100%, 300px); }


/* Custom subscription/rank grant modal: in-app UI, replaces native prompt. */
.grant-subscription-card {
  width: min(100%, 440px); max-height: 88dvh; overflow: hidden; display: flex; flex-direction: column;
  background: var(--surface, #fff); color: var(--text-main, #1e293b); border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 18px; box-shadow: 0 20px 55px rgba(2, 8, 23, .35); animation: grantModalIn .16s ease-out;
}
.grant-subscription-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px; background:var(--header-bg, #1e293b); color:#fff; font-weight:800; }
.grant-subscription-header small { display:block; margin-top:4px; color:#cbd5e1; font-weight:500; }
.grant-subscription-body { padding:16px; overflow:auto; display:flex; flex-direction:column; gap:12px; }
.grant-subscription-body label { font-weight:700; font-size:14px; }
.grant-subscription-body .form-select { width:100%; min-height:48px; border-radius:12px; font-size:15px; }
.grant-subscription-summary { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.grant-subscription-summary > div { background:var(--surface-soft, #f8fafc); border:1px solid var(--border-soft, #e2e8f0); border-radius:12px; padding:12px; display:flex; flex-direction:column; gap:6px; }
.grant-subscription-summary span { font-size:12px; color:var(--text-muted, #64748b); }
.grant-subscription-summary strong { font-size:16px; }
.grant-subscription-note { margin:0; color:var(--text-muted, #64748b); font-size:13px; line-height:1.6; }
.grant-subscription-confirm { width:100%; min-height:48px; border-radius:12px; background:var(--secondary, #157f6b); font-weight:800; }
.grant-subscription-cancel { border:0; background:transparent; color:var(--text-muted, #64748b); padding:10px; font-weight:700; }
@keyframes grantModalIn { from { opacity:0; transform:translateY(8px) scale(.98); } to { opacity:1; transform:none; } }
@media (max-width:420px) { .grant-subscription-body { padding:12px; } .grant-subscription-summary strong { font-size:14px; } }

/* Custom room-transfer modal controls */
.room-transfer-modal { display:grid; gap:12px; }
.room-transfer-list { display:grid; gap:8px; max-height:55dvh; overflow:auto; }
.room-transfer-option { display:flex; align-items:center; gap:10px; width:100%; border:1px solid #334155; background:rgba(30,41,59,.72); color:inherit; border-radius:12px; padding:12px; text-align:right; cursor:pointer; }
.room-transfer-option span:nth-child(2) { flex:1; font-weight:700; }
.room-transfer-option small { color:#94a3b8; }
.room-transfer-option:active { transform:scale(.99); }

.room-lock-entry { display:grid; gap:10px; }
.room-lock-entry p { margin:0; line-height:1.6; }
.room-lock-entry input { text-align:center; letter-spacing:2px; font-size:18px; }

/* Online members are visually separated by the viewer's current room. */
.online-users-section { margin: 0 0 12px; }
.online-users-section-title {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:11px 12px; margin:8px 0 6px; border-radius:8px;
  background:#101820; color:#fff; font-weight:800; font-size:14px;
}
.online-users-section-title span {
  display:inline-flex; align-items:center; justify-content:center; min-width:24px;
  height:24px; padding:0 6px; border-radius:20px; background:#263746; color:#fff; font-size:12px;
}
.online-users-empty { padding:12px; text-align:center; color:#94a3b8; font-size:12px; }

/* Platform-native image lightbox and private-message deletion controls */
.platform-image-viewer {
  position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center;
  padding: 14px; background: rgba(5, 12, 24, .94); backdrop-filter: blur(7px);
}
.platform-image-viewer.hidden { display: none !important; }
.platform-image-viewer-card {
  position: relative; width: min(100%, 980px); max-height: 94vh; display: flex; flex-direction: column;
  align-items: center; gap: 12px; padding: 14px; border-radius: 18px;
  background: var(--surface, #fff); border: 1px solid var(--border-soft, #dbe3ec); box-shadow: 0 24px 80px rgba(0,0,0,.35);
}
.platform-image-viewer-card img { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 10px; user-select: none; -webkit-user-drag: none; }
.platform-image-close { position: absolute; top: 8px; inset-inline-end: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; color: #fff; background: #dc2626; font-size: 22px; cursor: pointer; z-index: 2; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.platform-image-viewer-actions { display: flex; justify-content: center; width: 100%; }
.platform-image-save { text-decoration: none; color: #fff; background: var(--primary, #1d5b8c); padding: 10px 18px; border-radius: 10px; font-weight: 700; box-shadow: 0 4px 12px rgba(29,91,140,.25); }
.platform-view-image { cursor: zoom-in; user-select: none; -webkit-user-drag: none; }
.pm-image-wrap { margin-top: 5px; display: flex; justify-content: flex-start; }
.pm-image { max-width: 190px; max-height: 240px; object-fit: cover; border-radius: 10px; cursor: zoom-in; user-select: none; -webkit-user-drag: none; }
.pm-delete-message-btn { display: inline-flex; align-items: center; justify-content: center; align-self: flex-end; margin-top: 5px; border: 0; border-radius: 7px; padding: 5px 7px; background: #fee2e2; color: #b91c1c; font-size: 14px; line-height: 1; cursor: pointer; opacity: .9; transition: transform .15s ease, opacity .15s ease; }
.pm-delete-message-btn:hover { opacity: 1; transform: translateY(-1px); }
.pm-bubble { display: flex; flex-direction: column; }
.deleted-message { color: #64748b !important; background: #e2e8f0 !important; font-style: italic; }
.deleted-message span { padding: 2px 4px; }
.user-name-text, .user-name-banner, .user-row-name-line { -webkit-user-select: none !important; user-select: none !important; }

/* Stealth entry: icon-only accessible checkbox */
.stealth-icon-only{display:inline-flex!important;align-items:center;justify-content:center;width:44px;height:40px;padding:0;margin:7px 0;border-radius:11px;cursor:pointer;background:var(--surface-soft,#f1f5f9);border:1px solid var(--border,#cbd5e1)}
.stealth-icon-only input{position:absolute;opacity:0;width:1px;height:1px}
.stealth-eye-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;color:#64748b}
.stealth-icon-only:has(input:checked){background:#e0e7ff;border-color:#6366f1;color:#4338ca;box-shadow:0 0 0 2px #6366f120}
.stealth-icon-only:has(input:checked) .stealth-eye-icon{color:#4338ca}
.stealth-icon-only:focus-within{outline:2px solid #60a5fa;outline-offset:2px}

/* Wall comments modal with profile/rank/subscription identity */
.wall-comments-modal { position:fixed; inset:0; z-index:12000; display:none; align-items:center; justify-content:center; padding:14px; background:rgba(15,23,42,.56); backdrop-filter:blur(4px); }
.wall-comments-modal.open { display:flex; }
.wall-comments-dialog { width:min(560px,100%); max-height:min(82vh,760px); display:flex; flex-direction:column; overflow:hidden; border-radius:18px; background:var(--panel-bg,#fff); color:var(--text-color,#1e293b); border:1px solid rgba(100,116,139,.25); box-shadow:0 22px 65px rgba(0,0,0,.24); }
.wall-comments-dialog header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 16px; background:var(--header-bg,#1e293b); color:#fff; }
.wall-comments-close { border:0; border-radius:50%; width:34px; height:34px; font-size:23px; color:#fff; background:#ef4444; cursor:pointer; }
.wall-comments-list { flex:1; overflow:auto; padding:12px; display:flex; flex-direction:column; gap:9px; }
.wall-comment-item { border:1px solid rgba(148,163,184,.25); background:rgba(148,163,184,.08); border-radius:12px; padding:10px; }
.wall-comment-author { display:flex; align-items:center; flex-wrap:wrap; gap:6px; min-height:30px; }
.wall-comment-avatar { width:32px; height:32px; object-fit:cover; border-radius:9px; border:1px solid rgba(148,163,184,.35); }
.wall-comment-rank { width:24px; height:24px; object-fit:contain; }
.wall-comment-name { font-weight:800; font-size:13px; }
.wall-comment-banner { max-width:135px; max-height:30px; object-fit:contain; }
.wall-comment-author .user-gift-inline-img { width:22px; height:22px; object-fit:contain; vertical-align:middle; }
.wall-comment-text { margin:7px 0 0; line-height:1.65; font-size:14px; overflow-wrap:anywhere; }
.wall-comments-empty { text-align:center; color:#94a3b8; padding:26px 10px; }
.wall-comments-dialog footer { display:flex; gap:8px; padding:11px; border-top:1px solid rgba(148,163,184,.25); }
.wall-comments-dialog footer input { flex:1; min-width:0; border:1px solid #cbd5e1; border-radius:10px; padding:10px; font:inherit; }
.wall-comments-dialog footer button { border:0; border-radius:10px; padding:9px 16px; background:#25638c; color:#fff; font-weight:700; cursor:pointer; }
.global-ann-delete { position:absolute; top:6px; left:6px; z-index:2; border:0; width:26px; height:26px; border-radius:50%; background:rgba(239,68,68,.95); color:#fff; font-size:20px; cursor:pointer; }
.global-ann-card { position:relative; }
.deleted-message { font-size:12px; opacity:.9; }
@media(max-width:480px) { .wall-comments-modal { padding:8px; } .wall-comments-dialog { max-height:86vh; border-radius:15px; } .wall-comment-item { padding:8px; } }
