/* ==========================================================================
   CARD GAMES - CLEAN PRODUCTION DESIGN SYSTEM
   Optimized, non-redundant, pure CSS with Dynamic Dark & Light Themes
   ========================================================================== */

:root {
    --scroll-fade-color: #121215;
}

html.dark {
    --scroll-fade-color: #121215;
}

html.light {
    --scroll-fade-color: #ffffff;
}

/* --------------------------------------------------------------------------
   1. BASE TYPOGRAPHY & ESSENTIAL UTILITIES
   -------------------------------------------------------------------------- */
body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: #09090b;
    color: #f4f4f5;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.font-display {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
}

body.modal-open {
    overflow: hidden;
    touch-action: none;
}

/* Custom Scrollbars */
.custom-scroll::-webkit-scrollbar {
    width: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: #3f3f46;
    border-radius: 4px;
}

html.light .custom-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

/* --------------------------------------------------------------------------
   2. GLASS CONTAINERS & HEADERS
   -------------------------------------------------------------------------- */
.glass {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.glass-card {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

/* --------------------------------------------------------------------------
   3. GRID GAME CARDS & 3D COVER FRAME
   -------------------------------------------------------------------------- */
.game-card {
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.cover-frame {
    position: relative;
    isolation: isolate;
}

.cover-image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.3s ease !important;
}

.favorite-badge {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Strictly Single-Line Card Badges Row (Only show full whole badges that fit) */
.card-badges-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.3rem !important;
    height: 1.45rem !important;
    max-height: 1.2rem !important;
    overflow: hidden !important;
    align-items: center !important;
}

.card-badges-row .badge-tag {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
}

.badge-tag {
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.18rem 0.5rem;
    letter-spacing: 0.01em;
    transition: background-color 0.15s ease, color 0.15s ease;
}

/* Meta Pills (Duration & Difficulty) */
.card-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    border-radius: 0.5rem;
    padding: 0.2rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.card-icon-duration {
    color: #10b981 !important;
}

.card-icon-difficulty {
    color: #fbbf24 !important;
}

@media (max-width: 640px) {
    .card-open-label {
        display: none !important;
    }
}

/* --------------------------------------------------------------------------
   4. HORIZONTAL FILTER SCROLLERS & FADE INDICATORS
   -------------------------------------------------------------------------- */
.mobile-scroll-shell {
    position: relative;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.mobile-scroll-row {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap !important;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-right: 1.55rem;
    padding-bottom: 0.15rem;
    cursor: grab;
    user-select: none;
}

.mobile-scroll-row.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.mobile-scroll-row::-webkit-scrollbar {
    display: none;
}

.mobile-scroll-row > * {
    flex: 0 0 auto;
}

.mobile-scroll-shell::before,
.mobile-scroll-shell::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1.5rem;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.mobile-scroll-shell::before {
    left: 0;
    background: linear-gradient(90deg, var(--scroll-fade-color), transparent);
}

.mobile-scroll-shell::after {
    right: 0;
    background: linear-gradient(270deg, var(--scroll-fade-color), transparent);
}

.mobile-scroll-shell.can-scroll-left::before,
.mobile-scroll-shell.can-scroll-right::after {
    opacity: 1;
}

.filter-pill,
.tag-btn {
    white-space: nowrap;
    scroll-snap-align: start;
    transition: all 0.15s ease;
}

/* --------------------------------------------------------------------------
   5. MODAL DIALOG STRUCTURE
   -------------------------------------------------------------------------- */
#game-modal {
    transition: opacity 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#modal-container {
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-hero {
    position: relative;
    isolation: isolate;
    min-height: 220px !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

#modal-cover-backdrop {
    display: none !important;
}

.modal-hero-vignette {
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    pointer-events: none !important;
}

.modal-title-block {
    position: relative !important;
    z-index: 3 !important;
    padding: 1.25rem 1.5rem !important;
    width: 100% !important;
}

.modal-heading-row {
    display: flex !important;
    align-items: flex-end !important;
    gap: 0.85rem !important;
    width: 100% !important;
}

.modal-cover-art {
    display: block !important;
    width: clamp(5.25rem, 14vw, 6.75rem) !important;
    height: clamp(5.25rem, 14vw, 6.75rem) !important;
    object-fit: contain !important;
    border-radius: 0.85rem !important;
    flex: 0 0 auto !important;
}

#modal-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: clamp(1.4rem, 4vw, 1.85rem) !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    word-break: break-word !important;
}

.modal-badges-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
    width: 100% !important;
    margin-top: 0.75rem !important;
}

.modal-close-btn {
    position: absolute !important;
    top: 1rem !important;
    right: 1rem !important;
    z-index: 10 !important;
    border-radius: 9999px !important;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.modal-close-btn:hover {
    transform: scale(1.05);
}

.modal-close-btn:active {
    transform: scale(0.95);
}

/* Modal Mini Cards Desktop vs Mobile */
@media (min-width: 701px) {
    .modal-mini-card {
        padding: 0.6rem 0.45rem !important;
    }

    .modal-mini-label {
        font-size: 0.65rem !important;
        letter-spacing: 0.05em !important;
        margin-bottom: 0.15rem !important;
    }

    .modal-mini-value {
        font-size: 0.84rem !important;
        font-weight: 800 !important;
    }

    .modal-mini-card svg {
        width: 1.15rem !important;
        height: 1.15rem !important;
        margin-bottom: 0.25rem !important;
    }
}

/* Mobile Fullscreen Modal Mode */
@media (max-width: 700px) {
    #game-modal {
        padding: 0 !important;
    }

    #modal-container {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    .modal-hero {
        min-height: 180px !important;
        border-radius: 0 !important;
    }

    .modal-title-block {
        padding: 1rem !important;
    }

    #modal-body {
        padding: 1rem !important;
    }
}

/* --------------------------------------------------------------------------
   6. NOTION CONTENT & RULES STYLING
   -------------------------------------------------------------------------- */
.notion-content {
    font-size: 0.92rem;
    line-height: 1.72;
}

.notion-content h2,
.notion-content h3,
.notion-content h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    line-height: 1.25;
    margin-top: 1.4rem;
    margin-bottom: 0.7rem;
}

.notion-content h2 {
    font-size: 1.35rem;
}

.notion-content h3 {
    font-size: 1.15rem;
}

.notion-content h4 {
    font-size: 1rem;
}

.notion-content p,
.notion-content ul,
.notion-content ol,
.notion-content blockquote,
.notion-content figure,
.notion-content .notion-callout,
.notion-content .notion-table-wrap,
.notion-content details {
    margin-bottom: 0.95rem;
}

.notion-content ul {
    list-style-type: disc;
    padding-left: 1.35rem;
}

.notion-content ol {
    list-style-type: decimal;
    padding-left: 1.35rem;
}

.notion-content li {
    margin-bottom: 0.35rem;
}

.notion-content strong,
.notion-content b {
    font-weight: 800;
}

.notion-content a {
    color: #60a5fa;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.notion-content blockquote,
.notion-content .notion-callout {
    border-radius: 1rem;
    padding: 0.9rem 1rem;
}

.notion-content .notion-callout {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.notion-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0.9rem;
    overflow: hidden;
    margin: 1rem 0;
    border-width: 1px;
    border-style: solid;
}

.notion-content th,
.notion-content td {
    padding: 0.7rem 0.9rem;
    text-align: left;
    vertical-align: top;
    border-bottom-width: 1px;
    border-bottom-style: solid;
}

.notion-content th {
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.notion-content tr:last-child td {
    border-bottom: 0;
}

.content-heading-iconized {
    display: flex !important;
    align-items: center !important;
    gap: 0.55rem !important;
}

.content-heading-icon {
    width: 1.25rem !important;
    height: 1.25rem !important;
    flex-shrink: 0 !important;
}

/* Modal Content Images */
.notion-content img {
    border-radius: 0.85rem !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 1rem auto !important;
}

/* YouTube Video Previews in Modal */
.youtube-preview {
    margin-top: 1.25rem !important;
    margin-bottom: 1.25rem !important;
    border-radius: 1rem !important;
    overflow: hidden !important;
}

.youtube-preview + .youtube-preview {
    margin-top: 1.25rem !important;
}

.youtube-preview iframe {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    display: block !important;
    border: none !important;
}

.youtube-open-link {
    display: block !important;
    padding: 0.65rem 1rem !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}

/* --------------------------------------------------------------------------
   7. SITE FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
    margin-top: 4rem;
    padding: 2rem 1rem;
    border-top: 1px solid;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.site-footer-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    text-align: center;
    font-size: 0.95rem;
}

.site-footer-credit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.site-footer-logo {
    width: auto;
    height: 1.5rem;
    object-fit: contain;
}

/* ==========================================================================
   8. DARK THEME DEFINITIONS (Pure Neutral Charcoal Black #09090b / #121215)
   ========================================================================== */
html.dark body {
    background-color: #09090b !important;
    color: #f4f4f5 !important;
}

html.dark header.glass {
    background: rgba(18, 18, 21, 0.94) !important;
    border-color: #27272a !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.8) !important;
}

html.dark .glass {
    background: rgba(18, 18, 21, 0.85) !important;
    border-color: #27272a !important;
    box-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.7) !important;
}

/* Dark Mode Tag Cloud & Filter Buttons */
html.dark .filter-pill {
    background: #18181b !important;
    border: 1px solid #27272a !important;
    color: #a1a1aa !important;
}

html.dark .filter-pill:hover {
    background: #27272a !important;
    color: #f4f4f5 !important;
    border-color: #3f3f46 !important;
}

html.dark .filter-pill.is-active {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4) !important;
}

html.dark .fav-filter-pill.is-active {
    background: #451a03 !important;
    border-color: #b45309 !important;
    color: #fef3c7 !important;
}

html.dark .tag-btn {
    background: #121215 !important;
    border: 1px solid #27272a !important;
    color: #a1a1aa !important;
}

html.dark .tag-btn:hover {
    background: #1e293b !important;
    border-color: #3b82f6 !important;
    color: #60a5fa !important;
}

html.dark .tag-btn.is-active {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

/* Dark Mode Scroll Fades */
html.dark .mobile-scroll-shell::before {
    background: linear-gradient(90deg, #121215 20%, rgba(18, 18, 21, 0) 100%) !important;
}

html.dark .mobile-scroll-shell::after {
    background: linear-gradient(270deg, #121215 20%, rgba(18, 18, 21, 0) 100%) !important;
}

/* Dark Mode Grid Game Card & 3D Cover Frame */
html.dark .game-card {
    background: #121215 !important;
    border: 1px solid #27272a !important;
}

html.dark .game-card:hover {
    transform: translateY(-4px) !important;
    border-color: rgba(59, 130, 246, 0.6) !important;
    box-shadow: 0 16px 30px -8px rgba(0, 0, 0, 0.95), 0 0 15px rgba(59, 130, 246, 0.15) !important;
}

html.dark .cover-frame {
    background: radial-gradient(ellipse at 50% 50%, #18181d 0%, #0d0d10 100%) !important;
}

html.dark .cover-image {
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.95)) !important;
}

html.dark .card-game-title {
    color: #f4f4f5 !important;
}

html.dark .card-game-summary {
    color: #a1a1aa !important;
}

html.dark .card-divider {
    border-color: #27272a !important;
}

/* Colorful Duration & Difficulty Pills in Dark Mode */
html.dark .card-meta-duration {
    background: rgba(6, 78, 59, 0.4) !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
    color: #6ee7b7 !important;
    font-weight: 600 !important;
}

html.dark .card-meta-difficulty {
    background: rgba(69, 26, 3, 0.45) !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
    color: #fde68a !important;
    font-weight: 600 !important;
}

/* Uniform Sober Gray Badges in Dark Mode */
html.dark .badge-tag {
    background: #18181b !important;
    color: #a1a1aa !important;
    border: 1px solid #27272a !important;
}

/* Dark Mode Modal */
html.dark #game-modal {
    background: rgba(0, 0, 0, 0.85) !important;
}

html.dark #modal-container {
    background: #121215 !important;
    border-color: #27272a !important;
    color: #f4f4f5 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85) !important;
}

html.dark .modal-hero {
    background: radial-gradient(circle at 78% 18%, rgba(59, 130, 246, 0.12), transparent 40%), #0e0e11 !important;
    border-bottom: 1px solid #27272a !important;
}

html.dark .modal-hero-vignette {
    background: linear-gradient(180deg, rgba(14, 14, 17, 0.2) 0%, rgba(14, 14, 17, 0.8) 60%, rgba(14, 14, 17, 0.98) 100%),
                linear-gradient(90deg, rgba(14, 14, 17, 0.98) 0%, rgba(14, 14, 17, 0.84) 48%, rgba(14, 14, 17, 0.68) 100%) !important;
}

html.dark .modal-cover-art {
    filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.9)) !important;
}

html.dark #modal-title {
    color: #f4f4f5 !important;
}

html.dark .modal-close-btn {
    background: rgba(24, 24, 27, 0.88) !important;
    border-color: #3f3f46 !important;
    color: #f4f4f5 !important;
}

html.dark #modal-body .modal-mini-card {
    background: #18181b !important;
    border: 1px solid #27272a !important;
}

html.dark #modal-body .modal-mini-label {
    color: #71717a !important;
}

html.dark #modal-body .modal-mini-value {
    color: #f4f4f5 !important;
}

/* Dark Mode Modal Accordion & Callout Boxes */
html.dark .modal-accordion-box {
    background: #18181b !important;
    border: 1px solid #27272a !important;
}

html.dark .modal-accordion-header {
    color: #93c5fd !important;
    background: transparent !important;
}

html.dark .modal-accordion-header:hover {
    background: rgba(39, 39, 42, 0.5) !important;
}

html.dark .modal-accordion-title {
    color: #93c5fd !important;
    font-weight: 700 !important;
}

html.dark .modal-accordion-icon,
html.dark .modal-accordion-arrow {
    color: #60a5fa !important;
}

html.dark .modal-accordion-badge {
    background: rgba(37, 99, 235, 0.2) !important;
    color: #93c5fd !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    font-weight: 700 !important;
}

html.dark .modal-accordion-content {
    border-color: #27272a !important;
}

html.dark .modal-callout-box {
    background: #18181b !important;
    border: 1px solid #27272a !important;
}

html.dark .modal-callout-title {
    color: #60a5fa !important;
}

html.dark .modal-callout-text {
    color: #d4d4d8 !important;
}

html.dark .content-heading-iconized {
    color: #f4f4f5 !important;
}

html.dark .content-heading-icon {
    color: #60a5fa !important;
}

html.dark .notion-content {
    color: #cbd5e1 !important;
}

html.dark .notion-content h2,
html.dark .notion-content h3,
html.dark .notion-content h4 {
    color: #f8fafc !important;
}

html.dark .notion-content hr {
    border: 0 !important;
    border-top: 1px solid #27272a !important;
    margin: 1.25rem 0 !important;
}

html.dark .notion-content blockquote,
html.dark .notion-content .notion-callout {
    background: #18181b !important;
    border: 1px solid #27272a !important;
    color: #cbd5e1 !important;
}

html.dark .notion-content table {
    border-color: #27272a !important;
}

html.dark .notion-content th,
html.dark .notion-content td {
    border-color: #27272a !important;
    color: #f4f4f5 !important;
}

html.dark .notion-content th {
    background: #18181b !important;
    color: #a1a1aa !important;
}

html.dark .notion-content img {
    border: 1px solid #27272a !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
}

html.dark .youtube-preview {
    background: #09090b !important;
    border: 1px solid #27272a !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
}

html.dark .youtube-open-link {
    background: rgba(39, 39, 42, 0.6) !important;
    color: #60a5fa !important;
}

html.dark .youtube-open-link:hover {
    background: #2563eb !important;
    color: #ffffff !important;
}

/* Dark Mode Footer (Pure Black/Charcoal #09090b - ZERO BLUE) */
html.dark .site-footer {
    background: #09090b !important;
    border-color: #18181b !important;
}

html.dark .site-footer-copyright,
html.dark .site-footer-credit,
html.dark .site-footer-credit span {
    color: #ffffff !important;
    opacity: 0.95 !important;
}

html.dark .site-footer-logo {
    filter: none !important;
    opacity: 1 !important;
}

/* ==========================================================================
   9. LIGHT THEME DEFINITIONS (Studio Pearl White & Slate)
   ========================================================================== */
html.light body {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

html.light header.glass {
    background: rgba(255, 255, 255, 0.94) !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.03) !important;
}

html.light .glass {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 24px -2px rgba(15, 23, 42, 0.04) !important;
}

/* Intermediate clean divider lines in light mode */
html.light .border-slate-800,
html.light .border-slate-800\/80,
html.light .border-slate-800\/60,
html.light .border-slate-700,
html.light .border-slate-700\/80,
html.light .border-slate-700\/50,
html.light .mobile-tags-row,
html.light .filter-control-row,
html.light .stats-bar,
html.light footer.site-footer,
html.light section.glass {
    border-color: #e2e8f0 !important;
}

html.light .header-title,
html.light h1 {
    color: #0f172a !important;
}

html.light #btn-toggle-search,
html.light #btn-theme-toggle {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

html.light #header-search-bar input {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02) !important;
}

html.light #header-search-bar input::placeholder {
    color: #94a3b8 !important;
}

/* Light Mode Filter Buttons */
html.light .filter-pill {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
}

html.light .filter-pill:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

html.light .filter-pill.is-active {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28) !important;
}

html.light .fav-filter-pill.is-active {
    background: #fef3c7 !important;
    border-color: #f59e0b !important;
    color: #b45309 !important;
}

/* Light Mode Tag Cloud */
html.light .tag-btn {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
}

html.light .tag-btn:hover {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #1d4ed8 !important;
}

html.light .tag-btn.is-active {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

/* Light Mode Scroll Fades (Pure White Fade - ZERO DARK BLUE) */
html.light .mobile-scroll-shell::before {
    background: linear-gradient(90deg, #ffffff 20%, rgba(255, 255, 255, 0) 100%) !important;
}

html.light .mobile-scroll-shell::after {
    background: linear-gradient(270deg, #ffffff 20%, rgba(255, 255, 255, 0) 100%) !important;
}

/* Light Mode Grid Game Card & 3D Cover Frame */
html.light .game-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05) !important;
}

html.light .game-card:hover {
    transform: translateY(-4px) !important;
    border-color: #60a5fa !important;
    box-shadow: 0 16px 28px -4px rgba(37, 99, 235, 0.15), 0 4px 12px rgba(15, 23, 42, 0.04) !important;
}

html.light .cover-frame {
    background: radial-gradient(ellipse at 50% 50%, #ffffff 0%, #f1f5f9 100%) !important;
}

html.light .cover-image {
    filter: drop-shadow(0 8px 12px rgba(15, 23, 42, 0.14));
}

html.light .game-card:hover .cover-image {
    transform: translateY(-4px) scale(1.03) !important;
    filter: drop-shadow(0 14px 18px rgba(37, 99, 235, 0.2)) !important;
}

html.light .card-game-title {
    color: #0f172a !important;
}

html.light .card-game-summary {
    color: #64748b !important;
}

html.light .card-divider {
    border-color: #e2e8f0 !important;
}

/* Colorful Duration & Difficulty Pills in Light Mode */
html.light .card-meta-duration {
    background: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    color: #047857 !important;
    font-weight: 600 !important;
}

html.light .card-meta-difficulty {
    background: #fffbeb !important;
    border: 1px solid #fde68a !important;
    color: #b45309 !important;
    font-weight: 600 !important;
}

/* Uniform Sober Gray Badges in Light Mode */
html.light .badge-tag {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #e2e8f0 !important;
}

/* Light Mode Modal */
html.light #game-modal {
    background: rgba(15, 23, 42, 0.65) !important;
}

html.light #modal-container {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
}

html.light .modal-hero {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

html.light .modal-hero-vignette {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 50%, #ffffff 100%),
                linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.85) 45%, rgba(255, 255, 255, 0.1) 100%) !important;
}

html.light .modal-cover-art {
    filter: drop-shadow(0 10px 16px rgba(15, 23, 42, 0.12)) !important;
}

/* Modal Badges in Light Mode: Sleek Subtle Gray Background */
html.light .modal-badges-row .badge-tag {
    background: #f1f5f9 !important;
    color: gray !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    padding: 0.28rem 0.7rem !important;
    border-radius: 9999px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) !important;
    letter-spacing: 0.01em !important;
    transition: transform 0.15s ease, background-color 0.15s ease !important;
}

html.light .modal-badges-row .badge-tag:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

html.light #modal-title {
    color: #0f172a !important;
    text-shadow: none !important;
}

html.light .modal-close-btn {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1) !important;
}

html.light #modal-body .modal-mini-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
}

html.light #modal-body .modal-mini-label {
    color: #64748b !important;
}

html.light #modal-body .modal-mini-value {
    color: #0f172a !important;
}

/* Light Mode Modal Accordion & Callout Boxes */
html.light .modal-accordion-box {
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.05) !important;
}

html.light .modal-accordion-header {
    color: #1e40af !important;
    background: transparent !important;
}

html.light .modal-accordion-header:hover {
    background: rgba(219, 234, 254, 0.5) !important;
}

html.light .modal-accordion-title {
    color: #1e40af !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
}

html.light .modal-accordion-icon,
html.light .modal-accordion-arrow {
    color: #2563eb !important;
}

html.light .modal-accordion-badge {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    border: 1px solid #93c5fd !important;
    font-weight: 800 !important;
}

html.light .modal-accordion-content {
    border-color: #dbeafe !important;
    background: #f8fafc !important;
}

html.light .modal-callout-box {
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
}

html.light .modal-callout-title {
    color: #1d4ed8 !important;
    font-weight: 800 !important;
}

html.light .modal-callout-text {
    color: #1e293b !important;
}

html.light .content-heading-iconized {
    color: #0f172a !important;
}

html.light .content-heading-icon {
    color: #2563eb !important;
}

html.light .notion-content {
    color: #334155 !important;
}

html.light .notion-content h2,
html.light .notion-content h3,
html.light .notion-content h4 {
    color: #0f172a !important;
}

/* Intermediate clean separator line in light mode */
html.light .notion-content hr {
    border: 0 !important;
    border-top: 1px solid #e2e8f0 !important;
    margin: 1.25rem 0 !important;
}

html.light .notion-content blockquote,
html.light .notion-content .notion-callout {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
}

html.light .notion-content table {
    border-color: #e2e8f0 !important;
}

html.light .notion-content th,
html.light .notion-content td {
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

html.light .notion-content th {
    background: #f8fafc !important;
    color: #475569 !important;
}

html.light .notion-content img {
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06) !important;
    background: #ffffff !important;
}

html.light .youtube-preview {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
}

html.light .youtube-open-link {
    background: #f1f5f9 !important;
    color: #2563eb !important;
}

html.light .youtube-open-link:hover {
    background: #2563eb !important;
    color: #ffffff !important;
}

/* Light Mode Footer (Clean Seamless Studio Light - ZERO DARK BLUE) */
html.light .site-footer {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

html.light .site-footer-copyright,
html.light .site-footer-credit,
html.light .site-footer-credit span {
    color: #0f172a !important;
    font-weight: 600 !important;
    opacity: 1 !important;
}

html.light .site-footer-logo {
    filter: brightness(0) !important;
    opacity: 0.95 !important;
}