@font-face {
    font-family: 'The Bellovia Sans';
    src: url('../fonts/The_Bellovia_Sans.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Base Preloader Styles */
#fr-preloader-wrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--fr-bg);
    color: var(--fr-text);
    font-family: var(--fr-font);
    font-weight: var(--fr-weight);
    font-size: var(--fr-size);
    letter-spacing: var(--fr-spacing);
    overflow: hidden;
    /* GPU Acceleration for smooth animations */
    will-change: transform, opacity;
}

/* Entrance Animations */
.entrance-fade {
    animation: fadeIn 0.5s ease forwards;
}
.entrance-slide-up {
    animation: slideInUp 0.5s ease forwards;
}
.entrance-slide-down {
    animation: slideInDown 0.5s ease forwards;
}
.entrance-slide-left {
    animation: slideInLeft 0.5s ease forwards;
}

/* Exit Animations (Applied via JS class toggling) */
.fr-exit-active.exit-fade {
    animation: fadeOut 0.8s ease forwards;
}
.fr-exit-active.exit-slide-up {
    animation: slideOutUp 0.8s ease forwards;
}
.fr-exit-active.exit-slide-down {
    animation: slideOutDown 0.8s ease forwards;
}
.fr-exit-active.exit-slide-left {
    animation: slideOutLeft 0.8s ease forwards;
}
.fr-exit-active.exit-slide-right {
    animation: slideOutRight 0.8s ease forwards;
}

/* Keyframes */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

@keyframes slideInUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes slideOutUp { from { transform: translateY(0); } to { transform: translateY(-100%); } }

@keyframes slideInDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes slideOutDown { from { transform: translateY(0); } to { transform: translateY(100%); } }

@keyframes slideInLeft { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes slideOutLeft { from { transform: translateX(0); } to { transform: translateX(-100%); } }

@keyframes slideOutRight { from { transform: translateX(0); } to { transform: translateX(100%); } }


/* --- Specific Animation Styles --- */

/* Strobo */
.fr-loader-text {
    text-transform: uppercase;
}
.cursor {
    display: inline-block;
    width: 10px;
    height: var(--fr-size);
    background-color: currentColor;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
    margin-left: 5px;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Matrix */
.fr-matrix-text {
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Glitch */
.fr-glitch-wrapper {
    position: relative;
    animation: pulse 5s infinite;
}
.fr-glitch-text {
    position: relative;
    display: inline-block;
}
.fr-glitch-text::before,
.fr-glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--fr-bg);
}
.fr-glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 var(--fr-accent);
    clip-path: inset(44% 0 61% 0);
    animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}
.fr-glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9; /* Secondary accent, maybe make configurable later */
    clip-path: inset(50% 0 30% 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip-path: inset(20% 0 80% 0); }
    20% { clip-path: inset(60% 0 10% 0); }
    40% { clip-path: inset(40% 0 50% 0); }
    60% { clip-path: inset(80% 0 5% 0); }
    80% { clip-path: inset(10% 0 70% 0); }
    100% { clip-path: inset(30% 0 20% 0); }
}
@keyframes glitch-anim-2 {
    0% { clip-path: inset(10% 0 60% 0); }
    20% { clip-path: inset(80% 0 5% 0); }
    40% { clip-path: inset(30% 0 10% 0); }
    60% { clip-path: inset(50% 0 80% 0); }
    80% { clip-path: inset(20% 0 40% 0); }
    100% { clip-path: inset(70% 0 10% 0); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.9; }
}
