/* Globales Page-Transition-Overlay + Matrix-Effekt + Spinner */

#pagetransition {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;

    background: radial-gradient(circle at top, rgba(56,189,248,0.15), rgba(15,23,42,0.98));
    box-shadow: inset 0 0 140px rgba(56,189,248,0.3);

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
}

/* Aktiv = sichtbar */
#pagetransition.pt-active {
    opacity: 1;
    pointer-events: auto;
}

/* Matrix-Regen im Hintergrund */
#pagetransition .pt-matrix {
    position: absolute;
    inset: -50px;
    background-image:
        linear-gradient(rgba(15,23,42,0.9), rgba(15,23,42,0.9)),
        repeating-linear-gradient(
            to bottom,
            rgba(56,189,248,0.0) 0px,
            rgba(56,189,248,0.12) 2px,
            rgba(56,189,248,0.0) 4px
        );
    background-size: 100% 100%, 2px 40px;
    background-position: 0 0, 0 0;
    mix-blend-mode: screen;
    opacity: 0.6;
    animation: pt-matrix-fall 1.4s linear infinite;
}

@keyframes pt-matrix-fall {
    0%   { background-position: 0 0, 0 0; }
    100% { background-position: 0 0, 0 40px; }
}

#pagetransition .pt-center {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 26px;
    border-radius: 999px;
    background: radial-gradient(circle at top left, rgba(15,23,42,0.9), rgba(2,6,23,0.98));
    border: 1px solid rgba(56,189,248,0.4);
    box-shadow:
        0 20px 60px rgba(0,0,0,0.85),
        0 0 30px rgba(56,189,248,0.55);
}

/* Balken-Spinner */
#pagetransition .pt-spinner {
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

#pagetransition .pt-spinner span {
    display: block;
    width: 6px;
    height: 20px;
    border-radius: 999px;
    background: rgba(56,189,248,0.95);
    box-shadow: 0 0 12px rgba(56,189,248,0.9);
    animation: pt-spinner-pulse 0.8s ease-in-out infinite;
}

#pagetransition .pt-spinner span:nth-child(2) {
    animation-delay: 0.12s;
}
#pagetransition .pt-spinner span:nth-child(3) {
    animation-delay: 0.24s;
}

@keyframes pt-spinner-pulse {
    0%, 100% { transform: scaleY(0.4); opacity: 0.6; }
    50%      { transform: scaleY(1.2); opacity: 1; }
}

/* Text */
#pagetransition .pt-text {
    text-align: center;
    font-size: 0.8rem;
    color: #e5e7eb;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#pagetransition .pt-text small {
    display: block;
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Mobile Anpassung */
@media (max-width: 600px) {
    #pagetransition .pt-center {
        width: 80%;
        padding: 14px 18px;
        border-radius: 24px;
    }
}
