/* ==========================================================================
   mIRC Aero ParaloqueseaNET - Cliente Exclusivo mIRC
   Red: ParaloqueseaNET (irc.paraloquesea.com:+6667 / +6697 SSL/TLS)
   ========================================================================== */

:root {
  --aero-accent: #1d82d2;
  --scene-gradient: linear-gradient(135deg, #0a4e96 0%, #1697dc 48%, #4be6c9 100%);
  --status-online: #44d62c;
  --status-busy: #ec2929;
  --status-away: #ff9d0a;
  --status-offline: #9aa9b8;
  --font-wlm: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* {
  box-sizing: border-box;
  user-select: none;
}

[hidden] {
  display: none !important;
}

input, textarea, .chat-history-box, .chat-history-box * {
  user-select: text !important;
  -webkit-user-select: text !important;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-wlm);
  font-size: 12px;
  color: #142a40;
  background: #082038;
}

/* Main Full-Viewport Aero Container */
.aero-app-shell {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #f3f9ff;
  position: relative;
  overflow: hidden;
}

@keyframes wlmNudgeShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  12% { transform: translate(-11px, -7px) rotate(-1.2deg); }
  25% { transform: translate(11px, 6px) rotate(1.2deg); }
  37% { transform: translate(-10px, 5px) rotate(-1deg); }
  50% { transform: translate(9px, -6px) rotate(1deg); }
  62% { transform: translate(-8px, -4px) rotate(-0.8deg); }
  75% { transform: translate(8px, 5px) rotate(0.8deg); }
  88% { transform: translate(-5px, 3px) rotate(0deg); }
}

.aero-app-shell.nudge-shaking {
  animation: wlmNudgeShake 0.58s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* ==========================================================================
   ICONIC mIRC Aero ParaloqueseaNET 3D GLOWING STATUS AVATAR FRAME
   ========================================================================== */
.wlm-avatar-frame {
  position: relative;
  border-radius: 8px;
  padding: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(210,235,255,0.75) 100%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.9) inset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.wlm-avatar-frame::after {
  content: "";
  position: absolute;
  inset: 2px 2px 52% 2px;
  border-radius: 6px 6px 40% 40% / 6px 6px 14px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.68) 0%, rgba(255,255,255,0.08) 100%);
  pointer-events: none;
}

.wlm-avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}

.wlm-avatar-frame.status-online {
  background: linear-gradient(180deg, #b8ff9e 0%, #44d62c 50%, #1d8f12 100%);
  box-shadow: 0 0 12px rgba(68, 214, 44, 0.88), 0 0 0 1px rgba(255,255,255,0.85) inset;
}

.wlm-avatar-frame.status-busy {
  background: linear-gradient(180deg, #ffb3b3 0%, #ec2929 50%, #9b0e0e 100%);
  box-shadow: 0 0 12px rgba(236, 41, 41, 0.88), 0 0 0 1px rgba(255,255,255,0.85) inset;
}

.wlm-avatar-frame.status-away {
  background: linear-gradient(180deg, #ffe29e 0%, #ff9d0a 50%, #b86200 100%);
  box-shadow: 0 0 12px rgba(255, 157, 10, 0.88), 0 0 0 1px rgba(255,255,255,0.85) inset;
}

.wlm-avatar-frame.xl { width: 92px; height: 92px; padding: 5px; border-radius: 11px; }
.wlm-avatar-frame.lg { width: 54px; height: 54px; padding: 3.5px; border-radius: 9px; }
.wlm-avatar-frame.md { width: 42px; height: 42px; padding: 3px; border-radius: 7px; }
.wlm-avatar-frame.sm { width: 28px; height: 28px; padding: 2px; border-radius: 6px; }

/* ==========================================================================
   mIRC Aero ParaloqueseaNET CUSTOMIZABLE SCENE HEADER
   ========================================================================== */
.wlm-scene-header {
  position: relative;
  background-image: var(--scene-gradient);
  background-size: cover;
  background-position: center;
  padding: 10px 14px 12px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 15, 35, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.wlm-scene-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 16px;
  background: linear-gradient(180deg, rgba(243,249,255,0) 0%, rgba(243,249,255,0.85) 100%);
  pointer-events: none;
}

.wlm-brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  position: relative;
  z-index: 2;
}

.wlm-brand-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.scene-picker-btn {
  background: rgba(0, 22, 48, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.scene-picker-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* User Hero Row when connected to IRC */
.user-hero-row {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 2;
}

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

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

.user-display-name {
  font-size: 14px;
  font-weight: 700;
}

.irc-badge-pill {
  font-size: 10.5px;
  padding: 2px 9px;
  border-radius: 10px;
  background: rgba(15, 185, 65, 0.88);
  border: 1px solid #b5ffca;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, background 0.18s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.irc-badge-pill:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.irc-badge-pill:active {
  transform: translateY(0);
}

.irc-badge-pill.offline {
  background: rgba(185, 38, 38, 0.9);
  border-color: #ffb5b5;
}

.status-pill-select {
  background: rgba(0, 20, 44, 0.42);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 4px;
  font-size: 11px;
  padding: 2px 5px;
  cursor: pointer;
}

.status-pill-select option {
  color: #142a40;
  background: #fff;
}

.personal-msg-box {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.personal-msg-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 3px;
  color: #fff;
  font-size: 11px;
  padding: 3px 7px;
}

.personal-msg-input::placeholder {
  color: rgba(255, 255, 255, 0.9);
}

.personal-msg-input:focus {
  background: rgba(255, 255, 255, 0.95);
  color: #102a44;
  outline: none;
}

/* ==========================================================================
   1. LOGIN SCREEN (DIRECT TO IRC.PARALOQUESEA.COM)
   ========================================================================== */
.login-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 24px;
  background: linear-gradient(180deg, #d7ecff 0%, #f3f9ff 45%, #ffffff 100%);
  overflow-y: auto;
}

.login-card-inner {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-avatar-wrap {
  margin: 4px 0 14px;
  cursor: pointer;
}

.login-SpinningBuddies {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 24px 0;
}

.login-SpinningBuddies.active {
  display: flex;
}

.buddies-spinner {
  width: 68px;
  height: 68px;
  animation: wlmOrbit 1.35s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

@keyframes wlmOrbit {
  0% { transform: rotateY(0deg) scale(1); }
  50% { transform: rotateY(180deg) scale(1.08); }
  100% { transform: rotateY(360deg) scale(1); }
}

.wlm-field {
  width: 100%;
  margin-bottom: 9px;
}

.wlm-field label {
  display: block;
  font-size: 11px;
  color: #24476b;
  margin-bottom: 3px;
  font-weight: 600;
}

.wlm-input, .wlm-select {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #8eb2d5;
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 12.5px;
  color: #142a40;
}

.wlm-input:focus, .wlm-select:focus {
  outline: none;
  border-color: #2693e6;
  box-shadow: 0 0 6px rgba(38, 147, 230, 0.55);
}

.wlm-btn {
  padding: 7px 14px;
  border-radius: 4px;
  border: 1px solid #2b6da8;
  background: linear-gradient(180deg, #f2f9ff 0%, #cce7ff 48%, #9bd0ff 52%, #d4ecff 100%);
  color: #0e3358;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,0.85) inset, 0 1px 3px rgba(0,0,0,0.12);
}

.wlm-btn:hover {
  background: linear-gradient(180deg, #ffffff 0%, #dcf0ff 48%, #b0dcff 52%, #e8f6ff 100%);
  border-color: #1783df;
}

/* ==========================================================================
   2. MAIN WORKSPACE: CHANNELS SWITCHBAR + CHAT + RIGHT NICKLIST
   ========================================================================== */
.mirc-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #eef6ff;
}

/* Top Channel Quick Strip */
.wlm-action-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 5px 10px;
  background: linear-gradient(180deg, #eef6ff 0%, #d8ebfb 100%);
  border-bottom: 1px solid #b2d0ee;
  flex-wrap: wrap;
}

.strip-btn {
  background: rgba(255,255,255,0.55);
  border: 1px solid #9ec4e8;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #153c63;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.strip-btn:hover {
  background: linear-gradient(180deg, #fff 0%, #d2eaff 100%);
  border-color: #5ca8f0;
}

/* Switchbar: Channel & Private Query Tabs */
.mirc-tabs-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px 0;
  background: linear-gradient(180deg, #cde2f7 0%, #b8d4f0 100%);
  border-bottom: 1px solid #7ea8d4;
  overflow-x: auto;
  flex-shrink: 0;
}

.mirc-tab-btn {
  border: 1px solid #7ea8d4;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #ebf5ff 0%, #c7e0f9 100%);
  color: #183d63;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.mirc-tab-btn.active {
  background: #ffffff;
  color: #092644;
  font-weight: 700;
  box-shadow: 0 -2px 6px rgba(25, 118, 210, 0.2);
}

@keyframes tabOrangePulse {
  0% { background: linear-gradient(180deg, #ffd180 0%, #ff9100 100%); color: #4a1c00; }
  100% { background: linear-gradient(180deg, #ffe8bd 0%, #ffb74d 100%); color: #4a1c00; }
}

.mirc-tab-btn.unread {
  animation: tabOrangePulse 0.8s infinite alternate;
}

.mirc-badge {
  background: #e52424;
  color: #fff;
  border-radius: 9px;
  padding: 0 5px;
  font-size: 10px;
}

.mirc-tab-close {
  font-style: normal;
  font-size: 10.5px;
  opacity: 0.65;
  margin-left: 3px;
}

.mirc-tab-close:hover {
  opacity: 1;
  color: #d01818;
}

/* Topic Banner */
.mirc-topic-bar {
  padding: 5px 10px;
  background: linear-gradient(90deg, #f3f9ff 0%, #e4f1fd 100%);
  border-bottom: 1px solid #b5d1ec;
  font-size: 11.5px;
  color: #163b61;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

/* Split Body: Chat on Left, Users/Avatars on Right */
.chat-split-body {
  flex: 1;
  display: flex;
  min-height: 0;
  background: #eef6ff;
  position: relative;
}

.chat-left-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 6px;
  gap: 6px;
}

.chat-history-box {
  flex: 1;
  background: #ffffff;
  border: 1px solid #9abbe0;
  border-radius: 5px;
  padding: 8px 10px;
  overflow-y: auto;
  font-size: 12.5px;
  line-height: 1.45;
  position: relative;
}

/* Message Line Styling */
.irc-msg-row {
  margin-bottom: 5px;
  word-break: break-word;
}

.irc-ts {
  color: #7c90a6;
  font-size: 10.5px;
  margin-right: 4px;
  font-family: Consolas, monospace;
}

.irc-nick-tag {
  font-weight: 700;
  color: #12487e;
  cursor: pointer;
}

.irc-nick-tag.me {
  color: #0e6b36;
}

.irc-nick-tag:hover {
  text-decoration: underline;
}

.irc-join { color: #198754; font-size: 11.5px; }
.irc-part { color: #3d5a80; font-size: 11.5px; }
.irc-action { color: #8c008c; font-weight: 600; }
.irc-notice { color: #8b4513; background: #fff9f0; padding: 2px 6px; border-left: 3px solid #e09132; border-radius: 2px; }
.irc-sys, .irc-welcome { color: #0d5aa7; font-weight: 600; }
.irc-err { color: #c91d1d; font-weight: 600; }
.irc-topic { color: #0f764a; font-weight: 600; background: #f0fdf6; padding: 3px 6px; border-radius: 4px; }
.irc-motd { font-family: Consolas, "Courier New", monospace; font-size: 11.5px; white-space: pre-wrap; }

.msg-nudge-card {
  margin: 6px 0;
  padding: 6px 10px;
  background: linear-gradient(90deg, #fff4d9 0%, #fffdf7 100%);
  border-left: 4px solid #f59f00;
  border-radius: 4px;
  color: #6b3d00;
  font-weight: 700;
  font-size: 12px;
}

/* Composer Card */
.chat-composer-card {
  background: #ffffff;
  border: 1px solid #9abbe0;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  position: relative;
  flex-shrink: 0;
}

.composer-toolstrip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  background: linear-gradient(180deg, #f3f9ff 0%, #dcecfc 100%);
  border-bottom: 1px solid #c2dbf4;
  flex-wrap: wrap;
}

.tool-icon-btn {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  color: #163d63;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.tool-icon-btn:hover {
  background: linear-gradient(180deg, #ffffff 0%, #cde7ff 100%);
  border-color: #7eb8f0;
}

.composer-body-row {
  display: flex;
  align-items: stretch;
  height: 54px;
}

.composer-input {
  flex: 1;
  border: none;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

.composer-send-col {
  width: 74px;
  padding: 5px;
  display: flex;
  border-left: 1px solid #d5e6f7;
  background: #f6faff;
}

.send-main-btn {
  flex: 1;
  border: 1px solid #3c82c4;
  border-radius: 4px;
  background: linear-gradient(180deg, #f2f9ff 0%, #c6e4ff 50%, #99ceff 51%, #d9eeff 100%);
  color: #0e3863;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

/* Right Column: Channel Users List (or Private Chat Dual Avatars) */
.irc-right-sidebar {
  width: 185px;
  padding: 6px 6px 6px 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.irc-users-card {
  flex: 1;
  background: #ffffff;
  border: 1px solid #9abbe0;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.irc-users-header {
  padding: 6px 8px;
  background: linear-gradient(180deg, #eef6ff 0%, #d8eafc 100%);
  border-bottom: 1px solid #b5d1ec;
  font-weight: 700;
  font-size: 11px;
  color: #164370;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.irc-users-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 4px;
}

.irc-user-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 5px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
}

.irc-user-row:hover {
  background: linear-gradient(180deg, #f2f9ff 0%, #d9eeff 100%);
  border-color: #96cbff;
}

.irc-user-nick {
  font-size: 12px;
  font-weight: 600;
  color: #122d48;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.irc-rank-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 3px;
  color: #fff;
}

/* Dual Avatar Column for Private Queries */
.query-dual-avatars {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  padding: 10px 4px;
  background: linear-gradient(180deg, #f4f9ff 0%, #dfeeff 100%);
  border: 1px solid #9abbe0;
  border-radius: 5px;
}

/* Popovers for Emoticons, Winks & mIRC Colors */
.wlm-popover {
  position: absolute;
  bottom: 92px;
  left: 8px;
  z-index: 120;
  background: #ffffff;
  border: 1px solid #6b9fd4;
  border-radius: 6px;
  box-shadow: 0 8px 26px rgba(0, 22, 48, 0.38);
  padding: 8px;
  width: min(330px, 94vw);
  max-height: 310px;
  overflow-y: auto;
}

.popover-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: 6px;
}

.wink-particle {
  position: fixed;
  font-size: 36px;
  pointer-events: none;
  z-index: 9205;
  animation: winkParticleFloat 1.85s ease-out forwards;
}

@keyframes winkParticleFloat {
  0% { transform: translate(0, 0) scale(0.4) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx, 60px), var(--dy, -120px)) scale(1.3) rotate(var(--rot, 25deg)); opacity: 0; }
}

.pop-item-btn {
  border: 1px solid #d8e8f8;
  background: #f8fbff;
  border-radius: 4px;
  padding: 5px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10px;
  color: #1c3f63;
}

.pop-item-btn span.ico {
  font-size: 20px;
  margin-bottom: 2px;
}

.pop-item-btn:hover {
  background: #d9eeff;
  border-color: #70b5f9;
}

/* Full-Screen Wink Overlay */
.wink-stage-overlay {
  position: fixed;
  inset: 0;
  z-index: 9200;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(255,255,255,0.42) 0%, transparent 70%);
  animation: winkBurst 1.95s ease-out forwards;
}

.wink-stage-overlay .wink-giant-emoji {
  font-size: 118px;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.45));
  animation: winkBounce 1.95s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.wink-stage-overlay .wink-caption {
  margin-top: 8px;
  padding: 5px 16px;
  border-radius: 16px;
  background: rgba(12, 34, 62, 0.88);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}

@keyframes winkBounce {
  0% { transform: scale(0.1) rotate(-25deg); opacity: 0; }
  25% { transform: scale(1.28) rotate(8deg); opacity: 1; }
  45% { transform: scale(0.95) rotate(-6deg); opacity: 1; }
  65% { transform: scale(1.15) rotate(4deg); opacity: 1; }
  85% { transform: scale(1.05) rotate(0deg); opacity: 1; }
  100% { transform: scale(1.45); opacity: 0; }
}

@keyframes winkBurst {
  0%, 82% { opacity: 1; }
  100% { opacity: 0; }
}

/* Bottom-Right WLM Toast Notifications */
.wlm-toast-container {
  position: fixed;
  right: 12px;
  bottom: 14px;
  z-index: 9100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.wlm-toast-card {
  width: 245px;
  pointer-events: auto;
  border-radius: 6px;
  border: 1px solid #3c7fb8;
  background: linear-gradient(180deg, #e7f4ff 0%, #ffffff 45%, #d6ebff 100%);
  box-shadow: 0 8px 24px rgba(0, 15, 36, 0.55);
  overflow: hidden;
  cursor: pointer;
}

.wlm-toast-head {
  background: linear-gradient(90deg, #1b6ec2 0%, #48a3f3 100%);
  color: #fff;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
}

.wlm-toast-body {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #123354;
  font-size: 11.5px;
}

/* Modals */
.wlm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(4, 18, 36, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wlm-modal-card {
  width: min(420px, 94vw);
  border-radius: 8px;
  padding: 6px;
  background: linear-gradient(160deg, rgba(240,249,255,0.95), rgba(165,212,250,0.88));
  border: 1px solid #2b659e;
  box-shadow: 0 18px 48px rgba(0,0,0,0.55);
}

.wlm-modal-inner {
  background: #fff;
  border-radius: 5px;
  border: 1px solid #8ebae3;
  padding: 14px;
}

.scene-swatch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0;
}

.scene-swatch {
  height: 52px;
  border-radius: 6px;
  border: 2px solid #c5ddf5;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  padding: 4px 6px;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

/* ==========================================================================
   MOBILE & SMARTPHONE OPTIMIZATION (PORTRAIT & LANDSCAPE)
   ========================================================================== */
@media (max-width: 768px) {
  .wlm-scene-header {
    padding: 6px 10px 8px;
  }
  .wlm-brand-bar {
    margin-bottom: 4px;
    gap: 4px;
  }
  .wlm-brand-logo {
    font-size: 12px;
  }
  .scene-picker-btn {
    padding: 4px 7px;
    font-size: 10.5px;
  }
  .user-hero-row {
    gap: 8px;
  }
  .wlm-avatar-frame.lg {
    width: 42px;
    height: 42px;
    padding: 2.5px;
  }
  .user-display-name {
    font-size: 13px;
  }
  .irc-badge-pill {
    font-size: 9.5px;
    padding: 2px 7px;
  }
  .personal-msg-box {
    margin-top: 2px;
  }
  .personal-msg-input {
    font-size: 11px;
    padding: 2px 6px;
  }

  /* Login screen compact on mobile */
  .login-view {
    padding: 12px 14px 28px;
    justify-content: flex-start;
  }
  .login-avatar-wrap {
    margin: 2px 0 8px;
  }
  .wlm-avatar-frame.xl {
    width: 68px;
    height: 68px;
    padding: 4px;
  }
  .wlm-field {
    margin-bottom: 7px;
  }
  .wlm-input, .wlm-select {
    font-size: 16px !important; /* Previene auto-zoom molesto en iOS/Android al tocar un input */
    padding: 7px 9px;
  }

  /* Top quick channels & tools strip horizontally scrollable without wrapping */
  .wlm-action-strip {
    padding: 4px 6px;
    overflow-x: auto;
    flex-wrap: nowrap !important;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .wlm-action-strip > div {
    flex-wrap: nowrap !important;
    flex-shrink: 0;
  }
  .strip-btn {
    padding: 4px 8px;
    font-size: 11px;
    white-space: nowrap;
  }

  /* Tabs bar horizontally scrollable */
  .mirc-tabs-bar {
    padding: 4px 6px 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .mirc-tab-btn {
    padding: 5px 10px;
    font-size: 11.5px;
  }

  /* Chat area maximum space on mobile */
  .chat-left-column {
    padding: 4px;
    gap: 4px;
  }
  .chat-history-box {
    padding: 6px 8px;
    font-size: 13px;
  }

  /* Composer toolstrip horizontally scrollable & touch friendly */
  .composer-toolstrip {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 4px 5px;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .tool-icon-btn {
    white-space: nowrap;
    padding: 4px 8px;
    font-size: 11.5px;
    flex-shrink: 0;
  }
  .composer-body-row {
    height: 44px;
  }
  .composer-input {
    font-size: 16px !important; /* Previene zoom al abrir teclado en celular */
    padding: 6px 8px;
  }
  .composer-send-col {
    width: 68px;
    padding: 4px;
  }

  /* Popovers centered on mobile screen */
  .wlm-popover {
    left: 6px;
    right: 6px;
    bottom: 88px;
    width: auto;
    max-height: 52vh;
  }
  .popover-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Slide-over Drawer for Right Sidebar (Users list & Dual Avatars) */
  .irc-right-sidebar {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(240px, 78vw);
    padding: 6px;
    background: rgba(230, 243, 255, 0.98);
    box-shadow: -6px 0 24px rgba(0, 20, 45, 0.45);
    z-index: 95;
    display: none;
  }
  .irc-right-sidebar.mobile-open {
    display: flex;
  }

  /* Context menu fits mobile viewport */
  .mirc-context-menu {
    max-height: 82vh;
    overflow-y: auto;
    width: min(245px, 88vw);
  }
}

/* Landscape phone optimization (when height is small, e.g. < 500px) */
@media (max-height: 500px) {
  .wlm-scene-header {
    padding: 4px 10px;
  }
  .wlm-avatar-frame.lg {
    width: 34px;
    height: 34px;
  }
  .personal-msg-box {
    display: none;
  }
  .login-view {
    padding: 8px 16px;
  }
  .login-card-inner {
    max-width: 520px;
  }
  .login-avatar-wrap {
    margin: 0 0 6px;
  }
  .wlm-avatar-frame.xl {
    width: 52px;
    height: 52px;
  }
  .composer-body-row {
    height: 38px;
  }
}

/* ==========================================================================
   CLASSIC mIRC RIGHT-CLICK / LONG-PRESS NICK POPUP MENU
   ========================================================================== */
.mirc-context-menu {
  position: fixed;
  z-index: 9800;
  width: 235px;
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
  border: 1px solid #3c7fb8;
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 18, 42, 0.48), 0 0 0 1px rgba(255,255,255,0.9) inset;
  padding: 4px;
  font-size: 12px;
  color: #102a44;
  animation: ctxFadeIn 0.12s ease-out;
}

@keyframes ctxFadeIn {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.mirc-ctx-header {
  background: linear-gradient(90deg, #165ba8 0%, #3a95e8 100%);
  color: #fff;
  font-weight: 700;
  font-size: 11.5px;
  padding: 5px 8px;
  border-radius: 4px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mirc-ctx-section {
  font-size: 10px;
  font-weight: 700;
  color: #527394;
  padding: 4px 8px 2px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.mirc-ctx-item {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  padding: 5px 8px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 11.5px;
  color: #123050;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
}

.mirc-ctx-item:hover, .mirc-ctx-item:active {
  background: linear-gradient(180deg, #dcf0ff 0%, #b5dcff 100%);
  border-color: #6db3f2;
  color: #07223f;
}

.mirc-ctx-item.danger {
  color: #9e1919;
}

.mirc-ctx-item.danger:hover {
  background: linear-gradient(180deg, #ffe3e3 0%, #ffc2c2 100%);
  border-color: #e07b7b;
}

.mirc-ctx-sep {
  height: 1px;
  background: #c8ddf2;
  margin: 3px 4px;
}

/* Inline Chat Photos (Safe EXIF-stripped previews) */
.chat-inline-photo {
  display: block;
  margin-top: 4px;
  max-width: 260px;
  max-height: 210px;
  border-radius: 8px;
  border: 1px solid #96bee6;
  box-shadow: 0 2px 6px rgba(10, 42, 74, 0.14);
  cursor: zoom-in;
  object-fit: contain;
  background: #f4f9ff;
}

.chat-ext-photo-btn {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 7px;
  font-size: 11px;
  border-radius: 5px;
  border: 1px solid #8eb8e0;
  background: linear-gradient(180deg, #ffffff 0%, #dceeff 100%);
  color: #134272;
  cursor: pointer;
}

.chat-ext-photo-btn:hover {
  background: linear-gradient(180deg, #eaf5ff 0%, #c4e3ff 100%);
}

.photo-lightbox-img {
  max-width: 84vw;
  max-height: 75vh;
  border-radius: 8px;
  border: 1px solid #9ec4e8;
  object-fit: contain;
  background: #f4f9ff;
}

