/* =========================================================
   KAFE GAMES CHAT SYSTEM (v3.0.0)
   Modern Cyberpunk Glassmorphism UI for Live Gamer Squad Rooms
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --chat-bg: #070913;
  --chat-card-bg: rgba(18, 22, 38, 0.65);
  --chat-card-self: rgba(0, 242, 255, 0.12);
  --chat-border: rgba(255, 255, 255, 0.08);
  --chat-border-glow: rgba(0, 242, 255, 0.35);
  --chat-input-bg: rgba(12, 16, 28, 0.85);
  --neon-cyan: #00f2ff;
  --neon-purple: #bc00ff;
  --neon-rose: #ff3366;
  --glow-cyan: 0 0 20px rgba(0, 242, 255, 0.4);
  --glow-purple: 0 0 20px rgba(188, 0, 255, 0.4);
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--chat-bg);
  color: #f1f5f9;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 0%, rgba(0, 242, 255, 0.08) 0%, transparent 60%),
              radial-gradient(circle at 100% 100%, rgba(188, 0, 255, 0.08) 0%, transparent 50%),
              #070913;
}

.chat-app-root {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* =========================================================
   TOP HEADER & HUD
   ========================================================= */
.chat-header {
  flex-shrink: 0;
  background: rgba(7, 9, 19, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--chat-border);
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.chat-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  gap: 12px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.chat-brand-logo {
  height: 38px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.5));
  transition: transform 0.3s ease;
}

.chat-brand-logo:hover {
  transform: scale(1.06);
}

.active-room-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 242, 255, 0.08);
  border: 1px solid rgba(0, 242, 255, 0.3);
  border-radius: 30px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--neon-cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.15);
}

.live-beacon {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: beaconPulse 1.5s infinite;
}

@keyframes beaconPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px #10b981; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-counter-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
}

.sound-toggle-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--chat-border);
  color: #cbd5e1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

.sound-toggle-btn:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  transform: scale(1.05);
}

.sound-toggle-btn.muted {
  opacity: 0.5;
  filter: grayscale(1);
}

.nav-action-btn {
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--chat-border);
  transition: all 0.25s ease;
}

.nav-action-btn:hover, .nav-action-btn.active {
  background: rgba(0, 242, 255, 0.15);
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 255, 0.2);
}

/* Room Switcher Horizontal Strip */
.rooms-quick-bar {
  display: flex;
  gap: 8px;
  padding: 6px 18px 8px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.rooms-quick-bar::-webkit-scrollbar {
  display: none;
}

.room-chip {
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--chat-border);
  color: #94a3b8;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.room-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.room-chip.current {
  background: linear-gradient(135deg, rgba(0, 242, 255, 0.2), rgba(188, 0, 255, 0.2));
  color: #fff;
  border-color: var(--neon-cyan);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(0, 242, 255, 0.25);
}

/* LFG Quick Action Bar */
.lfg-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.lfg-bar::-webkit-scrollbar {
  display: none;
}

.lfg-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--neon-purple);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  margin-right: 4px;
}

.lfg-preset-btn {
  background: rgba(188, 0, 255, 0.08);
  border: 1px solid rgba(188, 0, 255, 0.25);
  border-radius: 12px;
  padding: 4px 10px;
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.lfg-preset-btn:hover {
  background: var(--neon-purple);
  color: #fff;
  border-color: var(--neon-purple);
  box-shadow: var(--glow-purple);
  transform: translateY(-1px);
}

/* =========================================================
   CHAT MESSAGE STREAM
   ========================================================= */
.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 195px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
  position: relative;
  z-index: 10;
}

.chat-container::-webkit-scrollbar {
  width: 6px;
}

.chat-container::-webkit-scrollbar-thumb {
  background: rgba(0, 242, 255, 0.3);
  border-radius: 10px;
}

.welcome-room-banner {
  display: none !important;
}

/* Message Card Bubble */
.message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--chat-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--chat-border);
  max-width: 82%;
  min-width: 120px;
  animation: messageSlideUp 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@keyframes messageSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.message.self {
  align-self: flex-end;
  background: var(--chat-card-self);
  border-color: var(--chat-border-glow);
  box-shadow: 0 4px 20px rgba(0, 242, 255, 0.1);
  border-bottom-right-radius: 4px;
}

.message:not(.self) {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.message img.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  object-fit: cover;
  flex-shrink: 0;
  background: #000;
}

.message.self img.avatar {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 255, 0.4);
}

.message .content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.message .content .name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.message .content .name {
  font-weight: 800;
  font-size: 0.75rem;
  font-family: 'Orbitron', sans-serif;
  color: var(--neon-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.message.self .content .name {
  color: #38bdf8;
}

.message .content .timestamp {
  font-size: 0.65rem;
  color: #64748b;
  font-family: 'Inter', sans-serif;
}

.message .content .text {
  font-size: 0.92rem;
  color: #f1f5f9;
  line-height: 1.45;
  word-break: break-word;
  user-select: text;
}

/* Quoted Reply Reference Inside Message */
.message-reply-quote {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  border-left: 3px solid var(--neon-cyan);
  border-radius: 8px;
  padding: 5px 10px;
  margin-bottom: 6px;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  transition: background 0.2s ease, transform 0.2s ease;
}

.message.self .message-reply-quote {
  border-left-color: #38bdf8;
  background: rgba(0, 0, 0, 0.55);
}

.message-reply-quote:hover {
  background: rgba(0, 242, 255, 0.12);
  transform: translateX(2px);
}

.reply-quote-icon {
  font-size: 0.75rem;
  color: var(--neon-cyan);
  flex-shrink: 0;
}

.reply-quote-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.reply-quote-author {
  font-size: 0.68rem;
  font-weight: 800;
  font-family: 'Orbitron', sans-serif;
  color: #00f2ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-quote-text {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Reactions Badge Row Under Message */
.message-reactions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.reaction-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.reaction-badge:hover {
  transform: scale(1.1);
  background: rgba(0, 242, 255, 0.15);
  border-color: rgba(0, 242, 255, 0.4);
}

.reaction-badge.user-reacted {
  background: rgba(0, 242, 255, 0.22);
  border-color: #00f2ff;
  box-shadow: 0 0 10px rgba(0, 242, 255, 0.3);
}

.reaction-count {
  font-size: 0.7rem;
  font-weight: 700;
  color: #e2e8f0;
  font-family: 'Orbitron', sans-serif;
}

/* Floating Action Toolbar on Message Hover */
.message-actions-hover {
  position: absolute;
  top: -14px;
  right: 14px;
  display: none;
  align-items: center;
  gap: 4px;
  background: rgba(8, 12, 24, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 242, 255, 0.35);
  border-radius: 20px;
  padding: 3px 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 0 12px rgba(0, 242, 255, 0.2);
  z-index: 25;
  animation: actionsPop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes actionsPop {
  0% { transform: scale(0.85) translateY(4px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.message.self .message-actions-hover {
  right: auto;
  left: 14px;
}

.message:hover .message-actions-hover,
.message:focus-within .message-actions-hover,
.message.actions-active .message-actions-hover {
  display: flex;
}

.action-btn-hover {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  transition: all 0.15s ease;
  line-height: 1;
}

.action-btn-hover:hover {
  background: rgba(0, 242, 255, 0.2);
  color: #00f2ff;
  transform: scale(1.08);
}

/* Quick Reaction Picker Popup */
.quick-reaction-picker {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: rgba(8, 12, 24, 0.96);
  border: 1px solid #00f2ff;
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.4), 0 10px 30px rgba(0, 0, 0, 0.8);
  border-radius: 22px;
  padding: 4px 8px;
  gap: 6px;
  z-index: 50;
  animation: pickerPop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.message.self .quick-reaction-picker {
  right: auto;
  left: 0;
}

@keyframes pickerPop {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.quick-reaction-picker.open {
  display: flex;
}

.picker-emoji-btn {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  padding: 3px 4px;
  cursor: pointer;
  border-radius: 6px;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.picker-emoji-btn:hover {
  transform: scale(1.35);
}

/* Highlight Animation when clicking a quoted reply */
.message.highlight-reply {
  animation: replyFlash 1.6s ease;
}

@keyframes replyFlash {
  0% { box-shadow: 0 0 30px #00f2ff, 0 0 15px #bc00ff; border-color: #00f2ff; }
  50% { box-shadow: 0 0 20px #00f2ff; border-color: #00f2ff; }
  100% { }
}

.message .content .media-container {
  margin-top: 8px;
  border-radius: 12px;
  overflow: hidden;
  max-width: 320px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.message .content .media-container img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.message .content .media-container img:hover {
  transform: scale(1.02);
}

.message .content .media-container video {
  width: 100%;
  max-height: 240px;
  display: block;
}

/* Jump to bottom pill */
.scroll-bottom-pill {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 8px 18px;
  background: rgba(0, 242, 255, 0.2);
  backdrop-filter: blur(15px);
  border: 1px solid var(--neon-cyan);
  border-radius: 30px;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 242, 255, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 99;
}

.scroll-bottom-pill.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.scroll-bottom-pill:hover {
  background: var(--neon-cyan);
  color: #000;
}

/* =========================================================
   INPUT DOCK & CONTROLS
   ========================================================= */
.input-dock {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 30px);
  max-width: 760px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: transparent;
}

/* Scrollable Ad Strip directly above Input Dock */
.chat-dock-ad {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
  transition: max-height 0.4s ease, opacity 0.4s ease, transform 0.4s ease, padding 0.4s ease;
  max-height: 70px;
  opacity: 1;
}

.chat-dock-ad::-webkit-scrollbar {
  display: none;
}

.chat-dock-ad-inner {
  min-width: 320px;
  width: 320px;
  height: 50px;
  position: relative;
  background: rgba(12, 16, 28, 0.85);
  border: 1px solid rgba(0, 242, 255, 0.25);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: opacity 0.3s ease;
}

.chat-dock-ad-close {
  position: absolute;
  top: 2px;
  right: 4px;
  background: rgba(255, 51, 102, 0.85);
  color: white;
  border: none;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  line-height: 1;
}

/* Reply Preview Bar Above Input Bar */
.reply-preview-bar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--neon-cyan);
  border-left: 4px solid var(--neon-cyan);
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.2s ease;
}

.reply-preview-bar.active {
  display: flex;
}

.reply-preview-icon {
  font-size: 1rem;
  color: var(--neon-cyan);
  flex-shrink: 0;
}

.reply-preview-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.reply-preview-author {
  font-size: 0.72rem;
  font-weight: 800;
  font-family: 'Orbitron', sans-serif;
  color: var(--neon-cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-preview-snippet {
  font-size: 0.76rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-cancel-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ff3366;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  flex-shrink: 0;
  line-height: 1;
}

.reply-cancel-btn:hover {
  background: #ff3366;
  color: #fff;
}

/* Attachment Preview Drawer */
.attachment-preview-bar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--neon-cyan);
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.2s ease;
}

.attachment-preview-bar.active {
  display: flex;
}

.attachment-preview-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.attachment-preview-info {
  flex: 1;
  font-size: 0.78rem;
  color: #cbd5e1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-remove-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ff3366;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.attachment-remove-btn:hover {
  background: #ff3366;
  color: #fff;
}

/* Quick Emoji Drawer */
.emoji-drawer {
  display: none;
  align-items: center;
  justify-content: space-around;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--chat-border);
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  overflow-x: auto;
}

.emoji-drawer.active {
  display: flex;
}

.emoji-item-btn {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.emoji-item-btn:hover {
  transform: scale(1.3);
}

/* Input Capsule Bar */
.input-bar {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: var(--chat-input-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--chat-border);
  border-radius: 40px;
  gap: 8px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 242, 255, 0.05);
  transition: all 0.3s ease;
}

.input-bar:focus-within {
  border-color: var(--neon-cyan);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), var(--glow-cyan);
  background: rgba(12, 16, 28, 0.95);
}

.media-btn, .emoji-toggle-btn, .share-btn {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--chat-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--neon-cyan);
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.media-btn:hover, .emoji-toggle-btn:hover, .share-btn:hover {
  background: rgba(0, 242, 255, 0.15);
  border-color: var(--neon-cyan);
  transform: scale(1.08);
}

.input-bar input[type="text"] {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 8px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  min-width: 0;
}

.input-bar input[type="text"]::placeholder {
  color: #64748b;
}

.send-action-btn {
  padding: 0 20px;
  height: 38px;
  border: none;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--neon-cyan), #00b4d8);
  color: #050814;
  cursor: pointer;
  font-weight: 800;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.76rem;
  transition: all 0.25s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0, 242, 255, 0.35);
}

.send-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 242, 255, 0.5);
  background: #fff;
}

.send-action-btn:active {
  transform: translateY(0);
}

/* =========================================================
   LIGHTBOX & MODALS
   ========================================================= */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

#lightbox.active {
  display: flex;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 16px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), var(--glow-cyan);
  border: 1px solid rgba(0, 242, 255, 0.3);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#lightbox.active #lightbox-img {
  transform: scale(1);
}

#lightbox .close-btn {
  position: absolute;
  top: 25px;
  right: 25px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 3100;
}

#lightbox .close-btn:hover {
  background: var(--neon-rose);
  border-color: var(--neon-rose);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 15px rgba(255, 51, 102, 0.6);
}

/* =========================================================
   PAGE LOADER
   ========================================================= */
#page-loader {
  position: fixed;
  inset: 0;
  background: #070913;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.4s ease;
}

#page-loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.cyber-loader {
  display: flex;
  gap: 8px;
}

.cyber-loader span {
  width: 8px;
  height: 32px;
  background: var(--neon-cyan);
  border-radius: 4px;
  box-shadow: 0 0 10px var(--neon-cyan);
  animation: cyberPulse 0.8s infinite ease-in-out alternate;
}

.cyber-loader span:nth-child(1) { animation-delay: 0s; }
.cyber-loader span:nth-child(2) { animation-delay: 0.2s; background: var(--neon-purple); box-shadow: 0 0 10px var(--neon-purple); }
.cyber-loader span:nth-child(3) { animation-delay: 0.4s; }

@keyframes cyberPulse {
  0% { transform: scaleY(0.3); opacity: 0.4; }
  100% { transform: scaleY(1.2); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .chat-nav-row {
    padding: 8px 12px;
  }
  .active-room-pill span:last-child {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .live-counter-badge,
  .chat-header-profile-btn,
  .sound-toggle-btn,
  .nav-action-btn {
    display: none !important;
  }
  .chat-mobile-menu-btn {
    display: inline-flex !important;
  }
  .chat-container {
    padding: 12px 12px 185px;
    gap: 10px;
  }
  .message {
    max-width: 92%;
    padding: 10px 14px;
  }
  .input-dock {
    width: calc(100% - 16px);
    bottom: 10px;
  }
  .send-action-btn {
    padding: 0 14px;
    font-size: 0.72rem;
  }
}
