/* ============================================================
   JALWA GAME — Professional Animations
   ============================================================ */

/* -----------------------------------------------------------
   1. PAGE LOAD — body fade in
   ----------------------------------------------------------- */
@keyframes jalwa-pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  animation: jalwa-pageFadeIn 0.6s ease-out both;
}

/* -----------------------------------------------------------
   2. NAV — slide down from top
   ----------------------------------------------------------- */
@keyframes jalwa-navSlide {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#site-navigation {
  animation: jalwa-navSlide 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* -----------------------------------------------------------
   3. LOGO — pulse glow (index page hero logo)
   ----------------------------------------------------------- */
@keyframes jalwa-logoGlow {
  0%,
  100% {
    box-shadow:
      0 0 20px rgba(0, 236, 190, 0.3),
      0 0 60px rgba(0, 236, 190, 0.1);
  }
  50% {
    box-shadow:
      0 0 40px rgba(0, 236, 190, 0.7),
      0 0 120px rgba(0, 236, 190, 0.25);
  }
}

@keyframes jalwa-logoFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.wp-block-image.logo img,
.wp-block-image.logo figure {
  animation: jalwa-logoFloat 3.5s ease-in-out infinite;
}

.wp-block-image.logo a {
  display: inline-block;
  border-radius: 30px;
  animation: jalwa-logoGlow 3.5s ease-in-out infinite;
}

/* -----------------------------------------------------------
   4. HEADER LOGO (nav) — pulse
   ----------------------------------------------------------- */
@keyframes jalwa-navLogoPulse {
  0%,
  100% {
    filter: drop-shadow(0 0 4px rgba(0, 236, 190, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(0, 236, 190, 0.9));
  }
}

.navigation-branding img {
  animation: jalwa-navLogoPulse 4s ease-in-out infinite;
}

/* -----------------------------------------------------------
   5. REGISTER / LOGIN BUTTONS — shimmer + scale
   ----------------------------------------------------------- */
@keyframes jalwa-shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes jalwa-btnPop {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.registerbtnn a,
.registerbtn a {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    90deg,
    #7afec3 0%,
    #02afb6 30%,
    #00fff0 50%,
    #02afb6 70%,
    #7afec3 100%
  );
  background-size: 200% auto;
  animation:
    jalwa-btnPop 0.6s 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both,
    jalwa-shimmer 3s linear infinite;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease !important;
}

.registerbtnn a:hover,
.registerbtn a:hover {
  transform: scale(1.06) !important;
  box-shadow: 0 0 24px rgba(0, 236, 190, 0.6) !important;
}

.loginbtnn a,
.loginbtn a {
  animation: jalwa-btnPop 0.6s 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease !important;
}

.loginbtnn a:hover,
.loginbtn a:hover {
  transform: scale(1.06) !important;
  box-shadow: 0 0 20px rgba(0, 236, 190, 0.4) !important;
}

/* -----------------------------------------------------------
   6. H1 TITLE — fade + slide up
   ----------------------------------------------------------- */
@keyframes jalwa-titleIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

h1 {
  animation: jalwa-titleIn 0.7s 0.2s ease-out both;
}

/* -----------------------------------------------------------
   7. GIFT CODE — typewriter glow blink
   ----------------------------------------------------------- */
@keyframes jalwa-giftBlink {
  0%,
  100% {
    border-color: rgba(0, 236, 190, 0.9);
  }
  50% {
    border-color: rgba(0, 236, 190, 0.2);
  }
}

p.has-text-align-center:has(+ p) code,
/* fallback — target the gift code paragraph by content proximity */
.entry-content > p:nth-child(5) {
  border: 1px solid rgba(0, 236, 190, 0.6);
  padding: 4px 10px;
  border-radius: 4px;
  animation: jalwa-giftBlink 2s ease-in-out infinite;
  font-family: monospace;
  letter-spacing: 2px;
}

/* -----------------------------------------------------------
   8. INFO TABLE — rows fade in one-by-one
   ----------------------------------------------------------- */
@keyframes jalwa-rowIn {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

table tbody tr:nth-child(1) {
  animation: jalwa-rowIn 0.5s 0.2s ease-out both;
}
table tbody tr:nth-child(2) {
  animation: jalwa-rowIn 0.5s 0.35s ease-out both;
}
table tbody tr:nth-child(3) {
  animation: jalwa-rowIn 0.5s 0.5s ease-out both;
}
table tbody tr:nth-child(4) {
  animation: jalwa-rowIn 0.5s 0.65s ease-out both;
}

table tbody tr {
  transition: background-color 0.25s ease;
}

table tbody tr:hover td {
  background-color: rgba(0, 236, 190, 0.07) !important;
}

/* -----------------------------------------------------------
   9. SCROLL REVEAL — .jalwa-reveal class (added via JS)
   ----------------------------------------------------------- */
.jalwa-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.jalwa-reveal.jalwa-visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger siblings */
.jalwa-reveal:nth-child(2) {
  transition-delay: 0.1s;
}
.jalwa-reveal:nth-child(3) {
  transition-delay: 0.2s;
}
.jalwa-reveal:nth-child(4) {
  transition-delay: 0.3s;
}

/* -----------------------------------------------------------
   10. FOOTER — fade up
   ----------------------------------------------------------- */
@keyframes jalwa-footerIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-footer {
  animation: jalwa-footerIn 0.7s 0.3s ease-out both;
}

/* -----------------------------------------------------------
   11. FOOTER LINKS — underline slide
   ----------------------------------------------------------- */
.site-info a,
.site-footer a {
  position: relative;
  display: inline-block;
}

.site-info a::after,
.site-footer a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #00ecbe;
  transition: width 0.3s ease;
}

.site-info a:hover::after,
.site-footer a:hover::after {
  width: 100%;
}

/* -----------------------------------------------------------
   12. NAV LINKS — hover underline slide
   ----------------------------------------------------------- */
.main-navigation .main-nav ul li a {
  position: relative;
}

.main-navigation .main-nav ul li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 15px;
  right: 15px;
  height: 2px;
  background: #00ecbe;
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.main-navigation .main-nav ul li a:hover::after {
  transform: scaleX(1);
}

/* -----------------------------------------------------------
   13. STAR RATING — pop in
   ----------------------------------------------------------- */
@keyframes jalwa-starPop {
  from {
    opacity: 0;
    transform: scale(0.4) rotate(-15deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

[style*="★"] {
  display: inline-block;
  animation: jalwa-starPop 0.5s 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* -----------------------------------------------------------
   14. ARTICLE CONTENT — smooth entrance
   ----------------------------------------------------------- */
@keyframes jalwa-contentIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.entry-content {
  animation: jalwa-contentIn 0.7s 0.15s ease-out both;
}

/* -----------------------------------------------------------
   15. GLOWING BORDER on active nav items
   ----------------------------------------------------------- */
@keyframes jalwa-borderGlow {
  0%,
  100% {
    box-shadow: 0 0 0px transparent;
  }
  50% {
    box-shadow: 0 2px 12px rgba(0, 236, 190, 0.5);
  }
}

.main-navigation .main-nav ul li.current-menu-item > a {
  animation: jalwa-borderGlow 2.5s ease-in-out infinite;
  border-radius: 4px;
}

/* -----------------------------------------------------------
   16. REDUCE MOTION — respect user preferences
   ----------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
