/* nl-3d.css */

.n3d-card {
  perspective: 1200px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.6s ease;
  border-radius: 18px;
}

.n3d-card.is-flipped {
  transform: rotateY(180deg);
}

.n3d-card.is-hovered {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(1.02);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45);
}

.n3d-card .n3d-front,
.n3d-card .n3d-back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: inherit;
}

.n3d-card .n3d-back {
  transform: rotateY(180deg);
}

.n3d-glow {
  position: relative;
  overflow: hidden;
}

.n3d-glow::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.55), rgba(212, 175, 55, 0) 40%, rgba(212, 175, 55, 0) 60%, rgba(212, 175, 55, 0.55));
  filter: blur(8px);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
}

.n3d-glow:hover::before { opacity: 1; }

.n3d-float {
  animation: n3d-float 6s ease-in-out infinite;
  transform-style: preserve-3d;
}

@keyframes n3d-float {
  0%, 100% { transform: translateY(0) rotateX(6deg) rotateY(-8deg); }
  50% { transform: translateY(-14px) rotateX(-6deg) rotateY(8deg); }
}

.n3d-pulse {
  animation: n3d-pulse 2.4s ease-in-out infinite;
  transform-origin: center;
}

@keyframes n3d-pulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.04); filter: brightness(1.12); }
}

.n3d-spin {
  animation: n3d-spin 14s linear infinite;
  transform-style: preserve-3d;
}

@keyframes n3d-spin {
  to { transform: rotateX(360deg) rotateY(360deg); }
}

.n3d-reveal {
  opacity: 0;
  transform: translateY(30px) rotateX(20deg);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.n3d-reveal.is-in {
  opacity: 1;
  transform: translateY(0) rotateX(0deg);
}

.n3d-shimmer {
  position: relative;
  overflow: hidden;
}

.n3d-shimmer::after {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: n3d-shimmer 3.2s ease-in-out infinite;
}

@keyframes n3d-shimmer {
  0%, 100% { left: -120%; }
  60%, 100% { left: 140%; }
}

.n3d-input {
  transition: all 0.3s ease;
  border-radius: 10px;
}

.n3d-input:focus {
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
  transform: translateY(-1px);
}

.n3d-btn {
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease, filter 0.3s ease;
  transform-style: preserve-3d;
}

.n3d-btn:hover {
  transform: translateY(-3px) rotateX(6deg);
  box-shadow: 0 14px 28px -10px rgba(212, 175, 55, 0.6);
  filter: brightness(1.05);
}

.n3d-btn:active { transform: translateY(-1px) scale(0.98); }

.n3d-ripple {
  position: relative;
  overflow: hidden;
}

.n3d-ripple::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255, 255, 255, 0.45);
  animation: n3d-ripple 0.6s ease-out;
}

@keyframes n3d-ripple {
  to { transform: scale(4); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .n3d-float, .n3d-pulse, .n3d-spin, .n3d-shimmer, .n3d-reveal, .n3d-card, .n3d-btn {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}