/* ============================================
   POKE+ Cyberpunk Landing Page — Custom CSS
   Effects & animations Tailwind can't handle
   ============================================ */

/* --- Glitch Text Effect --- */
.glitch {
  position: relative;
  display: inline-block;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.glitch::before {
  color: #7de6fa;
  z-index: -1;
  animation: glitch-clip-top 3s infinite linear alternate-reverse;
}

.glitch::after {
  color: #ff00e5;
  z-index: -2;
  animation: glitch-clip-bottom 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-clip-top {
  0%   { clip-path: inset(40% 0 61% 0); transform: translate(-3px, -2px); }
  10%  { clip-path: inset(10% 0 85% 0); transform: translate(3px, 1px); }
  20%  { clip-path: inset(80% 0 1% 0);  transform: translate(-2px, 3px); }
  30%  { clip-path: inset(25% 0 58% 0); transform: translate(2px, -1px); }
  40%  { clip-path: inset(55% 0 30% 0); transform: translate(-3px, 2px); }
  50%  { clip-path: inset(5% 0 70% 0);  transform: translate(1px, -3px); }
  60%  { clip-path: inset(65% 0 15% 0); transform: translate(-1px, 2px); }
  70%  { clip-path: inset(35% 0 50% 0); transform: translate(3px, -2px); }
  80%  { clip-path: inset(70% 0 10% 0); transform: translate(-2px, 1px); }
  90%  { clip-path: inset(15% 0 72% 0); transform: translate(2px, 3px); }
  100% { clip-path: inset(45% 0 40% 0); transform: translate(-1px, -1px); }
}

@keyframes glitch-clip-bottom {
  0%   { clip-path: inset(60% 0 1% 0);  transform: translate(3px, 2px); }
  10%  { clip-path: inset(20% 0 65% 0); transform: translate(-2px, -1px); }
  20%  { clip-path: inset(75% 0 5% 0);  transform: translate(1px, -3px); }
  30%  { clip-path: inset(10% 0 78% 0); transform: translate(-3px, 2px); }
  40%  { clip-path: inset(50% 0 35% 0); transform: translate(2px, -2px); }
  50%  { clip-path: inset(85% 0 2% 0);  transform: translate(-1px, 3px); }
  60%  { clip-path: inset(30% 0 55% 0); transform: translate(3px, -1px); }
  70%  { clip-path: inset(5% 0 80% 0);  transform: translate(-2px, 2px); }
  80%  { clip-path: inset(45% 0 40% 0); transform: translate(1px, -2px); }
  90%  { clip-path: inset(70% 0 15% 0); transform: translate(-3px, 1px); }
  100% { clip-path: inset(25% 0 60% 0); transform: translate(2px, -3px); }
}

/* --- Scanline Overlay --- */
.scanlines::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  z-index: 2;
}

/* --- Neon Glow Pulse --- */
@keyframes neon-pulse-cyan {
  0%, 100% { box-shadow: 0 0 5px rgba(125, 230, 250, 0.3), 0 0 20px rgba(125, 230, 250, 0.1); }
  50%      { box-shadow: 0 0 10px rgba(125, 230, 250, 0.5), 0 0 40px rgba(125, 230, 250, 0.2); }
}

@keyframes neon-pulse-magenta {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 0, 229, 0.3), 0 0 20px rgba(255, 0, 229, 0.1); }
  50%      { box-shadow: 0 0 10px rgba(255, 0, 229, 0.5), 0 0 40px rgba(255, 0, 229, 0.2); }
}

@keyframes neon-text-pulse {
  0%, 100% { text-shadow: 0 0 7px rgba(125, 230, 250, 0.5), 0 0 20px rgba(125, 230, 250, 0.2); }
  50%      { text-shadow: 0 0 14px rgba(125, 230, 250, 0.8), 0 0 40px rgba(125, 230, 250, 0.4); }
}

/* --- Terminal Cursor Blink --- */
.terminal-cursor::after {
  content: '|';
  animation: cursor-blink 0.7s step-end infinite;
  color: #7de6fa;
  font-weight: 400;
  margin-left: 2px;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* --- Border Trace Animation --- */
.border-trace {
  border: 1px solid transparent;
  background:
    linear-gradient(#0a0a0f, #0a0a0f) padding-box,
    linear-gradient(135deg, #7de6fa, #ff00e5, #7de6fa) border-box;
  background-size: 100% 100%, 300% 300%;
  animation: border-shift 4s linear infinite;
}

@keyframes border-shift {
  0%   { background-position: 0 0, 0% 0%; }
  50%  { background-position: 0 0, 100% 100%; }
  100% { background-position: 0 0, 0% 0%; }
}

@supports (background: conic-gradient(from 0deg, red, blue)) {
  @property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
  }

  .border-trace {
    --border-angle: 0deg;
    background:
      linear-gradient(#0a0a0f, #0a0a0f) padding-box,
      conic-gradient(from var(--border-angle), transparent 70%, #7de6fa 85%, #ff00e5 100%) border-box;
    animation: border-rotate 4s linear infinite;
  }

  @keyframes border-rotate {
    to { --border-angle: 360deg; }
  }
}

/* --- Floating Pokeball Particles --- */
#poke-particles {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.pokeball-particle {
  position: absolute;
  bottom: -24px;
  opacity: 0;
  pointer-events: none;
  animation: pokeball-float linear infinite;
  background: url('https://www.pokewiki.de/images/2/2c/Pok%C3%A9ball_Traumwelt.png') center/contain no-repeat;
}

.pokeplus-particle {
  position: absolute;
  bottom: -24px;
  opacity: 0;
  pointer-events: none;
  animation: pokeball-float linear infinite;
  background: url('../images/pokeplus-icon.png') center/contain no-repeat;
}

.pokeone-particle {
  position: absolute;
  bottom: -24px;
  opacity: 0;
  pointer-events: none;
  animation: pokeball-float linear infinite;
  background: url('../images/pokeone-icon.png') center/contain no-repeat;
}

@keyframes pokeball-float {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  5% {
    opacity: 0.15;
  }
  50% {
    opacity: 0.25;
  }
  95% {
    opacity: 0.1;
  }
  100% {
    transform: translateY(-110vh) translateX(var(--drift, 0px)) rotate(360deg);
    opacity: 0;
  }
}

/* --- Core SVG Animation --- */
#core-svg .svg-line {
  stroke: #7de6fa;
  stroke-width: 1;
  stroke-dasharray: 130;
  stroke-dashoffset: 130;
  opacity: 0;
}

#core-svg .svg-node,
#core-svg .svg-dot {
  opacity: 0;
}

#core-svg .svg-center,
#core-svg .svg-center-dot {
  opacity: 0;
}

#core-svg .svg-ring {
  stroke-dasharray: 720;
  stroke-dashoffset: 720;
  opacity: 0.2;
}

#core-svg .svg-orbit {
  opacity: 0;
}

/* Animated state */
#core-svg.animated .svg-center {
  animation: svg-fade 0.6s ease forwards;
}

#core-svg.animated .svg-center-dot {
  animation: svg-fade 0.5s ease forwards 0.15s, svg-pulse 3s ease-in-out infinite 1.5s;
}

#core-svg.animated .svg-line {
  animation: svg-line-draw 0.7s ease forwards;
  animation-delay: calc(0.3s + var(--i, 0) * 0.1s);
}

#core-svg.animated .svg-node {
  animation: svg-fade 0.5s ease forwards;
  animation-delay: calc(0.6s + var(--i, 0) * 0.1s);
}

#core-svg.animated .svg-dot {
  animation: svg-fade 0.4s ease forwards;
  animation-delay: calc(0.75s + var(--i, 0) * 0.1s);
}

#core-svg.animated .svg-ring {
  animation: svg-ring-draw 1.5s ease forwards 1.2s;
}

#core-svg.animated .svg-orbit {
  animation: svg-fade 0.5s ease forwards 2s;
}

@keyframes svg-fade {
  to { opacity: 1; }
}

@keyframes svg-line-draw {
  to { stroke-dashoffset: 0; opacity: 0.4; }
}

@keyframes svg-ring-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes svg-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* --- Shiny Farm Factory Animations --- */

/* Conveyor belt teeth movement */
.belt-move {
  animation: belt-scroll 2s linear infinite;
}
@keyframes belt-scroll {
  to { stroke-dashoffset: -30; }
}

/* Pokeballs rolling across the belt */
.ball-roll {
  animation: ball-travel 4s linear infinite;
}
.ball-1 { animation-delay: 0s; }
.ball-2 { animation-delay: -1.3s; }
.ball-3 { animation-delay: -2.6s; }

@keyframes ball-travel {
  0%   { transform: translateX(-80px); opacity: 0; }
  5%   { opacity: 1; }
  45%  { opacity: 1; }
  50%  { opacity: 0; transform: translateX(240px); }
  100% { opacity: 0; transform: translateX(240px); }
}

/* Machine gears */
.gear-spin {
  transform-origin: 460px 120px;
  animation: spin 3s linear infinite;
}
.gear-spin-reverse {
  transform-origin: 460px 155px;
  animation: spin 2s linear infinite reverse;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Blinking lights */
.light-blink {
  animation: blink-green 1.5s step-end infinite;
}
@keyframes blink-green {
  0%, 100% { fill: #00ff64; opacity: 1; }
  50% { fill: #00ff64; opacity: 0.2; }
}

.light-pulse {
  animation: pulse-amber 2s ease-in-out infinite;
}
@keyframes pulse-amber {
  0%, 100% { fill: #ffaa00; opacity: 0.3; }
  50% { fill: #ffaa00; opacity: 1; }
}

.scan-blink {
  animation: scan-flash 1.2s step-end infinite;
}
@keyframes scan-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Smoke puffs rising */
.smoke {
  animation: smoke-rise 4s ease-out infinite;
}
.smoke-1 { animation-delay: 0s; }
.smoke-2 { animation-delay: -1.5s; }
.smoke-3 { animation-delay: -3s; }

@keyframes smoke-rise {
  0%   { transform: translateY(0) scale(1); opacity: 0.06; }
  50%  { opacity: 0.08; }
  100% { transform: translateY(-50px) scale(2.5); opacity: 0; }
}

/* Shiny stars output */
.shiny-output {
  animation: shiny-pop 3s ease-out infinite;
}
.shiny-out-1 { animation-delay: 0s; }
.shiny-out-2 { animation-delay: -1s; }
.shiny-out-3 { animation-delay: -2s; }

@keyframes shiny-pop {
  0%   { transform: translateX(-80px) scale(0); opacity: 0; }
  15%  { transform: translateX(0) scale(1.2); opacity: 1; }
  25%  { transform: translateX(10px) scale(1); opacity: 0.9; }
  80%  { opacity: 0.9; }
  100% { transform: translateX(10px) scale(1); opacity: 0; }
}

/* Sparkle dots */
.sparkle-dot {
  animation: sparkle-twinkle 2s ease-in-out infinite;
}
.s1 { animation-delay: 0s; }
.s2 { animation-delay: -0.3s; }
.s3 { animation-delay: -0.7s; }
.s4 { animation-delay: -1.1s; }
.s5 { animation-delay: -1.5s; }
.s6 { animation-delay: -1.8s; }

@keyframes sparkle-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50%      { opacity: 1; transform: scale(1.5); }
}

/* Background sparkles */
.shiny-sparkle-bg {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255, 170, 0, 0.3) 50%, transparent 100%),
    radial-gradient(1px 1px at 30% 60%, rgba(255, 170, 0, 0.2) 50%, transparent 100%),
    radial-gradient(1px 1px at 50% 10%, rgba(255, 255, 255, 0.15) 50%, transparent 100%),
    radial-gradient(1px 1px at 70% 80%, rgba(255, 170, 0, 0.25) 50%, transparent 100%),
    radial-gradient(1px 1px at 90% 40%, rgba(255, 255, 255, 0.1) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 25% 90%, rgba(255, 170, 0, 0.2) 50%, transparent 100%),
    radial-gradient(1px 1px at 85% 15%, rgba(255, 170, 0, 0.15) 50%, transparent 100%);
  animation: sparkle-bg-drift 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes sparkle-bg-drift {
  0%   { opacity: 0.4; }
  50%  { opacity: 0.7; }
  100% { opacity: 0.4; }
}

/* --- Scroll Animations --- */
.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in-up.visible,
.fade-in-left.visible,
.fade-in-right.visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* Stagger delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }

/* --- FAQ Accordion --- */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 1.25rem;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 1.25rem 1.25rem;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item {
  border-left: 3px solid transparent;
  transition: border-color 0.3s ease;
}

.faq-item.active {
  border-left-color: #7de6fa;
}

/* --- Neon Button Hover --- */
.btn-neon-cyan {
  position: relative;
  transition: all 0.3s ease;
}

.btn-neon-cyan:hover {
  box-shadow: 0 0 15px rgba(125, 230, 250, 0.5), 0 0 30px rgba(125, 230, 250, 0.2);
  transform: translateY(-2px);
}


/* --- Feature Card Hover Glow --- */
.feature-card {
  transition: all 0.4s ease;
  border: 1px solid rgba(125, 230, 250, 0.1);
}

.feature-card:hover {
  border-color: rgba(125, 230, 250, 0.4);
  box-shadow: 0 0 20px rgba(125, 230, 250, 0.1), inset 0 0 20px rgba(125, 230, 250, 0.03);
  transform: translateY(-4px);
}

/* --- Mode Card Styles --- */
.mode-card-free {
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 255, 100, 0.2);
}

.mode-card-free:hover {
  border-color: rgba(0, 255, 100, 0.5);
  box-shadow: 0 0 15px rgba(0, 255, 100, 0.1);
}

.mode-card-premium {
  transition: all 0.3s ease;
  border: 1px solid rgba(125, 230, 250, 0.2);
}

.mode-card-premium:hover {
  border-color: rgba(125, 230, 250, 0.5);
  box-shadow: 0 0 15px rgba(125, 230, 250, 0.1);
}

/* --- Pricing Card Glow --- */
.pricing-card-cyan {
  transition: all 0.4s ease;
}

.pricing-card-cyan:hover {
  box-shadow: 0 0 30px rgba(125, 230, 250, 0.15);
}


/* --- Amber Button & Card (PokeMMO+ Pricing) --- */
.btn-neon-amber {
  position: relative;
  transition: all 0.3s ease;
}

.btn-neon-amber:hover {
  box-shadow: 0 0 15px rgba(170, 0, 255, 0.5), 0 0 30px rgba(170, 0, 255, 0.2);
  transform: translateY(-2px);
}

.pricing-card-amber {
  transition: all 0.4s ease;
}

.pricing-card-amber:hover {
  box-shadow: 0 0 30px rgba(170, 0, 255, 0.15);
}

/* --- Coral Button & Card (PokeOne+ Pricing) --- */
.btn-neon-coral {
  position: relative;
  transition: all 0.3s ease;
}

.btn-neon-coral:hover {
  box-shadow: 0 0 15px rgba(229, 20, 0, 0.5), 0 0 30px rgba(229, 20, 0, 0.2);
  transform: translateY(-2px);
}

.pricing-card-coral {
  transition: all 0.4s ease;
}

.pricing-card-coral:hover {
  box-shadow: 0 0 30px rgba(229, 20, 0, 0.15);
}

/* --- Sticky Header --- */
#main-header {
  background: rgba(10, 10, 15, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.header-solid {
  background: rgba(10, 10, 15, 0.95) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.5);
}

/* --- Scroll-to-top --- */
.scroll-top {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(10px);
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* --- Step Connector Lines --- */
.step-connector {
  border-top: 2px dashed rgba(125, 230, 250, 0.3);
}

/* --- Mobile Menu Overlay --- */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

/* --- Selection color --- */
::selection {
  background: rgba(125, 230, 250, 0.3);
  color: #fff;
}

/* --- Custom scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
  background: rgba(125, 230, 250, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(125, 230, 250, 0.5);
}
