/* SMS Page Specific Styles */

/* SMS page art container adjustment */
.art-inner {
  min-height: 450px;
  height: 450px;
  max-width: 320px;
}

.phone-device {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 420px;
  background: linear-gradient(135deg, #0ea5e9, #22c55e);
  border-radius: 36px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.9);
  transform-origin: center;
  animation: phone-sequence 12s ease-in-out infinite;
  z-index: 5;
  padding: 20px;
  overflow: hidden;
  transition: all 0.5s ease;
}

.phone-device::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
  border-radius: 28px 28px 0 0;
}

.phone-device.getting-hooked {
  animation: phone-hacked 2s ease-in forwards;
  z-index: 15;
}

/* Phone states for animation sequence */
.phone-device.state-receive {
  animation: phone-receive-text 3s ease-in-out;
}

.phone-device.state-click {
  animation: phone-click-link 2s ease-in-out;
}

.phone-device.state-hacked {
  animation: phone-hacked-final 4s ease-in-out;
  filter: hue-rotate(0deg) brightness(0.7);
}

.phone-device.getting-hooked::after {
  content: "";
  position: absolute;
  top: -30px;
  left: 50%;
  width: 2px;
  height: 30px;
  background: linear-gradient(
    to top,
    rgba(148, 163, 184, 0.9),
    rgba(148, 163, 184, 0)
  );
  transform: translateX(-50%);
  z-index: -1;
}

/* Phone notch */
.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 6px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 4px;
}

/* Phone screen content */
.phone-screen {
  position: absolute;
  top: 24px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, 0.1);
  border-radius: 24px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.phone-contact {
  height: 36px;
  background: rgba(15, 23, 42, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.75rem;
  color: rgba(15, 23, 42, 0.6);
  font-weight: 500;
  animation: contact-appear 0.5s ease-in;
}

.phone-contact.unknown {
  background: rgba(248, 113, 113, 0.2);
  border: 2px solid rgba(248, 113, 113, 0.4);
  color: #fee2e2;
}

.phone-message {
  background: rgba(248, 113, 113, 0.2);
  border-radius: 14px;
  border: 2px solid rgba(248, 113, 113, 0.5);
  padding: 14px;
  font-size: 0.7rem;
  color: #fee2e2;
  line-height: 1.5;
  animation: message-appear 0.8s ease-in;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.phone-message:hover {
  background: rgba(248, 113, 113, 0.3);
  border-color: rgba(248, 113, 113, 0.7);
  transform: scale(1.02);
}

.phone-message.clicked {
  animation: message-clicked 0.5s ease-in;
  background: rgba(34, 197, 94, 0.3);
  border-color: rgba(34, 197, 94, 0.6);
}

.phone-message-title {
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.phone-message-title::before {
  content: "⚠";
  font-size: 0.7rem;
}

.phone-message-text {
  opacity: 0.9;
}

.phone-keyboard {
  position: absolute;
  bottom: 14px;
  left: 10px;
  right: 10px;
  height: 40px;
  background: rgba(15, 23, 42, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: rgba(15, 23, 42, 0.5);
}

/* Hacked state visuals */
.phone-device.hacked .phone-screen {
  background: rgba(239, 68, 68, 0.2);
  border: 2px solid rgba(239, 68, 68, 0.6);
}

.phone-device.hacked .phone-screen::before {
  content: "⚠";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  color: rgba(239, 68, 68, 0.8);
  animation: hack-warning 1s ease-in-out infinite;
  z-index: 10;
}

.phone-device.hacked .phone-screen::after {
  content: "HACKED";
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  font-weight: 700;
  color: #ef4444;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  z-index: 10;
  animation: hack-text 1s ease-in-out infinite;
}

.hack-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9;
}

.hack-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #ef4444;
  border-radius: 50%;
  animation: particle-float 2s ease-out infinite;
}

/* Animation sequence: receive -> click -> hacked */
@keyframes phone-sequence {
  0% {
    transform: translateX(-50%) translateY(0) scale(1);
    filter: brightness(1);
  }
  /* Receive text (0-25%) */
  5% {
    transform: translateX(-50%) translateY(-5px) scale(1);
  }
  10% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  /* Click link (25-40%) */
  30% {
    transform: translateX(-50%) translateY(-8px) scale(1.05);
  }
  35% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  /* Getting hacked (40-100%) */
  45% {
    transform: translateX(-50%) translateY(0) scale(1);
    filter: brightness(0.9) hue-rotate(0deg);
  }
  50% {
    transform: translateX(-50%) translateY(0) scale(0.98);
    filter: brightness(0.8) hue-rotate(10deg);
  }
  60% {
    transform: translateX(-50%) translateY(0) scale(0.95);
    filter: brightness(0.7) hue-rotate(20deg);
  }
  70%, 100% {
    transform: translateX(-50%) translateY(0) scale(0.95);
    filter: brightness(0.6) hue-rotate(30deg);
  }
}

@keyframes phone-receive-text {
  0% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
  }
  100% {
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes phone-click-link {
  0% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.08);
  }
  100% {
    transform: translateX(-50%) scale(1);
  }
}

@keyframes phone-hacked-final {
  0% {
    filter: brightness(1) hue-rotate(0deg);
  }
  50% {
    filter: brightness(0.7) hue-rotate(15deg);
  }
  100% {
    filter: brightness(0.6) hue-rotate(30deg);
  }
}

@keyframes contact-appear {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes message-appear {
  0% {
    opacity: 0;
    transform: translateX(-20px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes message-clicked {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.6);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes hack-warning {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2) rotate(10deg);
    opacity: 1;
  }
}

@keyframes hack-text {
  0%, 100% {
    opacity: 0.8;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.05);
  }
}

@keyframes particle-float {
  0% {
    opacity: 1;
    transform: translateY(0) translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) translateX(var(--particle-x, 0));
  }
}

@keyframes message-pulse {
  0%, 100% {
    border-color: rgba(248, 113, 113, 0.5);
    box-shadow: 0 0 0 rgba(248, 113, 113, 0);
  }
  50% {
    border-color: rgba(248, 113, 113, 0.8);
    box-shadow: 0 0 12px rgba(248, 113, 113, 0.4);
  }
}

@keyframes bubble-float {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-15px) translateX(5px);
    opacity: 1;
  }
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .art-inner {
    min-height: 420px;
    height: 420px;
    max-width: 300px;
  }
  
  .phone-device {
    width: 220px;
    height: 380px;
  }
}

@media (max-width: 700px) {
  .art-inner {
    min-height: 400px;
    height: 400px;
    max-width: 280px;
  }
  
  .phone-device {
    width: 200px;
    height: 340px;
  }
}
