/* Custom CSS for CrazyGames v2 */
body {
    -webkit-tap-highlight-color: transparent;
    margin: 0;
}

*,
::before,
::after {
    box-sizing: border-box;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
    border: 0;
}

/* Minimal local utility fallback for when Tailwind CDN is unavailable. */
.hidden {
    display: none !important;
}

.block {
    display: block;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.inline-flex {
    display: inline-flex;
}

.flex-none {
    flex: none;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.inset-0 {
    inset: 0;
}

.top-0 {
    top: 0;
}

.top-2\.5 {
    top: .625rem;
}

.top-4 {
    top: 1rem;
}

.right-0 {
    right: 0;
}

.right-3 {
    right: .75rem;
}

.right-4 {
    right: 1rem;
}

.bottom-0 {
    bottom: 0;
}

.left-0 {
    left: 0;
}

.z-10 {
    z-index: 10;
}

.z-30 {
    z-index: 30;
}

.z-40 {
    z-index: 40;
}

.z-50 {
    z-index: 50;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.h-screen {
    height: 100vh;
}

.h-14 {
    height: 3.5rem;
}

.h-7 {
    height: 1.75rem;
}

.h-8 {
    height: 2rem;
}

.h-9 {
    height: 2.25rem;
}

.h-px {
    height: 1px;
}

.min-h-\[70vh\] {
    min-height: 70vh;
}

.w-7 {
    width: 1.75rem;
}

.w-8 {
    width: 2rem;
}

.w-9 {
    width: 2.25rem;
}

.w-10 {
    width: 2.5rem;
}

.w-\[240px\] {
    width: 240px;
}

.max-w-2xl {
    max-width: 42rem;
}

.max-w-3xl {
    max-width: 48rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.max-w-\[1600px\] {
    max-width: 1600px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.my-4 {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: .5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mr-2 {
    margin-right: .5rem;
}

.mt-2 {
    margin-top: .5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-12 {
    margin-top: 3rem;
}

.p-2 {
    padding: .5rem;
}

.p-3 {
    padding: .75rem;
}

.p-4 {
    padding: 1rem;
}

.p-8 {
    padding: 2rem;
}

.px-3 {
    padding-left: .75rem;
    padding-right: .75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-5 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.py-1\.5 {
    padding-top: .375rem;
    padding-bottom: .375rem;
}

.py-2 {
    padding-top: .5rem;
    padding-bottom: .5rem;
}

.py-2\.5 {
    padding-top: .625rem;
    padding-bottom: .625rem;
}

.py-3 {
    padding-top: .75rem;
    padding-bottom: .75rem;
}

.pb-2 {
    padding-bottom: .5rem;
}

.pl-5 {
    padding-left: 1.25rem;
}

.pr-10 {
    padding-right: 2.5rem;
}

.pt-6 {
    padding-top: 1.5rem;
}

.space-x-2>*+* {
    margin-left: .5rem;
}

.space-x-3>*+* {
    margin-left: .75rem;
}

.space-x-4>*+* {
    margin-left: 1rem;
}

.space-y-1>*+* {
    margin-top: .25rem;
}

.space-y-4>*+* {
    margin-top: 1rem;
}

.space-y-6>*+* {
    margin-top: 1.5rem;
}

.space-y-8>*+* {
    margin-top: 2rem;
}

.gap-2 {
    gap: .5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-x-auto {
    overflow-x: auto;
}

.overflow-x-hidden {
    overflow-x: hidden;
}

.overflow-y-auto {
    overflow-y: auto;
}

.rounded-full {
    border-radius: 9999px;
}

.rounded-xl {
    border-radius: .75rem;
}

.border {
    border-width: 1px;
    border-style: solid;
}

.border-b {
    border-bottom-width: 1px;
    border-bottom-style: solid;
}

.border-r {
    border-right-width: 1px;
    border-right-style: solid;
}

.border-none {
    border: 0;
}

.border-cg-card,
.border-\[\#2a2a35\] {
    border-color: #2a2a35;
}

.bg-black {
    background: #000;
}

.bg-white {
    background: #fff;
}

.bg-\[\#2a2a35\] {
    background: #2a2a35;
}

.bg-black\/60 {
    background: rgba(0, 0, 0, .6);
}

.from-black\/90 {
    --cg-gradient-from: rgba(0, 0, 0, .9);
}

.via-black\/40 {
    --cg-gradient-via: rgba(0, 0, 0, .4);
}

.to-transparent {
    --cg-gradient-to: transparent;
}

.bg-gradient-to-t {
    background: linear-gradient(to top, var(--cg-gradient-from, rgba(0, 0, 0, .9)), var(--cg-gradient-via, rgba(0, 0, 0, .4)), var(--cg-gradient-to, transparent));
}

.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--cg-gradient-from), var(--cg-gradient-to));
}

.from-indigo-900 {
    --cg-gradient-from: #312e81;
}

.to-purple-800 {
    --cg-gradient-to: #6b21a8;
}

.from-amber-800 {
    --cg-gradient-from: #92400e;
}

.to-orange-700 {
    --cg-gradient-to: #c2410c;
}

.from-emerald-800 {
    --cg-gradient-from: #065f46;
}

.to-teal-700 {
    --cg-gradient-to: #0f766e;
}

.from-cyan-900 {
    --cg-gradient-from: #164e63;
}

.to-blue-800 {
    --cg-gradient-to: #1e40af;
}

.from-rose-900 {
    --cg-gradient-from: #881337;
}

.to-pink-800 {
    --cg-gradient-to: #9d174d;
}

.text-white {
    color: #fff;
}

.text-black {
    color: #000;
}

.text-gray-300 {
    color: #d1d5db;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-yellow-400 {
    color: #facc15;
}

.placeholder-gray-400::placeholder {
    color: #9ca3af;
}

.text-center {
    text-align: center;
}

.text-xs {
    font-size: .75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: .875rem;
    line-height: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-8xl {
    font-size: 6rem;
    line-height: 1;
}

.font-medium {
    font-weight: 500;
}

.font-bold {
    font-weight: 700;
}

.font-black {
    font-weight: 900;
}

.italic {
    font-style: italic;
}

.tracking-tight {
    letter-spacing: 0;
}

.tracking-tighter {
    letter-spacing: 0;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.opacity-0 {
    opacity: 0;
}

.opacity-50 {
    opacity: .5;
}

.transition-all,
.transition-colors,
.transition-opacity,
.transition-transform {
    transition-duration: .2s;
}

.shadow-md {
    box-shadow: 0 4px 6px rgba(0, 0, 0, .25);
}

.shadow-2xl {
    box-shadow: 0 25px 50px rgba(0, 0, 0, .5);
}

.antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.shrink-0 {
    flex-shrink: 0;
}

.focus\:outline-none:focus {
    outline: 0;
}

.hover\:text-white:hover {
    color: #fff;
}

.hover\:text-black:hover {
    color: #000;
}

.hover\:bg-white:hover {
    background: #fff;
}

.hover\:bg-cg-brand:hover,
.hover\:bg-cg-brandHover:hover {
    background: #8e62ff;
}

.hover\:opacity-100:hover,
.game-card:hover .hover\:opacity-100 {
    opacity: 1;
}

.pointer-events-none {
    pointer-events: none;
}

.translate-x-full {
    transform: translateX(100%);
}

.-translate-x-full {
    transform: translateX(-100%);
}

@media (min-width: 640px) {
    .sm\:flex {
        display: flex;
    }
}

@media (min-width: 768px) {
    .md\:block {
        display: block;
    }

    .md\:flex-row {
        flex-direction: row;
    }

    .md\:h-16 {
        height: 4rem;
    }

    .md\:h-8 {
        height: 2rem;
    }

    .md\:h-9 {
        height: 2.25rem;
    }

    .md\:min-w-\[200px\] {
        min-width: 200px;
    }

    .md\:w-1\/4 {
        width: 25%;
    }

    .md\:w-8 {
        width: 2rem;
    }

    .md\:w-9 {
        width: 2.25rem;
    }

    .md\:px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .md\:p-6 {
        padding: 1.5rem;
    }

    .md\:py-2 {
        padding-top: .5rem;
        padding-bottom: .5rem;
    }

    .md\:px-5 {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .md\:text-xl {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }

    .md\:text-5xl {
        font-size: 3rem;
        line-height: 1;
    }

    .md\:items-start {
        align-items: flex-start;
    }

    .md\:hidden {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .lg\:block {
        display: block;
    }

    .lg\:hidden {
        display: none !important;
    }

    .lg\:relative {
        position: relative;
    }

    .lg\:translate-x-0 {
        transform: translateX(0);
    }

    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }

    .lg\:p-8 {
        padding: 2rem;
    }
}

@media (min-width: 1280px) {
    .xl\:flex-row {
        flex-direction: row;
    }
}

/* Hide scrollbars */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: #2a2a35;
    border-radius: 10px;
}

/* Base colors mapped to Tailwind config in header */
.bg-cg-main {
    background-color: #0b0c10;
}

.bg-cg-sidebar {
    background-color: #12131c;
}

.bg-cg-header {
    background-color: #19152b;
}

.bg-cg-card {
    background-color: #1a1a24;
}

.text-cg-brand {
    color: #8e62ff;
}

.bg-cg-brand {
    background-color: #7232f2;
}

/* Portal header */
.portal-header {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .012)),
        rgba(18, 19, 28, .96);
    border-bottom-color: rgba(255, 255, 255, .08);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .32);
    backdrop-filter: blur(18px);
}

.portal-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(142, 98, 255, .65), rgba(14, 165, 233, .35), transparent);
    pointer-events: none;
}

.portal-brand {
    min-width: 0;
    border-radius: 999px;
    padding: 5px 8px 5px 5px;
    transition: background .2s, transform .2s;
}

.portal-brand:hover {
    background: rgba(255, 255, 255, .045);
}

.portal-brand-mark {
    box-shadow: 0 8px 18px rgba(114, 50, 242, .36);
}

.portal-brand-text {
    white-space: nowrap;
}

.portal-search {
    max-width: 660px;
    margin: 0 auto;
}

.portal-search-input {
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(10, 11, 17, .72) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), 0 10px 24px rgba(0, 0, 0, .18);
}

.portal-search-input:focus {
    border-color: rgba(142, 98, 255, .72);
    box-shadow: 0 0 0 3px rgba(142, 98, 255, .18), 0 14px 30px rgba(0, 0, 0, .24);
}

.portal-search-button {
    width: 28px;
    height: 28px;
    top: 7px !important;
    right: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .055);
}

.portal-icon-button {
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .055) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045);
    transition: background .2s, border-color .2s, color .2s, transform .2s;
}

.portal-icon-button:hover {
    border-color: rgba(142, 98, 255, .45);
    background: rgba(142, 98, 255, .18) !important;
}

.portal-account-button {
    border: 1px solid rgba(255, 255, 255, .12);
    background: linear-gradient(135deg, #7232f2, #8e62ff) !important;
    box-shadow: 0 12px 24px rgba(114, 50, 242, .28);
}

/* Grid Layouts */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 18px;
}

@media (min-width: 1024px) {
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Home featured picks */
.home-featured-section {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .015)),
        #101119;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

.featured-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-kicker {
    display: block;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.section-link {
    flex: none;
    color: #d8ceff;
    border: 1px solid rgba(142, 98, 255, .35);
    background: rgba(114, 50, 242, .13);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 800;
    transition: background .2s, border-color .2s, color .2s;
}

.section-link:hover {
    color: #fff;
    background: rgba(114, 50, 242, .26);
    border-color: rgba(142, 98, 255, .7);
}

.portal-panel,
.archive-hero {
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .014)),
        #101119;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .24);
}

.archive-hero {
    padding: 24px;
    margin-bottom: 8px;
}

.archive-hero h1 {
    max-width: 980px;
}

.archive-hero-copy {
    max-width: 780px;
    color: #d1d5db;
    margin-top: 16px;
    line-height: 1.65;
}

.portal-section {
    margin-top: 48px;
}

.portal-section-heading {
    margin-bottom: 16px;
}

.portal-section-heading.compact {
    margin-bottom: 12px;
}

.portal-section-heading h2 {
    color: #fff;
    font-size: 22px;
    line-height: 1.15;
    font-weight: 950;
    margin: 0;
}

.bento-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(150px, .75fr));
    grid-auto-rows: minmax(138px, 1fr);
    gap: 14px;
}

.bento-card {
    min-height: 138px;
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    background: #1a1a24;
    isolation: isolate;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
    transition: transform .2s, border-color .2s, box-shadow .2s;
}

.bento-card:hover {
    transform: translateY(-2px);
    border-color: rgba(142, 98, 255, .55);
    box-shadow: 0 18px 34px rgba(0, 0, 0, .35);
}

.bento-card-featured {
    grid-row: span 2;
    min-height: 290px;
}

.bento-card img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
    transition: transform .35s;
}

.bento-card:hover img {
    transform: scale(1.06);
}

.bento-card-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(7, 8, 13, .08) 0%, rgba(7, 8, 13, .4) 48%, rgba(7, 8, 13, .94) 100%),
        linear-gradient(90deg, rgba(7, 8, 13, .5), rgba(7, 8, 13, .05));
}

.bento-card-content {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
}

.bento-card-featured .bento-card-content {
    padding: 22px;
}

.bento-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.bento-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: rgba(10, 11, 17, .62);
    color: #e5e7eb;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.bento-card h3 {
    color: #fff;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 900;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bento-card-featured h3 {
    max-width: 680px;
    font-size: 32px;
    line-height: 1.05;
}

.bento-card p {
    max-width: 560px;
    color: #d1d5db;
    font-size: 14px;
    line-height: 1.5;
    margin: 12px 0 0;
}

.bento-play-cta {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    color: #0b0c10;
    font-size: 13px;
    font-weight: 900;
}

/* Game detail */
.game-detail-page {
    padding-bottom: 48px;
}

.game-hero-panel {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    background:
        radial-gradient(circle at top left, rgba(142, 98, 255, .18), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012)),
        #101119;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

.game-hero-copy h1 {
    max-width: 980px;
    color: #fff;
    font-size: 44px;
    line-height: 1.02;
    font-weight: 950;
    margin: 0;
}

.game-hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.game-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 999px;
    background: rgba(10, 11, 17, .48);
    color: #d1d5db;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 850;
}

.game-hero-meta i {
    color: #8e62ff;
}

.game-hero-actions {
    display: flex;
    flex: none;
    gap: 10px;
}

.game-action-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 900;
    transition: transform .2s, border-color .2s, background .2s, color .2s;
}

.game-action-button.primary {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .12);
    background: linear-gradient(135deg, #7232f2, #8e62ff);
    box-shadow: 0 14px 26px rgba(114, 50, 242, .26);
}

.game-action-button.secondary {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .06);
}

.game-action-button.secondary.is-active,
.game-action-button.secondary:hover {
    color: #0b0c10;
    background: #fff;
}

.game-action-button:hover {
    transform: translateY(-1px);
}

.game-player-shell {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 20px;
    background: #05060a;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .42);
}

.game-player-toolbar {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(180deg, #171824, #101119);
    color: #9ca3af;
    font-size: 12px;
    font-weight: 800;
}

.game-player-dots {
    display: flex;
    gap: 6px;
}

.game-player-dots span {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #4b5563;
}

.game-player-dots span:nth-child(1) {
    background: #ef4444;
}

.game-player-dots span:nth-child(2) {
    background: #f59e0b;
}

.game-player-dots span:nth-child(3) {
    background: #22c55e;
}

.game-player-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
}

.game-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 22px;
}

.game-about-panel,
.game-side-panel {
    padding: 22px;
}

.game-description {
    color: #d1d5db;
    font-size: 15px;
    line-height: 1.75;
}

.game-description p {
    margin: 0 0 14px;
}

.game-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.game-category-list a {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(142, 98, 255, .32);
    border-radius: 999px;
    background: rgba(114, 50, 242, .12);
    color: #fff;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 900;
    transition: background .2s, border-color .2s, transform .2s;
}

.game-category-list a:hover {
    transform: translateY(-1px);
    border-color: rgba(142, 98, 255, .7);
    background: rgba(114, 50, 242, .24);
}

.game-trust-card {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.game-trust-card div {
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
    padding: 13px;
}

.game-trust-card strong,
.game-trust-card span {
    display: block;
}

.game-trust-card strong {
    color: #fff;
    font-size: 13px;
    margin-bottom: 4px;
}

.game-trust-card span {
    color: #9ca3af;
    font-size: 12px;
}

@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bento-card-featured {
        grid-column: span 2;
    }

    .game-hero-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .game-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .home-featured-section {
        padding: 14px;
        border-radius: 14px;
    }

    .featured-section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 10px;
    }

    .bento-card,
    .bento-card-featured {
        grid-column: auto;
        grid-row: auto;
        min-height: 168px;
    }

    .bento-card-featured {
        min-height: 260px;
    }

    .bento-card-featured h3 {
        font-size: 26px;
    }

    .game-hero-panel,
    .game-about-panel,
    .game-side-panel,
    .archive-hero {
        padding: 16px;
        border-radius: 16px;
    }

    .game-hero-copy h1 {
        font-size: 32px;
    }

    .game-hero-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .game-action-button {
        flex: 1 1 140px;
    }

    .game-player-toolbar {
        height: 38px;
    }
}

.game-card {
    position: relative;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)),
        #151620;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .04);
    transition: transform .2s, box-shadow .2s, border-color .2s, background .2s;
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: rgba(142, 98, 255, .48);
    background:
        linear-gradient(180deg, rgba(142, 98, 255, .08), rgba(255, 255, 255, .014)),
        #171824;
    box-shadow: 0 18px 36px rgba(0, 0, 0, .36), 0 0 0 1px rgba(142, 98, 255, .12);
    z-index: 10;
}

.game-card-link {
    display: block;
    height: 100%;
    color: inherit;
}

.game-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #20212d;
}

.game-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.01);
    transition: transform .28s, filter .28s;
}

.game-card:hover .game-card-media img {
    transform: scale(1.06);
    filter: saturate(1.08) contrast(1.04);
}

.game-card-media-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8, 9, 14, 0) 40%, rgba(8, 9, 14, .75) 100%),
        linear-gradient(90deg, rgba(8, 9, 14, .16), rgba(8, 9, 14, 0));
    opacity: .75;
    transition: opacity .2s;
}

.game-card:hover .game-card-media-shade {
    opacity: .95;
}

.game-card-play {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .95);
    color: #0b0c10;
    font-size: 12px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .34);
    opacity: 0;
    transform: translateY(6px) scale(.92);
    transition: opacity .2s, transform .2s;
}

.game-card:hover .game-card-play {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.game-card-body {
    padding: 11px 12px 12px;
}

.game-card-body h3 {
    color: #fff;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 900;
    margin: 0 0 8px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 35px;
}

.game-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 750;
}

.game-card-meta span {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.game-card-meta span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640px) {
    .game-card {
        border-radius: 14px;
    }

    .game-card-body {
        padding: 9px 10px 10px;
    }

    .game-card-body h3 {
        font-size: 13px;
        min-height: 33px;
    }

    .game-card-meta {
        font-size: 10px;
    }

    .game-card-play {
        display: none;
    }
}

.bento-large.game-card {
    aspect-ratio: auto;
    height: 100%;
}

/* Top category channel rail */
.category-rail-section {
    position: relative;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, rgba(142, 98, 255, .16), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012)),
        #101119;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .24);
    overflow: hidden;
}

.category-rail-section::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 72px;
    background: linear-gradient(90deg, transparent, #101119 70%);
    pointer-events: none;
    z-index: 2;
}

.category-rail-header {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.category-rail-header h1 {
    margin: 0;
    color: #fff;
    font-size: 24px;
    line-height: 1.12;
    font-weight: 950;
}

.category-rail-note {
    max-width: 280px;
    color: #9ca3af;
    font-size: 12px;
    line-height: 1.45;
    text-align: right;
}

.category-rail {
    position: relative;
    z-index: 3;
    scroll-snap-type: x proximity;
    padding: 2px 72px 2px 2px;
}

.top-category-card {
    min-width: 210px;
    height: 116px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    color: white;
    font-weight: bold;
    font-size: 14px;
    scroll-snap-align: start;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 12px 26px rgba(0, 0, 0, .22);
    transition: transform .2s, border-color .2s, box-shadow .2s, filter .2s;
}

.top-category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(0, 0, 0, .18)),
        linear-gradient(90deg, rgba(0, 0, 0, .34), transparent 70%);
    pointer-events: none;
}

.top-category-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, .22);
    box-shadow: 0 18px 34px rgba(0, 0, 0, .34);
    filter: saturate(1.08);
}

.top-category-card strong,
.top-category-card span,
.top-category-card i {
    position: relative;
    z-index: 1;
}

.top-category-card strong {
    display: block;
    /*max-width: 145px;*/
    font-size: 18px;
    line-height: 1.12;
    font-weight: 950;
}

.category-card-label {
    width: fit-content;
    margin-bottom: 8px;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    background: rgba(10, 11, 17, .42);
    color: rgba(255, 255, 255, .82);
    font-size: 11px;
    line-height: 1;
    font-weight: 850;
}

.top-category-card img {
    position: absolute;
    top: -10px;
    right: 10px;
    width: 60px;
    height: auto;
}

@media (max-width: 768px) {
    .portal-header {
        min-height: 56px;
    }

    .category-rail-section {
        padding: 14px;
        border-radius: 14px;
    }

    .category-rail-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .category-rail-header h1 {
        font-size: 21px;
    }

    .category-rail-note {
        max-width: none;
        text-align: left;
    }

    .category-rail {
        padding-right: 44px;
    }

    .top-category-card {
        min-width: 176px;
        height: 104px;
    }

    .top-category-card strong {
        font-size: 16px;
    }
}

/* Skeleton */
.skeleton {
    animation: skeleton-loading 1s linear infinite alternate;
}

@keyframes skeleton-loading {
    0% {
        background-color: #1a1a24;
    }

    100% {
        background-color: #2a2a35;
    }
}

/* Badges */
.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
}

.badge-originals {
    background: rgba(255, 255, 255, .94);
    color: #7232f2;
}

.badge-top {
    background: rgba(250, 204, 21, .95);
    color: #111827;
}

.badge-hot {
    background: rgba(239, 68, 68, .95);
    color: white;
}

.badge-updated {
    background: rgba(14, 165, 233, .95);
    color: white;
}

/* User profile */
.profile-hero {
    background: linear-gradient(135deg, #1a1a24 0%, #19152b 100%);
}

.profile-avatar {
    width: 112px;
    height: 112px;
    border-radius: 24px;
    overflow: hidden;
    background: #2a2a35;
    border: 1px solid #3a3a48;
    flex: none;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.level-badge {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex: none;
}

.profile-progress {
    height: 10px;
    border-radius: 999px;
    background: #2a2a35;
    overflow: hidden;
}

.profile-progress div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7232f2, #8e62ff);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.profile-stats div {
    border: 1px solid #2a2a35;
    border-radius: 12px;
    padding: 16px;
    background: #12131c;
}

.profile-stats span {
    display: block;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.profile-stats strong {
    color: #fff;
    font-size: 18px;
}

/* Content pages */
.content-page-panel {
    padding: 28px;
}

.content-page-body {
    color: #d1d5db;
    font-size: 16px;
    line-height: 1.75;
}

.content-page-body h2,
.content-page-body h3 {
    color: #fff;
    margin: 24px 0 10px;
}

.content-page-body p {
    margin: 0 0 14px;
}

.content-page-body a {
    color: #d8ceff;
    font-weight: 800;
}

/* Sidebar icons */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 8px;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: #1a1a24;
    color: white;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    color: #6b7280;
}

.sidebar-link:hover i,
.sidebar-link.active i {
    color: #8e62ff;
}

.touch-active:active {
    transform: scale(0.96);
}