/* ========================================
   UKV Radio — Visual Effects
   Glitch, Glow, Scanlines, Equalizer
   ======================================== */

/* ---- Glitch Text Effect ---- */
.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.glitch::before {
  color: var(--neon-cyan);
  animation: glitch-shift-1 3s infinite linear alternate-reverse;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  z-index: -1;
}

.glitch::after {
  color: var(--neon-magenta);
  animation: glitch-shift-2 2s infinite linear alternate-reverse;
  clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
  z-index: -1;
}

@keyframes glitch-shift-1 {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(3px, -1px); }
  94% { transform: translate(-3px, 1px); }
  96% { transform: translate(2px, 0); }
  98% { transform: translate(-1px, -1px); }
}

@keyframes glitch-shift-2 {
  0%, 88%, 100% { transform: translate(0); }
  90% { transform: translate(-3px, 1px); }
  93% { transform: translate(3px, -1px); }
  95% { transform: translate(-2px, 0); }
  97% { transform: translate(1px, 1px); }
}

/* ---- Neon Glow Text ---- */
.glow-text {
  text-shadow: var(--glow-cyan);
}

.glow-text-magenta {
  text-shadow: var(--glow-magenta);
}

.glow-text-purple {
  text-shadow: var(--glow-purple);
}

/* ---- Neon Border Glow ---- */
.neon-border {
  border: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow:
    inset 0 0 20px rgba(0, 240, 255, 0.05),
    0 0 15px rgba(0, 240, 255, 0.1);
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

.neon-border:hover {
  border-color: rgba(0, 240, 255, 0.6);
  box-shadow:
    inset 0 0 30px rgba(0, 240, 255, 0.08),
    0 0 25px rgba(0, 240, 255, 0.2);
}

/* ---- Pulse Animation (LIVE badge) ---- */
.pulse-ring {
  position: relative;
}

.pulse-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid var(--neon-magenta);
  animation: pulse-expand 2s ease-out infinite;
}

@keyframes pulse-expand {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

/* ---- Equalizer Bars ---- */
.equalizer {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
}

.equalizer .bar {
  width: 4px;
  background: var(--neon-cyan);
  border-radius: 2px;
  animation: eq-bounce 0.8s ease-in-out infinite alternate;
  box-shadow: 0 0 6px var(--neon-cyan);
}

.equalizer .bar:nth-child(1) { height: 40%; animation-delay: 0s; }
.equalizer .bar:nth-child(2) { height: 70%; animation-delay: 0.15s; }
.equalizer .bar:nth-child(3) { height: 50%; animation-delay: 0.3s; }
.equalizer .bar:nth-child(4) { height: 90%; animation-delay: 0.1s; }
.equalizer .bar:nth-child(5) { height: 60%; animation-delay: 0.25s; }

@keyframes eq-bounce {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

.equalizer.paused .bar {
  animation-play-state: paused;
  transform: scaleY(0.15);
}

/* ---- Float Animation ---- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.float {
  animation: float 6s ease-in-out infinite;
}

/* ---- Fade In Up ---- */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fade-in-up 0.6s ease-out forwards;
  opacity: 0;
}

/* ---- Typing Cursor ---- */
.typing-cursor::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--neon-cyan);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ---- Hover Glow Card ---- */
.hover-glow {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-glow:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 240, 255, 0.15);
}

/* ---- Gradient Border ---- */
.gradient-border {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta), var(--neon-purple));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---- Neon Line ---- */
.neon-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
  border: none;
  margin: var(--space-xl) 0;
}

/* ---- Shimmer ---- */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--text-primary) 0%,
    var(--neon-cyan) 50%,
    var(--text-primary) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s linear infinite;
}
