@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Alfa+Slab+One&family=Anton&family=Bebas+Neue&family=Cinzel:wght@400;700&family=Cormorant+Garamond:wght@400;700&family=DM+Serif+Display&family=Dancing+Script:wght@400;700&family=Fjalla+One&family=Great+Vibes&family=Inter:wght@100;400;900&family=Lobster&family=Montserrat:wght@100;400;900&family=Oswald:wght@200;400;700&family=Pacifico&family=Playfair+Display:wght@400;700&family=Righteous&family=Roboto+Mono:wght@100;400;700&family=Space+Mono:wght@400;700&family=Syne:wght@400;800&family=Unbounded:wght@200;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100vw;
    height: 100vh;
    background: #000;
    overflow: hidden;
    color: #fff;
}

#bg-circles,
#fg-circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

#bg-circles {
    z-index: 0;
}

#text-grid {
    z-index: 1;
    position: relative;
    /* Ensure z-index works */
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    padding: 20px;
    gap: 2px;
    /* Slight gap for texture */
    overflow: hidden;
}

#fg-circles {
    z-index: 2;
}

.floating-circle {
    position: absolute;
    border-radius: 50%;
    background: #fff;
    /* Sharp shadow for depth */
    box-shadow: 15px 15px 0px rgba(0, 0, 0, 0.8);
    will-change: transform;
}

.char {
    font-size: 12rem;
    /* Increased to 12rem */
    line-height: 1;
    display: inline-block;
    transition: color 2s ease-in-out;
    /* Smooth dissolve */
    position: relative;
    /* For z-index context if needed */
}

.cursor {
    display: inline-block;
    width: 12rem;
    /* Match char width approx */
    height: 12rem;
    /* Match char height */
    background-color: #fff;
    animation: blink 1s step-end infinite;
    vertical-align: bottom;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .char {
        font-size: 4rem;
        /* Smaller on mobile */
    }

    .cursor {
        width: 4rem;
        height: 4rem;
    }
}