/* DS Game Codes — Frontend Styles
   Scoped under .dsgc-* to never conflict with JNews or WP */

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

/* ── Scroll containment (v1.2.0 hardened) ──────────────────────────────────
   html + body must NOT be scroll containers.
   #dsgc-app owns ALL scroll. This eliminates fast-fling snap-back / jerk-to-center
   on Android/iOS when content is short (e.g. only 3 codes). We use the strongest
   possible containment so momentum fling stops cleanly at bounds without visual jerk.
   100dvh + !important rules beat aggressive theme CSS (JNews etc).
   scroll-behavior:auto prevents any smooth-scroll interference with native fling.
*/
html {
    height: 100% !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
}

body.dsgc-body {
    margin: 0 !important;
    padding: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
    background: #020617;
    color: #e2e8f0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

#dsgc-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow-y: scroll;
    overflow-x: hidden;
    overscroll-behavior: none !important;
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: none !important;
    scroll-behavior: auto !important;
    background: #020617;
    /* Stronger bottom safe-area to prevent last card from being cut off */
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 24px));
}

/* ---- Top bar ---- */
.dsgc-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #020617;
    border-bottom: 1px solid #1e293b;
    padding: 10px 24px;
}
.dsgc-back-link {
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color .15s;
    min-width: 120px;
}
.dsgc-back-link:hover { color: #94a3b8; }
.dsgc-topbar-logo { display: flex; align-items: center; gap: 10px; }
.dsgc-logo-icon {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 14px;
}
.dsgc-logo-text { font-size: 18px; font-weight: 700; letter-spacing: -.5px; }
.dsgc-topbar-right { min-width: 120px; }

/* ---- Nav ---- */
.dsgc-nav { background: #0f172a; border-bottom: 1px solid #1e293b; }
.dsgc-nav-inner { max-width: 1280px; margin: 0 auto; padding: 12px 24px; }
.dsgc-nav-tabs {
    display: inline-flex;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 4px;
    gap: 2px;
}
.dsgc-nav-tab {
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
}
.dsgc-nav-tab.active { background: #06b6d4; color: #0f172a; font-weight: 600; }
.dsgc-nav-tab:hover:not(.active) { color: #e2e8f0; }

/* ---- Sections ---- */
.dsgc-section { display: none; }
.dsgc-section--active { display: block; flex: 1; }
.dsgc-container { max-width: 1280px; margin: 0 auto; padding: 32px 24px; }
@media (max-width: 640px) {
    .dsgc-container {
        padding-bottom: calc(32px + env(safe-area-inset-bottom, 20px));
    }
}
.dsgc-section-title { font-size: 26px; font-weight: 700; margin: 0 0 28px; color: #fff !important; }

/* ---- Quick game tabs ---- */
.dsgc-quick-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    /* Mobile: allow horizontal scroll so "All Games" is always easy to reach to clear filter */
}
@media (max-width: 640px) {
    .dsgc-quick-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
        scrollbar-width: thin;
    }
    .dsgc-quick-tab {
        flex-shrink: 0;
        white-space: nowrap;
    }
}
.dsgc-quick-tab {
    padding: 6px 16px;
    font-size: 13px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    color: #e2e8f0;
    cursor: pointer;
    transition: all .15s;
}
.dsgc-quick-tab:hover { border-color: #64748b; }
.dsgc-quick-tab.active { background: #06b6d4; color: #0f172a; font-weight: 600; border-color: #06b6d4; }

/* ---- Active game filter chip + Clear button ---- */
.dsgc-active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 999px;
    padding: 6px 14px 6px 18px;
    font-size: 13px;
    color: #94a3b8;
}
.dsgc-active-filter-chip strong {
    color: #e2e8f0;
    font-weight: 600;
}
.dsgc-clear-filter-btn {
    background: #334155;
    color: #e2e8f0;
    border: none;
    border-radius: 999px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.dsgc-clear-filter-btn:hover {
    background: #475569;
}

/* ---- Platform + search row ---- */
.dsgc-filter-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}
@media(min-width: 768px) { .dsgc-filter-row { flex-direction: row; align-items: center; } }
.dsgc-platform-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.dsgc-plat-btn {
    padding: 6px 16px;
    font-size: 13px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    color: #e2e8f0;
    cursor: pointer;
    transition: all .15s;
}
.dsgc-plat-btn.active { background: #8b5cf6; color: white; border-color: #8b5cf6; }
.dsgc-plat-btn:hover:not(.active) { border-color: #64748b; }
.dsgc-search-wrap { flex: 1; }
.dsgc-search-wrap input {
    width: 100%;
    background: #0f172a !important;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 13px;
    color: #e2e8f0 !important;
    outline: none;
    transition: border-color .15s;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none !important;
}
.dsgc-search-wrap input:focus { border-color: #06b6d4; }
.dsgc-search-wrap input::placeholder { color: #475569 !important; }
/* Override browser autofill white background */
.dsgc-search-wrap input:-webkit-autofill,
.dsgc-search-wrap input:-webkit-autofill:hover,
.dsgc-search-wrap input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #0f172a inset !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    caret-color: #e2e8f0;
}
/* Remove search cancel button that can cause style leaks */
.dsgc-search-wrap input[type="search"]::-webkit-search-cancel-button,
.dsgc-search-wrap input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

/* ---- Cards grid ---- */
.dsgc-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    /* Extra bottom spacing so last card is never cut off on mobile */
    padding-bottom: 40px;
}
@media (max-width: 640px) {
    .dsgc-cards-grid {
        padding-bottom: calc(60px + env(safe-area-inset-bottom, 30px));
    }
}
@media(min-width: 640px)  { .dsgc-cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media(min-width: 1024px) { .dsgc-cards-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---- Single code card ---- */
.dsgc-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 20px;
    padding: 22px;
    transition: border-color .2s;
    overflow: hidden;
    min-width: 0;
}
.dsgc-card:hover { border-color: #334155; }
.dsgc-card-header { display: flex; justify-content: space-between; margin-bottom: 14px; }
.dsgc-card-game { font-weight: 700; font-size: 17px; }
.dsgc-card-verified { font-size: 11px; margin-top: 2px; }
.dsgc-card-verified--official { color: #34d399; }
.dsgc-card-verified--community { color: #60a5fa; }
.dsgc-status-badge {
    padding: 3px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    height: fit-content;
    white-space: nowrap;
}
.dsgc-status-badge--working    { background: rgba(52,211,153,.12); color: #34d399; }
.dsgc-status-badge--expired    { background: rgba(239,68,68,.12);  color: #f87171; }
.dsgc-status-badge--unverified { background: rgba(250,204,21,.12); color: #fbbf24; }

/* Platform tags */
.dsgc-plat-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.dsgc-plat-tag {
    padding: 3px 10px;
    font-size: 11px;
    border-radius: 6px;
    font-weight: 500;
}
.dsgc-plat-tag--pc          { background: #14532d; color: #86efac; }
.dsgc-plat-tag--mobile      { background: #1e3a5f; color: #93c5fd; }
.dsgc-plat-tag--playstation { background: #3b1f6b; color: #c4b5fd; }
.dsgc-plat-tag--xbox        { background: #14532d; color: #86efac; }
.dsgc-plat-tag--switch      { background: #7f1d1d; color: #fca5a5; }

/* Code box */
.dsgc-code-box {
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.dsgc-code-box-left { min-width: 0; }
.dsgc-code-label { font-size: 10px; color: #475569; margin-bottom: 3px; }
.dsgc-code-value {
    font-family: monospace;
    font-size: 19px;
    font-weight: 700;
    word-break: break-all;
    overflow-wrap: break-word;
}
.dsgc-copy-btn {
    padding: 6px 10px;
    background: #1e293b;
    border: none;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all .15s;
}
.dsgc-copy-btn:hover { background: #334155; color: #e2e8f0; }
.dsgc-copy-btn.copied { background: rgba(52,211,153,.15); color: #34d399; }

/* Reward row */
.dsgc-reward {
    font-size: 13px;
    margin-bottom: 14px;
    color: #94a3b8;
    word-break: break-all;
    overflow-wrap: anywhere;
    max-width: 100%;
    display: block;
}
.dsgc-reward span { color: #e2e8f0; font-weight: 500; }

/* Card footer */
.dsgc-card-footer { display: flex; justify-content: space-between; align-items: center; }
.dsgc-last-checked { font-size: 11px; color: #475569; }
.dsgc-vote-btns { display: flex; gap: 8px; }
.dsgc-vote-btn {
    padding: 5px 12px;
    font-size: 12px;
    background: #1e293b;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #e2e8f0;
    cursor: pointer;
    transition: opacity .15s;
    /* voted-state color changes are instant (no transition on bg/color) */
}
.dsgc-vote-btn:hover { background: #334155; }
.dsgc-vote-btn.voted-up   { background: rgba(52,211,153,.15); color: #34d399; border-color: rgba(52,211,153,.3); }
.dsgc-vote-btn.voted-down { background: rgba(239,68,68,.15);  color: #f87171; border-color: rgba(239,68,68,.3); }
.dsgc-vote-btn:disabled   { opacity: .6; cursor: default; }

/* ── Vote pop animation (like Twitter heart) ── */
@keyframes dsgc-vote-pop {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.35); }
    55%  { transform: scale(0.92); }
    75%  { transform: scale(1.12); }
    90%  { transform: scale(0.97); }
    100% { transform: scale(1); }
}
.dsgc-vote-btn.vote-pop {
    animation: dsgc-vote-pop 0.45s cubic-bezier(.36,.07,.19,.97) both;
}

/* ---- Empty state ---- */
.dsgc-empty { text-align: center; padding: 70px 0; }
.dsgc-empty-icon { font-size: 40px; margin-bottom: 12px; }
.dsgc-empty-text { color: #64748b; font-size: 14px; }

/* ---- Games table ---- */
.dsgc-table-wrap {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 20px;
    overflow: hidden;
}
.dsgc-table-scroll { overflow-x: auto; }
.dsgc-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13px; }
.dsgc-table thead { background: #020617; }
.dsgc-table th {
    padding: 14px 20px;
    text-align: left;
    color: #64748b;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.dsgc-table th.center { text-align: center; }
.dsgc-table th.right  { text-align: right; }
.dsgc-table tbody tr { border-top: 1px solid #1e293b; cursor: pointer; transition: background .1s; }
.dsgc-table tbody tr:hover { background: #1e293b; }
.dsgc-table td { padding: 14px 20px; }
.dsgc-table td.center { text-align: center; }
.dsgc-table td.right  { text-align: right; color: #64748b; }
.dsgc-table-game { font-weight: 600; }
.dsgc-table-count-working { font-weight: 700; color: #34d399; }
.dsgc-table-loading { text-align: center; color: #475569; padding: 40px !important; }
.dsgc-plat-chip {
    display: inline-block;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 500;
    margin: 2px;
}
.dsgc-plat-chip--pc          { background: #14532d; color: #86efac; }
.dsgc-plat-chip--mobile      { background: #1e3a5f; color: #93c5fd; }
.dsgc-plat-chip--playstation { background: #3b1f6b; color: #c4b5fd; }
.dsgc-plat-chip--xbox        { background: #14532d; color: #86efac; }
.dsgc-plat-chip--switch      { background: #7f1d1d; color: #fca5a5; }

/* ---- Modal ---- */
.dsgc-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}
.dsgc-modal-overlay.open { display: flex; }
.dsgc-modal {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 20px;
    padding: 28px;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    /* Lock all nested text/bg against browser light mode */
    color-scheme: dark;
    color: #e2e8f0;
}
.dsgc-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.dsgc-modal-title { font-size: 20px; font-weight: 700; margin: 0; }
.dsgc-modal-close {
    background: none; border: none; color: #64748b; font-size: 18px;
    cursor: pointer; padding: 4px; line-height: 1;
}
.dsgc-modal-close:hover { color: #e2e8f0; }
.dsgc-field { margin-bottom: 16px; }
.dsgc-field label { display: block; font-size: 12px; color: #94a3b8; margin-bottom: 6px; }
.dsgc-field input,
.dsgc-field select {
    width: 100%;
    background: #020617 !important;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 11px 16px;
    font-size: 13px;
    color: #e2e8f0 !important;
    outline: none;
    transition: border-color .15s;
    appearance: auto;
    -webkit-appearance: auto;
    /* Prevent browser light mode from overriding field colors */
    color-scheme: dark;
}
.dsgc-field input::placeholder { color: #475569 !important; }
.dsgc-field select option {
    background: #020617;
    color: #e2e8f0;
}
.dsgc-field input:focus,
.dsgc-field select:focus { border-color: #06b6d4; }
/* Override browser autofill white background in light mode */
.dsgc-field input:-webkit-autofill,
.dsgc-field input:-webkit-autofill:hover,
.dsgc-field input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #020617 inset !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    caret-color: #e2e8f0;
}
.dsgc-modal-note {
    font-size: 11px;
    color: #64748b;
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 20px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.dsgc-modal-actions { display: flex; gap: 12px; }
.dsgc-btn-cancel {
    flex: 1; padding: 12px;
    border: 1px solid #334155; border-radius: 12px;
    background: transparent; color: #e2e8f0; font-size: 13px; cursor: pointer;
}
.dsgc-btn-cancel:hover { background: #1e293b; }
.dsgc-btn-submit {
    flex: 1; padding: 12px;
    background: white; color: #0f172a;
    border: none; border-radius: 12px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: background .15s;
}
.dsgc-btn-submit:hover { background: #f1f5f9; }
.dsgc-btn-submit:disabled { opacity: .5; cursor: default; }
.dsgc-submit-feedback {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    text-align: center;
}
.dsgc-submit-feedback.success { background: rgba(52,211,153,.12); color: #34d399; }
.dsgc-submit-feedback.error   { background: rgba(239,68,68,.12);  color: #f87171; }

/* ---- Responsive ---- */
@media(max-width: 480px) {
    .dsgc-topbar { padding: 10px 16px; }
    .dsgc-container { padding: 24px 16px; }
    .dsgc-nav-inner { padding: 10px 16px; }
    .dsgc-nav-tabs { width: 100%; }
    .dsgc-nav-tab { flex: 1; padding: 8px 12px; font-size: 12px; }
    .dsgc-logo-text { font-size: 16px; }
    .dsgc-back-link { font-size: 12px; }
}

/* ══════════════════════════════════════════════════════════════════
   PAGINATION
══════════════════════════════════════════════════════════════════ */
.dsgc-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 32px 0 16px;
    padding: 16px 20px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
}
@media (max-width: 640px) {
    .dsgc-pagination {
        margin-bottom: calc(40px + env(safe-area-inset-bottom, 20px));
    }
}
.dsgc-pagination-info {
    font-size: 13px;
    color: rgba(255,255,255,.45);
}
.dsgc-pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
}
.dsgc-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,.7);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}
.dsgc-page-btn:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
    border-color: rgba(255,255,255,.2);
}
.dsgc-page-btn.active {
    background: #6c63ff;
    color: #fff;
    border-color: #6c63ff;
    pointer-events: none;
}
.dsgc-page-ellipsis {
    color: rgba(255,255,255,.35);
    padding: 0 4px;
    font-size: 13px;
}

/* ══════════════════════════════════════════════════════════════════
   SORT DROPDOWN  (theme-proof: div+button, no ul/li)
══════════════════════════════════════════════════════════════════ */
.dsgc-filter-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.dsgc-sort-wrap {
    position: relative;
    display: inline-block;
}
/* Trigger button */
.dsgc-sort-btn {
    all: unset;                  /* wipe every inherited/theme style */
    box-sizing: border-box;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 12px !important;
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    color: #e2e8f0 !important;
    font-size: 13px !important;
    font-family: inherit !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    user-select: none !important;
    line-height: 1.4 !important;
    transition: border-color .15s !important;
}
.dsgc-sort-btn:hover {
    border-color: #06b6d4 !important;
    background: #0f172a !important;
    color: #e2e8f0 !important;
}
/* Chevron icon */
.dsgc-sort-chevron {
    font-size: 10px;
    opacity: .7;
    transition: transform .2s;
    pointer-events: none;
}
/* Dropdown panel — div, not ul */
.dsgc-sort-dropdown {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    right: auto !important;
    min-width: 170px !important;
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    padding: 4px 0 !important;
    margin: 0 !important;
    z-index: 9999 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.6) !important;
    list-style: none !important;
    /* display controlled by JS inline style */
}
/* Option buttons inside dropdown */
.dsgc-sort-option {
    all: unset;
    box-sizing: border-box;
    display: block !important;
    width: 100% !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    font-family: inherit !important;
    color: #e2e8f0 !important;
    background: transparent !important;
    cursor: pointer !important;
    text-align: left !important;
    border: none !important;
    border-radius: 0 !important;
    line-height: 1.4 !important;
    transition: background .1s, color .1s !important;
    white-space: nowrap !important;
}
.dsgc-sort-option:hover {
    background: #0f172a !important;
    color: #06b6d4 !important;
}
.dsgc-sort-option.active {
    color: #06b6d4 !important;
    font-weight: 600 !important;
}

/* ══════════════════════════════════════════════════════════════════
   ALL GAMES PAGE — header + search
══════════════════════════════════════════════════════════════════ */
.dsgc-games-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.dsgc-games-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(108,99,255,.25);
    color: #a49eff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    padding: 2px 10px;
    margin-left: 8px;
    vertical-align: middle;
}
.dsgc-games-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dsgc-games-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.dsgc-games-search-wrap i {
    position: absolute;
    left: 10px;
    color: rgba(255,255,255,.35);
    font-size: 13px;
    pointer-events: none;
}
.dsgc-games-search-wrap input[type="search"] {
    padding: 8px 32px 8px 32px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    width: 220px;
    outline: none;
    transition: border-color .15s, background .15s;
}
.dsgc-games-search-wrap input[type="search"]:focus {
    border-color: #6c63ff;
    background: rgba(255,255,255,.1);
}
.dsgc-games-search-clear {
    position: absolute;
    right: 8px;
    color: rgba(255,255,255,.4);
    font-size: 12px;
    text-decoration: none;
    line-height: 1;
}
.dsgc-games-search-clear:hover { color: #fff; }
.dsgc-games-search-btn {
    padding: 8px 16px;
    background: #6c63ff;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
}
.dsgc-games-search-btn:hover { background: #5a52e0; }
.dsgc-games-search-label {
    font-size: 13px;
    color: rgba(255,255,255,.5);
    margin-bottom: 12px;
}
.dsgc-games-search-label strong { color: rgba(255,255,255,.8); }
.dsgc-games-search-label a { color: #a49eff; text-decoration: none; margin-left: 6px; }
.dsgc-games-search-label a:hover { text-decoration: underline; }
.dsgc-table-date { font-size: 12px; color: rgba(255,255,255,.45); }

/* ── Game page: breadcrumb ───────────────────────────────────────────────── */
.dsgc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 13px;
    color: rgba(255,255,255,.45);
    background: rgba(255,255,255,.03);
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.dsgc-breadcrumb-link {
    color: #a49eff;
    text-decoration: none;
}
.dsgc-breadcrumb-link:hover { text-decoration: underline; }
.dsgc-breadcrumb-sep { opacity: .4; }
.dsgc-breadcrumb-current { color: rgba(255,255,255,.7); font-weight: 500; }

/* ── Game page: H1 heading block ─────────────────────────────────────────── */
.dsgc-game-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.dsgc-game-page-title {
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}
.dsgc-game-page-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #c4bfff;                 /* brighter lavender for good contrast on desktop */
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid rgba(164,158,255,.3);
    border-radius: 8px;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.dsgc-game-page-back:hover {
    background: rgba(164,158,255,.15);
    color: #e0e7ff;
}

/* ── Card game name: now an anchor link ──────────────────────────────────── */
a.dsgc-card-game {
    display: inline-block;
    color: #a49eff !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .3px;
    margin-bottom: 2px;
    transition: color .15s;
}
a.dsgc-card-game:hover {
    color: #c4bfff !important;
    text-decoration: underline;
}

/* ── All Games table: game name link ─────────────────────────────────────── */
.dsgc-table-game-link {
    color: #e2e0ff;
    text-decoration: none;
    font-weight: 500;
    transition: color .15s;
}
.dsgc-table-game-link:hover {
    color: #a49eff;
    text-decoration: underline;
}

/* ── All Games: controls row (sort + search together) ────────────────────── */
.dsgc-games-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.dsgc-gsort-wrap {
    position: relative;
    flex-shrink: 0;
}
