/* iPhone Animation Styles */

.animate-slide-in {
  animation: slideIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.typing-indicator {
  animation: typing 2s ease-in-out infinite;
}

@keyframes typing {
  0%, 100% { opacity: 0.2; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1); }
}

.pulse-animation {
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.message-bounce {
  animation: messageBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes messageBounce {
  0% {
    opacity: 0;
    transform: translateX(-20px) scale(0.8);
  }
  50% {
    opacity: 0.8;
    transform: translateX(5px) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.notification-pop {
  animation: notificationPop 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes notificationPop {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-180deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.2) rotate(-90deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.glow-effect {
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
  }
  to {
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.6);
  }
}

.message-glow {
  animation: messageGlow 0.6s ease-out forwards;
}

@keyframes messageGlow {
  0% {
    box-shadow: 0 0 0 rgba(34, 197, 94, 0);
  }
  50% {
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
  }
  100% {
    box-shadow: 0 0 0 rgba(34, 197, 94, 0);
  }
}

.notification-item {
  animation: notificationSlide 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes notificationSlide {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lock-screen-glow {
  animation: lockScreenGlow 3s ease-in-out infinite;
}

@keyframes lockScreenGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(147, 51, 234, 0.5);
  }
}

.notification-vibrate {
  animation: vibrate 0.3s ease-in-out;
}

@keyframes vibrate {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

.phone-vibrate {
  animation: phoneVibrate 0.5s ease-in-out;
}

@keyframes phoneVibrate {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-1px) rotate(0.5deg); }
  75% { transform: translateY(1px) rotate(-0.5deg); }
}

/* iPhone Frame Styling */
.iphone-frame {
  position: relative;
  width: 320px;
  height: 650px;
  background-color: #000;
  border-radius: 45px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), /* Deep shadow */
              0 0 0 8px #222, /* Inner border */
              inset 0 0 10px rgba(255, 255, 255, 0.1), /* Inner glow */
              inset 0 0 20px rgba(0, 0, 0, 0.8); /* Inner darkness */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border: 2px solid #333; /* Physical phone border */
}

/* iPhone Side Buttons */
.side-button {
  position: absolute;
  background-color: #333;
  border-radius: 3px;
  z-index: 15;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}

.power-button {
  right: -5px;
  top: 180px;
  width: 5px;
  height: 60px;
}

.volume-up-button {
  left: -5px;
  top: 120px;
  width: 5px;
  height: 40px;
}

.volume-down-button {
  left: -5px;
  top: 180px;
  width: 5px;
  height: 40px;
}

.mute-switch {
  left: -5px;
  top: 70px;
  width: 5px;
  height: 20px;
  border-radius: 2px;
}

/* iPhone Notch */
.iphone-notch {
  position: absolute;
  top: 0px;
  width: 120px;
  height: 25px;
  background-color: #000;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  z-index: 10;
}

/* iPhone Screen Container */
.iphone-screen {
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  border-radius: 35px;
  position: relative;
  overflow: hidden; /* Crucial for layers */
}

/* Wallpaper Layer */
#wallpaper {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(34, 197, 94, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(5, 150, 105, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 60% 20%, rgba(4, 120, 87, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 90% 40%, rgba(6, 95, 70, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 10% 60%, rgba(6, 78, 59, 0.2) 0%, transparent 50%),
    linear-gradient(135deg, #10b981 0%, #059669 20%, #047857 40%, #065f46 60%, #064e3b 80%, #022c22 100%);
  background-size: cover;
  background-position: center;
  z-index: 0;
}

/* Homescreen Layer (always hidden/blurred) */
#homescreen {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-image: url("https://i.imgur.com/OaFfuMV.png");
  background-size: cover;
  background-position: center;
  z-index: 1;
  filter: blur(20px) opacity(0);
  transition: none;
}

/* Lockscreen Layer (always visible) */
#lockscreen {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: 35px;
  overflow: hidden;
  z-index: 2;
  backdrop-filter: blur(8px) saturate(1) brightness(1);
  -webkit-backdrop-filter: blur(8px) saturate(1) brightness(1);
  transition: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 35px;
  box-sizing: border-box;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Status Bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  width: 85%;
  margin-bottom: 15px;
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.9;
  align-items: center;
}



/* Battery Icon Styling */
.battery-icon {
  width: 20px;
  height: 10px;
  position: relative;
  border: 1px solid #fff;
  border-radius: 2.5px;
  margin-left: 5px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 1px;
  box-sizing: border-box;
}

.battery-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -3px;
  width: 1.5px;
  height: 5px;
  background-color: #fff;
  border-radius: 0 1px 1px 0;
  transform: translateY(-50%);
}

.battery-level {
  height: 100%;
  width: 85%;
  background-color: #fff;
  border-radius: 1px;
}

/* Time and Date */
.time {
  font-size: 3.8rem;
  font-weight: 800;
  margin-bottom: 0px;
  line-height: 1;
  position: relative;
  top: 0px;
  transition: none;
}

.date {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 15px;
  opacity: 0.9;
}

/* Notifications Container */
.notifications-container {
  width: calc(100% - 6px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 490px;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 0 3px;
  padding-bottom: 20px;
  mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

.notifications-container::-webkit-scrollbar {
  display: none;
}

/* Individual Notification Styling */
.notification {
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 18px;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  color: #fff;
  text-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.notification.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.notification-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.notification-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  margin-right: 12px;
  background-color: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: none;
  overflow: hidden;
}

.notification-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
}

.notification-app {
  font-weight: 700;
  font-size: 1rem;
  flex-grow: 1;
  opacity: 0.95;
}

.notification-time {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.notification-title {
  font-weight: 700;
  margin-bottom: 5px;
  font-size: 1rem;
}

.notification-body {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.3;
}

/* Accordion Styles */
.toggle-solution {
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
}

.toggle-solution:hover {
  background-color: rgba(34, 197, 94, 0.1);
  border-radius: 8px;
  padding: 8px;
  margin: -8px;
}

.solution-content {
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}

.solution-content.hidden {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.solution-content:not(.hidden) {
  max-height: 200px;
  opacity: 1;
} 