.tc-page-games .tc-main-inner {
    background:
        radial-gradient(
            circle at 16% 6%,
            color-mix(in srgb, var(--tc-accent) 16%, transparent),
            transparent 28rem
        ),
        radial-gradient(
            circle at 88% 12%,
            color-mix(
                in srgb,
                var(--tc-accent-2, var(--tc-accent)) 13%,
                transparent
            ),
            transparent 26rem
        ),
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--tc-bg) 94%, var(--tc-accent) 6%),
            var(--tc-bg)
        );
}

.tc-page-games .tc-content {
    background: transparent;
}

.tc-games-page {
    width: min(1240px, 100%);
    display: grid;
    gap: clamp(0.9rem, 1.8vw, 1.35rem);
    margin: 0 auto;
    padding: clamp(0.75rem, 2vw, 1.5rem);
}

.tc-games-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1rem, 2.4vw, 2rem);
    padding: clamp(1.1rem, 2.5vw, 1.8rem);
    overflow: hidden;
    border: 1px solid var(--tc-border);
    border-radius: 28px;
    background:
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--tc-panel-bg) 92%, transparent),
            color-mix(in srgb, var(--tc-accent) 12%, var(--tc-panel-bg))
        );
    box-shadow: var(--tc-shadow-card);
}

.tc-games-hero__copy {
    max-width: 760px;
}

.tc-games-kicker,
.tc-game-card__eyebrow {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--tc-accent);
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.tc-games-hero h1 {
    max-width: 19ch;
    margin: 0;
    color: var(--tc-text);
    font-size: clamp(1.8rem, 3.4vw, 3.15rem);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.tc-games-hero p {
    max-width: 65ch;
    margin: 0.8rem 0 0;
    color: var(--tc-text-soft);
    font-size: clamp(0.98rem, 1.5vw, 1.12rem);
    line-height: 1.65;
}

.tc-games-hero__badge {
    width: clamp(96px, 11vw, 132px);
    aspect-ratio: 1;
    flex: 0 0 auto;
    display: grid;
    place-content: center;
    justify-items: center;
    border: 1px solid
        color-mix(in srgb, var(--tc-accent) 35%, var(--tc-border));
    border-radius: 50%;
    background:
        radial-gradient(
            circle at 35% 28%,
            color-mix(in srgb, var(--tc-accent) 24%, transparent),
            transparent 42%
        ),
        color-mix(in srgb, var(--tc-panel-bg) 90%, transparent);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 22px 50px rgba(0, 0, 0, 0.2);
}

.tc-games-hero__badge span {
    color: var(--tc-text);
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 900;
    line-height: 0.85;
}

.tc-games-hero__badge small {
    margin-top: 0.55rem;
    color: var(--tc-text-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tc-games-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.35rem);
}

.tc-game-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--tc-border);
    border-radius: 24px;
    background: var(--tc-panel-bg);
    box-shadow: var(--tc-shadow-card);
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.tc-game-card:hover {
    transform: translateY(-4px);
    border-color:
        color-mix(in srgb, var(--tc-accent) 45%, var(--tc-border));
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.24);
}

.tc-game-card__visual {
    position: relative;
    min-height: 225px;
    display: block;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    isolation: isolate;
    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(186, 230, 253, 0.25),
            transparent 44%
        ),
        linear-gradient(
            180deg,
            #0d5b82,
            #07516e 45%,
            #052d43
        );
}

.tc-game-card__visual::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background:
        linear-gradient(
            115deg,
            transparent 12%,
            rgba(255, 255, 255, 0.08) 30%,
            transparent 46%
        );
}

.tc-game-card__visual::after {
    position: absolute;
    right: 0;
    bottom: -10px;
    left: 0;
    height: 55px;
    content: "";
    background:
        radial-gradient(
            ellipse at center,
            #194d52 0,
            #0c2833 72%
        );
}

.tc-game-card__water {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at 12% 65%,
            rgba(255, 255, 255, 0.12) 0 2px,
            transparent 3px
        ),
        radial-gradient(
            circle at 73% 34%,
            rgba(255, 255, 255, 0.12) 0 3px,
            transparent 4px
        ),
        radial-gradient(
            circle at 46% 76%,
            rgba(255, 255, 255, 0.1) 0 2px,
            transparent 3px
        );
    background-size: 88px 94px, 122px 116px, 70px 86px;
    animation: tcGameWater 8s linear infinite;
}

.tc-game-card__status {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 4;
    padding: 0.4rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #e0f2fe;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(3, 23, 42, 0.64);
    backdrop-filter: blur(10px);
}

.tc-game-fish,
.tc-game-dash-player,
.tc-invader,
.tc-submarine,
.tc-bubble-shot,
.tc-game-food {
    position: absolute;
    z-index: 3;
    line-height: 1;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.3));
}

.tc-game-fish {
    font-size: 2.7rem;
}

.tc-game-fish--one {
    top: 72px;
    left: 13%;
    transform: scaleX(-1);
}

.tc-game-fish--two {
    top: 125px;
    left: 48%;
}

.tc-game-fish--three {
    top: 64px;
    right: 10%;
    font-size: 2.35rem;
}

.tc-game-dash-player {
    top: 92px;
    left: 13%;
    font-size: 3.2rem;
}

.tc-game-food {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    font-size: 0;
    background: #fbbf24;
    box-shadow: 0 0 14px #fbbf24;
}

.tc-game-food--one {
    top: 72px;
    left: 48%;
}

.tc-game-food--two {
    top: 128px;
    left: 65%;
    background: #fb7185;
    box-shadow: 0 0 14px #fb7185;
}

.tc-game-food--three {
    top: 88px;
    right: 10%;
    background: #34d399;
    box-shadow: 0 0 14px #34d399;
}

.tc-invader {
    top: 55px;
    font-size: 2.25rem;
}

.tc-invader--one {
    left: 16%;
}

.tc-invader--two {
    left: 43%;
}

.tc-invader--three {
    right: 13%;
}

.tc-submarine {
    bottom: 42px;
    left: 44%;
    font-size: 3.1rem;
    transform: rotate(180deg);
}

.tc-bubble-shot {
    bottom: 96px;
    left: 51%;
    color: #e0f2fe;
    font-size: 1.8rem;
    text-shadow: 0 0 12px #38bdf8;
}

.tc-fry-escape-player,
.tc-fry-predator,
.tc-fry-safe-zone {
    position: absolute;
    z-index: 3;
    line-height: 1;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.3));
}

.tc-fry-escape-player {
    right: 46%;
    bottom: 44px;
    font-size: 1.55rem;
    transform: scaleX(-1);
}

.tc-fry-predator {
    font-size: 2.8rem;
}

.tc-fry-predator--one {
    top: 72px;
    left: 14%;
}

.tc-fry-predator--two {
    top: 122px;
    right: 13%;
    font-size: 2.4rem;
}

.tc-fry-safe-zone {
    top: 44px;
    right: 41%;
    font-size: 3rem;
}

.tc-game-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.4rem;
    padding: 1.25rem;
}

.tc-game-card h2 {
    margin: 0;
    color: var(--tc-text);
    font-size: 1.55rem;
    letter-spacing: -0.03em;
}

.tc-game-card p {
    margin: 0.65rem 0 0;
    color: var(--tc-text-soft);
    line-height: 1.58;
}

.tc-game-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding-top: 1rem;
    border-top: 1px solid var(--tc-border-soft);
}

.tc-game-card__footer > span {
    color: var(--tc-text-soft);
    font-size: 0.74rem;
    font-weight: 700;
}

.tc-game-play {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.62rem 0.85rem;
    border: 1px solid
        color-mix(in srgb, var(--tc-accent) 38%, var(--tc-border));
    border-radius: 12px;
    color: var(--tc-text);
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    background:
        color-mix(in srgb, var(--tc-accent) 14%, var(--tc-panel-bg));

    white-space: nowrap;
    min-width: 5.9rem;
    justify-content: center;}

.tc-game-play:hover {
    color: var(--tc-text);
    background:
        color-mix(in srgb, var(--tc-accent) 23%, var(--tc-panel-bg));
}

.tc-games-note {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--tc-border);
    border-radius: 20px;
    background: var(--tc-panel-bg);
    box-shadow: var(--tc-shadow-card);
}

.tc-games-note__icon {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 1.45rem;
    background:
        color-mix(in srgb, var(--tc-accent) 16%, var(--tc-panel-bg));
}

.tc-games-note h2 {
    margin: 0;
    color: var(--tc-text);
    font-size: 1rem;
}

.tc-games-note p {
    margin: 0.25rem 0 0;
    color: var(--tc-text-soft);
    font-size: 0.88rem;
    line-height: 1.5;
}

@keyframes tcGameWater {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-40px);
    }
}


/* ==========================================================================
   River Rhythm arcade card
   ========================================================================== */

.tc-game-card--rhythm .tc-game-card__visual {
    background:
        radial-gradient(
            circle at 24% 24%,
            rgba(186, 230, 253, 0.28),
            transparent 28%
        ),
        linear-gradient(
            155deg,
            #0e7490 0%,
            #0f766e 48%,
            #164e63 100%
        );
}

.tc-game-card--rhythm .tc-game-card__water {
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0 23px,
            rgba(186, 230, 253, 0.08) 24px 25px
        ),
        radial-gradient(
            circle at 78% 18%,
            rgba(250, 204, 21, 0.16),
            transparent 24%
        );
}

.tc-rhythm-fish {
    position: absolute;
    left: 18%;
    top: 44%;
    z-index: 3;
    display: block;
    font-size: clamp(2.8rem, 7vw, 4.6rem);
    line-height: 1;
    filter:
        drop-shadow(0 10px 12px rgba(2, 6, 23, 0.34));
    transform: translateY(-50%);
    animation:
        tcRhythmFishSwim 2.4s ease-in-out infinite;
}

.tc-rhythm-note {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 2.7rem;
    height: 2.7rem;
    border: 2px solid rgba(255, 255, 255, 0.52);
    border-radius: 999px;
    color: #ffffff;
    background:
        radial-gradient(
            circle at 32% 27%,
            rgba(255, 255, 255, 0.92),
            rgba(56, 189, 248, 0.82) 24%,
            rgba(14, 116, 144, 0.9) 100%
        );
    box-shadow:
        0 0 18px rgba(125, 211, 252, 0.42),
        0 8px 14px rgba(2, 6, 23, 0.24);
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1;
    animation:
        tcRhythmNotePulse 1.8s ease-in-out infinite;
}

.tc-rhythm-note--one {
    left: 48%;
    top: 28%;
}

.tc-rhythm-note--two {
    left: 64%;
    top: 51%;
    animation-delay: -0.55s;
}

.tc-rhythm-note--three {
    left: 80%;
    top: 34%;
    animation-delay: -1.1s;
}

.tc-rhythm-debris {
    position: absolute;
    right: 11%;
    bottom: 12%;
    z-index: 2;
    display: block;
    font-size: 2.1rem;
    filter:
        drop-shadow(0 7px 8px rgba(2, 6, 23, 0.3));
    transform: rotate(-18deg);
}

@keyframes tcRhythmFishSwim {
    0%,
    100% {
        transform:
            translateY(-50%)
            rotate(-2deg);
    }

    50% {
        transform:
            translateY(calc(-50% - 8px))
            rotate(2deg);
    }
}

@keyframes tcRhythmNotePulse {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.12);
    }
}


/* ==========================================================================
   Arcade compact 4 + 3 desktop grid
   ========================================================================== */

@media (min-width: 1180px) {
    .tc-games-page {
        max-width: min(1120px, calc(100vw - 4rem));
    }

    .tc-games-hero {
        padding: clamp(1.35rem, 2.2vw, 2rem);
        margin-bottom: 1.05rem;
    }

    .tc-games-hero__copy h1 {
        max-width: 720px;
        font-size: clamp(2.1rem, 3.1vw, 3.35rem);
        line-height: 1.02;
    }

    .tc-games-hero__copy p {
        max-width: 700px;
        margin-top: 0.65rem;
    }

    .tc-games-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 0.9rem;
    }

    .tc-game-card {
        grid-column: span 3;
        border-radius: 20px;
    }

    .tc-game-card__visual {
        min-height: 145px;
    }

    .tc-game-card__body {
        padding: 1rem;
        gap: 0.8rem;
    }

    .tc-game-card__body h2 {
        font-size: 1.2rem;
    }

    .tc-game-card__body p {
        font-size: 0.88rem;
        line-height: 1.5;
    }

    .tc-game-card__footer {
        padding-top: 0.65rem;
        font-size: 0.72rem;
    }

    /*
     * The final three cards become compact thumbnail cards.
     * Current order:
     * 1 Fish Frenzy
     * 2 Fish Food Dash
     * 3 Tank Invaders
     * 4 Fry Escape
     * 5 Pleco Patrol
     * 6 River Rhythm
     * 7 Tropical Rescue
     */
    .tc-games-grid .tc-game-card:nth-child(n + 5) {
        grid-column: span 4;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .tc-games-grid .tc-game-card:nth-child(n + 5) .tc-game-card__visual {
        min-height: 112px;
        height: 112px;
    }

    .tc-games-grid .tc-game-card:nth-child(n + 5) .tc-game-card__body {
        min-height: 170px;
        padding: 0.85rem 0.95rem;
        gap: 0.65rem;
    }

    .tc-games-grid .tc-game-card:nth-child(n + 5) .tc-game-card__eyebrow {
        font-size: 0.68rem;
        line-height: 1.25;
    }

    .tc-games-grid .tc-game-card:nth-child(n + 5) .tc-game-card__body h2 {
        margin-top: 0.25rem;
        font-size: 1.08rem;
    }

    .tc-games-grid .tc-game-card:nth-child(n + 5) .tc-game-card__body p {
        display: -webkit-box;
        overflow: hidden;
        margin-top: 0.4rem;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        font-size: 0.8rem;
        line-height: 1.42;
    }

    .tc-games-grid .tc-game-card:nth-child(n + 5) .tc-game-card__footer {
        margin-top: auto;
        padding-top: 0.55rem;
        gap: 0.65rem;
        font-size: 0.68rem;
    }

    .tc-games-grid .tc-game-card:nth-child(n + 5) .tc-game-play {
        flex: 0 0 auto;
        padding: 0.48rem 0.7rem;
        font-size: 0.7rem;
        white-space: nowrap;
    }

    .tc-games-note {
        margin-top: 1rem;
        padding: 1rem 1.15rem;
    }
}


@media (max-width: 980px) {
    .tc-games-grid {
        grid-template-columns: 1fr;
    }

    .tc-game-card {
        display: grid;
        grid-template-columns: minmax(250px, 0.8fr) 1.2fr;
    }

    .tc-game-card__visual {
        min-height: 100%;
    }
}

@media (max-width: 700px) {
    .tc-games-page {
        padding: 0.75rem;
    }

    .tc-games-hero {
        align-items: flex-start;
        border-radius: 22px;
    }

    .tc-games-hero__badge {
        display: none;
    }

    .tc-games-hero h1 {
        max-width: none;
    }

    .tc-game-card {
        display: flex;
        border-radius: 20px;
    }

    .tc-game-card__visual {
        min-height: 205px;
    }

    .tc-game-card__footer {
        align-items: flex-end;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tc-game-card__water {
        animation: none;
    }

    .tc-game-card {
        transition: none;
    }
}

/* ==================================================
   Game leaderboards
   ================================================== */

.tc-games-leaderboards {
    margin-top: 1.25rem;
    border: 1px solid rgba(148, 225, 255, 0.22);
    border-radius: 1.35rem;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 22rem),
        rgba(6, 28, 46, 0.74);
    box-shadow: 0 24px 70px rgba(3, 12, 22, 0.32);
    padding: clamp(1rem, 2.6vw, 1.45rem);
}

.tc-games-leaderboards__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tc-games-leaderboards__head h2 {
    margin: 0.35rem 0 0.35rem;
    color: #f8fdff;
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
    letter-spacing: -0.04em;
}

.tc-games-leaderboards__head p {
    max-width: 44rem;
    margin: 0;
    color: rgba(224, 246, 255, 0.78);
    line-height: 1.5;
}

.tc-games-leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.tc-games-leaderboard-card {
    border: 1px solid rgba(148, 225, 255, 0.18);
    border-radius: 1rem;
    background: rgba(2, 18, 31, 0.48);
    overflow: hidden;
}

.tc-games-leaderboard-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-bottom: 1px solid rgba(148, 225, 255, 0.14);
}

.tc-games-leaderboard-card__top h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1rem;
}

.tc-games-leaderboard-card__top a {
    color: #9beeff;
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.tc-games-score-list {
    list-style: none;
    padding: 0.4rem;
    margin: 0;
    display: grid;
    gap: 0.32rem;
}

.tc-games-score-list li {
    display: grid;
    grid-template-columns: 3.4rem minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
    min-height: 2.35rem;
    padding: 0.42rem 0.5rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.045);
    color: rgba(236, 252, 255, 0.9);
}

.tc-games-score-rank {
    color: #8be9ff;
    font-weight: 900;
}

.tc-games-score-player {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.tc-games-score-list strong {
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.tc-games-score-empty {
    grid-template-columns: minmax(0, 1fr) auto !important;
    color: rgba(224, 246, 255, 0.68) !important;
}

@media (max-width: 820px) {
    .tc-games-leaderboards__head {
        display: grid;
    }

    .tc-games-leaderboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .tc-games-score-list li {
        grid-template-columns: 2.75rem minmax(0, 1fr) auto;
        gap: 0.45rem;
        font-size: 0.9rem;
    }
}
