/* ========== RESET & BASE ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --neon-pink: #ff2a6d;
  --neon-cyan: #05d9e8;
  --neon-purple: #d300c5;
  --neon-yellow: #f9f002;
  --dark-bg: #0d0221;
  --darker: #05010a;
}

html {
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  background: var(--dark-bg);
  color: #fff;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

/* ========== NOISE & SCANLINES ========== */
.noise-overlay {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 1000;
}

.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
  z-index: 999;
  animation: scanlineMove 8s linear infinite;
}

@keyframes scanlineMove {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

/* ========== PARTICLES ========== */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan);
  opacity: 0.8;
}

.particle.pink { background: var(--neon-pink); box-shadow: 0 0 10px var(--neon-pink); }
.particle.purple { background: var(--neon-purple); box-shadow: 0 0 10px var(--neon-purple); }
.particle.yellow { background: var(--neon-yellow); box-shadow: 0 0 10px var(--neon-yellow); }

/* ========== HERO ========== */
.hero {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% 50%, rgba(255, 42, 109, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 70% 30%, rgba(5, 217, 232, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse 50% 30% at 30% 70%, rgba(211, 0, 197, 0.1) 0%, transparent 40%);
  animation: bgPulse 6s ease-in-out infinite;
}

@keyframes bgPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

.glitch-wrapper {
  position: relative;
  margin-bottom: 1rem;
}

.name {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: 0.2em;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan), var(--neon-purple));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  position: relative;
  animation: gradientShift 4s ease infinite;
}

.name::before,
.name::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  -webkit-background-clip: text;
  background-clip: text;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan));
  -webkit-text-fill-color: transparent;
  opacity: 0.3;
  z-index: -1;
}

.glitch:hover .name::before,
.glitch-wrapper.glitch-active .name::before {
  animation: glitchBefore 0.3s infinite;
}

.glitch:hover .name::after,
.glitch-wrapper.glitch-active .name::after {
  animation: glitchAfter 0.3s infinite;
}

@keyframes glitchBefore {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, 3px); }
  40% { transform: translate(-3px, -3px); }
  60% { transform: translate(3px, 3px); }
  80% { transform: translate(3px, -3px); }
  100% { transform: translate(0); }
}

@keyframes glitchAfter {
  0% { transform: translate(0); }
  20% { transform: translate(3px, -3px); }
  40% { transform: translate(3px, 3px); }
  60% { transform: translate(-3px, -3px); }
  80% { transform: translate(-3px, 3px); }
  100% { transform: translate(0); }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.subtitle {
  font-size: clamp(0.9rem, 2.5vw, 1.2rem);
  color: var(--neon-cyan);
  letter-spacing: 0.3em;
  margin-bottom: 2rem;
  opacity: 0;
  animation: subtitleFade 1s ease 0.5s forwards;
  text-shadow: 0 0 20px rgba(5, 217, 232, 0.5);
}

@keyframes subtitleFade {
  to { opacity: 1; }
}

/* Power level bar */
.power-level {
  opacity: 0;
  animation: subtitleFade 1s ease 1s forwards;
}

.power-label {
  display: block;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--neon-yellow);
  margin-bottom: 0.5rem;
}

.power-bar {
  width: 280px;
  height: 24px;
  border: 2px solid var(--neon-cyan);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 15px rgba(5, 217, 232, 0.3), inset 0 0 15px rgba(0,0,0,0.5);
}

.power-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-yellow));
  border-radius: 2px;
  animation: powerFill 2s ease 1.5s forwards;
}

@keyframes powerFill {
  to { width: 100%; }
}

.power-value {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 10px #000;
  z-index: 1;
}

/* ========== MEME QUOTES ========== */
.meme-quote {
  position: fixed;
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(0.7rem, 1.5vw, 0.95rem);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 50;
  pointer-events: none;
  text-shadow: 0 0 10px currentColor;
  border: 1px solid;
  backdrop-filter: blur(4px);
  /* Chuyển động trôi do anime.js điều khiển */
}

.meme-quote.cyan {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  background: rgba(5, 217, 232, 0.1);
}

.meme-quote.pink {
  color: var(--neon-pink);
  border-color: var(--neon-pink);
  background: rgba(255, 42, 109, 0.1);
}

.meme-quote.purple {
  color: var(--neon-purple);
  border-color: var(--neon-purple);
  background: rgba(211, 0, 197, 0.1);
}

.meme-quote.yellow {
  color: var(--neon-yellow);
  border-color: var(--neon-yellow);
  background: rgba(249, 240, 2, 0.1);
}

/* ========== CORNERS ========== */
.corner {
  position: fixed;
  width: 80px;
  height: 80px;
  border-color: var(--neon-cyan);
  border-style: solid;
  border-width: 0;
  z-index: 100;
  opacity: 0.6;
  animation: cornerPulse 3s ease-in-out infinite;
}

.corner-tl { top: 20px; left: 20px; border-top-width: 3px; border-left-width: 3px; }
.corner-tr { top: 20px; right: 20px; border-top-width: 3px; border-right-width: 3px; }
.corner-bl { bottom: 20px; left: 20px; border-bottom-width: 3px; border-left-width: 3px; }
.corner-br { bottom: 20px; right: 20px; border-bottom-width: 3px; border-right-width: 3px; }

@keyframes cornerPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

/* ========== SPARKLES ========== */
.sparkle {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--neon-yellow);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon-yellow);
  z-index: 5;
  pointer-events: none;
}
