#ipnft-module {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  min-height: 500px;
  /* 优化折叠区渲染成本 */
  content-visibility: auto;
  contain-intrinsic-size: 600px 500px;
}

.ipnft-bg {
  position: absolute;
  inset: 0;
  background: url('/images/ipnft-bg.jpeg') center/cover no-repeat, url('/ipnft-bg.jpeg') center/cover no-repeat;
  z-index: 0;
  transform-origin: center;
  will-change: transform;
  /* Enhanced background for better visual consistency */
  background-size: 110% auto;
  background-position: center 40%;
}

.ipnft-mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* Enhanced mask for better text readability and visual depth */
  background:
    linear-gradient(90deg, 
      rgba(5,12,24,.72) 0%, 
      rgba(5,12,24,.42) 32%, 
      rgba(5,12,24,.15) 56%, 
      rgba(5,12,24,0) 70%),
    radial-gradient(60% 60% at 55% 45%, 
      rgba(5,12,24,.00) 0%, 
      rgba(5,12,24,.38) 60%, 
      rgba(5,12,24,.58) 100%);
  /* Subtle breathing animation */
  animation: breathe 12s ease-in-out infinite;
}

.ipnft-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.ipnft-content {
  position: relative;
  z-index: 3;
}

/* Enhanced Ken Burns animation */
@keyframes kenBurns {
  0%, 100% {
    transform: scale(1.02) translate3d(0.8%, -0.6%, 0);
  }
  33% {
    transform: scale(1.04) translate3d(-0.5%, 0.8%, 0);
  }
  66% {
    transform: scale(1.03) translate3d(0.6%, -0.4%, 0);
  }
}

/* Breathing animation for mask overlay */
@keyframes breathe {
  0%, 100% {
    opacity: 1;
    filter: brightness(1);
  }
  50% {
    opacity: 0.95;
    filter: brightness(1.04);
  }
}

.kb-fallback {
  animation: kenBurns 16s ease-in-out infinite;
}

/* Reduced motion support */
[data-reduce-motion] .ipnft-canvas {
  display: none !important;
}

[data-reduce-motion] .kb-fallback {
  animation: none;
}

/* Performance optimization for mobile */
@media (max-width: 768px) {
  .ipnft-canvas {
    image-rendering: auto;
  }
  
  .ipnft-bg {
    transform: scale(1.02);
    background-size: 105% auto;
    animation-duration: 20s; /* Slower animation for better performance */
  }
  
  .ipnft-mask {
    animation-duration: 16s;
  }
  
  .kb-fallback {
    animation-duration: 20s;
  }
}

/* Low-end device optimization */
@media (max-width: 480px) {
  .ipnft-bg {
    background-size: cover;
    animation: none; /* Disable animation on very small screens */
  }
  
  .ipnft-mask {
    animation: none;
  }
}

/* High DPI screens */
@media (min-resolution: 192dpi) {
  .ipnft-canvas {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}
/* High-contrast text tokens for vivid animated backgrounds */
:root {
  --text-strong: #F4F8FF;   /* title - highest contrast */
  --text-body:   #D7E6FF;   /* paragraphs - high contrast */
  --text-dim:    #B5C9E8;   /* small meta - readable contrast */
  --accent:      #00E676;   /* brand accent for highlights */
}

/* Enhanced scrim overlay for maximum text readability */
.ipnft-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(90deg,
      rgba(6,14,25,0.82) 0%,
      rgba(6,14,25,0.72) 28%,
      rgba(6,14,25,0.50) 52%,
      rgba(6,14,25,0.22) 68%,
      rgba(6,14,25,0.00) 78%),
    radial-gradient(60% 60% at 28% 42%,
      rgba(6,14,25,0.00) 0%,
      rgba(6,14,25,0.36) 62%,
      rgba(6,14,25,0.56) 100%);
  /* Soft blur for noisy frames */
  backdrop-filter: blur(2px);
}

/* Module container styling */
#ipnft-module {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

/* Content wrapper - positioned above scrim */
.ipnft-content {
  position: relative;
  z-index: 3;
  max-width: 560px;
  padding: clamp(20px, 4vw, 40px);
}

/* Reset and apply consistent text colors */
.ipnft-content,
.ipnft-content * {
  color: var(--text-body);
}

/* Typography scale with responsive sizing */
.ipnft-content h2 {
  color: var(--text-strong);
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.12;
  letter-spacing: 0.2px;
  margin: 0 0 12px;
  font-weight: 700;
}

.ipnft-content p {
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.5;
  margin: 0 0 18px;
  max-width: 54ch;
}

.ipnft-content p.lead {
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.5;
  margin: 0 0 18px;
  max-width: 54ch;
}

/* Meta text styling */
.ipnft-content .meta {
  color: var(--text-dim);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Benefits list layout */
.ipnft-bullets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 22px;
  margin: 14px 0 22px;
  list-style: none;
}

.ipnft-bullets li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 500;
}

.ipnft-bullets li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Readability enhancement with subtle shadows */
.ipnft-content h2,
.ipnft-content p,
.ipnft-bullets li {
  text-shadow:
    0 1px 2px rgba(0,0,0,0.45),
    0 8px 24px rgba(0,0,0,0.35);
}

/* CTA button prominence */
.ipnft-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #05121A;
  background: linear-gradient(90deg, #25F29B, #36F1CD);
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 6px 24px rgba(37,242,155,0.25);
  font-size: 0.95rem;
}

.ipnft-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(37,242,155,0.35);
}

.ipnft-cta:focus-visible {
  outline: 2px solid #A8FFF0;
  outline-offset: 2px;
}

.ipnft-cta:active {
  transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 960px) {
  .ipnft-content {
    max-width: 100%;
    padding: clamp(16px, 3vw, 32px);
  }
  
  .ipnft-bullets {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .ipnft-content h2 {
    font-size: clamp(24px, 4vw, 32px);
    margin-bottom: 16px;
  }
}

/* Mobile-specific optimizations */
@media (max-width: 640px) {
  .ipnft-scrim {
    background:
      linear-gradient(90deg,
        rgba(6,14,25,0.88) 0%,
        rgba(6,14,25,0.78) 40%,
        rgba(6,14,25,0.45) 70%,
        rgba(6,14,25,0.15) 100%),
      radial-gradient(70% 70% at 30% 40%,
        rgba(6,14,25,0.00) 0%,
        rgba(6,14,25,0.42) 60%,
        rgba(6,14,25,0.62) 100%);
  }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .ipnft-scrim {
    backdrop-filter: none;
  }
  
  .ipnft-content h2,
  .ipnft-content p,
  .ipnft-bullets li {
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  }
  
  .ipnft-cta {
    transition: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --text-strong: #FFFFFF;
    --text-body: #F0F8FF;
    --text-dim: #E0E8F0;
  }
  
  .ipnft-scrim {
    background:
      linear-gradient(90deg,
        rgba(0,0,0,0.9) 0%,
        rgba(0,0,0,0.8) 30%,
        rgba(0,0,0,0.6) 50%,
        rgba(0,0,0,0.3) 70%,
        rgba(0,0,0,0.0) 80%);
  }
  
  .ipnft-content h2,
  .ipnft-content p,
  .ipnft-bullets li {
    text-shadow:
      0 1px 2px rgba(0,0,0,0.8),
      0 2px 4px rgba(0,0,0,0.6);
  }
}

/* Print styles */
@media print {
  .ipnft-scrim {
    display: none;
  }
  
  .ipnft-content h2,
  .ipnft-content p,
  .ipnft-bullets li {
    color: #000000 !important;
    text-shadow: none !important;
  }
}
