/* Theme toggle control */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.theme-toggle-icon {
  font-size: 1rem;
  line-height: 1;
  transition: transform .3s ease;
}

.theme-toggle-text {
  font-size: .75rem;
  letter-spacing: .08em;
}

.theme-toggle-icon.bi-sun-fill {
  transform: rotate(12deg);
}

.theme-toggle-icon.bi-moon-stars-fill {
  transform: rotate(-10deg);
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle-icon {
    transition: none;
  }
}

.disabled-link {
  pointer-events: none;
}

footer a {
  color: inherit;
}

.legal-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.legal-content h3 {
  margin-top: 2rem;
  margin-bottom: .75rem;
  font-size: 1.15rem;
}

.legal-content p {
  margin-bottom: 1rem;
}

.legal-content ul {
  padding-left: 1.2rem;
}

.legal-content li {
  margin-bottom: .5rem;
}

@keyframes aiSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes aiPulse {
  0%,
  100% {
    opacity: .45;
    transform: scale(1);
  }
  50% {
    opacity: .8;
    transform: scale(1.05);
  }
}

/* TheaterJS Typing Animation Styles */

.theater-display {
  position: relative;
  display: inline-block;
  min-height: 1.6rem;
}

.theater-display.is-typing::after {
  content: '▋';
  display: inline-block;
  animation: blink 0.8s infinite;
  margin-left: 2px;
  color: inherit;
}

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

/* Terminal-style background for theater display */
.bg-dark .theater-display {
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

/* TV Ein/Aus Effekt für Gerd-GPT */
/* Wrapper ist zugleich Screen */
#gerd-screen.gerd-screen-wrapper {
  padding-left: 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  background: radial-gradient(circle at 50% 50%, rgba(16,185,129,0.15), rgba(0,0,0,0.85));
  min-height: 70px;
  transition: background .25s ease;
}

/* Animationszustände */
#gerd-screen.turning-off::after,
#gerd-screen.turning-on::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  pointer-events: none;
}

/* Keyframes für TV-off Effekt (Linie schrumpft) */
@keyframes tvOffCollapse {
  0% { transform: scaleY(1) scaleX(1); opacity:1; }
  40% { transform: scaleY(.05) scaleX(1); opacity:1; }
  100% { transform: scaleY(.05) scaleX(0); opacity:0; }
}

@keyframes tvOnExpand {
  0% { transform: scaleY(.05) scaleX(0); opacity:0; }
  60% { transform: scaleY(.05) scaleX(1); opacity:1; }
  100% { transform: scaleY(1) scaleX(1); opacity:1; }
}

#gerd-screen.off .theater-display { opacity:0; }
#gerd-screen.turning-off { animation: tvOffCollapse .45s forwards ease-in; }
#gerd-screen.turning-on { animation: tvOnExpand .55s forwards ease-out; }

#tv-toggle { font-size: .65rem; letter-spacing: .05em; }
#tv-toggle .off-label { letter-spacing: .05em; }

/* Komplett ausblenden wenn ausgeschaltet */
#gerd-screen.off {
  display: none;
}

/* LED Indikator */
.terminal-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1f3d1f;
  box-shadow: 0 0 0 2px rgba(0,0,0,.4) inset;
  position: relative;
  transition: background .3s ease, box-shadow .3s ease, filter .4s ease;
}
.terminal-led.led-on {
  background: #3dff7a;
  box-shadow: 0 0 6px 2px rgba(61,255,122,.6), 0 0 0 2px rgba(0,0,0,.4) inset;
  filter: brightness(1.1);
}
.terminal-led.led-off {
  background: #233323;
  box-shadow: 0 0 3px 0 rgba(0,0,0,.35) inset;
  filter: grayscale(.4) brightness(.8);
}

/* Fade-Out Effekt vor Abschalten */
#gerd-screen.fading .theater-display {
  transition: opacity .4s ease;
  opacity: 0;
}
#gerd-screen.on .theater-display { opacity: 1; transition: opacity .3s ease; }
