/* roth-fam.de — Zusatz-Effekte (rein additiv, siehe fx.js) */

body[data-page="index"] { --fx-a:#7ab8e8; --fx-b:#c9748a; --fx-glow:rgba(160,150,200,.10); }
body[data-page="sven"]  { --fx-a:#7ab8e8; --fx-b:#e8c97a; --fx-glow:rgba(232,201,122,.07); }
body[data-page="e"]     { --fx-a:#ff4fa3; --fx-b:#4aa8ff; --fx-glow:rgba(255,79,163,.10); }
body[data-page="raetsel"] { --fx-a:#a84f68; --fx-b:#d4a96a; --fx-glow:rgba(201,116,138,.08); }
body[data-page="vio"]   { --fx-a:#c9748a; --fx-b:#d4a96a; --fx-glow:rgba(201,116,138,.11); }

/* Scroll-Fortschritt */
.fx-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 10000;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--fx-a), var(--fx-b));
  pointer-events: none;
}

/* Cursor-Spotlight */
.fx-spot {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx,50%) var(--my,50%), var(--fx-glow), transparent 65%);
  opacity: 0; transition: opacity .4s;
}
.fx-spot.on { opacity: 1; }

/* Partikel-Canvas (Startseite) */
.fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }

/* Intro Startseite */
@keyframes fx-in-left  { from { opacity: 0; transform: translateX(-7vw); } }
@keyframes fx-in-right { from { opacity: 0; transform: translateX( 7vw); } }
@keyframes fx-rise     { from { opacity: 0; transform: translateY(18px); } }
body[data-page="index"] .half-sven { animation: fx-in-left  1s cubic-bezier(.2,.8,.2,1) backwards; }
body[data-page="index"] .half-vio  { animation: fx-in-right 1s cubic-bezier(.2,.8,.2,1) backwards; }
body[data-page="index"] .sven-icon, body[data-page="index"] .vio-icon { animation: fx-rise .8s .35s cubic-bezier(.2,.8,.2,1) backwards; }
body[data-page="index"] .sven-name, body[data-page="index"] .vio-name { animation: fx-rise .8s .5s cubic-bezier(.2,.8,.2,1) backwards; }
body[data-page="index"] .sven-tag,  body[data-page="index"] .vio-tag  { animation: fx-rise .8s .65s cubic-bezier(.2,.8,.2,1) backwards; }

/* Sven: blinkender Cursor am Namen */
body[data-page="index"] .sven-name::after { content: '_'; color: #7ab8e8; animation: fx-blink 1.1s steps(1) infinite; }
@keyframes fx-blink { 50% { opacity: 0; } }

/* Sven: Terminal-Widget */
.section-term { padding: 4rem 0; border-top: 1px solid var(--border); }
.fx-term {
  font-family: 'Space Mono', monospace; font-size: .72rem; line-height: 1.7;
  background: #0a0c10; border: 1px solid var(--border); border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0,0,0,.35); overflow: hidden;
}
.fx-term-bar { display: flex; gap: .4rem; align-items: center; padding: .55rem .8rem; background: var(--surface); border-bottom: 1px solid var(--border); color: var(--muted); font-size: .68rem; letter-spacing: .08em; }
.fx-term-bar i { width: .55rem; height: .55rem; border-radius: 50%; display: inline-block; }
.fx-term-bar i:nth-child(1) { background: #e87a7a; } .fx-term-bar i:nth-child(2) { background: #e8c97a; } .fx-term-bar i:nth-child(3) { background: #6db87a; }
.fx-term-bar span { margin-left: .6rem; }
.fx-term-out { padding: .9rem 1rem .2rem; height: 15rem; overflow-y: auto; color: var(--text); white-space: pre-wrap; word-break: break-word; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.fx-term-out .cmd { color: var(--muted); }
.fx-term-out .ok { color: #6db87a; } .fx-term-out .warn { color: var(--accent); } .fx-term-out .crit { color: #e87a7a; } .fx-term-out .info { color: var(--accent2); }
.fx-term-in { display: flex; gap: .5rem; padding: .3rem 1rem .9rem; align-items: center; cursor: text; }
.fx-term-in b { color: var(--accent2); font-weight: 400; white-space: nowrap; }
.fx-term-in input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #eef0f5; font: inherit; caret-color: var(--accent); }
.fx-term-hint { font-size: .7rem; color: var(--muted); margin-top: .8rem; letter-spacing: .05em; }
.fx-term-hint code { color: var(--accent2); cursor: pointer; }

/* Klick-Emojis (Vio) */
.fx-pop { position: fixed; z-index: 9990; pointer-events: none; font-size: 1.3rem; animation: fx-pop 1.3s ease-out forwards; }
@keyframes fx-pop { 0% { opacity: 0; transform: translate(-50%, 0) scale(.4); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), -90px) scale(1.2) rotate(var(--rot)); } }

/* Konfetti */
.fx-confetti { position: fixed; inset: 0; z-index: 9995; pointer-events: none; width: 100%; height: 100%; }

/* Kachel-Tilt */
.fx-tilt { transition: transform .18s ease-out, border-color .3s, box-shadow .3s; will-change: transform; }

@media (hover: none), (prefers-reduced-motion: reduce) { .fx-spot, .fx-canvas { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.countdown-sub { color: var(--accent) !important; font-style: italic; }

/* Startseite: mittlere Tür (E.) */
body[data-page="index"] .half-e { animation: fx-rise 1s .15s cubic-bezier(.2,.8,.2,1) backwards; }
body[data-page="index"] .e-icon { animation: fx-rise .8s .4s cubic-bezier(.2,.8,.2,1) backwards; }
body[data-page="index"] .e-name { animation: fx-rise .8s .55s cubic-bezier(.2,.8,.2,1) backwards; }
body[data-page="index"] .e-tag  { animation: fx-rise .8s .7s  cubic-bezier(.2,.8,.2,1) backwards; }

/* Seitenübergang (ersetzt den alten, blockiert keine Klicks) */
.fx-veil { position: fixed; inset: 0; z-index: 9999; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.fx-veil.on { opacity: 1; }

/* Besondere Tage */
.fx-banner {
  position: fixed; top: .8rem; left: 50%; transform: translateX(-50%); z-index: 9000;
  display: flex; align-items: center; gap: .6rem; max-width: calc(100vw - 2rem);
  background: linear-gradient(135deg, #a84f68, #a67cff); color: #fff;
  font: 600 .9rem/1.4 system-ui, sans-serif; padding: .55rem .6rem .55rem 1.1rem; border-radius: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: fx-drop .6s cubic-bezier(.2,1.3,.4,1) both;
}
.fx-banner-x { flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255,255,255,.25); color: #fff; font-size: 1.1rem; line-height: 1; }
.fx-banner-x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@keyframes fx-drop { from { transform: translate(-50%, -150%); } }
.fx-balloon { position: fixed; bottom: -4rem; z-index: 8990; pointer-events: none; animation: fx-balloon linear forwards; }
@keyframes fx-balloon { 0% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-55vh) translateX(20px) rotate(6deg); } 100% { transform: translateY(-115vh) rotate(-4deg); } }
body.fx-party[data-page="vio"] .hero-name::after { content: ' 🎂'; -webkit-text-fill-color: initial; }
