/* ============================================================
   ProGaming-Tips — pg-animations.css
   Keyframes, transitions, scroll reveals, effects
   ============================================================ */

/* ---- Keyframe Definitions ---- */

@keyframes pg-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(1.3); }
}

@keyframes pg-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(0,229,255,0.2); }
  50%       { box-shadow: 0 0 30px rgba(0,229,255,0.5), 0 0 60px rgba(0,229,255,0.15); }
}

@keyframes pg-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

@keyframes pg-float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-8px) rotate(1deg); }
  66%       { transform: translateY(-4px) rotate(-1deg); }
}

@keyframes pg-scan-line {
  0%   { transform: translateY(-100%); opacity: 0; }
  10%  { opacity: 0.5; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(100vh); opacity: 0; }
}

@keyframes pg-grid-move {
  0%   { transform: perspective(600px) rotateX(60deg) translateY(0); }
  100% { transform: perspective(600px) rotateX(60deg) translateY(60px); }
}

@keyframes pg-fade-up {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pg-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pg-slide-right {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pg-slide-left {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pg-scale-in {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pg-border-spin {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pg-particle-drift {
  0%   { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0.6; }
  25%  { transform: translateY(-20px) translateX(10px) rotate(90deg); }
  50%  { transform: translateY(-10px) translateX(-10px) rotate(180deg); }
  75%  { transform: translateY(-30px) translateX(5px) rotate(270deg); }
  100% { transform: translateY(0) translateX(0) rotate(360deg); opacity: 0.6; }
}

@keyframes pg-counter-pop {
  0%   { transform: scale(0.7); opacity: 0; }
  60%  { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes pg-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes pg-ripple {
  0%   { transform: scale(0); opacity: 0.6; }
  100% { transform: scale(4); opacity: 0; }
}

@keyframes pg-type-cursor {
  0%, 100% { border-right-color: var(--pg-neon-cyan); }
  50%       { border-right-color: transparent; }
}

@keyframes pg-hero-bg-drift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(20px, -15px) scale(1.02); }
  66%  { transform: translate(-15px, 10px) scale(0.99); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes pg-neon-flicker {
  0%, 95%, 100% { opacity: 1; }
  96%            { opacity: 0.85; }
  97%            { opacity: 1; }
  98%            { opacity: 0.9; }
}

/* ---- Scroll Reveal Base States ---- */

.pg-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.pg-reveal.pg-visible {
  opacity: 1;
  transform: translateY(0);
}

.pg-reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.pg-reveal-left.pg-visible {
  opacity: 1;
  transform: translateX(0);
}

.pg-reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.pg-reveal-right.pg-visible {
  opacity: 1;
  transform: translateX(0);
}

.pg-reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.pg-reveal-scale.pg-visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.pg-delay-1 { transition-delay: 0.1s; }
.pg-delay-2 { transition-delay: 0.2s; }
.pg-delay-3 { transition-delay: 0.3s; }
.pg-delay-4 { transition-delay: 0.4s; }
.pg-delay-5 { transition-delay: 0.5s; }
.pg-delay-6 { transition-delay: 0.6s; }

/* ---- Hero Background Effects ---- */

.pg-hero-bg-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.pg-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: pg-hero-bg-drift 20s ease-in-out infinite;
}

.pg-hero-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.pg-hero-orb-1 {
  width: 600px;
  height: 600px;
  right: -100px;
  top: -100px;
  background: radial-gradient(circle, rgba(176,64,255,0.12) 0%, transparent 70%);
  animation: pg-float-slow 12s ease-in-out infinite;
}

.pg-hero-orb-2 {
  width: 400px;
  height: 400px;
  right: 200px;
  bottom: -50px;
  background: radial-gradient(circle, rgba(0,229,255,0.08) 0%, transparent 70%);
  animation: pg-float-slow 16s ease-in-out infinite reverse;
}

.pg-hero-scan {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,229,255,0.4), transparent);
  animation: pg-scan-line 8s linear infinite;
}

/* ---- Particle System ---- */

.pg-particle-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.pg-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--pg-neon-cyan);
  border-radius: 50%;
  opacity: 0.4;
  animation: pg-particle-drift linear infinite;
}

/* ---- Animated Elements ---- */

.pg-float-anim { animation: pg-float 4s ease-in-out infinite; }
.pg-glow-anim  { animation: pg-glow  3s ease-in-out infinite; }
.pg-pulse-anim { animation: pg-pulse 2s ease-in-out infinite; }
.pg-flicker    { animation: pg-neon-flicker 5s infinite; }

/* ---- Neon Text Effects ---- */

.pg-neon-cyan {
  color: var(--pg-neon-cyan);
  text-shadow: 0 0 10px rgba(0,229,255,0.4);
}

.pg-neon-green {
  color: var(--pg-neon-green);
  text-shadow: 0 0 10px rgba(57,255,20,0.4);
}

.pg-neon-violet {
  color: var(--pg-neon-violet);
  text-shadow: 0 0 10px rgba(176,64,255,0.4);
}

.pg-shimmer-text {
  background: linear-gradient(90deg,
    #e8eaf6 0%,
    #00e5ff 30%,
    #b040ff 60%,
    #e8eaf6 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pg-shimmer 4s linear infinite;
}

/* ---- Hover Effects ---- */

.pg-hover-lift {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pg-hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 20px rgba(0,229,255,0.15);
}

.pg-hover-glow:hover {
  box-shadow: 0 0 30px rgba(0,229,255,0.3);
}

.pg-hover-border {
  position: relative;
  overflow: hidden;
}

.pg-hover-border::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: var(--pg-gradient-neon);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
  transition: opacity 0.3s ease;
}

.pg-hover-border:hover::after { opacity: 1; }

/* ---- Section Dividers ---- */

.pg-divider {
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(0,229,255,0.2),
    rgba(176,64,255,0.2),
    transparent);
  margin: 0;
}

.pg-divider-glow {
  height: 2px;
  background: var(--pg-gradient-neon);
  opacity: 0.3;
  margin: 0;
}

/* ---- Loading States ---- */

.pg-skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: pg-shimmer 1.5s infinite;
  border-radius: var(--pg-radius-sm);
}

/* ---- Ripple Effect ---- */

.pg-ripple-container { position: relative; overflow: hidden; }

.pg-ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(0,229,255,0.25);
  pointer-events: none;
  animation: pg-ripple 0.6s ease-out forwards;
}

/* ---- Number Ticker ---- */

.pg-ticker-digit {
  display: inline-block;
  animation: pg-counter-pop 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ---- Gaming Image Overlays ---- */

.pg-img-overlay-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--pg-radius-md);
}

.pg-img-overlay-wrap img { display: block; transition: transform 0.5s ease; }
.pg-img-overlay-wrap:hover img { transform: scale(1.05); }

.pg-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,12,20,0.8) 0%, transparent 60%);
  pointer-events: none;
}

/* ---- Typewriter Cursor ---- */

.pg-cursor-blink {
  border-right: 2px solid var(--pg-neon-cyan);
  padding-right: 4px;
  animation: pg-type-cursor 1s step-end infinite;
}

/* ---- Animated Border Card ---- */

.pg-animated-border {
  position: relative;
  background: var(--pg-gradient-card);
  border-radius: var(--pg-radius-md);
  overflow: hidden;
}

.pg-animated-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(60deg,
    var(--pg-neon-cyan),
    var(--pg-neon-violet),
    var(--pg-neon-cyan));
  background-size: 200% 200%;
  animation: pg-border-spin 4s linear infinite;
  z-index: 0;
}

.pg-animated-border-inner {
  position: relative;
  z-index: 1;
  background: var(--pg-bg-card);
  border-radius: calc(var(--pg-radius-md) - 1px);
  padding: 28px;
}
