/* Custom effects — Tailwind handles layout */

@keyframes aurora {
  0%, 100% { opacity: 0.45; transform: translate3d(0, 0, 0) scale(1); }
  50% { opacity: 0.65; transform: translate3d(1%, -1%, 0) scale(1.03); }
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -5px, 0); }
}

@keyframes shimmer {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(16px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateX(16px); }
}

.aurora-blob { animation: aurora 18s ease-in-out infinite; }
.aurora-blob-delay { animation-delay: -4s; }
.aurora-blob-delay2 { animation-delay: -8s; }

.float-card { animation: float 7s ease-in-out infinite; }
.float-card-delay { animation-delay: -2.5s; }

.btn-shimmer {
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}

.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

/* Hero bento preview */
.hero-bento__shell {
  box-shadow: 0 28px 80px -32px rgba(0, 0, 0, 0.65);
}

.hero-bento__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
}

.hero-bento__panel {
  grid-column: 1 / -1;
}

.hero-bento__bar {
  grid-column: 1 / -1;
}

.hero-bento__row {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.hero-bento__row--risk {
  border-color: rgba(244, 63, 94, 0.22);
  background: rgba(244, 63, 94, 0.06);
}

.hero-bento__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-bento__metric {
  padding: 0.875rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.hero-bento__metric--accent {
  border-color: rgba(16, 185, 129, 0.18);
  background: rgba(16, 185, 129, 0.06);
}

.glow-border {
  position: relative;
}
.glow-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.02), rgba(16,185,129,0.2));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  pointer-events: none;
}

.card-enter { animation: motion-card-in 0.75s cubic-bezier(0.16, 1, 0.3, 1) both; }

.toast-enter { animation: toast-in 0.4s cubic-bezier(0.22,1,0.36,1); }
.toast-exit { animation: toast-out 0.3s ease forwards; }

.modal-backdrop { animation: fade-up 0.25s ease both; }
.modal-panel { animation: fade-up 0.35s cubic-bezier(0.22,1,0.36,1) both; }

.btn-loading .btn-label { opacity: 0; }
.btn-loading .btn-spinner { display: flex; }

.is-connected-wallet {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  color: rgb(110, 231, 183) !important;
}

.card-done { opacity: 0.4; pointer-events: none; filter: grayscale(0.3); }

.filter-active {
  background: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.lang-open .lang-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) scale(1) !important;
}

/* Mega menu */
.mega-panel {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
}

.mega-panel.mega-open,
.mega-wrap:hover .mega-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

@media (min-width: 1024px) {
  .mega-wrap:hover [data-mega-trigger] { color: white; }
}

.mobile-nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.mobile-nav.mobile-open {
  max-height: 480px;
}

details summary::-webkit-details-marker { display: none; }

/* Security / threats section */
.threat-row {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.4s ease, background 0.4s ease;
}

.threat-row:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.defense-cell {
  padding: 1.5rem 1.25rem;
}

@media (min-width: 640px) {
  .defense-cell { padding: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-blob, .float-card, .btn-shimmer { animation: none; }
}
