/* Ultra-Premium Feature Popup Component */
/* Inspired by PlayStation, NVIDIA, and Apple UI */

/* Backdrop with frosted glass effect */
.feature-popup-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 99998 !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  display: block !important;
}

.feature-popup-backdrop.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: all !important;
  display: block !important;
}

/* Main popup card container */
.feature-popup-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  background: linear-gradient(135deg, 
    rgba(20, 20, 30, 0.95) 0%,
    rgba(15, 15, 25, 0.98) 50%,
    rgba(10, 10, 20, 0.95) 100%);
  border-radius: 24px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 100px rgba(100, 150, 255, 0.1);
  z-index: 99999 !important;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  display: flex !important;
  flex-direction: row;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glossy edge and subtle reflection overlays */
.feature-popup-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.0) 30%,
    rgba(255, 255, 255, 0.02) 70%,
    rgba(255, 255, 255, 0.08) 100%);
  mix-blend-mode: screen;
}

.feature-popup-card::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120%;
  height: 120%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(closest-side,
    rgba(100, 150, 255, 0.12),
    rgba(0, 0, 0, 0) 70%);
  filter: blur(24px);
}

.feature-popup-card.active {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translate(-50%, -50%) scale(1) !important;
  display: flex !important;
}

/* Close button */
.feature-popup-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.feature-popup-close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg) scale(1.1);
}

.feature-popup-close svg {
  width: 20px;
  height: 20px;
  stroke: rgba(255, 255, 255, 0.8);
  stroke-width: 2;
  transition: stroke 0.3s ease;
}

.feature-popup-close:hover svg {
  stroke: rgba(255, 255, 255, 1);
}

/* Image section (left side) */
.feature-popup-image-container {
  flex: 0 0 50%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, 
    rgba(30, 30, 50, 0.8) 0%,
    rgba(20, 20, 40, 0.9) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s,
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.feature-popup-card.active .feature-popup-image-container {
  opacity: 1;
  transform: translateX(0);
}

.feature-popup-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 600px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 0 60px rgba(100, 150, 255, 0.1);
}

.feature-popup-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1.1) contrast(1.1);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-popup-image-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(100, 150, 255, 0.1) 0%,
    rgba(255, 100, 150, 0.1) 50%,
    rgba(150, 100, 255, 0.1) 100%
  );
  opacity: 0.6;
  z-index: 1;
  pointer-events: none;
}

.feature-popup-image-wrapper::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: shimmer 3s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
}

@keyframes shimmer {
  0%, 100% {
    transform: translate(-50%, -50%) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: translate(-50%, -50%) rotate(180deg);
    opacity: 0.6;
  }
}

/* Content section (right side) */
.feature-popup-content {
  flex: 0 0 50%;
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  position: relative;
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s,
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
}

.feature-popup-card.active .feature-popup-content {
  opacity: 1;
  transform: translateX(0);
}

/* Typography */
.feature-popup-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: #ffffff;
  margin: 0;
  background: linear-gradient(135deg, 
    #ffffff 0%,
    rgba(255, 255, 255, 0.9) 50%,
    rgba(200, 220, 255, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  text-shadow: 0 0 30px rgba(100, 150, 255, 0.3);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUpIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
}

.feature-popup-description {
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  font-weight: 400;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUpIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.8s forwards;
}

/* Typewriter effect container */
.feature-popup-description.typewriter {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid rgba(255, 255, 255, 0.3);
  animation: typing 2s steps(40, end) 0.8s forwards,
             blinkCursor 0.75s step-end infinite 2.8s;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
    white-space: normal;
  }
}

@keyframes blinkCursor {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: rgba(255, 255, 255, 0.3);
  }
}

@keyframes fadeUpIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Buttons container */
.feature-popup-buttons {
  display: flex;
  gap: 20px;
  margin-top: 8px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUpIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 1s forwards;
}

/* Premium button styles */
.feature-popup-btn {
  flex: 1;
  padding: 18px 32px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  font-family: inherit;
  z-index: 1;
}

/* Primary button (Play Now) */
.feature-popup-btn-primary {
  background: linear-gradient(135deg, 
    #667eea 0%,
    #764ba2 50%,
    #f093fb 100%);
  color: #ffffff;
  box-shadow: 
    0 8px 24px rgba(102, 126, 234, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.feature-popup-btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent);
  transition: left 0.6s ease;
  z-index: -1;
}

.feature-popup-btn-primary:hover::before {
  left: 100%;
}

.feature-popup-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 32px rgba(102, 126, 234, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 40px rgba(102, 126, 234, 0.3);
}

.feature-popup-btn-primary:active {
  transform: translateY(0);
}

/* Secondary button (See in Detail) */
.feature-popup-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.feature-popup-btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.feature-popup-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 30px rgba(255, 255, 255, 0.1);
}

.feature-popup-btn-secondary:hover::before {
  opacity: 1;
}

.feature-popup-btn-secondary:active {
  transform: translateY(0);
}

/* Responsive design */
@media (max-width: 1024px) {
  .feature-popup-card {
    flex-direction: column;
    max-width: 95%;
    max-height: 95vh;
  }

  .feature-popup-image-container {
    flex: 0 0 auto;
    padding: 40px 30px;
    max-height: 300px;
  }

  .feature-popup-content {
    flex: 1 1 auto;
    padding: 40px 30px;
    overflow-y: auto;
  }

  .feature-popup-title {
    font-size: 2.5rem;
  }

  .feature-popup-buttons {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .feature-popup-card {
    border-radius: 20px;
  }

  .feature-popup-image-container {
    padding: 30px 20px;
    max-height: 250px;
  }

  .feature-popup-content {
    padding: 30px 24px;
    gap: 24px;
  }

  .feature-popup-title {
    font-size: 2rem;
  }

  .feature-popup-description {
    font-size: 1rem;
  }

  .feature-popup-btn {
    padding: 16px 24px;
    font-size: 0.9rem;
  }

  .feature-popup-close {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .feature-popup-title {
    font-size: 1.75rem;
  }

  .feature-popup-description {
    font-size: 0.95rem;
  }

  .feature-popup-buttons {
    gap: 12px;
  }
}

/* Prevent body scroll when popup is open */
body.popup-open {
  overflow: hidden;
}

