﻿/* FreeEgg Shop - Custom Styles & Animations */
:root {
  --brand-primary: #0ea5e9;
  --brand-primary-dark: #0284c7;
  --brand-secondary: #f59e0b;
  --brand-accent: #06b6d4;
  /* Locker background variables */
  --bg: #f1ecfb;
  --violet: #7c3aed;
  --cyan: #0891b2;
  --gold: #d97706;
  --white: #2a1b47;
  --w-60: rgba(42,27,71,0.62);
  --w-35: rgba(42,27,71,0.38);
}

/* Hero Background Slideshow */
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}
.hero-slide.active {
  opacity: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f0f9ff;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #0284c7, #0891b2);
}

/* Locker-style Background */
body {
  background-color: var(--bg);
  position: relative;
}

/* Radial glow gradients */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 70% 45% at 18% -5%, rgba(124,58,237,0.16), transparent 70%),
    radial-gradient(ellipse 55% 40% at 92% 8%,  rgba(34,211,238,0.22), transparent 70%),
    radial-gradient(ellipse 75% 55% at 50% 115%, rgba(251,191,36,0.22), transparent 75%);
  pointer-events: none;
}

/* Diagonal grid pattern with radial mask */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    repeating-linear-gradient(135deg, rgba(124,58,237,0.08) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(45deg,  rgba(34,211,238,0.08) 0 1px, transparent 1px 34px);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 25%, transparent 95%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 25%, transparent 95%);
  pointer-events: none;
}

/* Floating coins */
.bg-decor {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.bg-decor .coin {
  position: absolute;
  width: 48px;
  height: 48px;
  opacity: 0.35;
  animation: coinBob linear infinite;
}
@keyframes coinBob {
  0%   { transform: translateY(0) rotate(-6deg); }
  50%  { transform: translateY(-26px) rotate(10deg); }
  100% { transform: translateY(0) rotate(-6deg); }
}

/* Input Focus Glow */
input:focus, textarea:focus, select:focus {
  outline: none !important;
  border-color: #0ea5e9 !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2) !important;
}

/* Keyframe Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}

/* Slow up-and-down motion for the offers image */
@keyframes offerFloatSlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-14px); }
}
.offer-float-slow {
  animation: offerFloatSlow 5.5s ease-in-out infinite;
}

/* Fixed frame that stays still while the taller image pans up and back down */
.offers-pan-frame {
  position: relative;
  overflow: hidden;
  height: 12rem;
}
.offers-pan-img {
  height: 30rem; /* taller than the 12rem frame so there is room to travel */
  animation: offersPan 9s ease-in-out infinite alternate;
}
@keyframes offersPan {
  0%   { transform: translateY(0); }        /* top edge of the image visible */
  100% { transform: translateY(-60%); }     /* 18rem = full picture travels past the frame */
}

@keyframes eggPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 10px 15px rgba(14, 165, 233, 0.25)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 15px 25px rgba(6, 182, 212, 0.4)); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.float-animation {
  animation: float 4s ease-in-out infinite;
}

.egg-pulse {
  animation: eggPulse 3s ease-in-out infinite;
}

.shimmer-badge {
  background: linear-gradient(90deg, #10b981 0%, #34d399 50%, #10b981 100%);
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

/* Rarity Border Gradients */
.border-mythic {
  border: 2px solid #ec4899 !important;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.15);
}
.border-legendary {
  border: 2px solid #f59e0b !important;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
}
.border-rare {
  border: 2px solid #3b82f6 !important;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}
.border-uncommon {
  border: 2px solid #10b981 !important;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

/* Card Hover Lift */
.product-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 25px -5px rgba(14, 165, 233, 0.15), 0 8px 10px -6px rgba(14, 165, 233, 0.1);
}

/* Responsive Logo */
.responsive-logo {
  height: 42px;
  transition: transform 0.3s ease;
}
@media (min-width: 640px) {
  .responsive-logo {
    height: 50px;
  }
}

/* Nav links under indicator */
.nav-link {
  position: relative;
  transition: all 0.3s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #0ea5e9, #06b6d4);
  transition: width 0.3s ease;
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Grid / List View Toggle */
.view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 0.65rem;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  background: transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}
.view-btn:hover {
  color: #0ea5e9;
  background: #f0f9ff;
}
.view-btn.active {
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.4);
}

/* Mobile Niceties */
a, button, .cat-btn, .view-btn, .product-card {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

@media (max-width: 640px) {
  .cat-btn {
    padding-left: 14px !important;
    padding-right: 14px !important;
    white-space: nowrap;
  }
}

/* Subtle Glow Effect (Glow Khfif) */
@keyframes subtleGlowPulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4), 0 0 16px rgba(6, 182, 212, 0.25);
  }
  50% {
    box-shadow: 0 6px 26px rgba(14, 165, 233, 0.65), 0 0 32px rgba(6, 182, 212, 0.45);
  }
}

.btn-glow-subtle {
  animation: subtleGlowPulse 2.8s ease-in-out infinite;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-glow-subtle:hover {
  animation: none;
  box-shadow: 0 8px 30px rgba(14, 165, 233, 0.75), 0 0 38px rgba(6, 182, 212, 0.55) !important;
  transform: translateY(-2px) scale(1.01);
}

.credits-bubble::after {
  content: "";
  position: absolute;
  top: -9px;
  right: 2.5rem;
  border: 9px solid transparent;
  border-bottom-color: #fb5a12;
}

/* Modal Pop Open Animation */
.animatePop {
  animation: modalPop .4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes modalPop {
  from {
    transform: scale(0.88) translateY(10px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Welcome Spin Wheel */
.wheel-box {
  width: min(270px, 78vw);
  aspect-ratio: 1;
}

.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 0 0 6px #fff;
  transition: transform 4.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.wheel .seg-num {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 2;
  pointer-events: none;
}

.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 22px solid #1f2937;
  z-index: 12;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35));
}

.wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 0 0 3px #fff;
}

/* Claim Payments Pop */
.claim-pop {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 30;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.88);
  padding: 5px 10px 5px 12px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

.claim-pop.pop-in {
  animation: claimPop .35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes claimPop {
  0% {
    transform: translateX(-50%) scale(0.5);
    opacity: 0;
  }
  60% {
    transform: translateX(-50%) scale(1.08);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
}

/* Tap To Unlock Pop Note */
.tap-note {
  position: absolute;
  top: 36%;
  left: 50%;
  z-index: 20;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

.tap-note.pop-in {
  animation: pinsPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.tap-note.fade-out {
  animation: pinsFadeOut 0.3s ease both;
}

@keyframes pinsPop {
  0% {
    transform: translateX(-50%) scale(0.3);
    opacity: 0;
  }
  60% {
    transform: translateX(-50%) scale(1.15);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
}

@keyframes pinsFadeOut {
  to {
    transform: translateX(-50%) translateY(-8px) scale(0.9);
    opacity: 0;
  }
}

/* ===== FIRST VISIT GIFT ANIMATIONS ===== */
@keyframes giftBoxFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes giftLidOpen {
  0% { transform: rotateX(0deg) translateY(0); opacity: 1; }
  60% { transform: rotateX(-120deg) translateY(-30px); opacity: 1; }
  100% { transform: rotateX(-135deg) translateY(-40px); opacity: 0; }
}

@keyframes giftBowPop {
  0% { transform: translateX(-50%) scale(0.3); opacity: 0; }
  50% { transform: translateX(-50%) scale(1.3); opacity: 1; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

@keyframes particleBurst {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(150px) rotate(720deg); opacity: 0; }
}

@keyframes coinFloatUp {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-80px) scale(0.5); opacity: 0; }
}

@keyframes staggerFadeIn {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 0 16px rgba(16, 185, 129, 0); }
}

.gift-box-float {
  animation: giftBoxFloat 3s ease-in-out infinite;
}

.gift-lid-open {
  animation: giftLidOpen 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.gift-bow-pop {
  animation: giftBowPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  animation: particleBurst 1s ease-out forwards;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  pointer-events: none;
  animation: confettiFall 2s ease-out forwards;
}

.coin-particle {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
  pointer-events: none;
  animation: coinFloatUp 1.5s ease-out forwards;
}

.stagger-fade-in {
  animation: staggerFadeIn 0.5s ease-out forwards;
  opacity: 0;
}

.balance-counter {
  transition: all 0.1s ease-out;
}

.gift-pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

.gift-card-enter {
  animation: staggerFadeIn 0.4s ease-out forwards;
  opacity: 0;
}

/* Custom scrollbar for gift items grid */
#giftItemsGrid::-webkit-scrollbar {
  width: 4px;
}
#giftItemsGrid::-webkit-scrollbar-track {
  background: transparent;
}
#giftItemsGrid::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #10b981, #14b8a6);
  border-radius: 2px;
}

/* ===== HERO REDESIGN ===== */
.hero-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(14, 165, 233, 0.18);
  box-shadow: 0 25px 50px -12px rgba(14, 165, 233, 0.3), 0 8px 20px -6px rgba(6, 182, 212, 0.22);
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-float {
  animation: heroFloat 5s ease-in-out infinite;
}

.hero-bg-wash {
  -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.7), transparent 90%);
  mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.7), transparent 90%);
}
@media (max-width: 1023px) {
  .hero-bg-wash {
    -webkit-mask-image: none;
    mask-image: none;
    opacity: 0.12 !important;
  }
}

