/* This simpler approach uses your existing global variables directly */

.nier-logo-container {
  position: relative;
  display: inline-block;
  padding: 0.25rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.nier-logo {
  position: relative;
  color: var(--color-nier-text-dark); /* Use your global variable */
  text-shadow: 0 0 2px var(--color-nier-text-dark);
  animation: nier-fade-in 2.5s ease-out forwards, nier-subtle-pulse 4s 2.5s infinite;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nier-logo::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  text-shadow: 0 0 3px var(--color-nier-text-dark);
  opacity: 0;
  animation: nier-glitch 6s 3s infinite;
  transition: text-shadow 0.3s ease;
}

.nier-logo::after {
  content: attr(data-text);
  position: absolute;
  left: -2px;
  top: 0;
  width: 100%;
  height: 100%;
  text-shadow: -1px 0 1px var(--color-nier-text-dark);
  opacity: 0;
  animation: nier-glitch-2 5s 3s infinite;
  transition: text-shadow 0.3s ease;
}

.nier-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    color-mix(in srgb, var(--color-nier-text-dark) 5%, transparent) 50%,
    transparent 100%
  );
  animation: nier-scan 3s linear infinite;
  z-index: 2;
  pointer-events: none;
  transition: background 0.3s ease;
}

.nier-blocks {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.nier-blocks::before,
.nier-blocks::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 6px;
  background: color-mix(in srgb, var(--color-nier-text-dark) 10%, transparent);
  animation: nier-blocks 10s linear infinite;
  transition: background 0.3s ease;
}

.nier-blocks::before {
  top: 20%;
  left: 10%;
  animation-delay: 1s;
}

.nier-blocks::after {
  bottom: 40%;
  right: 10%;
  width: 15px;
  height: 4px;
  animation-delay: 3s;
}

/* Border and interface details */
.nier-logo-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px solid var(--color-nier-border);
  pointer-events: none;
  transition: border-color 0.3s ease;
}

/* Interface dots in the corner */
.nier-logo-container::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 3px;
  height: 3px;
  background-color: var(--color-nier-text-dark);
  box-shadow:
    -6px 0 0 var(--color-nier-text-dark),
    -12px 0 0 var(--color-nier-text-dark),
    0 6px 0 var(--color-nier-text-dark),
    -6px 6px 0 var(--color-nier-text-dark),
    -12px 6px 0 var(--color-nier-text-dark);
  pointer-events: none;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Animations unchanged */
@keyframes nier-fade-in {
  0% { opacity: 0; clip-path: inset(0 100% 0 0); }
  20% { opacity: 0.3; clip-path: inset(0 80% 0 0); }
  40% { opacity: 0.5; clip-path: inset(0 60% 0 0); }
  60% { opacity: 0.7; clip-path: inset(0 40% 0 0); }
  80% { opacity: 0.9; clip-path: inset(0 20% 0 0); }
  95% { opacity: 1; clip-path: inset(0 5% 0 0); }
  100% { opacity: 1; clip-path: inset(0 0 0 0); }
}

@keyframes nier-subtle-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.9; }
}

@keyframes nier-glitch {
  0%, 100% { opacity: 0; transform: translateX(0); }
  10.5% { opacity: 0.5; transform: translateX(3px); }
  11% { opacity: 0; transform: translateX(0); }
  29.5% { opacity: 0; transform: translateX(0); }
  30% { opacity: 0.4; transform: translateX(-3px); }
  30.5% { opacity: 0; transform: translateX(0); }
  80% { opacity: 0; transform: translateX(0); }
  80.5% { opacity: 0.6; transform: translateX(5px); }
  81% { opacity: 0; transform: translateX(0); }
}

@keyframes nier-glitch-2 {
  0%, 100% { opacity: 0; transform: translateX(0); }
  10.5% { opacity: 0; transform: translateX(0); }
  11% { opacity: 0.4; transform: translateX(-2px); }
  11.5% { opacity: 0; transform: translateX(0); }
  50% { opacity: 0; transform: translateX(0); }
  50.5% { opacity: 0.4; transform: translateX(2px); }
  51% { opacity: 0; transform: translateX(0); }
}

@keyframes nier-scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

@keyframes nier-blocks {
  0% { opacity: 0; transform: translateY(0) translateX(0); }
  10% { opacity: 0.8; }
  30% { opacity: 0.6; transform: translateY(20px) translateX(10px); }
  50% { opacity: 0.4; transform: translateY(40px) translateX(20px); }
  70% { opacity: 0.2; transform: translateY(60px) translateX(30px); }
  100% { opacity: 0; transform: translateY(100px) translateX(40px); }
}
