/* Algemeen */
:root{
--bg:#0f1020;
--font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}
*{box-sizing:border-box}
html,body{height:100%;}
body{
margin:0;
background: radial-gradient(1200px 600px at 10% 20%, rgba(255,255,255,0.03), transparent),
radial-gradient(900px 400px at 90% 80%, rgba(255,255,255,0.02), transparent),
var(--bg);
font-family:var(--font-family);
-webkit-font-smoothing:antialiased;
-moz-osx-font-smoothing:grayscale;
}


/* Centraal gebied */
#player{
height:100vh;
display:flex;
align-items:center;
justify-content:center;
text-align:center;
user-select:none; /* voorkomt geselecteerde tekst */
-webkit-user-select:none;
-ms-user-select:none;
cursor:pointer; /* laat zien dat je kunt tikken */
}


/* Het woord zelf */
#word{
font-size: clamp(48px, 12vw, 140px); /* responsief groot */
font-weight:800;
line-height:1;
padding: 0 2rem;
}

/* Extra levendig pop/glow effect */
.pop-in {
  animation: pop 420ms cubic-bezier(.17,.67,.3,1), glowPulse 800ms ease-out;
}

@keyframes glowPulse {
  0%   { text-shadow: 0 0 0 rgba(255,255,255,0); }
  50%  { text-shadow: 0 0 25px rgba(255,255,255,0.6), 0 0 40px currentColor; }
  100% { text-shadow: 0 6px 18px rgba(0,0,0,0.6), 0 2px 8px currentColor; }
}

.pop-out {
  animation: popOut 420ms cubic-bezier(.17,.67,.3,1);
}

@keyframes popOut {
  0%   { transform: scale(1); opacity:1; }
  60%  { transform: scale(1.1); opacity:0.6; filter:blur(1px); }
  100% { transform: scale(0.6); opacity:0; filter:blur(2px); }
}

/* Nieuwe fade + pop animatie */
.word-transition {
  animation: fadePop 650ms ease;
}

@keyframes fadePop {
  0%   { opacity: 0; transform: scale(0.8); filter: blur(6px); }
  50%  { opacity: 1; transform: scale(1.05); filter: blur(0); text-shadow: 0 0 20px currentColor; }
  100% { opacity: 1; transform: scale(1); }
}

#words {
  position: relative;
  display: inline-block;
}

.word {
  position: absolute;
  top: 0; left: 0;
  right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(48px, 12vw, 140px);
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  transition: opacity 600ms ease, transform 600ms ease, text-shadow 600ms ease;
  will-change: opacity, transform;
}

.word.incoming {
  opacity: 0;
  transform: scale(0.8);
}
/* Sterker pop- en glow-effect */

@keyframes glowPulse {
  0%, 100% { text-shadow: 0 0 25px currentColor, 0 0 40px rgba(0,0,0,0.6); }
  50%      { text-shadow: 0 0 45px currentColor, 0 0 70px currentColor; }
}

.echo {
  position: fixed;
  pointer-events: none;
  font-size: 3rem;
  font-weight: bold;
  opacity: 0.8;
  transform: scale(1);
  animation: echoFloatPulse 2s ease-out forwards;
}


.particle {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  background-color: currentColor;
  opacity: 0.9;
  animation: particleFly 700ms ease-out forwards;
}

@keyframes particleFly {
  0%   { transform: translate(0,0) scale(1); opacity:1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity:0; }
}
/* Pop + glow animatie voor woorden */
.word.active {
  opacity: 1;
  transform: scale(1);
  text-shadow: 0 2px 8px rgba(0,0,0,0.6), 0 0 15px currentColor;
  animation: subtlePop 400ms cubic-bezier(.17,.67,.3,1);
}

@keyframes subtlePop {
  0% {
    transform: scale(0.85);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
    text-shadow: 0 4px 12px rgba(0,0,0,0.5), 0 0 20px currentColor;
  }
  100% {
    transform: scale(1);
    opacity: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6), 0 0 15px currentColor;
  }
}

@keyframes subtleBounce {
  0%   { transform: translateY(-4px) scale(1); }
  50%  { transform: translateY(2px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

/* Voeg dit toe aan de animatie van de actieve woorden */
.word.active {
  opacity: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6), 0 0 15px currentColor;
  animation: subtlePop 400ms cubic-bezier(.17,.67,.3,1), subtleBounce 600ms ease-out;
}
@keyframes subtleFloat {
  0%   { transform: translateY(-2px) scale(1); }
  50%  { transform: translateY(1px) scale(1.01); }
  100% { transform: translateY(0) scale(1); }
}

/* Actieve woorden */
.word.active {
  opacity: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6), 0 0 15px currentColor;
  animation: subtlePop 400ms cubic-bezier(.17,.67,.3,1), subtleFloat 1200ms ease-in-out;
}
/* Subtiel op en neer bewegen van actieve woorden */
.word.active {
  animation: punchIn 650ms cubic-bezier(.17,.67,.3,1) forwards, 
             glowPulse 2.6s ease-in-out infinite, 
             gentleScale 3s ease-in-out infinite;
}

@keyframes gentleScale {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); } /* subtiel groter */
}




.fullscreen-heart {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 30vw;
  height: 30vw;
  background: white;
  clip-path: polygon(
    50% 0%, 
    61% 10%, 
    70% 20%, 
    75% 30%, 
    80% 40%, 
    82% 50%, 
    80% 60%, 
    75% 70%, 
    70% 80%, 
    61% 90%, 
    50% 100%, 
    39% 90%, 
    30% 80%, 
    25% 70%, 
    20% 60%, 
    18% 50%, 
    20% 40%, 
    25% 30%, 
    30% 20%, 
    39% 10%
  );
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.6s ease, opacity 0.6s ease;
}


.broken-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: url('https://i.imgur.com/7y3GfQh.png') center/cover no-repeat; /* PNG van gebroken glas */
  opacity: 0;
  animation: breakScreen 1s forwards;
  z-index: 9999;
}

@keyframes breakScreen {
  0%   { opacity: 0; transform: scale(0.8) rotate(0deg); }
  50%  { opacity: 1; transform: scale(1.05) rotate(2deg); }
  100% { opacity: 0; transform: scale(1) rotate(-2deg); }
}

/* Scherven effect */
.broken-piece {
  position: fixed;
  width: 20px;
  height: 20px;
  background: rgba(255,255,255,0.8);
  pointer-events: none;
  border-radius: 2px;
  z-index: 9999;
  animation: shatter 800ms forwards;
}

@keyframes shatter {
  0% {
    transform: translate(0,0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.5);
    opacity: 0;
  }
}

