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

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─── VIDEO SCREEN — sempre no DOM, atras da tela de chamada ─── */
#video-screen {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 1;
}

#call-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#video-blocker {
  position: absolute;
  inset: 0;
  z-index: 5;
}

#end-overlay {
  position: absolute;
  inset: 0;
  z-index: 7;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: background 0.8s ease, opacity 0.8s ease;
}

#end-overlay.visible {
  background: rgba(0, 0, 0, 0.55);
  opacity: 1;
  pointer-events: all;
}

#btn-sim {
  background: #4CAF50;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  border: none;
  border-radius: 50px;
  padding: 18px 64px;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(76, 175, 80, 0.5);
  transform: scale(0.85);
  transition: transform 0.4s ease;
}

#end-overlay.visible #btn-sim {
  transform: scale(1);
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding-top: max(env(safe-area-inset-top), 48px);
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 6;
}

.video-caller-name {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

.video-timer {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
}

.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px;
  padding-bottom: max(env(safe-area-inset-bottom), 40px);
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  z-index: 6;
}

.ctrl-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  width: 58px;
  height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 4px;
}

.ctrl-btn svg {
  width: 22px;
  height: 22px;
}

.ctrl-btn span {
  font-size: 10px;
  color: rgba(255,255,255,0.8);
}

.btn-end-call {
  background: #e53935;
  width: 66px;
  height: 66px;
  box-shadow: 0 4px 16px rgba(229,57,53,0.5);
}

/* ─── CALL SCREEN — na frente, some ao atender ─── */
#call-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding-top: max(env(safe-area-inset-top), 48px);
  padding-bottom: max(env(safe-area-inset-bottom), 40px);
  padding-left: 24px;
  padding-right: 24px;
  transition: opacity 0.3s ease;
}

#call-screen.dismissing {
  opacity: 0;
  pointer-events: none;
}

.bg-photo {
  position: absolute;
  inset: 0;
  background: url('woman.png') center/cover no-repeat;
  filter: blur(18px) brightness(0.55);
  transform: scale(1.1);
  z-index: 0;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.25) 0%,
    rgba(0,0,0,0.05) 45%,
    rgba(0,0,0,0.55) 100%
  );
  z-index: 1;
}

.caller-info {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.caller-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.8);
  box-shadow: 0 4px 24px rgba(0,0,0,0.45);
}

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

.caller-name {
  color: #fff;
  font-size: 26px;
  font-weight: 600;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}

.call-status {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
}

/* ─── SWIPE ─── */
.answer-area {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.swipe-label {
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  letter-spacing: 0.3px;
}

.swipe-track {
  position: relative;
  width: 72px;
  height: 130px;
  background: rgba(255,255,255,0.15);
  border-radius: 36px;
  border: 1.5px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
  overflow: hidden;
}

.swipe-arrow {
  position: absolute;
  top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  animation: bounce 1.4s ease-in-out infinite;
}

.swipe-arrow span {
  display: block;
  width: 10px;
  height: 10px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(-45deg);
  opacity: 0.5;
}

@keyframes bounce {
  0%, 100% { transform: translateY(4px); opacity: 0.3; }
  50%       { transform: translateY(-2px); opacity: 0.7; }
}

.swipe-thumb {
  position: absolute;
  bottom: 6px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #4CAF50;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 16px rgba(76,175,80,0.65);
  cursor: grab;
  touch-action: none;
  z-index: 2;
}

.swipe-thumb svg {
  width: 28px;
  height: 28px;
}
