/* ============================================================
   GENRE.CSS — OMEGA CINEMATIC WOW
   Phase W8+ — FINAL AUTHORITY PASS (LOCK AFTER APPLY)
   ------------------------------------------------------------
   • Genre index + single genre pages only
   • CSS-only (NO JS)
   • Zero impact on cards elsewhere
   • Calm, cinematic, premium authority
============================================================ */

/* ============================================================
   PAGE SCOPE
============================================================ */

.ccg-page--genres-index .ccg-main,
.ccg-page--genre-single .ccg-main {
    padding-top: 0;
}

/* Remove any inherited top padding/margins from the first hero block */
.ccg-page--genres-index .ccg-main > .ccg-section.ccg-genres-hero {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.ccg-page--genres-index .ccg-genres-hero .ccg-hero {
    margin-top: 0 !important;
}

.ccg-page--genres-index .ccg-genres-hero .ccg-hero-inner > :first-child {
    margin-top: 0 !important;
}


/* ============================================================
   GENRE HERO — CINEMATIC AUTHORITY
============================================================ */

.ccg-genre-hero {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: clamp(200px, 26vw, 300px);

    background:
        radial-gradient(
            ellipse at 18% 14%,
            rgba(var(--accent-rgb), 0.22),
            transparent 58%
        ),
        radial-gradient(
            ellipse at 85% 8%,
            rgba(255,255,255,0.08),
            transparent 62%
        ),
        linear-gradient(
            145deg,
            rgba(0,0,0,0.94),
            rgba(12,12,32,0.88),
            rgba(0,0,0,0.96)
        );

    box-shadow:
        0 36px 96px rgba(0,0,0,0.92),
        inset 0 0 0 1px rgba(255,255,255,0.07);
}

.ccg-genre-hero::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 18px;
    pointer-events: none;
    z-index: 1;
    border: 1px solid rgba(var(--accent-rgb),0.32);
    box-shadow:
        0 0 24px rgba(var(--accent-rgb),0.22),
        inset 0 0 22px rgba(255,255,255,0.08);
    mix-blend-mode: screen;
}

.ccg-genre-hero__bg,
.ccg-genre-hero__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ccg-genre-hero__overlay {
    z-index: 1;
    background:
        radial-gradient(circle at 18% 22%, rgba(var(--accent-rgb),0.28), transparent 42%),
        radial-gradient(circle at 78% 18%, rgba(255,255,255,0.14), transparent 48%),
        repeating-radial-gradient(circle at 12% 20%, rgba(255,255,255,0.12) 0 1px, transparent 1px 6px),
        repeating-radial-gradient(circle at 82% 68%, rgba(255,255,255,0.08) 0 1px, transparent 1px 7px),
        radial-gradient(circle at 20% 30%, rgba(var(--accent-rgb),0.20), transparent 40%),
        radial-gradient(circle at 80% 18%, rgba(255,255,255,0.14), transparent 46%),
        linear-gradient(135deg, rgba(255,255,255,0.05), transparent 40%),
        linear-gradient(to bottom, rgba(0,0,0,0.25), rgba(0,0,0,0.70));
    mix-blend-mode: screen;
}

.ccg-page--genre-single .ccg-genre-hero__bg,
body:not([data-collection="Retro Events"]) .ccg-page--collection-single .ccg-genre-hero__bg {
    overflow: hidden;
}

.ccg-page--genre-single .ccg-genre-hero__img,
body:not([data-collection="Retro Events"]) .ccg-page--collection-single .ccg-genre-hero__img {
    position: absolute;
    inset: -6%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
    transform: scale(1.08);
    filter: blur(6px) saturate(1.1) contrast(1.05) brightness(0.72);
    opacity: 0.82;
}

.ccg-page--genre-single .ccg-genre-hero__bg::before,
body:not([data-collection="Retro Events"]) .ccg-page--collection-single .ccg-genre-hero__bg::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(110deg, rgba(6,8,18,0.88) 6%, rgba(6,8,18,0.55) 42%, rgba(6,8,18,0.16) 78%),
        radial-gradient(circle at 22% 24%, rgba(var(--accent-rgb),0.22), transparent 46%),
        linear-gradient(to bottom, rgba(0,0,0,0.08), rgba(0,0,0,0.62));
    opacity: 0.92;
    pointer-events: none;
}

body[data-collection="Retro Events"] .ccg-page--collection-single .ccg-genre-hero__bg::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(110deg, rgba(5,7,16,0.92) 8%, rgba(5,7,16,0.6) 46%, rgba(5,7,16,0.2) 82%),
        radial-gradient(circle at 22% 24%, rgba(var(--accent-rgb),0.22), transparent 48%),
        linear-gradient(to bottom, rgba(0,0,0,0.16), rgba(0,0,0,0.72));
    opacity: 0.96;
    pointer-events: none;
}

.ccg-page--collection-single .ccg-collection-hero .ccg-genre-hero__bg::after {
    content: "";
    position: absolute;
    inset: -8%;
    background: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(10px) brightness(0.7) saturate(1.05);
    opacity: 0.9;
    transform: scale(1.08);
    z-index: 0;
    pointer-events: none;
}

.ccg-page--genre-single .ccg-genre-hero__overlay,
body:not([data-collection="Retro Events"]) .ccg-page--collection-single .ccg-genre-hero__overlay {
    z-index: 2;
    mix-blend-mode: screen;
}

.ccg-page--genre-single .ccg-genre-hero__inner,
body:not([data-collection="Retro Events"]) .ccg-page--collection-single .ccg-genre-hero__inner {
    width: 100%;
    max-width: min(980px, 94vw);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    pointer-events: none;
}

.ccg-page--genre-single .ccg-genre-hero__inner::before,
body:not([data-collection="Retro Events"]) .ccg-page--collection-single .ccg-genre-hero__inner::before {
    content: "";
    position: absolute;
    inset: -18px -26px -20px -26px;
    border-radius: 18px;
    background:
        linear-gradient(120deg, rgba(5,7,16,0.74), rgba(5,7,16,0.4) 62%, rgba(5,7,16,0.12)),
        radial-gradient(circle at 18% 18%, rgba(var(--accent-rgb),0.22), transparent 58%);
    box-shadow: 0 18px 42px rgba(0,0,0,0.5);
    z-index: 0;
    pointer-events: none;
}

body[data-collection="Retro Events"] .ccg-page--collection-single .ccg-genre-hero__inner::before {
    content: "";
    position: absolute;
    inset: -18px -26px -20px -26px;
    border-radius: 18px;
    background:
        linear-gradient(120deg, rgba(5,7,16,0.86), rgba(5,7,16,0.58) 62%, rgba(5,7,16,0.22)),
        radial-gradient(circle at 18% 18%, rgba(var(--accent-rgb),0.24), transparent 58%);
    box-shadow: 0 20px 48px rgba(0,0,0,0.58);
    z-index: 0;
    pointer-events: none;
}

.ccg-page--genre-single .ccg-genre-hero__inner > *,
body:not([data-collection="Retro Events"]) .ccg-page--collection-single .ccg-genre-hero__inner > * {
    position: relative;
    z-index: 1;
}

.ccg-genre-hero__inner {
    position: relative;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.ccg-page--genres-index .ccg-hero--genres {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(26px, 3.2vw, 40px) clamp(20px, 3.2vw + 10px, 48px);
    min-height: clamp(220px, 28vw, 320px);
    margin-bottom: 32px;

    background:
        radial-gradient(circle at 18% 20%, rgba(var(--accent-rgb), 0.32), transparent 46%),
        radial-gradient(circle at 84% 18%, rgba(255,255,255,0.12), transparent 48%),
        linear-gradient(145deg, rgba(4,6,16,0.98), rgba(12,12,34,0.88), rgba(0,0,0,0.96));

    box-shadow:
        0 34px 90px rgba(0,0,0,0.88),
        0 0 42px rgba(var(--accent-rgb),0.18),
        inset 0 0 0 1px rgba(255,255,255,0.06);
}

.ccg-page--genres-index .ccg-hero-inner--genres {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
    text-shadow: 0 16px 40px rgba(0,0,0,0.78);
}

.ccg-page--genres-index .ccg-hero--genres::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 14%, rgba(255,255,255,0.08), transparent 58%),
        radial-gradient(circle at 50% 120%, rgba(0,0,0,0.68), transparent 48%),
        linear-gradient(to bottom, rgba(0,0,0,0.32), rgba(0,0,0,0.76));
    opacity: 0.9;
    animation: ccg-omega-hero-halo 36s ease-in-out infinite;
}

.ccg-page--genres-index .ccg-hero--genres .ccg-hero-image {
    position: absolute;
    inset: -12%;
    z-index: 0;
    background:
        linear-gradient(120deg, rgba(var(--accent-rgb),0.18), transparent 44%),
        radial-gradient(circle at 80% 40%, rgba(var(--accent-rgb),0.22), transparent 52%),
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.08), transparent 50%);
    opacity: 0.62;
    transform: translate3d(0, 0, 0) scale(1.08);
    filter: saturate(1.08);
    animation: ccg-omega-hero-drift 70s ease-in-out infinite;
}

.ccg-page--genres-index .ccg-hero--genres .ccg-hero-scanlines {
    opacity: 0.28;
}

.ccg-page--genres-index .ccg-hero-inner--genres .ccg-hero-kicker {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.74);
}

.ccg-page--genres-index .ccg-hero-inner--genres .ccg-hero-title {
    margin: 0;
    letter-spacing: 0.12em;
    line-height: 1.08;
    font-weight: 700;
    -webkit-text-stroke: 1px rgba(0,0,0,0.45);
    text-shadow:
        0 14px 36px rgba(0,0,0,0.88),
        0 0 28px rgba(var(--accent-rgb),0.32);
}

.ccg-page--genres-index .ccg-hero-inner--genres .ccg-hero-tagline {
    margin: 0;
    max-width: 60ch;
    font-size: 1.05rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.86);
    -webkit-text-stroke: 0.6px rgba(0,0,0,0.4);
    text-shadow: 0 2px 18px rgba(0,0,0,0.82);
}

@keyframes ccg-omega-hero-drift {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1.08);
        opacity: 0.58;
    }
    50% {
        transform: translate3d(0, -2%, 0) scale(1.12);
        opacity: 0.7;
    }
}

@keyframes ccg-omega-hero-halo {
    0%, 100% { opacity: 0.82; }
    50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .ccg-page--genres-index .ccg-hero--genres::before,
    .ccg-page--genres-index .ccg-hero--genres .ccg-hero-image {
        animation: none;
    }
}

@media (max-width: 768px) {
    .ccg-page--genres-index .ccg-hero--genres {
        padding: 26px 18px 32px;
        min-height: 200px;
    }

    .ccg-page--genres-index .ccg-hero-inner--genres .ccg-hero-title {
        letter-spacing: 0.08em;
    }

    .ccg-page--genres-index .ccg-hero-inner--genres .ccg-hero-tagline {
        font-size: 1rem;
    }
}

/* Scanline + vignette parity */
.ccg-genre-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;

    background:
        radial-gradient(
            ellipse at center,
            transparent 50%,
            rgba(0,0,0,0.64) 100%
        ),
        repeating-linear-gradient(
            to bottom,
            rgba(255,255,255,0.022),
            rgba(255,255,255,0.022) 1px,
            transparent 1px,
            transparent 4px
        );

    opacity: 0.26;
}

/* Hero inner spacing */
.ccg-genre-hero__inner {
    position: relative;
    z-index: 2;
    padding: 20px 24px 22px;
}

/* Mobile discipline */
@media (max-width: 768px) {
    .ccg-genre-hero__inner {
        padding: 16px 14px 18px;
    }
}

.ccg-genre-meta {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;

    padding: 14px 18px;
    border-radius: 12px;

    background:
        linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    border: 1px solid rgba(var(--accent-rgb),0.38);
    box-shadow: 0 20px 46px rgba(0,0,0,0.68), 0 0 20px rgba(var(--accent-rgb),0.20);
}

.ccg-genre-meta__left,
.ccg-genre-meta__right {
    display: flex;
    align-items: center;
    gap: 8px;

    font-family: var(--ccg-font-main);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.22;
}

/* Title confidence */
.ccg-genre-hero__title {
    letter-spacing: 0.14em;
    line-height: 1.16;

    text-shadow:
        0 22px 52px rgba(0,0,0,0.92),
        0 0 32px rgba(var(--accent-rgb),0.42),
        0 0 64px rgba(var(--accent-rgb),0.18);
}

/* Tagline readability */
.ccg-genre-hero__tagline {
    max-width: 64ch;
    opacity: 0.94;

    text-shadow:
        0 2px 14px rgba(0,0,0,0.80);
}

body[data-collection="Retro Events"] .ccg-page--collection-single .ccg-genre-hero__title,
body[data-collection="Retro Events"] .ccg-page--collection-single .ccg-genre-hero__tagline,
body[data-collection="Retro Events"] .ccg-page--collection-single .ccg-genre-meta {
    text-shadow:
        0 20px 44px rgba(0,0,0,0.9),
        0 0 24px rgba(var(--accent-rgb),0.32);
}

body[data-collection="Retro Events"] .ccg-page--collection-single .ccg-genre-meta {
    background:
        linear-gradient(145deg, rgba(5,7,16,0.62), rgba(5,7,16,0.24));
    border-color: rgba(var(--accent-rgb),0.46);
}

/* Collection hero banners */
.ccg-page--collection-single .ccg-collection-hero .ccg-genre-hero__bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

body[data-collection="Cartridge Games"] .ccg-page--collection-single .ccg-collection-hero .ccg-genre-hero__bg {
    background-image: url("../images/genres/banners/cartridge-games-banner.png");
}

body[data-collection="Licensed Games"] .ccg-page--collection-single .ccg-collection-hero .ccg-genre-hero__bg {
    background-image: url("../images/genres/banners/licensed-games-banner.png");
}

body[data-collection="BPJS Games"] .ccg-page--collection-single .ccg-collection-hero .ccg-genre-hero__bg {
    background-image: url("../images/genres/banners/bpjs-indexed-games-banner.png");
}

body[data-collection="Top Picks"] .ccg-page--collection-single .ccg-collection-hero .ccg-genre-hero__bg {
    background-image: url("../images/genres/banners/top-picks-banner.png");
}

body[data-collection="Retro Events"] .ccg-page--collection-single .ccg-collection-hero .ccg-genre-hero__bg {
    background-image: url("../images/genres/banners/retro-events-banner.png");
}
/* ============================================================
   GENRE HERO TEXT REFINEMENTS — FOR 'Browse by Genre'
============================================================ */

/* Hero Text Refinements */
.ccg-genre-hero__title {
    font-size: 2.6rem; /* Adjusted size for better fit */
    letter-spacing: 0.06em; /* Reduced letter-spacing for a tighter look */
    line-height: 1.05; /* Reduced line-height for tighter spacing */
    font-weight: 700;
    -webkit-text-stroke: 1px rgba(0,0,0,0.55);
    text-shadow:
        0 24px 54px rgba(0,0,0,0.92),
        0 0 32px rgba(var(--accent-rgb),0.42),
        0 0 72px rgba(var(--accent-rgb),0.24);
}

.ccg-genre-hero__tagline {
    font-size: 1.15rem; /* Adjusted for a more compact appearance */
    line-height: 1.35; /* Reduced line-height for tighter text */
    max-width: 58ch; /* Adjusting the width of the tagline */
    opacity: 0.96;
    -webkit-text-stroke: 0.6px rgba(0,0,0,0.45);
    text-shadow:
        0 2px 18px rgba(0,0,0,0.86),
        0 0 18px rgba(var(--accent-rgb),0.18);
}

/* Adjust padding around hero text for better fitting */
.ccg-genre-hero__inner {
    padding: 20px 24px 22px; /* Refined padding for cinematic spacing */
}

/* Mobile adjustments for the hero section */
@media (max-width: 768px) {
    .ccg-genre-hero__title {
        font-size: 2rem; /* Smaller font on mobile */
    }

    .ccg-genre-hero__tagline {
        font-size: 1.05rem; /* Slightly smaller on mobile for better fit */
    }

    .ccg-genre-hero__inner {
        padding: 16px 14px 18px; /* Reduced padding for better mobile layout */
    }

    .ccg-page--genre-single .ccg-genre-hero__inner::before,
    body:not([data-collection="Retro Events"]) .ccg-page--collection-single .ccg-genre-hero__inner::before {
        inset: -12px -14px -14px;
    }

    body[data-collection="Retro Events"] .ccg-page--collection-single .ccg-genre-hero__inner::before {
        inset: -12px -14px -14px;
    }

    body[data-collection="Retro Events"] .ccg-page--collection-single .ccg-genre-hero__bg::before {
        opacity: 0.98;
    }
}

/* ============================================================
   GENRE GRID — STRUCTURAL RHYTHM
============================================================ */

.ccg-genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 22px;
    align-items: stretch;

    /* Subtle depth separation from hero */
    margin-top: 12px;
}

/* Desktop breathing room */
@media (min-width: 1024px) {
    .ccg-genre-grid {
        gap: 28px;
    }
}


/* ============================================================
   GENRE CARD TONE (NO STRUCTURAL OVERRIDE)
============================================================ */

.ccg-genre-grid .ccg-card {
    transition:
        transform 0.32s ease,
        box-shadow 0.32s ease,
        filter 0.32s ease;
}


/* ============================================================
   HOVER / FOCUS — RESTRAINED WOW
============================================================ */

@media (hover: hover) {

    .ccg-genre-grid .ccg-card:hover,
    .ccg-genre-grid .ccg-card:focus-within {
        transform: translateY(-3px);
        filter: brightness(1.04);

        box-shadow:
            0 0 0 1px rgba(var(--accent-rgb),0.38),
            0 0 24px rgba(var(--accent-rgb),0.30),
            0 26px 56px rgba(0,0,0,0.80);
    }
}

/* Touch devices — no fake hover */
@media (hover: none) {
    .ccg-genre-grid .ccg-card:hover {
        transform: none;
        filter: none;
        box-shadow: none;
    }
}


/* ============================================================
   SECTION RHYTHM & PAGE FLOW
============================================================ */

.ccg-genre-main {
    margin-top: 36px;
    position: relative;
}

/* Soft divider glow between hero and grid */
.ccg-genre-main::before {
    content: "";
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    width: min(820px, 90%);
    height: 1px;

    background:
        linear-gradient(
            to right,
            transparent,
            rgba(var(--accent-rgb),0.42),
            transparent
        );

    opacity: 0.55;
}

@media (max-width: 768px) {
    .ccg-genre-main {
        margin-top: 30px;
    }

    .ccg-genre-main::before {
        top: -18px;
    }
}


/* ============================================================
   GRID CARDS — NEON VAULT FINISH
============================================================ */

.ccg-page--genre-single .ccg-genre-grid,
.ccg-page--collection-single .ccg-genre-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.ccg-list-load-more {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.ccg-list-load-more__btn {
    min-width: 220px;
}

.ccg-page--genre-single .ccg-game-card,
.ccg-page--collection-single .ccg-game-card {
    position: relative;
    z-index: 0;
    padding: 14px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;

    background:
        linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01)),
        radial-gradient(circle at 18% 22%, rgba(var(--accent-rgb),0.14), transparent 48%),
        radial-gradient(circle at 82% 8%, rgba(255,255,255,0.10), transparent 54%),
        rgba(5,7,16,0.92);

    border: 1px solid rgba(var(--accent-rgb),0.36);
    box-shadow: 0 24px 62px rgba(0,0,0,0.82), 0 0 24px rgba(var(--accent-rgb),0.24);
    overflow: hidden;
    transition:
        transform var(--ccg-hover-duration) var(--ccg-ease-out-lux),
        box-shadow var(--ccg-hover-duration) var(--ccg-ease-out-lux),
        border-color var(--ccg-hover-duration) var(--ccg-ease-out-lux);
}

.ccg-page--genre-single .ccg-game-card::before,
.ccg-page--collection-single .ccg-game-card::before {
    content: "";
    position: absolute;
    inset: -30% auto auto -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle at center, rgba(var(--accent-rgb),0.18), transparent 60%);
    filter: blur(18px);
    z-index: 0;
}

.ccg-page--genre-single .ccg-game-card::after,
.ccg-page--collection-single .ccg-game-card::after {
    z-index: 0;
}

.ccg-page--genre-single .ccg-game-card:hover,
.ccg-page--genre-single .ccg-game-card:focus-within,
.ccg-page--collection-single .ccg-game-card:hover,
.ccg-page--collection-single .ccg-game-card:focus-within {
    transform: translateY(-2px);
    border-color: rgba(var(--accent-rgb),0.75);
    box-shadow: 0 22px 56px rgba(0,0,0,0.88), 0 0 24px rgba(var(--accent-rgb),0.26);
}

@media (prefers-reduced-motion: reduce) {
    .ccg-page--genre-single .ccg-game-card:hover,
    .ccg-page--genre-single .ccg-game-card:focus-within,
    .ccg-page--collection-single .ccg-game-card:hover,
    .ccg-page--collection-single .ccg-game-card:focus-within {
        transform: none;
        filter: contrast(1.02) brightness(1.01);
    }
}

.ccg-page--genre-single .ccg-game-card__thumb,
.ccg-page--collection-single .ccg-game-card__thumb {
    position: relative;
    z-index: 1;
    padding: 6px;
    border-radius: 12px;
    background: linear-gradient(140deg, rgba(var(--accent-rgb),0.35), rgba(255,255,255,0.08));
    overflow: hidden;
    display: block;
    aspect-ratio: 16 / 9;
}

.ccg-page--genre-single .ccg-game-card__thumb img,
.ccg-page--collection-single .ccg-game-card__thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.68);
}

.ccg-page--genre-single .ccg-game-card__body,
.ccg-page--collection-single .ccg-game-card__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.ccg-page--genre-single .ccg-game-card__title,
.ccg-page--collection-single .ccg-game-card__title {
    margin: 0;
    letter-spacing: 0.08em;
    font-size: 1.05rem;
    text-shadow: 0 10px 24px rgba(0,0,0,0.72);
}

.ccg-page--genre-single .ccg-game-card__meta,
.ccg-page--collection-single .ccg-game-card__meta {
    color: var(--ccg-soft);
    font-size: 0.9rem;
}

.ccg-page--genre-single .ccg-game-card__actions,
.ccg-page--collection-single .ccg-game-card__actions {
    display: flex;
    justify-content: center;
    margin-top: auto;
    position: relative;
    z-index: 2;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .ccg-page--genre-single .ccg-game-card__actions,
    .ccg-page--collection-single .ccg-game-card__actions {
        padding-bottom: 6px;
    }

    .ccg-page--genre-single .ccg-game-card__title,
    .ccg-page--collection-single .ccg-game-card__title {
        /* Mobile clip fix: allow long card titles to wrap without truncation. */
        font-size: clamp(0.98rem, 3.6vw, 1.05rem);
        line-height: 1.35;
        letter-spacing: 0.06em;
        white-space: normal;
        overflow-wrap: anywhere;
        height: auto;
        max-height: none;
        overflow: visible;
    }
}

/* ============================================================
   Mobile Visual Reliability Safeguard
   • Mobile only
   • Prevents View Game buttons from being hidden or clipped
============================================================ */

@media (max-width: 640px) {
    .ccg-page--genre-single .ccg-game-card__actions,
    .ccg-page--collection-single .ccg-game-card__actions {
        position: relative;
        z-index: 4;
        overflow: visible;
        flex-shrink: 0;
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    .ccg-page--genre-single .ccg-game-card__btn,
    .ccg-page--collection-single .ccg-game-card__btn {
        position: relative;
        z-index: 5;
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        flex-shrink: 0;
    }
}

.ccg-page--genre-single .ccg-game-card__btn,
.ccg-page--collection-single .ccg-game-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 220px;
    padding: 12px 18px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(var(--accent-rgb),0.9), rgba(255,255,255,0.16));
    border: 1px solid rgba(var(--accent-rgb),0.85);
    color: #0b0d10;
    text-shadow: 0 1px 0 rgba(255,255,255,0.35);
    box-shadow:
        0 14px 32px rgba(0,0,0,0.86),
        0 0 30px rgba(var(--accent-rgb),0.4),
        inset 0 1px 0 rgba(255,255,255,0.25);
    position: relative;
    z-index: 3;
    overflow: hidden;
    transition: transform 220ms ease, box-shadow 220ms ease, letter-spacing 220ms ease;
}

.ccg-page--genre-single .ccg-game-card__btn::after,
.ccg-page--collection-single .ccg-game-card__btn::after {
    content: "";
    position: absolute;
    inset: -12% -8% -16% -18%;
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.42), transparent 55%);
    opacity: 0.7;
    transform: translateX(-12%);
    transition: transform 240ms ease, opacity 240ms ease;
    pointer-events: none;
}

.ccg-page--genre-single .ccg-game-card__btn:hover,
.ccg-page--genre-single .ccg-game-card__btn:focus-visible,
.ccg-page--collection-single .ccg-game-card__btn:hover,
.ccg-page--collection-single .ccg-game-card__btn:focus-visible {
    transform: translateY(-2px);
    letter-spacing: 0.16em;
    box-shadow:
        0 18px 40px rgba(0,0,0,0.9),
        0 0 38px rgba(var(--accent-rgb),0.55),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.ccg-page--genre-single .ccg-game-card__btn:hover::after,
.ccg-page--genre-single .ccg-game-card__btn:focus-visible::after,
.ccg-page--collection-single .ccg-game-card__btn:hover::after,
.ccg-page--collection-single .ccg-game-card__btn:focus-visible::after {
    opacity: 1;
    transform: translateX(6%);
}

/* ============================================================
   WAYFINDING — PREMIUM NAVIGATION
============================================================ */

.ccg-genre-wayfinding {
    position: relative;
    margin-top: clamp(32px, 4vw, 56px);
    padding: clamp(20px, 3.2vw, 30px) clamp(18px, 4vw, 36px);
    min-height: clamp(120px, 14vw, 200px);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.05), rgba(6,8,16,0.72));
    box-shadow:
        0 24px 60px rgba(0,0,0,0.6),
        inset 0 0 0 1px rgba(255,255,255,0.06);
    overflow: hidden;
}

.ccg-genre-wayfinding::before {
    content: "";
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb),0.45), transparent);
    opacity: 0.7;
}

.ccg-genre-wayfinding .game-hero__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: clamp(12px, 2.4vw, 24px);
}

.ccg-genre-wayfinding .ccg-btn--secondary {
    min-width: clamp(190px, 22vw, 240px);
    padding: 12px 24px;
    letter-spacing: 0.1em;
    border-color: rgba(255,255,255,0.22);
    background:
        linear-gradient(
            to bottom,
            rgba(255,255,255,0.07),
            rgba(0,0,0,0.55)
        );
}

@media (max-width: 768px) {
    .ccg-genre-wayfinding {
        padding: 18px;
    }

    .ccg-genre-wayfinding .game-hero__buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .ccg-genre-wayfinding .ccg-btn--secondary {
        width: 100%;
        min-width: 0;
    }
}


/* ============================================================
   EMPTY STATES — LUXE SUPPORT
============================================================ */

.ccg-genre-empty {
    padding: 28px 22px;
    border-radius: 16px;
    border: 1px dashed rgba(var(--accent-rgb),0.45);
    background: rgba(255,255,255,0.04);
    box-shadow: 0 16px 42px rgba(0,0,0,0.76);
    text-align: center;
}

.ccg-genre-empty h3 {
    margin: 0 0 8px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ccg-genre-empty__actions {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ============================================================
   GENRE HERO TEXT REFINEMENTS — NEW ADDITIONS
============================================================ */

/* Hero Text Refinements */
.ccg-genre-hero__title {
    font-size: 2.6rem; /* Balanced for cinematic clarity */
    letter-spacing: 0.06em; /* Reduced letter-spacing for a tighter look */
    line-height: 1.05; /* Tighter spacing for punch */
    font-weight: 700;
    -webkit-text-stroke: 1px rgba(0,0,0,0.55);
    text-shadow:
        0 24px 54px rgba(0,0,0,0.92),
        0 0 32px rgba(var(--accent-rgb),0.42),
        0 0 72px rgba(var(--accent-rgb),0.24);
}

.ccg-genre-hero__tagline {
    font-size: 1.15rem; /* Refined for cinematic balance */
    line-height: 1.35; /* Reduced line-height for tighter text */
    max-width: 58ch; /* Adjusting the width of the tagline */
    opacity: 0.96;
    -webkit-text-stroke: 0.6px rgba(0,0,0,0.45);
    text-shadow:
        0 2px 18px rgba(0,0,0,0.86),
        0 0 18px rgba(var(--accent-rgb),0.18);
}

/* Adjust padding around hero text for better fitting */
.ccg-genre-hero__inner {
    padding: 20px 24px 22px; /* Refined padding for cinematic spacing */
}

/* Mobile adjustments for the hero section */
@media (max-width: 768px) {
    .ccg-genre-hero__title {
        font-size: 2rem; /* Smaller font on mobile */
    }

    .ccg-genre-hero__tagline {
        font-size: 1.05rem; /* Slightly smaller on mobile for better fit */
    }

    .ccg-genre-hero__inner {
        padding: 16px 14px 18px; /* Reduced padding for better mobile layout */
    }
}

/* ============================================================
   OMEGA VISUAL CLARITY UPGRADE
   • Genre + collection hero clarity
   • Title readability boost (mode-aware)
============================================================ */

.ccg-page--genre-single,
.ccg-page--collection-single,
.ccg-page--genres-index {
    /* OMEGA VISUAL CLARITY UPGRADE */
    --ccg-hero-title-glow: 0.46;
    --ccg-hero-title-glow-soft: 0.22;
}

body[data-ccg-mode="c64"] .ccg-page--genre-single,
body[data-ccg-mode="c64"] .ccg-page--collection-single,
body[data-ccg-mode="c64"] .ccg-page--genres-index,
body.c64-mode .ccg-page--genre-single,
body.c64-mode .ccg-page--collection-single,
body.c64-mode .ccg-page--genres-index {
    /* OMEGA VISUAL CLARITY UPGRADE */
    --ccg-hero-title-glow: 0.52;
    --ccg-hero-title-glow-soft: 0.26;
}

body[data-ccg-mode="amiga"] .ccg-page--genre-single,
body[data-ccg-mode="amiga"] .ccg-page--collection-single,
body[data-ccg-mode="amiga"] .ccg-page--genres-index,
body.amiga-mode .ccg-page--genre-single,
body.amiga-mode .ccg-page--collection-single,
body.amiga-mode .ccg-page--genres-index {
    /* OMEGA VISUAL CLARITY UPGRADE */
    --ccg-hero-title-glow: 0.48;
    --ccg-hero-title-glow-soft: 0.24;
}

.ccg-page--genres-index .ccg-hero--genres::before {
    /* OMEGA VISUAL CLARITY UPGRADE */
    background:
        radial-gradient(circle at 50% 14%, rgba(255,255,255,0.1), transparent 58%),
        radial-gradient(circle at 50% 120%, rgba(0,0,0,0.58), transparent 48%),
        linear-gradient(to bottom, rgba(0,0,0,0.22), rgba(0,0,0,0.66));
    opacity: 0.82;
}

.ccg-page--genres-index .ccg-hero--genres .ccg-hero-image {
    /* OMEGA VISUAL CLARITY UPGRADE */
    opacity: 0.68;
    filter: saturate(1.12) contrast(1.04);
}

.ccg-page--genre-single .ccg-genre-hero__img,
body:not([data-collection="Retro Events"]) .ccg-page--collection-single .ccg-genre-hero__img {
    /* OMEGA VISUAL CLARITY UPGRADE */
    opacity: 0.9;
    filter: blur(6px) saturate(1.12) contrast(1.08) brightness(0.78);
}

.ccg-page--genre-single .ccg-genre-hero__bg::before,
body:not([data-collection="Retro Events"]) .ccg-page--collection-single .ccg-genre-hero__bg::before {
    /* OMEGA VISUAL CLARITY UPGRADE */
    background:
        linear-gradient(110deg, rgba(6,8,18,0.82) 6%, rgba(6,8,18,0.48) 42%, rgba(6,8,18,0.12) 78%),
        radial-gradient(circle at 22% 24%, rgba(var(--accent-rgb),0.22), transparent 46%),
        linear-gradient(to bottom, rgba(0,0,0,0.05), rgba(0,0,0,0.54));
    opacity: 0.84;
}

body[data-collection="Retro Events"] .ccg-page--collection-single .ccg-genre-hero__bg::before {
    /* OMEGA VISUAL CLARITY UPGRADE */
    background:
        linear-gradient(110deg, rgba(5,7,16,0.86) 8%, rgba(5,7,16,0.52) 46%, rgba(5,7,16,0.16) 82%),
        radial-gradient(circle at 22% 24%, rgba(var(--accent-rgb),0.22), transparent 48%),
        linear-gradient(to bottom, rgba(0,0,0,0.12), rgba(0,0,0,0.64));
    opacity: 0.88;
}

.ccg-page--collection-single .ccg-collection-hero .ccg-genre-hero__bg::after {
    /* OMEGA VISUAL CLARITY UPGRADE */
    filter: blur(10px) brightness(0.76) saturate(1.08);
    opacity: 0.94;
}

.ccg-page--genre-single .ccg-genre-hero__overlay,
body:not([data-collection="Retro Events"]) .ccg-page--collection-single .ccg-genre-hero__overlay {
    /* OMEGA VISUAL CLARITY UPGRADE */
    background:
        radial-gradient(circle at 18% 22%, rgba(var(--accent-rgb),0.28), transparent 42%),
        radial-gradient(circle at 78% 18%, rgba(255,255,255,0.14), transparent 48%),
        repeating-radial-gradient(circle at 12% 20%, rgba(255,255,255,0.12) 0 1px, transparent 1px 6px),
        repeating-radial-gradient(circle at 82% 68%, rgba(255,255,255,0.08) 0 1px, transparent 1px 7px),
        radial-gradient(circle at 20% 30%, rgba(var(--accent-rgb),0.20), transparent 40%),
        radial-gradient(circle at 80% 18%, rgba(255,255,255,0.14), transparent 46%),
        linear-gradient(135deg, rgba(255,255,255,0.05), transparent 40%),
        linear-gradient(to bottom, rgba(0,0,0,0.18), rgba(0,0,0,0.62));
}

.ccg-page--genre-single .ccg-genre-hero__title,
body:not([data-collection="Retro Events"]) .ccg-page--collection-single .ccg-genre-hero__title,
.ccg-page--genres-index .ccg-hero-inner--genres .ccg-hero-title {
    /* OMEGA VISUAL CLARITY UPGRADE */
    text-shadow:
        0 20px 44px rgba(0,0,0,0.92),
        0 0 26px rgba(var(--accent-rgb), var(--ccg-hero-title-glow)),
        0 0 52px rgba(var(--accent-rgb), var(--ccg-hero-title-glow-soft));
}

/* =========================================================
   OMEGA HEADER SYSTEM
   Applies to ALL Collection & Genre headers
========================================================= */

/* ---------- ROOT VARIABLES (ACCENT SAFE) ---------- */
:root {
    --omega-header-text: #e9fbff;
    --omega-glow-inner: rgba(64, 220, 255, 0.9);
    --omega-glow-mid: rgba(32, 180, 255, 0.6);
    --omega-glow-outer: rgba(0, 120, 255, 0.35);
    --omega-panel-bg: linear-gradient(135deg, rgba(10, 30, 45, 0.85), rgba(20, 55, 75, 0.85));
    --omega-panel-border: rgba(120, 220, 255, 0.25);
    --omega-panel-glow: rgba(0, 180, 255, 0.15);
    --omega-subtext: rgba(200, 235, 245, 0.85);
}

/* ---------- HEADER CONTAINER (GLASS PANEL) ---------- */
.ccg-page--genre-single .ccg-genre-hero__inner,
.ccg-page--collection-single .ccg-genre-hero__inner,
.ccg-page--genres-index .ccg-hero-inner--genres {
    position: relative;
    padding: 28px 32px;
    border-radius: 14px;
    background: var(--omega-panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--omega-panel-border);
    box-shadow: 0 0 24px var(--omega-panel-glow), inset 0 0 0.5px rgba(255,255,255,0.15);
    overflow: hidden;
}

.ccg-page--genre-single .ccg-genre-hero__inner::before,
.ccg-page--collection-single .ccg-genre-hero__inner::before,
.ccg-page--genres-index .ccg-hero-inner--genres::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(255,255,255,0.06), transparent 60%);
    pointer-events: none;
}

/* ---------- MAIN HEADER TITLE ---------- */
.ccg-page--genre-single .ccg-genre-hero__title,
.ccg-page--collection-single .ccg-genre-hero__title,
.ccg-page--genres-index .ccg-hero-inner--genres .ccg-hero-title {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: none;
    font-size: clamp(2.2rem, 3.5vw, 3.2rem);
    color: var(--omega-header-text);
    text-shadow: 0 0 6px var(--omega-glow-inner), 0 0 18px var(--omega-glow-mid), 0 0 42px var(--omega-glow-outer);
    animation: omegaHeaderEnter 600ms ease-out both, omegaGlowPulse 10s ease-in-out infinite;
}

/* ---------- SUBTITLE / DESCRIPTION ---------- */
.ccg-page--genre-single .ccg-genre-hero__tagline,
.ccg-page--collection-single .ccg-genre-hero__tagline,
.ccg-page--genres-index .ccg-hero-inner--genres .ccg-hero-tagline {
    margin-top: 10px;
    max-width: 900px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: var(--omega-subtext);
    letter-spacing: 0.03em;
    text-shadow: none;
}

/* ---------- METADATA / COUNT BADGE ---------- */
.ccg-page--genre-single .ccg-genre-meta,
.ccg-page--collection-single .ccg-genre-meta {
    display: inline-block;
    margin-top: 16px;
    padding: 6px 14px;
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--omega-header-text);
    background: rgba(5, 25, 40, 0.7);
    border-radius: 999px;
    border: 1px solid rgba(120, 220, 255, 0.35);
    box-shadow: 0 0 12px rgba(0, 200, 255, 0.4);
    gap: 10px;
}

/* ---------- ENTRY ANIMATION ---------- */
@keyframes omegaHeaderEnter {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- AMBIENT GLOW PULSE ---------- */
@keyframes omegaGlowPulse {
    0%,
    100% {
        text-shadow: 0 0 6px var(--omega-glow-inner), 0 0 18px var(--omega-glow-mid), 0 0 42px var(--omega-glow-outer);
    }
    50% {
        text-shadow: 0 0 8px var(--omega-glow-inner), 0 0 22px var(--omega-glow-mid), 0 0 50px var(--omega-glow-outer);
    }
}

/* ---------- MOBILE ADJUSTMENT ---------- */
@media (max-width: 768px) {
    .ccg-page--genre-single .ccg-genre-hero__inner,
    .ccg-page--collection-single .ccg-genre-hero__inner,
    .ccg-page--genres-index .ccg-hero-inner--genres {
        padding: 22px 20px;
    }

    .ccg-page--genre-single .ccg-genre-hero__title,
    .ccg-page--collection-single .ccg-genre-hero__title,
    .ccg-page--genres-index .ccg-hero-inner--genres .ccg-hero-title {
        font-size: 2rem;
    }
}
