:root {
  --primary-accent: #b84eff;           /* Neon Purple */
  --secondary-accent: #4ee4ff;         /* Aqua Blue */
  --accent-gradient: linear-gradient(135deg, #b84eff, #4ee4ff);
  --button-bg: #1a1a1a;
  --highlight-border: #b84eff;
  --text-light: #e0e0e0;
  --text-dim: #aaa;
  --bg-dark: #0e0e0e;
  --bg-medium: #1c1c1c;
}
body {
  margin: 0;
  font-family: 'Segoe UI', 'Noto Emoji', sans-serif;
  background: #0f0f0f;
  color: #fff;
}

#highlightSidebar {
  width: 260px;
  background: #1b1b1b;
  padding: 1rem;
  border-right: 1px solid #333;
  border-top: 1px solid rgba(248, 87, 166, 0.3);
  box-shadow: inset -1px 0 4px rgba(255,255,255,0.05);
  box-shadow: 0 -1px 5px rgba(248, 87, 166, 0.1);
  overflow-y: auto;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(248, 87, 166, 0.3);
}

#highlightSidebar h2 {
  font-size: 1.1em;
  color: #ffb347;
  margin-bottom: 10px;
}
#highlightList {
  padding-left: 0;
  list-style: none;
  margin-top: 8px;
}

#highlightList li {
  padding: 6px 10px;
  margin: 5px 0;
  background: #222;
  border-left: 3px solid #f857a6;
  color: #ccc;
  font-size: 0.85em;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
}

#highlightList li:hover {
  background: #2c2c2c;
}

.remove-highlight-btn {
  background: none;
  color: #aaa;
  border: none;
  font-size: 1em;
  cursor: pointer;
}

.remove-highlight-btn:hover {
  color: #ff4d4d;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.fancy-title {
  font-size: 1.7em;
  background: linear-gradient(to right, #f857a6, #ff5858);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  font-weight: bold;
}

.dev-tag {
  font-size: 0.8em;
  background: #444;
  padding: 2px 6px;
  border-radius: 6px;
  color: #ccc;
  margin-left: 8px;
}

.controls {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(248, 87, 166, 0.4);
box-shadow: 0 1px 6px rgba(248, 87, 166, 0.1);

  margin-bottom: 10px; /* adds a gap below the border */
}


input[type="file"] {
  display: none;
}

.file-label {
  background: var(--accent-gradient);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.9em;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 6px rgba(184, 78, 255, 0.6);
  transition: all 0.3s ease;
}

.file-label:hover {
  box-shadow: 0 0 10px rgba(78, 228, 255, 0.7);
  filter: brightness(1.1);
}

#fileNameDisplay {
  color: #aaa;
  font-size: 0.85em;
  align-self: center;
}

.chat-container-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.chat-inner {
  transform-origin: top left;
}

.message {
  display: flex;
  align-items: flex-end;
  margin: 2px 0;
}

.message + .message.same-sender {
  margin-top: 0;
}

.message.you {
  flex-direction: row-reverse;
}

.message.them {
  flex-direction: row;
}

.bubble {
  padding: 8px 12px;
  margin: 4px 0;
  border-radius: 10px;
  max-width: 80%;
  word-wrap: break-word;
  position: relative;
  font-size: 0.88em;
  line-height: 1.4em;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}

.message.you .bubble {
  background: #9073d4; /* Soft neon purple (changeable) */
  color: #fff;
  align-self: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.3s ease;
}
.message.you .bubble:hover {
  filter: brightness(1.1);
}
.message.them .bubble:hover {
  filter: brightness(1.1);
}

.message.them .bubble {
  background: #242424;
  color: var(--text-light);
  align-self: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.timestamp {
  display: block;
  font-size: 0.7em;
  opacity: 0.65;
  margin-top: 6px;
  color: #aaa;
}


.media-preview {
  margin-top: 4px;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid #333;
}

.highlighted {
  animation: pulseGlow 1.2s ease-in-out 2;
}

@keyframes pulseGlow {
  0%   { box-shadow: 0 0 0px rgba(248,87,166, 0.5); }
  50%  { box-shadow: 0 0 16px rgba(248,87,166, 0.9); }
  100% { box-shadow: 0 0 0px rgba(255,88,136, 0.6); }
}

.footer {
  text-align: center;
  font-size: 0.85em;
  color: #777;
  padding: 10px;
  border-top: 1px solid #222;
  background-color: #0a0a0a;
}

.splash-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
    background-color: #0f0f0f; /* exactly same as body */
  background-size: cover;
  will-change: opacity, transform;
  color: #fff;
  font-family: 'Segoe UI', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.4em;
  z-index: 9999;
  opacity: 1;
  transition: opacity 1s ease;
  pointer-events: auto;
}
.splash-screen::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 50%, #381f3f 0%, #0b0013 100%);
  opacity: 1;
  z-index: -1;
  transition: opacity 0.4s ease;
}



.splash-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  background: linear-gradient(
    270deg,
    #f857a6,
    #ff5858,
    #ff5bcd,
    #6df0ff,
    #f857a6
  );
  background-size: 300% 300%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: animatedGradient 6s ease-in-out forwards;
}


@keyframes animatedGradient {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}
.splash-title::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 250%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmerSlide 2.5s ease-in-out 1.5s 1;
  pointer-events: none;
}

@keyframes shimmerSlide {
  0% {
    left: -150%;
  }
  100% {
    left: 150%;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.splash-subtitle {
  font-size: 1em;
  margin-top: 15px;
  color: #ccc;
  animation: fadeIn 2s ease-out forwards;
  opacity: 0;
}

@keyframes slideUp {
  0% { transform: translateY(30px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* Loader spinner */
.loader-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.loader-overlay.hidden {
  display: none;
}

.loader-spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #f857a6;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-text {
  margin-top: 15px;
  color: #eee;
  font-size: 1em;
  animation: fadeIn 1s ease-out;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.timestamp {
  font-size: 0.7em;
  color: #bbb;
  margin-top: 6px;
  padding-left: 4px;
  text-align: right;
}
.loader-spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #f857a6;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s ease-in-out infinite;
}
#identitySelector {
  background: #181818;
  color: #fff;
  border: 1px solid #444;
  padding: 6px 10px;
  font-size: 0.85em;
  border-radius: 6px;
  margin-top: 6px;
}

#identitySelector.hidden {
  display: none;
}
#search {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #333;
  background: #111;
  color: var(--text-light);
  font-size: 0.9em;
  transition: border-color 0.3s ease;
}
#search::placeholder {
  color: #888;
}

#search:focus {
  border-color: var(--primary-accent);
  outline: none;
}
#highlights-title {
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 10px;
  background: linear-gradient(to right, #f857a6, #ff5858);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulseTitle 0.6s ease-in-out 4; /* ← 0.6s x 4 = 2.4s total */
  letter-spacing: 0.5px;
}
  @keyframes pulseTitle {
  0%   { transform: scale(1); opacity: 1; text-shadow: none; }
  25%  { transform: scale(1.1); opacity: 1; text-shadow: 0 0 5px #f857a6; }
  50%  { transform: scale(1.2); opacity: 1; text-shadow: 0 0 15px #f857a6, 0 0 30px #ff5858; }
  75%  { transform: scale(1.1); opacity: 1; text-shadow: 0 0 8px #f857a6; }
  100% { transform: scale(1); opacity: 1; text-shadow: none; }
}
#stats-title {
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #f857a6;
}

.chat-stats {
  font-size: 0.9em;
  color: #ccc;
  background: #161616;
  padding: 10px;
  border-radius: 8px;
  border-left: 4px solid #f857a6; /* ✅ Gradient color (matches splash) */
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05);
}
#cloud-title {
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #f857a6;
}

#wordCloudCanvas {
  width: 100%;
  height: auto;
  background: #161616;
  border-radius: 8px;
  border-left: 4px solid #f857a6; /* 🔥 Splash-matching color */
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.05);
  padding: 10px;
}

.toggle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: #fff;
  font-size: 1.1em;
  margin-top: 20px;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(248, 87, 166, 0.4);
  background: linear-gradient(to right, #2a2a2a, #1a1a1a);
  box-shadow: 0 0 10px rgba(248, 87, 166, 0.1);
  transition: all 0.3s ease;
}

.toggle-header:hover {
  box-shadow: 0 0 14px rgba(248, 87, 166, 0.5);
  border-color: rgba(248, 87, 166, 0.6);
}

.toggle-header.pulsing {
  animation: pulseGlow 0.6s ease-out;
}

@keyframes pulseGlow {
  0%   { box-shadow: 0 0 10px rgba(248, 87, 166, 0.2); }
  50%  { box-shadow: 0 0 25px rgba(248, 87, 166, 0.6); }
  100% { box-shadow: 0 0 10px rgba(248, 87, 166, 0.2); }
}

.toggle-header .arrow {
  font-size: 0.9em;
  color: #f857a6;
  transition: transform 0.3s ease;
}

.collapsible {
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.collapsible:not(.open) {
  max-height: 0;
  padding: 0;
  margin: 0;
}

.collapsible.open {
  max-height: 1000px;
}
.collapsible:not(.open) + .toggle-header .arrow {
  transform: rotate(-90deg);
}

.about-box {
  background: #181818;
  padding: 12px;
  margin-top: 10px;
  border-radius: 8px;
  color: #ddd;
  font-size: 0.85em;
  border-left: 4px solid #f857a6;
  box-shadow: inset 0 0 6px rgba(255,255,255,0.05);
  line-height: 1.5em;
}
.about-box {
  background: #181818;
  padding: 14px;
  margin-top: 10px;
  border-radius: 10px;
  border-left: 4px solid #f857a6;
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.05);
  color: #ccc;
  font-size: 0.9em;
  line-height: 1.6em;
  transition: all 0.3s ease;
}

.creator-name {
  font-size: 1em;
  margin-bottom: 6px;
  color: #f2f2f2;
}

.creator-name .alias {
  font-size: 0.85em;
  color: #999;
  margin-left: 4px;
}

.creator-quote {
  font-style: italic;
  margin-top: 12px;
  padding-top: 10px;
  font-size: 0.92em;
  color: #ccc;
  letter-spacing: 0.3px;
  white-space: pre-wrap;
  text-shadow: none;
}


.creator-quote:hover {
  text-shadow: none !important;
}

.dev-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-bottom: 8px;
  animation: pulse-avatar 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(248, 87, 166, 0.4);
}

@keyframes pulse-avatar {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #121212;
}
::-webkit-scrollbar-thumb {
  background-color: #f857a6;
  border-radius: 10px;
  border: 2px solid #121212;
}

html {
  scroll-behavior: smooth;
}
.app {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-in-out;
  height: 100vh;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  position: relative;
}


.shared-link {
  display: inline-block;
  margin-top: 4px;
  color: #00b7ff;
  text-decoration: underline;
  font-weight: 500;
  font-size: 0.85em;
}
.shared-link:hover {
  color: #66d9ff;
}

img.emoji {
  height: 1.3em;
  width: 1.3em;
  vertical-align: -0.25em;
}
/* =============== WELCOME SCREEN =============== */

.welcome-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, #111 0%, #000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 1.2s ease-in-out;
}

.welcome-box {
  background: #181818;
  color: #eee;
  padding: 40px 50px;
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.2);
  animation: popIn 1s ease-out;
}

.welcome-title {
  font-size: 2.5em;
  background: linear-gradient(90deg, #ff6ec4, #7873f5, #48c6ef);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin-bottom: 10px;
}

.welcome-tagline {
  font-size: 1.1em;
  font-style: italic;
  color: #ccc;
  margin-bottom: 30px;
}

.welcome-info {
  text-align: left;
  font-size: 0.95em;
  background: #202020;
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.welcome-info a {
  color: #6df0ff;
  text-decoration: none;
}

.start-btn {
  padding: 14px 28px;
  font-size: 1em;
  border-radius: 8px;
  background: linear-gradient(135deg, #7b2ff7, #f107a3);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(255, 0, 150, 0.3);
  transition: all 0.25s ease;
}

.start-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 0, 150, 0.5);
}

/* Animations */
@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.welcome-logo {
  width: 500px; /* Reduce this value */
  height: auto;
  margin: 0 auto 1.5rem;
  display: block;
}
