/* ============================================================
   NYZA & DAD IPAD PWA - DESIGN SYSTEM & STYLESHEET
   Curated palette, child-friendly tactile UI, Apple safe-area
   ============================================================ */

:root {
  --primary-pink: #ec4899;
  --primary-pink-dark: #be185d;
  --primary-pink-light: #fbcfe8;
  --accent-purple: #8b5cf6;
  --accent-violet: #6366f1;
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.75);
  --bg-card-border: rgba(244, 114, 182, 0.25);
  --green-online: #10b981;
  --green-glow: rgba(16, 185, 129, 0.4);
  --red-decline: #ef4444;
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --font-heading: 'Fredoka', cursive, system-ui, sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: var(--font-body);
  background: radial-gradient(circle at 50% 20%, #1e1b4b 0%, #0f172a 60%, #090d16 100%);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

.hidden {
  display: none !important;
}

/* App Shell */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  position: relative;
  overflow: hidden;
}

/* ============================================================
   BANNERS (INSTALL & AUDIO UNLOCK)
   ============================================================ */

.install-banner {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.95), rgba(139, 92, 246, 0.95));
  backdrop-filter: blur(12px);
  color: #fff;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.3);
  z-index: 100;
  font-size: 0.95rem;
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.banner-icon {
  font-size: 1.5rem;
}

.banner-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audio-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 99;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
  transition: all 0.3s ease;
}

.btn-unlock-sound {
  background: #fff;
  color: #047857;
  border: none;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font-body);
}

/* ============================================================
   TOP NAVIGATION
   ============================================================ */

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  z-index: 10;
}

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

.avatar-wrap {
  position: relative;
  width: 48px;
  height: 48px;
}

.nav-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-pink);
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.5);
}

.avatar-sparkle {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 1rem;
  animation: sparkle-float 2s infinite ease-in-out;
}

@keyframes sparkle-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.2); }
}

.nav-titles {
  display: flex;
  flex-direction: column;
}

.nav-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fbcfe8, #ec4899, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.nav-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.presence-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.presence-chip.online {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.presence-chip.online .pulse-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-green 1.5s infinite;
}

.presence-chip.offline {
  color: #94a3b8;
}

.presence-chip.offline .pulse-dot {
  background: #64748b;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.icon-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.15);
}

/* ============================================================
   MAIN DASHBOARD GRID (IPAD TABLET OPTIMIZED)
   ============================================================ */

.dashboard-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
  padding: 20px 24px;
  overflow: hidden;
  height: calc(100% - 75px);
}

@media (max-width: 820px), (orientation: portrait) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    overflow-y: auto;
  }
}

/* Hero Call Dad Card */
.hero-call-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  border: 2px solid var(--bg-card-border);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 0 40px rgba(236, 72, 153, 0.08);
  padding: 30px;
}

.card-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.2) 0%, rgba(139, 92, 246, 0.05) 50%, transparent 70%);
  pointer-events: none;
  animation: glow-breathe 4s infinite alternate ease-in-out;
}

@keyframes glow-breathe {
  0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  z-index: 2;
  width: 100%;
}

.hero-pulse-container {
  position: relative;
  width: 190px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--primary-pink);
  opacity: 0;
}

.hero-pulse-container.online .pulse-1 {
  animation: ring-pulse 2.5s infinite ease-out;
  border-color: #10b981;
}

.hero-pulse-container.online .pulse-2 {
  animation: ring-pulse 2.5s infinite ease-out 1.25s;
  border-color: #34d399;
}

@keyframes ring-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.45); opacity: 0; }
}

.hero-big-call-btn {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #f43f5e 0%, #ec4899 50%, #d946ef 100%);
  box-shadow: 0 15px 35px rgba(244, 63, 94, 0.5), inset 0 2px 10px rgba(255, 255, 255, 0.4);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s;
  position: relative;
  z-index: 3;
}

.hero-pulse-container.online .hero-big-call-btn {
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #14b8a6 100%);
  box-shadow: 0 15px 40px rgba(16, 185, 129, 0.6), inset 0 2px 10px rgba(255, 255, 255, 0.4);
}

.hero-big-call-btn:hover {
  transform: scale(1.05);
}

.hero-big-call-btn:active {
  transform: scale(0.94);
  box-shadow: 0 5px 20px rgba(244, 63, 94, 0.6);
}

.heart-icon {
  font-size: 3.5rem;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  animation: heart-beat 1.8s infinite ease-in-out;
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.15); }
  28% { transform: scale(1); }
  42% { transform: scale(1.15); }
  70% { transform: scale(1); }
}

.call-btn-label {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 6px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-heading {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
}

.hero-subtext {
  font-size: 1rem;
  color: var(--text-muted);
}

.quick-status-bar {
  margin-top: 4px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.07);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.status-dot-mini {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.status-dot-mini.online {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

/* ============================================================
   MESSAGES WITH DAD CARD
   ============================================================ */

.messages-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  border: 2px solid var(--bg-card-border);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.messages-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.msg-card-icon {
  font-size: 1.4rem;
}

.messages-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
}

.online-tag {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.online-tag.online {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

/* Feed */
.messages-feed {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 100%;
  -webkit-overflow-scrolling: touch;
}

.feed-empty-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: auto;
  padding: 20px;
}

.chat-bubble-wrap {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  max-width: 82%;
  animation: pop-in 0.25s ease-out;
}

@keyframes pop-in {
  0% { transform: scale(0.9) translateY(10px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.chat-bubble-wrap.dad {
  align-self: flex-start;
}

.chat-bubble-wrap.nyza {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.bubble-avatar {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}

.bubble-body {
  padding: 12px 18px;
  border-radius: 20px;
  font-size: 1.05rem;
  line-height: 1.4;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.chat-bubble-wrap.dad .bubble-body {
  background: linear-gradient(135deg, #1e293b, #334155);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  border-bottom-left-radius: 4px;
}

.chat-bubble-wrap.nyza .bubble-body {
  background: linear-gradient(135deg, #db2777, #be185d);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.bubble-time {
  font-size: 0.72rem;
  opacity: 0.7;
  display: block;
  margin-top: 4px;
  text-align: right;
}

/* Quick Replies Tray */
.quick-replies-tray {
  display: flex;
  gap: 8px;
  padding: 10px 18px;
  overflow-x: auto;
  white-space: nowrap;
  background: rgba(15, 23, 42, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  -webkit-overflow-scrolling: touch;
}

.quick-reply-chip {
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.35);
  color: #fbcfe8;
  padding: 8px 16px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.quick-reply-chip:active {
  transform: scale(0.92);
  background: var(--primary-pink);
  color: #fff;
}

/* Input Bar */
.chat-input-bar {
  display: flex;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-input-bar input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 25px;
  padding: 12px 20px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 1.05rem;
  outline: none;
}

.chat-input-bar input:focus {
  border-color: var(--primary-pink);
  background: rgba(255, 255, 255, 0.12);
}

.btn-send {
  background: linear-gradient(135deg, var(--primary-pink), var(--accent-purple));
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 0 22px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-send:active {
  transform: scale(0.94);
}

/* ============================================================
   FULLSCREEN MODALS (INCOMING, OUTGOING, SETTINGS)
   ============================================================ */

.fullscreen-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop-glow {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(28px);
}

.incoming-dialog, .outgoing-dialog {
  position: relative;
  z-index: 2;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border: 2px solid var(--primary-pink);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 50px rgba(236, 72, 153, 0.3);
  border-radius: 36px;
  padding: 40px;
  width: 90%;
  max-width: 480px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: modal-enter 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modal-enter {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.avatar-ring {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-glow-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.6) 0%, transparent 70%);
  animation: glow-pulse 1.8s infinite alternate;
}

@keyframes glow-pulse {
  0% { transform: scale(0.9); opacity: 0.5; }
  100% { transform: scale(1.2); opacity: 1; }
}

.avatar-circle {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  background: #1e1b4b;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.dialog-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.outgoing-heart {
  font-size: 4rem;
  animation: heart-beat 1.5s infinite;
}

.dialog-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.dialog-subtitle {
  font-size: 1.15rem;
  color: var(--primary-pink-light);
}

.outgoing-preview-wrap {
  position: relative;
  width: 220px;
  height: 140px;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  background: #000;
}

.outgoing-preview-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.preview-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  color: #fff;
}

.dialog-actions {
  display: flex;
  gap: 16px;
  width: 100%;
  margin-top: 10px;
}

.btn-dialog-answer, .btn-dialog-decline {
  flex: 1;
  padding: 18px 24px;
  border-radius: 28px;
  border: none;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-dialog-answer {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.5);
}

.btn-dialog-answer:active {
  transform: scale(0.94);
}

.btn-dialog-decline {
  background: linear-gradient(135deg, #e11d48, #ef4444);
  color: #fff;
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.5);
}

.btn-dialog-decline:active {
  transform: scale(0.94);
}

/* ============================================================
   ACTIVE VIDEO CALL STAGE (FULLSCREEN)
   ============================================================ */

.video-stage {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: #000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.remote-video-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #090d16;
}

.remote-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remote-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #1e1b4b 0%, #090d16 80%);
  gap: 16px;
  z-index: 2;
  transition: opacity 0.5s ease;
}

.remote-video-wrap.connected .remote-placeholder {
  opacity: 0;
  pointer-events: none;
}

.placeholder-avatar-pulse {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-pink);
  z-index: 2;
}

.ripple-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--primary-pink);
  animation: ring-pulse 2s infinite ease-out;
}

.remote-placeholder h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: #fff;
}

.remote-placeholder p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.stage-header-overlay {
  position: absolute;
  top: calc(var(--safe-top) + 16px);
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

.stage-tag {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  padding: 8px 18px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
}

.call-timer-badge {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  padding: 8px 18px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-family: monospace;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fbcfe8;
}

/* Local Video PIP (Nyza) */
.local-pip-box {
  position: absolute;
  top: calc(var(--safe-top) + 75px);
  right: 20px;
  width: 170px;
  height: 240px;
  border-radius: 24px;
  overflow: hidden;
  border: 3px solid rgba(244, 114, 182, 0.6);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  z-index: 20;
  background: #1e1b4b;
  cursor: grab;
  touch-action: none;
}

@media (max-width: 600px) {
  .local-pip-box {
    width: 120px;
    height: 170px;
    border-radius: 18px;
  }
}

.local-pip-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.pip-name-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.65);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
}

/* Burst Emoji Layer */
.reactions-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
  overflow: hidden;
}

.burst-emoji {
  position: absolute;
  bottom: 120px;
  font-size: 4rem;
  animation: float-emoji 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  pointer-events: none;
}

@keyframes float-emoji {
  0% {
    transform: translateY(0) scale(0.4) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: translateY(-300px) scale(1.4) rotate(15deg);
    opacity: 0.9;
  }
  100% {
    transform: translateY(-600px) scale(1.1) rotate(-15deg);
    opacity: 0;
  }
}

/* Video Controls Dock */
.video-controls-dock {
  position: absolute;
  bottom: calc(var(--safe-bottom) + 20px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  z-index: 30;
  width: 90%;
  max-width: 640px;
}

.emoji-tray {
  display: flex;
  gap: 10px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(20px);
  padding: 8px 16px;
  border-radius: 35px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.emoji-tap-btn {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  transition: transform 0.15s;
  padding: 4px;
}

.emoji-tap-btn:active {
  transform: scale(1.4);
}

.control-actions-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(24px);
  padding: 12px 24px;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.stage-ctrl-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 28px;
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 68px;
}

.stage-ctrl-btn .btn-icon {
  font-size: 1.6rem;
}

.stage-ctrl-btn .btn-caption {
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
}

.stage-ctrl-btn.off {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fca5a5;
}

.btn-hangup-large {
  background: linear-gradient(135deg, #e11d48, #ef4444);
  border: none;
  padding: 10px 24px;
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

.btn-hangup-large:active {
  transform: scale(0.92);
}

/* Call Ended Toast */
.call-ended-toast {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-card {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 2px solid var(--primary-pink);
  border-radius: 32px;
  padding: 36px 44px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: modal-enter 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-heart {
  font-size: 3.5rem;
}

.toast-card h3 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: #fff;
}

.toast-card p {
  font-size: 1.15rem;
  color: var(--primary-pink-light);
}

/* Settings Dialog */
.settings-dialog {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  width: 90%;
  max-width: 440px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  z-index: 2;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dialog-header h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
}

.btn-close-modal {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

.dialog-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.setting-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.setting-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 12px 16px;
  color: #fff;
  font-size: 1rem;
}

.setting-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.info-box {
  background: rgba(0, 0, 0, 0.25);
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.85rem;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dialog-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: flex-end;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-pink), var(--accent-purple));
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 10px 24px;
  font-weight: 700;
  cursor: pointer;
}
