/* LABS / cats — full-page rainbow + tiled cats. Module-local CSS, body-scoped so
   nothing leaks to other pages. The site header behavior is intentionally NOT
   overridden globally; only a small scoped rule keeps it interactive above the
   fixed-position rainbow on the cats page. */

body.labs-cats-body {
    background:
        linear-gradient(
            180deg,
            #ff2d55 0%,
            #ff7f00 16%,
            #ffe600 33%,
            #00d26a 50%,
            #00b8ff 66%,
            #4b3bff 83%,
            #b026ff 100%
        ) fixed;
    overflow: hidden;
}

/* Scoped header override — applies only on the cats page so the global header
   CSS (and the user's separate header refresh) is not affected anywhere else. */
body.labs-cats-body header {
    position: relative;
    z-index: 10;
}

/* Rows are JS-generated into this container so the row count scales with
   viewport height (zoom in / resize → more rows fill the new space). */
.labs-cats-rows {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.labs-cats-row {
    position: absolute;
    left: 0;
    width: 200%;
    background-repeat: repeat-x;
    background-size: auto 100%;
    image-rendering: pixelated;
    animation-name: cats-scroll-left;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
}

.labs-cats-row[data-dir="right"] {
    animation-name: cats-scroll-right;
}

@keyframes cats-scroll-left {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@keyframes cats-scroll-right {
    from { transform: translateX(-50%); }
    to   { transform: translateX(0); }
}

.labs-cats-counter {
    position: fixed;
    top: 84px;
    right: 24px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 14px;
    padding: 12px 22px 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.04);
    text-align: center;
    color: var(--text-primary);
    pointer-events: none;
    z-index: 5;
    min-width: 130px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.labs-cats-counter-num {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(180deg, #ff2d55 0%, #b026ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -1px;
}

.labs-cats-counter-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-top: 6px;
    font-weight: 700;
}

.labs-cats-gesture {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    text-align: center;
    z-index: 9;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.labs-cats-gesture-title {
    font-size: clamp(26px, 6vw, 64px);
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
    font-family: "Comic Sans MS", "Marker Felt", system-ui, sans-serif;
}

.labs-cats-gesture-sub {
    font-size: clamp(13px, 2.2vw, 18px);
    opacity: 0.85;
}

.labs-cats-gesture.is-hidden {
    display: none;
}

@media (max-width: 720px) {
    .labs-cats-counter {
        top: auto;
        bottom: 16px;
        right: 50%;
        transform: translateX(50%);
        padding: 8px 18px 6px;
        min-width: 100px;
    }

    .labs-cats-counter-num {
        font-size: 36px;
    }
}
