/* ============================================================
   styles.css — Lovey AI Chat Bot — Full Desktop Theme
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  --pink-light:    #fce4ec;
  --pink-mid:      #f472b6;
  --pink-dark:     #ec4899;
  --coral:         #fb7185;
  --coral-deep:    #f43f5e;
  --peach:         #fdba74;
  --peach-light:   #fff1e6;
  --rose:          #e11d48;
  --lavender:      #f0abfc;
  --white-glass:   rgba(255, 255, 255, 0.25);
  --white-glass-2: rgba(255, 255, 255, 0.40);
  --white-solid:   rgba(255, 255, 255, 0.92);
  --text-main:     #4a1942;
  --text-light:    #7c3a6e;
  --text-muted:    rgba(120, 50, 100, 0.65);
  --shadow-soft:   0 8px 32px rgba(236, 72, 153, 0.18);
  --shadow-glow:   0 0 30px rgba(244, 114, 182, 0.45);
  --shadow-card:   0 4px 24px rgba(236, 72, 153, 0.12);
  --blur:          blur(18px);
  --radius-xl:     24px;
  --radius-lg:     18px;
  --radius-md:     12px;
  --radius-pill:   999px;
  --grad-shift:    0deg;
  --grad-mid:      #f472b6;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
  color: var(--text-main);
  background: #fce4ec;
}

/* ── Animated Gradient Background ────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(
    135deg,
    #ffd6e7 0%,
    #ffb3c6 15%,
    var(--grad-mid) 35%,
    #ff8fab 50%,
    #fb7185 65%,
    #fdba74 80%,
    #ffd6e7 100%
  );
  background-size: 400% 400%;
  animation: gradientFlow 12s ease infinite;
  transition: --grad-mid 1.5s ease;
  z-index: -2;
}

@keyframes gradientFlow {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

/* ── Hide Scrollbars (smooth scrolling remains active) ───── */
::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

* {
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE / Edge */
}

/* ── Screen Base ──────────────────────────────────────────── */
.screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── Ambient Particles ────────────────────────────────────── */
.ambient-particle {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  animation: floatUp linear forwards;
  user-select: none;
}

@keyframes floatUp {
  0%   { transform: translateY(0)   rotate(0deg);   opacity: 0; }
  15%  { opacity: 0.9; }
  85%  { opacity: 0.7; }
  100% { transform: translateY(-95vh) rotate(360deg); opacity: 0; }
}

/* ── Glassmorphism Card ───────────────────────────────────── */
.glass-card {
  background: var(--white-glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

/* ── Shimmer button ───────────────────────────────────────── */
.shimmer-btn {
  position: relative;
  overflow: hidden;
}

.shimmer-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  transition: none;
}

.shimmer-btn:hover::after,
.shimmer-active::after {
  animation: shimmerSlide 0.65s ease forwards;
}

@keyframes shimmerSlide {
  0%   { left: -100%; }
  100% { left: 140%; }
}

/* ── Shake animation ──────────────────────────────────────── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-5px); }
  80%       { transform: translateX(5px); }
}

.shake { animation: shake 0.45s ease; }

/* ── Hidden fade ──────────────────────────────────────────── */
.hidden-fade {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  visibility: hidden;
}

/* ================================================================
   WELCOME SCREEN (Pixel-Perfect Match with 2nd Image)
   ================================================================ */
#screen-welcome {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0a14;
  overflow: hidden;
  padding: 0;
  z-index: 1;
}

/* Ambient blurred glow background for screens with wider/taller aspect ratio */
.welcome-ambient-bg {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  background: url('intro_widescreen_4k.jpg') center center / cover no-repeat;
  filter: blur(50px) brightness(0.65);
  z-index: 0;
  pointer-events: none;
}

/* Centered Stage Container matching 4K Enhanced Panoramic Aspect Ratio (4096 / 1908) */
.welcome-stage {
  position: relative;
  z-index: 2;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-inner {
  position: relative;
  width: min(100vw, calc(100vh * (4096 / 1908)));
  height: min(100vh, calc(100vw * (1908 / 4096)));
  aspect-ratio: 4096 / 1908;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.85);
  container-type: size;
}

/* Master Image containing the full visual composition (Picsart-Enhanced 4K) */
.welcome-master-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

/* Form overlay mapped directly over the card in the image */
#name-form {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

/* Interactive Pill Input positioned exactly over the enhanced card's input */
.name-input-overlay {
  position: absolute;
  left: 64.40%;
  top: 59.54%;
  width: 25.51%;
  height: 8.75%;
  pointer-events: auto;
}

.name-input-overlay input {
  width: 100%;
  height: 100%;
  padding: 0 20px;
  border: 1.5px solid rgba(244, 114, 182, 0.45);
  border-radius: var(--radius-pill);
  background: rgba(28, 14, 40, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: 'Poppins', sans-serif;
  font-size: clamp(13px, 2.6cqh, 22px);
  font-weight: 500;
  color: #ffffff;
  outline: none;
  text-align: center;
  transition: all 0.25s ease;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.4);
}

.name-input-overlay input::placeholder {
  color: rgba(244, 180, 215, 0.75);
}

.name-input-overlay input:focus {
  border-color: #f43f5e;
  background: rgba(28, 14, 40, 0.88);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.35), 0 0 24px rgba(244, 63, 94, 0.5);
}

/* Interactive Button positioned exactly over the enhanced card's button */
.name-btn-overlay {
  position: absolute;
  left: 64.31%;
  top: 71.80%;
  width: 25.66%;
  height: 10.59%;
  pointer-events: auto;
}

.lets-chat-btn {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #ff4071 0%, #ff6b57 50%, #ff8e46 100%);
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(14px, 2.9cqh, 25px);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(255, 64, 113, 0.55);
  letter-spacing: 0.3px;
  transition: transform 0.2s, box-shadow 0.3s, filter 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lets-chat-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 12px 35px rgba(255, 64, 113, 0.75);
}

.lets-chat-btn:active {
  transform: translateY(0) scale(0.98);
  filter: brightness(0.96);
}

/* ================================================================
   CHAT SCREEN (Exact Glowing Purple-Magenta Gradient & Floating Hearts)
   ================================================================ */
#screen-chat {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  background: #140722;
  z-index: 1;
}

/* ── Gemini Enhanced 4K Neon Chat Background ── */
.chat-bg-gradient {
  position: absolute;
  inset: 0;
  background: url('chat_neon_bg_4k.jpg') center center / cover no-repeat;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ── Floating Bokeh Hearts & Sparkles Layer ── */
.floating-bokeh-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.bokeh-heart {
  position: absolute;
  color: #ff3388;
  user-select: none;
  pointer-events: none;
  opacity: 0.35;
  filter: blur(8px);
  transform-origin: center;
  animation: floatPulse 6s ease-in-out infinite alternate;
}

.bokeh-heart.h1 { top: 8%; right: 22%; font-size: 70px; opacity: 0.28; filter: blur(10px); animation-duration: 7s; }
.bokeh-heart.h2 { top: 18%; right: 10%; font-size: 110px; opacity: 0.22; filter: blur(14px); animation-duration: 9s; }
.bokeh-heart.h3 { bottom: 25%; right: 16%; font-size: 85px; opacity: 0.32; filter: blur(12px); animation-duration: 8s; }
.bokeh-heart.h4 { top: 45%; left: 8%; font-size: 55px; opacity: 0.25; filter: blur(8px); animation-duration: 6.5s; }
.bokeh-heart.h5 { top: 32%; left: 45%; font-size: 45px; opacity: 0.28; filter: blur(7px); animation-duration: 7.5s; }
.bokeh-heart.h6 { bottom: 42%; left: 24%; font-size: 35px; opacity: 0.4; filter: blur(3px); animation-duration: 5s; }
.bokeh-heart.h7 { bottom: 35%; right: 28%; font-size: 26px; opacity: 0.55; filter: blur(1px); animation-duration: 5.5s; }

/* Sparkle stars */
.star-sparkle {
  position: absolute;
  color: #ff99cc;
  font-size: 22px;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 0 6px #ff4d94);
  animation: twinkle 3.5s ease-in-out infinite alternate;
}
.star-sparkle.s1 { top: 30%; right: 12%; font-size: 26px; animation-delay: 0.3s; }
.star-sparkle.s2 { top: 40%; left: 18%; font-size: 20px; animation-delay: 1.2s; }
.star-sparkle.s3 { top: 42%; right: 38%; font-size: 22px; animation-delay: 0.8s; }
.star-sparkle.s4 { bottom: 38%; left: 16%; font-size: 18px; animation-delay: 1.8s; }
.star-sparkle.s5 { bottom: 28%; right: 22%; font-size: 16px; animation-delay: 0.5s; }

/* Continuous drifting particles container */
.drifting-particles-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.chat-drifting-particle {
  position: absolute;
  bottom: -40px;
  user-select: none;
  pointer-events: none;
  animation: driftUp linear forwards;
}

@keyframes driftUp {
  0% {
    transform: translateY(0) translateX(0) scale(0.8) rotate(0deg);
    opacity: 0;
  }
  15% { opacity: 0.7; }
  85% { opacity: 0.55; }
  100% {
    transform: translateY(-105vh) translateX(30px) scale(1.15) rotate(25deg);
    opacity: 0;
  }
}

@keyframes floatPulse {
  0%   { transform: translateY(0) scale(1); }
  100% { transform: translateY(-14px) scale(1.08); }
}

@keyframes twinkle {
  0%   { opacity: 0.3; transform: scale(0.8) rotate(0deg); }
  50%  { opacity: 1.0; transform: scale(1.3) rotate(45deg); filter: drop-shadow(0 0 12px #ff4d94); }
  100% { opacity: 0.4; transform: scale(0.9) rotate(90deg); }
}

/* ── Chat Header ─────────────────────────────────────────── */
.visitor-counter {
  position: fixed;
  top: 16px;
  left: 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 40px);
  padding: 8px 13px;
  border: 1px solid rgba(255, 145, 196, 0.65);
  border-radius: 12px;
  background: rgba(35, 12, 46, 0.86);
  color: #ffe0f1;
  font: 500 12px 'Poppins', sans-serif;
  backdrop-filter: blur(12px);
  pointer-events: auto;
}
.visitor-counter strong { color: #fff; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  #chat-header { padding-top: 60px; }
  #menu-reset { top: 62px; }
  .visitor-counter { top: 10px; left: 16px; }
}
.chat-header {
  position: relative;
  z-index: 20;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 24px 6px;
  background: transparent;
  border-bottom: none;
  flex-shrink: 0;
}

.chat-header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
}

.chat-control {
  border: 1px solid rgba(255, 145, 196, 0.7);
  border-radius: 9999px;
  padding: 8px 15px;
  min-height: 40px;
  color: #fff;
  background: rgba(35, 12, 46, 0.85);
  font: 500 0.8rem 'Poppins', sans-serif;
  cursor: pointer;
}

.chat-control:hover { background: rgba(111, 30, 86, 0.9); }
.chat-control:focus-visible, #send-btn:focus-visible, #name-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}
.chat-control[hidden] { display: none; }
button:disabled { opacity: 0.55; cursor: default; }
.new-chat-btn { position: absolute; right: 24px; top: 24px; }
.chat-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin: 0 8px 8px;
}
#model-status {
  color: #f5c5e3;
  font-size: 0.76rem;
  line-height: 1.5;
  margin: 0;
  overflow-wrap: anywhere;
}
#model-status[data-state="error"] { color: #ffd1cd; }
.message-bubble { white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 520px) {
  .chat-header { justify-content: flex-start; padding-left: 18px; padding-right: 115px; }
  .new-chat-btn { right: 16px; top: 20px; }
  .chat-header .chat-bot-name { gap: 5px; }
  .chat-header .shruti-exact-svg { width: 112px; }
  .chat-header .header-heart { width: 18px; height: 18px; }
}

.chat-bot-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  line-height: 1;
}

.header-heart {
  width: clamp(20px, 3.2vw, 24px);
  height: clamp(20px, 3.2vw, 24px);
  fill: #ff3b88;
  filter: drop-shadow(0 0 8px #ff3b88) drop-shadow(0 0 16px rgba(255, 59, 136, 0.7));
  flex-shrink: 0;
  display: inline-block;
}

.heart-left {
  transform: rotate(-12deg);
}

.heart-right {
  transform: rotate(15deg);
}

.shruti-exact-svg {
  width: clamp(130px, 18vw, 155px);
  height: auto;
  fill: #ffffff;
  filter: drop-shadow(0 0 6px rgba(255, 60, 150, 0.95)) drop-shadow(0 0 16px rgba(255, 60, 150, 0.8)) drop-shadow(0 0 30px rgba(255, 60, 150, 0.5));
  display: block;
}

.chat-bot-tagline {
  font-family: 'Quicksand', sans-serif;
  font-size: clamp(0.82rem, 1.8vw, 0.92rem);
  font-weight: 500;
  color: #fba5d5;
  letter-spacing: 0.6px;
  text-shadow: 0 0 10px rgba(255, 60, 150, 0.6), 0 0 20px rgba(255, 60, 150, 0.35);
  display: block;
}

/* ── Chat body ───────────────────────────────────────────── */
.chat-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE / Edge */
  padding: 24px 32px 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.chat-body::-webkit-scrollbar {
  display: none;                /* Chrome, Safari, Edge, Opera */
  width: 0;
  height: 0;
}

/* ── Romantic topics ─────────────────────────────────────── */
#topics-section {
  padding: 16px 0 20px;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}

#topics-section h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ff4088;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 14px;
  text-shadow: 0 0 10px rgba(255, 64, 136, 0.4);
}

.topics-grid {
  display: flex;
  gap: 14px;
}

.topic-card {
  flex: 1;
  padding: 18px 16px;
  border-radius: var(--radius-xl);
  border: 1.5px solid rgba(255, 42, 133, 0.3);
  background: rgba(30, 14, 44, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, border-color 0.25s;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.topic-card:hover {
  transform: translateY(-5px);
  background: rgba(45, 18, 62, 0.85);
  border-color: #ff2a85;
  box-shadow: 0 0 24px rgba(255, 42, 133, 0.45);
}

.topic-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 42, 133, 0.3), rgba(255, 115, 92, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  border: 1.5px solid rgba(255, 42, 133, 0.4);
}

.topic-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.topic-desc {
  font-size: 0.78rem;
  color: #fbcfe8;
  line-height: 1.4;
  font-weight: 400;
}

/* ── Messages Stream ─────────────────────────────────────── */
.message-wrapper {
  display: flex;
  align-items: flex-start;
  flex-shrink: 0;
  min-width: 0;
  gap: 14px;
  margin-bottom: 20px;
  max-width: 95%;
  animation: messageSlideIn 0.3s ease forwards;
}

@keyframes messageSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bot-wrapper {
  align-self: flex-start;
  margin-right: auto;
}

.user-wrapper {
  align-self: flex-end;
  margin-left: auto;
  flex-direction: row-reverse;
}

/* Glowing Avatar Halo (Light Pink Illumination) */
.bot-avatar-dot {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid #ff66b2;
  box-shadow: 0 0 14px rgba(255, 102, 178, 0.95), 0 0 28px rgba(255, 102, 178, 0.55), inset 0 0 6px rgba(255, 102, 178, 0.4);
  background: #200c30;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Bounded corners keep multiline text inside the glowing message background. */
.message-bubble {
  position: relative;
  border-radius: 24px;
  min-width: 0;
  max-width: 100%;
  padding: 12px 28px;
  font-size: 0.96rem;
  line-height: 1.55;
  word-break: break-word;
  color: #ffffff;
}

.bot-bubble {
  border: 1.5px solid transparent;
  background: 
    linear-gradient(rgba(30, 15, 42, 0.82), rgba(30, 15, 42, 0.82)) padding-box,
    linear-gradient(90deg, #ff2a85 0%, #ff4b77 40%, #ff735c 75%, #ff9552 100%) border-box;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 18px rgba(255, 42, 133, 0.45), 0 0 32px rgba(255, 75, 119, 0.22);
  color: #ffffff;
}

.user-bubble {
  border: 1.5px solid transparent;
  background: 
    linear-gradient(rgba(45, 18, 55, 0.85), rgba(45, 18, 55, 0.85)) padding-box,
    linear-gradient(90deg, #ff8566 0%, #ff5277 50%, #ff2a85 100%) border-box;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 18px rgba(255, 82, 119, 0.45), 0 0 32px rgba(255, 42, 133, 0.25);
  color: #ffffff;
  font-weight: 500;
}

/* ── Typing indicator ────────────────────────────────────── */
#typing-indicator {
  display: none;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  align-self: flex-start;
}

.typing-bubble {
  border-radius: 9999px;
  padding: 12px 24px;
  border: 1.5px solid transparent;
  background: 
    linear-gradient(rgba(30, 15, 42, 0.82), rgba(30, 15, 42, 0.82)) padding-box,
    linear-gradient(90deg, #ff2a85 0%, #ff4b77 50%, #ff735c 100%) border-box;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 16px rgba(255, 42, 133, 0.45);
  display: flex;
  gap: 6px;
  align-items: center;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4088;
  box-shadow: 0 0 6px #ff4088;
  animation: typingBounce 1.2s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-7px); }
}

/* ── Chat input bar ──────────────────────────────────────── */
.input-section {
  flex-shrink: 0;
  padding: 16px 32px 28px;
  background: transparent;
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.input-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 14px 10px 18px;
  border-radius: 9999px;
  border: 2px solid transparent;
  background: 
    linear-gradient(rgba(26, 12, 38, 0.88), rgba(26, 12, 38, 0.88)) padding-box,
    linear-gradient(90deg, #ff2a85 0%, #ff4b77 40%, #ff735c 75%, #ff9552 100%) border-box;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 0 22px rgba(255, 42, 133, 0.5), 0 0 42px rgba(255, 75, 119, 0.28);
  position: relative;
  transition: box-shadow 0.3s;
}

.input-bar:focus-within,
.input-bar.input-glow {
  box-shadow: 0 0 28px rgba(255, 42, 133, 0.7), 0 0 52px rgba(255, 75, 119, 0.4);
}

.input-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid #ff66b2;
  box-shadow: 0 0 12px rgba(255, 102, 178, 0.9), 0 0 24px rgba(255, 102, 178, 0.5), inset 0 0 5px rgba(255, 102, 178, 0.35);
}

#chat-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'Poppins', sans-serif;
  font-size: 0.96rem;
  color: #ffffff;
  outline: none;
  resize: none;
  overflow: hidden;
  min-height: 24px;
  max-height: 120px;
  line-height: 1.5;
}

#chat-input::placeholder {
  color: rgba(244, 180, 215, 0.72);
}

.input-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  flex-shrink: 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: transform 0.2s, background 0.2s;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.icon-btn:hover {
  transform: scale(1.08);
  background: rgba(255, 42, 133, 0.3);
}

.icon-btn:active { transform: scale(0.93); }

.send-btn-wrap {
  position: relative;
}

#send-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #ff3377 0%, #ff5e62 60%, #ff8c52 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 18px rgba(255, 51, 119, 0.75), 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

#send-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(255, 51, 119, 0.95);
}

#send-btn:active { transform: scale(0.93); }

.send-sparkle {
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 18px;
  pointer-events: none;
  color: #ffffff;
  filter: drop-shadow(0 0 6px #ff4081);
  animation: twinkle 2.5s infinite alternate;
}

.send-sparkle-mini {
  position: absolute;
  bottom: -4px;
  right: 6px;
  font-size: 10px;
  pointer-events: none;
  color: #ff80bf;
}

/* ================================================================
   UTILITY
   ================================================================ */

/* Focus ring for accessibility */
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(244, 114, 182, 0.7);
  outline-offset: 3px;
}

/* Selection colour */
::selection {
  background: rgba(244, 114, 182, 0.35);
  color: var(--text-main);
}
