/* ============================================
   PHONE + CHAT
   ============================================ */

.phone-wrap {
  position: relative;
  width: 320px;
  margin: 0 auto;
}

.phone-glow {
  position: absolute;
  inset: -60px;
  background: radial-gradient(ellipse at center, rgba(16,214,112,0.35), transparent 70%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
  animation: phoneGlow 6s ease-in-out infinite;
}
@keyframes phoneGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.phone-frame {
  position: relative;
  width: 320px;
  height: 660px;
  background: linear-gradient(180deg, #1a1a1a, #0a0a0a);
  border-radius: 44px;
  padding: 12px;
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.06),
    0 0 0 6px #0a0a0a,
    0 0 0 8px rgba(255,255,255,0.04),
    0 40px 80px -20px rgba(0,0,0,0.8),
    0 0 100px -20px rgba(16,214,112,0.3);
  overflow: hidden;
}

.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 28px;
  background: #000;
  border-radius: 999px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notch-pill {
  width: 6px;
  height: 6px;
  background: #1a1a1a;
  border-radius: 50%;
  box-shadow: 36px 0 0 #1a1a1a;
  margin-left: -36px;
}

.phone-statusbar {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 4;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  font-family: -apple-system, sans-serif;
}
.status-icons { display: inline-flex; gap: 6px; align-items: center; }

.phone-screen {
  width: 100%;
  height: 100%;
  background: #0B1410;
  border-radius: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-top: 48px;
  position: relative;
}

.phone-home-bar {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 4px;
  background: #fff;
  border-radius: 999px;
  opacity: 0.85;
  z-index: 5;
}

/* ===== Chat Header ===== */
.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(15,25,20,0.6);
  backdrop-filter: blur(8px);
}
.chat-back { color: #fff; opacity: 0.7; }
.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(16,214,112,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(16,214,112,0.3);
}
.chat-name { flex: 1; line-height: 1.1; }
.chat-name .name { color: #fff; font-weight: 600; font-size: 14px; }
.chat-name .status { color: var(--green); font-size: 11px; }
.chat-actions { display: flex; gap: 14px; color: #fff; opacity: 0.55; }

/* ===== Chat Body ===== */
.chat-body {
  flex: 1;
  overflow: hidden;
  padding: 12px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(16,214,112,0.04), transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(16,214,112,0.03), transparent 50%);
}

.date-chip {
  align-self: center;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  margin: 6px 0;
  letter-spacing: 0.05em;
}

/* ===== Bubbles ===== */
.bubble {
  display: flex;
  max-width: 78%;
}
.bubble-me { align-self: flex-end; }
.bubble-rich { align-self: flex-start; }

.bubble-inner {
  position: relative;
  padding: 8px 12px 18px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.4;
  color: #fff;
  word-wrap: break-word;
}
.bubble-me .bubble-inner {
  background: linear-gradient(180deg, #0e9856, #0a7e47);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.bubble-rich .bubble-inner {
  background: rgba(255,255,255,0.08);
  border-bottom-left-radius: 4px;
}

.bubble-time {
  position: absolute;
  bottom: 4px;
  right: 8px;
  font-size: 9px;
  opacity: 0.55;
  font-weight: 500;
}

.bubble-enter {
  animation: bubbleIn 0.4s var(--ease-out) both;
}
@keyframes bubbleIn {
  0% { opacity: 0; transform: translateY(10px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Typing dots */
.typing {
  display: inline-flex;
  gap: 3px;
  padding: 4px 2px 6px;
}
.typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  animation: typing-dots 1.4s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: 0.16s; }
.typing span:nth-child(3) { animation-delay: 0.32s; }

/* Audio msg */
.audio-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
}
.audio-play {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: #032814;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.audio-wave {
  display: flex;
  align-items: center;
  gap: 1.5px;
  flex: 1;
}
.audio-wave span {
  width: 2px;
  background: rgba(255,255,255,0.6);
  border-radius: 999px;
}
.audio-time { font-size: 10px; opacity: 0.6; }

.img-msg { padding: 2px 0; }

/* ===== Chat input ===== */
.chat-input {
  padding: 10px 14px 24px;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.chat-input-text {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}
.chat-input-icons { display: flex; gap: 12px; color: rgba(255,255,255,0.5); }
