/* ============================================================
   Beta Phase Gaming — ce-animations.css
   Animations & Transitions | https://betaphasegaming.com
   ============================================================ */

/* === KEYFRAMES === */
@keyframes ce-fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ce-fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ce-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes ce-slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes ce-slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes ce-scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes ce-pulseGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(0,245,212,0.3); }
  50%       { box-shadow: 0 0 28px rgba(0,245,212,0.7); }
}
@keyframes ce-pulseGlowViolet {
  0%, 100% { box-shadow: 0 0 8px rgba(155,93,229,0.3); }
  50%       { box-shadow: 0 0 28px rgba(155,93,229,0.7); }
}
@keyframes ce-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes ce-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes ce-shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}
@keyframes ce-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
@keyframes ce-scanline {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}
@keyframes ce-glitch {
  0%   { clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%); transform: translate(-2px, -2px); }
  20%  { clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%); transform: translate(2px, 2px); }
  40%  { clip-path: polygon(0 45%, 100% 45%, 100% 55%, 0 55%); transform: translate(0, 0); }
  60%  { clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%); transform: translate(-2px, 0); }
  80%  { clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%); transform: translate(2px, -2px); }
  100% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); transform: translate(0, 0); }
}
@keyframes ce-particleDrift {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-80px) translateX(20px); opacity: 0; }
}
@keyframes ce-progressFill {
  from { width: 0%; }
}
@keyframes ce-countUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ce-borderPulse {
  0%, 100% { border-color: rgba(0,245,212,0.2); }
  50%       { border-color: rgba(0,245,212,0.6); }
}
@keyframes ce-backgroundPan {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes ce-ripple {
  0%   { transform: scale(0); opacity: 0.6; }
  100% { transform: scale(2.5); opacity: 0; }
}
@keyframes ce-typing {
  from { width: 0; }
  to   { width: 100%; }
}

/* === UTILITY ANIMATION CLASSES === */
.ce-anim-fadeInUp { animation: ce-fadeInUp 0.6s ease both; }
.ce-anim-fadeInUp-d1 { animation: ce-fadeInUp 0.6s 0.1s ease both; }
.ce-anim-fadeInUp-d2 { animation: ce-fadeInUp 0.6s 0.2s ease both; }
.ce-anim-fadeInUp-d3 { animation: ce-fadeInUp 0.6s 0.3s ease both; }
.ce-anim-fadeInUp-d4 { animation: ce-fadeInUp 0.6s 0.4s ease both; }
.ce-anim-fadeInUp-d5 { animation: ce-fadeInUp 0.6s 0.5s ease both; }
.ce-anim-fadeIn { animation: ce-fadeIn 0.8s ease both; }
.ce-anim-scaleIn { animation: ce-scaleIn 0.5s ease both; }
.ce-anim-slideInLeft { animation: ce-slideInLeft 0.6s ease both; }
.ce-anim-slideInRight { animation: ce-slideInRight 0.6s ease both; }
.ce-anim-float { animation: ce-float 4s ease-in-out infinite; }
.ce-anim-pulse { animation: ce-pulseGlow 2s ease-in-out infinite; }
.ce-anim-pulse-violet { animation: ce-pulseGlowViolet 2s ease-in-out infinite; }
.ce-anim-rotate { animation: ce-rotate 8s linear infinite; }
.ce-anim-border-pulse { animation: ce-borderPulse 2s ease-in-out infinite; }
.ce-anim-bg-pan {
  background-size: 200% 200%;
  animation: ce-backgroundPan 5s ease infinite;
}

/* === SCROLL REVEAL === */
.ce-reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.ce-reveal.ce-revealed { opacity: 1; transform: translateY(0); }
.ce-reveal-left {
  opacity: 0; transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.ce-reveal-left.ce-revealed { opacity: 1; transform: translateX(0); }
.ce-reveal-right {
  opacity: 0; transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.ce-reveal-right.ce-revealed { opacity: 1; transform: translateX(0); }
.ce-reveal-scale {
  opacity: 0; transform: scale(0.95);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.ce-reveal-scale.ce-revealed { opacity: 1; transform: scale(1); }
.ce-reveal-d1 { transition-delay: 0.1s; }
.ce-reveal-d2 { transition-delay: 0.2s; }
.ce-reveal-d3 { transition-delay: 0.3s; }
.ce-reveal-d4 { transition-delay: 0.4s; }
.ce-reveal-d5 { transition-delay: 0.5s; }

/* === HOVER EFFECTS === */
.ce-hover-lift { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.ce-hover-lift:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.ce-hover-glow:hover { box-shadow: 0 0 20px rgba(0,245,212,0.3); }
.ce-hover-scale { transition: transform 0.3s ease; }
.ce-hover-scale:hover { transform: scale(1.04); }

/* === PARTICLES === */
.ce-particles-container {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden; pointer-events: none; z-index: 0;
}
.ce-particle {
  position: absolute; width: 3px; height: 3px;
  background: var(--ce-neon-cyan); border-radius: 50%;
  animation: ce-particleDrift linear infinite;
}

/* === CURSOR SPOTLIGHT === */
.ce-cursor-glow {
  position: fixed; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0,245,212,0.05) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%); transition: left 0.1s, top 0.1s;
}

/* === NEON TEXT GLOW === */
.ce-neon-text {
  text-shadow: 0 0 10px rgba(0,245,212,0.5), 0 0 30px rgba(0,245,212,0.3);
}

/* === SKELETON LOADING === */
.ce-skeleton {
  background: linear-gradient(90deg, var(--ce-bg-card) 25%, var(--ce-bg-surface) 50%, var(--ce-bg-card) 75%);
  background-size: 1000px 100%;
  animation: ce-shimmer 1.5s infinite;
  border-radius: var(--ce-radius-sm);
}

/* === LOADING SPINNER === */
.ce-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--ce-bg-surface);
  border-top-color: var(--ce-neon-cyan);
  border-radius: 50%;
  animation: ce-rotate 0.8s linear infinite;
  margin: 2rem auto;
}

/* === PAGE TRANSITION === */
.ce-page-transition {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--ce-bg-dark); z-index: 9998;
  animation: ce-fadeIn 0.3s ease reverse;
}

/* === GLITCH EFFECT === */
.ce-glitch-text { position: relative; }
.ce-glitch-text::before,
.ce-glitch-text::after {
  content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
.ce-glitch-text::before {
  left: 2px; text-shadow: -2px 0 var(--ce-neon-coral);
  animation: ce-glitch 3s infinite linear alternate-reverse;
  color: transparent;
}
.ce-glitch-text::after {
  left: -2px; text-shadow: 2px 0 var(--ce-neon-cyan);
  animation: ce-glitch 2s infinite linear alternate-reverse;
  color: transparent;
}

/* === GRID BACKGROUND === */
.ce-grid-bg {
  background-image:
    linear-gradient(rgba(0,245,212,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,245,212,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}
