@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
/* ==========================================================================
   Pyxion Labs - theme.css
   Visual design layer. Loads after style.css and restyles it.
   Glass surfaces for panels, soft raised/inset shapes for controls.
   ========================================================================== */


:root {
    /* colours */
    --bg-deep:   #070516;
    --bg-navy:   #0c0a24;
    --primary:   #a78bfa;
    --secondary: #67e8f9;
    --accent:    #f472b6;
    --mint:      #6ee7b7;
    --peach:     #fdba74;
    --dark:      #070516;
    --card:      rgba(255, 255, 255, 0.05);
    --card-hover: rgba(255, 255, 255, 0.08);
    --text:      #f1effc;
    --muted:     #9a95bd;
    --glow:      rgba(167, 139, 250, 0.18);
    --glow-accent: rgba(103, 232, 249, 0.12);
    --glow-pink: rgba(244, 114, 182, 0.15);

    /* theme tokens used only by this file */
    --glass:        rgba(255, 255, 255, 0.055);
    --glass-strong: rgba(18, 14, 44, 0.78);
    --glass-border: rgba(255, 255, 255, 0.11);
    --glass-edge:   rgba(255, 255, 255, 0.18);
    --btn-grad:     linear-gradient(135deg, #8b5cf6 0%, #d946ef 55%, #f472b6 100%);
    --raised:       6px 6px 16px rgba(0, 0, 0, 0.45), -4px -4px 12px rgba(255, 255, 255, 0.035);
    --inset:        inset 3px 3px 8px rgba(0, 0, 0, 0.5), inset -2px -2px 6px rgba(255, 255, 255, 0.04);
    --radius:       18px;
    --font:         'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
}

/* ---------- base ---------- */
html { background: var(--bg-deep); }

body {
    font-family: var(--font);
    background: transparent;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* soft colour blobs behind everything */
body::before {
    background:
        radial-gradient(42vmax 42vmax at 8% 6%,   rgba(124, 58, 237, 0.34), transparent 62%),
        radial-gradient(38vmax 38vmax at 94% 18%, rgba(236, 72, 153, 0.22), transparent 60%),
        radial-gradient(40vmax 40vmax at 78% 98%, rgba(34, 211, 238, 0.16), transparent 62%),
        radial-gradient(36vmax 36vmax at 4% 90%,  rgba(79, 70, 229, 0.26), transparent 60%),
        linear-gradient(180deg, #0a0820 0%, #070516 100%);
    animation: none;
    z-index: -1;
}
body::after { display: none; }

#sparkleCanvas { display: none !important; }

::selection { background: rgba(167, 139, 250, 0.4); color: #fff; }

* { scrollbar-color: rgba(167, 139, 250, 0.35) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(167, 139, 250, 0.3); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }

#preloader { background: var(--bg-deep); }
.loader {
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--primary);
    border-right-color: var(--accent);
    animation: spin 0.8s linear infinite;
}

/* ---------- navigation ---------- */
nav {
    background: rgba(10, 8, 30, 0.6);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    border-bottom: 1px solid var(--glass-border);
}
nav:hover { box-shadow: none; }

.logo {
    font-weight: 800;
    letter-spacing: 0.01em;
    color: var(--text);
    background: var(--btn-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo:hover { transform: none; text-shadow: none; color: inherit; filter: brightness(1.15); }

nav a { font-weight: 500; color: var(--muted); }
nav a:hover { color: var(--text); transform: none; }
nav a::after { background: var(--btn-grad); height: 2px; }

.menu-toggle span { background: var(--text); }

/* round icon buttons in the nav: soft raised shape */
.nav-settings-btn,
.nav-notif-btn,
.nav-friendschat-btn,
.nav-cart-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text);
    box-shadow: var(--raised);
    transition: box-shadow 0.2s, border-color 0.2s, color 0.2s;
}
.nav-settings-btn:hover,
.nav-notif-btn:hover,
.nav-friendschat-btn:hover,
.nav-cart-btn:hover {
    border-color: rgba(167, 139, 250, 0.5);
    color: #fff;
    box-shadow: var(--inset);
    transform: none;
}

#welcomeBackStrip {
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(14px);
}

/* ---------- hero ---------- */
header {
    background: none;
    height: 62vh;
    min-height: 380px;
}
header::before { display: none; }
header::after { background: linear-gradient(transparent, rgba(7, 5, 22, 0.9)); }

header h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 15%, #c4b5fd 55%, #f9a8d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: none;
}
header p { color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
    background: var(--btn-grad);
    color: #fff;
    border-radius: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    animation: none;
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 12px 30px rgba(217, 70, 239, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn:active { transform: translateY(0); }

/* ---------- section titles ---------- */
.section-title {
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text);
}
.section-title:after { background: var(--btn-grad); height: 3px; border-radius: 3px; }

/* ---------- glass panels ---------- */
.featured-container,
.game-card,
.games-apps-card,
.roadmap-card,
.dev-note-card,
.poll-card,
.addon-card,
.section-outline,
.account-detail-card,
.suggestion-form-wrap,
.community-panel,
.shop-owned-card,
.cp-comment-item,
.upp-card,
.settings-fav-item {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.featured-container:hover { transform: translateY(-3px); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1); }

.game-card,
.games-apps-card { transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.game-card:hover,
.games-apps-card:hover {
    transform: translateY(-6px);
    border-color: rgba(167, 139, 250, 0.45);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(167, 139, 250, 0.18);
}
.game-card::before { display: none; }
.game-card:hover .game-img { transform: scale(1.05); }

.roadmap-card:hover,
.dev-note-card:hover { border-color: rgba(167, 139, 250, 0.4); }

/* ---------- modals ---------- */
.game-detail-modal,
.settings-modal-overlay,
.pyxion-modal-overlay,
.pf-popup-overlay,
#roadmap-detail-modal {
    background: rgba(4, 3, 14, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-content,
.settings-modal-box,
.pyxion-modal-box,
.pf-popup-box,
.dev-note-modal-box,
.report-modal-box,
#roadmap-detail-modal .modal-content {
    background: var(--glass-strong);
    border: 1px solid var(--glass-edge);
    border-radius: 22px;
    backdrop-filter: blur(26px) saturate(150%);
    -webkit-backdrop-filter: blur(26px) saturate(150%);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: modalFade 0.25s ease;
}
@keyframes modalFade {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

.detail-gallery { background: rgba(0, 0, 0, 0.35); }

/* ---------- inputs: pressed-in neumorphic fields ---------- */
#gameSearch,
#webplaySearch,
.pyxion-modal-input,
.suggestion-textarea,
.report-textarea,
.sort-select,
.pf-add-row input,
.poll-form-field,
.gaf-search,
.gaf-sort,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="number"],
textarea,
select {
    font-family: var(--font);
    background: rgba(0, 0, 0, 0.28);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    box-shadow: var(--inset);
    transition: border-color 0.2s, box-shadow 0.2s;
}
#gameSearch:focus,
#webplaySearch:focus,
.pyxion-modal-input:focus,
.suggestion-textarea:focus,
.report-textarea:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(167, 139, 250, 0.6);
    box-shadow: var(--inset), 0 0 0 3px rgba(167, 139, 250, 0.18);
}
::placeholder { color: rgba(154, 149, 189, 0.7); }

/* search boxes that wrap their own input: the wrapper carries the shape */
.gaf-search input,
.search-container input {
    background: transparent;
    border: 0;
    box-shadow: none;
}
.gaf-search input:focus,
.search-container input:focus { box-shadow: none; }

/* ---------- toggles ---------- */
.settings-toggle-slider {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--inset);
}

/* ---------- filter / tag chips ---------- */
.tag-btn,
.gaf-filter-btn,
.gaf-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--muted);
    box-shadow: var(--raised);
    transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.tag-btn:hover,
.gaf-filter-btn:hover,
.gaf-tab:hover { color: var(--text); }
.tag-btn.active,
.gaf-tab.active {
    background: var(--btn-grad);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(168, 85, 247, 0.35);
}


/* ---------- primary action buttons used across pages ---------- */
.btn-primary,
.btn-signin,
.confirm-create-btn,
.cp-comment-submit,
.cp-edit-save-btn,
.download-btn,
.pyxion-modal-submit,
.suggestion-signin-btn,
.suggestion-submit-btn,
.gaf-filter-apply,
.shop-voucher-btn,
.pfchat-send-btn,
.pp-segmented-btn.active,
#roadmap-detail-modal .roadmap-close-btn {
    background: var(--btn-grad);
    color: #fff;
    border: 0;
    border-radius: 12px;
    font-family: var(--font);
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover,
.confirm-create-btn:hover,
.cp-comment-submit:hover,
.cp-edit-save-btn:hover,
.download-btn:hover,
.pyxion-modal-submit:hover,
.suggestion-signin-btn:hover,
.suggestion-submit-btn:hover,
.gaf-filter-apply:hover,
.shop-voucher-btn:hover,
.pfchat-send-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 10px 26px rgba(217, 70, 239, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.pyxion-modal-submit:disabled,
.suggestion-submit-btn:disabled,
.shop-voucher-btn:disabled { filter: grayscale(0.4); opacity: 0.55; box-shadow: none; transform: none; }

/* round close buttons on windows */
.pyxion-modal-close,
.close-btn {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
    border: 1px solid var(--glass-border);
    box-shadow: var(--raised);
}
.pyxion-modal-close:hover,
.close-btn:hover { background: rgba(255, 255, 255, 0.12); box-shadow: var(--inset); transform: none; }

/* badges */
.card-badge.badge-beta,
.featured-badge { background: var(--btn-grad); color: #fff; }

/* ---------- shop ---------- */
.shop-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.shop-voucher-input,
.shop-search-input { background: rgba(0, 0, 0, 0.28); color: var(--text); border-radius: 12px; box-shadow: var(--inset); }

/* ---------- profile and friends chat: soft raised controls ---------- */
.profile-sidebar-btn,
.profile-top-back-btn,
.pp-copy-username-btn,
.pp-banner-btn,
.pp-status-btn,
.pfchat-emoji-btn,
.pfchat-gif-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    box-shadow: var(--raised);
    color: var(--text);
}
.profile-sidebar-btn:hover,
.profile-top-back-btn:hover,
.pp-banner-btn:hover,
.pp-status-btn:hover { box-shadow: var(--inset); }
.pp-status-btn.selected { background: rgba(167, 139, 250, 0.22); border-color: rgba(167, 139, 250, 0.5); box-shadow: var(--inset); }

/* community jump bar */
.community-jump-banner {
    background: rgba(10, 8, 30, 0.6);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--glass-border);
}
.community-jump-link { color: var(--muted); }
.community-jump-link:hover { color: var(--text); }

/* ---------- footer ---------- */
footer {
    background: rgba(5, 4, 16, 0.7);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(14px);
}
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); transform: none; }
.social-links a { font-size: 1.5rem; color: var(--muted) !important; transition: color 0.2s, transform 0.2s; }
.social-links a:hover { color: var(--text) !important; transform: translateY(-3px); filter: none; }

/* ---------- light mode: same layout, frosted white on soft lavender ---------- */
body.light-mode {
    --primary: #7c3aed;
    --secondary: #0891b2;
    --accent: #db2777;
    --dark: #f3f0ff;
    --card: rgba(255, 255, 255, 0.6);
    --text: #1b1638;
    --muted: #5f5a85;
    --glass: rgba(255, 255, 255, 0.6);
    --glass-strong: rgba(255, 255, 255, 0.88);
    --glass-border: rgba(90, 70, 160, 0.16);
    --glass-edge: rgba(90, 70, 160, 0.22);
    --raised: 6px 6px 14px rgba(120, 100, 190, 0.18), -5px -5px 12px rgba(255, 255, 255, 0.9);
    --inset: inset 3px 3px 7px rgba(120, 100, 190, 0.18), inset -3px -3px 7px rgba(255, 255, 255, 0.9);
}
body.light-mode { background-color: transparent; }
html:has(body.light-mode) { background: #f3f0ff; }
body.light-mode::before {
    background:
        radial-gradient(42vmax 42vmax at 8% 6%,   rgba(167, 139, 250, 0.35), transparent 62%),
        radial-gradient(38vmax 38vmax at 94% 18%, rgba(244, 114, 182, 0.25), transparent 60%),
        radial-gradient(40vmax 40vmax at 78% 98%, rgba(103, 232, 249, 0.25), transparent 62%),
        linear-gradient(180deg, #f6f3ff 0%, #ece7ff 100%);
}
body.light-mode nav { background: rgba(255, 255, 255, 0.65); }
body.light-mode nav a { color: var(--muted); }
body.light-mode nav a:hover { color: var(--text); }
body.light-mode header { background: none; }
body.light-mode header::after { background: linear-gradient(transparent, rgba(243, 240, 255, 0.9)); }
body.light-mode header h1 { background: linear-gradient(135deg, #1b1638 10%, #7c3aed 60%, #db2777 100%); -webkit-background-clip: text; background-clip: text; }
body.light-mode footer { background: rgba(255, 255, 255, 0.6); }
body.light-mode .modal-content,
body.light-mode .settings-modal-box,
body.light-mode .pyxion-modal-box,
body.light-mode .pf-popup-box,
body.light-mode .dev-note-modal-box,
body.light-mode #roadmap-detail-modal .modal-content { background: var(--glass-strong); }
body.light-mode #gameSearch,
body.light-mode #webplaySearch,
body.light-mode .pyxion-modal-input,
body.light-mode .suggestion-textarea,
body.light-mode .report-textarea,
body.light-mode input,
body.light-mode textarea,
body.light-mode select { background: rgba(255, 255, 255, 0.7); color: var(--text); }

/* ---------- small screens ---------- */
@media (max-width: 768px) {
    nav { padding: 12px 5%; }
    header { min-height: 320px; }
    header h1 { font-size: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- fixes found in review ---------- */
header::after { display: none; }

.gaf-search input,
.search-container input,
.gaf-sort select,
.gaf-sort input,
body.light-mode .gaf-search input,
body.light-mode .search-container input,
body.light-mode .gaf-sort select {
    background: transparent;
    border: 0;
    box-shadow: none;
}
.gaf-search input:focus,
.gaf-sort select:focus { box-shadow: none; }
body.light-mode .gaf-search,
body.light-mode .gaf-sort,
body.light-mode #gameSearch,
body.light-mode #webplaySearch,
body.light-mode .pyxion-modal-input,
body.light-mode textarea { box-shadow: inset 2px 2px 5px rgba(120, 100, 190, 0.14), inset -2px -2px 5px rgba(255, 255, 255, 0.9); border-color: rgba(90, 70, 160, 0.12); }
body.light-mode .gaf-search,
body.light-mode .gaf-sort { background: rgba(255, 255, 255, 0.75); }

/* ==========================================================================
   3D glass windows
   Layered highlights, a soft glare in the top-left corner and a deep shadow
   make every popup look like a thick pane of frosted glass.
   ========================================================================== */
.pyxion-modal-overlay,
.game-detail-modal,
.settings-modal-overlay,
.pf-popup-overlay,
#roadmap-detail-modal,
#pyxWarnOverlay { perspective: 1400px; }

.modal-content,
.settings-modal-box,
.pyxion-modal-box,
.pf-popup-box,
.dev-note-modal-box,
.report-modal-box,
.confirm-modal-box,
.profile-modal-box,
.roadmap-modal-inner,
.upp-screenie-view-box,
.pyx-warn-box,
#roadmap-detail-modal .modal-content {
    background:
        radial-gradient(130% 70% at 0% 0%, rgba(255, 255, 255, 0.17), transparent 52%),
        linear-gradient(155deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.025) 45%, rgba(255, 255, 255, 0.06) 100%),
        rgba(15, 11, 38, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-top-color: rgba(255, 255, 255, 0.38);
    border-left-color: rgba(255, 255, 255, 0.26);
    border-radius: 24px;
    backdrop-filter: blur(30px) saturate(165%);
    -webkit-backdrop-filter: blur(30px) saturate(165%);
    box-shadow:
        0 50px 100px -20px rgba(0, 0, 0, 0.7),
        0 18px 36px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 1px 0 0 rgba(255, 255, 255, 0.14),
        inset 0 -24px 48px rgba(124, 58, 237, 0.14),
        inset 0 24px 40px -20px rgba(255, 255, 255, 0.08);
    transform-origin: 50% 100%;
    animation: glassRise 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
@keyframes glassRise {
    from { opacity: 0; transform: translateY(34px) rotateX(10deg) scale(0.95); }
    to   { opacity: 1; transform: none; }
}

.pyx-warn-box { border-color: inherit; }

/* header of the account window stays solid so nothing shows through it
   while the content scrolls underneath */
.settings-modal-header {
    background: rgba(20, 15, 48, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 4;
    border-radius: 24px 24px 0 0;
}
#settings-modal .pyxion-modal-close {
    position: sticky;
    top: 14px;
    display: flex;
    margin: 14px 16px -52px auto;
    z-index: 6;
}

body.light-mode .modal-content,
body.light-mode .settings-modal-box,
body.light-mode .pyxion-modal-box,
body.light-mode .pf-popup-box,
body.light-mode .dev-note-modal-box,
body.light-mode .report-modal-box,
body.light-mode .confirm-modal-box,
body.light-mode .profile-modal-box,
body.light-mode .roadmap-modal-inner,
body.light-mode #roadmap-detail-modal .modal-content {
    background:
        radial-gradient(130% 70% at 0% 0%, rgba(255, 255, 255, 0.9), transparent 55%),
        linear-gradient(155deg, rgba(255, 255, 255, 0.7), rgba(240, 235, 255, 0.55)),
        rgba(255, 255, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow:
        0 40px 80px -24px rgba(80, 60, 160, 0.38),
        0 14px 30px -12px rgba(80, 60, 160, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -20px 40px rgba(167, 139, 250, 0.12);
}
body.light-mode .settings-modal-header { background: rgba(255, 255, 255, 0.96); border-bottom-color: rgba(90, 70, 160, 0.12); }

/* ==========================================================================
   No scrollbars anywhere. Everything still scrolls.
   ========================================================================== */
html, body, * { scrollbar-width: none !important; -ms-overflow-style: none !important; }
*::-webkit-scrollbar, ::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }


/* ==========================================================================
   Close buttons: perfectly round, icon centred
   ========================================================================== */
.pyxion-modal-close,
.close-btn,
.roadmap-close-btn,
.fav-modal-close,
.lightbox-close,
.whatsnew-banner-close,
.whatsnew-modal-close,
.dev-note-modal-close,
.cart-drawer-close,
.upp-screenie-view-close,
.shop-modal-close,
.profile-modal-close,
.modal-close,
.poll-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    text-align: center;
}
.pyxion-modal-close i,
.close-btn i,
.roadmap-close-btn i,
.fav-modal-close i,
.lightbox-close i,
.whatsnew-banner-close i,
.whatsnew-modal-close i,
.dev-note-modal-close i,
.cart-drawer-close i,
.upp-screenie-view-close i,
.shop-modal-close i,
.profile-modal-close i { display: block; line-height: 1; margin: 0; font-size: 1em; }

.pyxion-modal-close, .close-btn, .roadmap-close-btn { box-sizing: border-box; }
.pyxion-modal-close { width: 38px; height: 38px; font-size: 1.05rem; padding-bottom: 0; }
.close-btn { width: 44px; height: 44px; font-size: 1.15rem; padding-bottom: 0; color: #fff; background: var(--btn-grad); }
.roadmap-close-btn { width: 40px; height: 40px; font-size: 1.05rem; padding: 0; color: #fff; }
.fav-modal-close, .lightbox-close, .whatsnew-modal-close, .dev-note-modal-close,
.cart-drawer-close, .shop-modal-close, .upp-screenie-view-close { width: 38px; height: 38px; font-size: 1.05rem; padding: 0; border-radius: 50%; }
.pyxion-modal-close, .close-btn, .roadmap-close-btn { border-radius: 50%; color: #fff; }

/* ==========================================================================
   Full-screen pages: game details, web play, roadmap, Terms, Help and Report
   ========================================================================== */
.game-detail-modal,
#roadmap-detail-modal,
#terms-modal.pyxion-modal-overlay,
#help-modal.pyxion-modal-overlay,
#report-modal.pyxion-modal-overlay {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    background: rgba(6, 4, 18, 0.9);
}

.game-detail-modal .modal-content,
#roadmap-detail-modal .modal-content,
#terms-modal .pyxion-modal-box,
#help-modal .pyxion-modal-box,
#report-modal .pyxion-modal-box {
    position: relative;
    box-sizing: border-box;
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border-radius: 0;
    border: 0;
    overflow-y: auto;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background:
        radial-gradient(70% 45% at 0% 0%, rgba(124, 58, 237, 0.28), transparent 70%),
        radial-gradient(60% 45% at 100% 100%, rgba(236, 72, 153, 0.16), transparent 70%),
        rgba(10, 8, 28, 0.94);
    box-shadow: none;
    transform-origin: 50% 50%;
    animation: pageIn 0.35s ease;
}
@keyframes pageIn {
    from { opacity: 0; transform: scale(0.985); }
    to   { opacity: 1; transform: none; }
}

/* keep the reading width comfortable on large screens */
#terms-modal .pyxion-modal-box,
#help-modal .pyxion-modal-box,
#report-modal .pyxion-modal-box {
    padding: 84px max(22px, calc((100vw - 760px) / 2)) 100px !important;
}
.game-detail-modal #detailContent,
.game-detail-modal #webplayDetailContent,
#roadmap-detail-modal .roadmap-modal-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding-top: 64px;
}
#roadmap-detail-modal .roadmap-modal-inner { padding-left: 24px; padding-right: 24px; padding-bottom: 60px; }

/* the close button stays on screen while the page scrolls */
#terms-modal .pyxion-modal-close,
#help-modal .pyxion-modal-close,
#report-modal .pyxion-modal-close,
#roadmap-detail-modal .roadmap-close-btn {
    position: fixed;
    top: 18px;
    right: 22px;
    z-index: 20;
}
.close-btn { top: 18px; right: 22px; }

@media (max-width: 640px) {
    #terms-modal .pyxion-modal-box,
    #help-modal .pyxion-modal-box,
    #report-modal .pyxion-modal-box { padding: 76px 18px 80px !important; }
    #terms-modal .pyxion-modal-close, #help-modal .pyxion-modal-close, #report-modal .pyxion-modal-close,
    #roadmap-detail-modal .roadmap-close-btn, .close-btn { top: 12px; right: 12px; }
}
body.light-mode .game-detail-modal .modal-content,
body.light-mode #roadmap-detail-modal .modal-content,
body.light-mode #terms-modal .pyxion-modal-box,
body.light-mode #help-modal .pyxion-modal-box,
body.light-mode #report-modal .pyxion-modal-box { background: radial-gradient(70% 45% at 0% 0%, rgba(167, 139, 250, 0.3), transparent 70%), rgba(246, 243, 255, 0.97); }


/* ==========================================================================
   Messages window: full screen. What's New and the other popups keep the
   glass window look so every popup shares one style.
   ========================================================================== */
#notif-modal.pyxion-modal-overlay {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    background: rgba(6, 4, 18, 0.9);
}
#notif-modal .pyxion-modal-box {
    position: relative;
    box-sizing: border-box;
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border-radius: 0;
    border: 0;
    overflow-y: auto;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background:
        radial-gradient(70% 45% at 0% 0%, rgba(124, 58, 237, 0.28), transparent 70%),
        radial-gradient(60% 45% at 100% 100%, rgba(236, 72, 153, 0.16), transparent 70%),
        rgba(10, 8, 28, 0.94);
    box-shadow: none;
    animation: pageIn 0.35s ease;
    padding: 84px max(22px, calc((100vw - 760px) / 2)) 100px !important;
}
#notif-modal .pyxion-modal-close {
    position: fixed;
    top: 18px;
    right: 22px;
    z-index: 20;
}
@media (max-width: 640px) {
    #notif-modal .pyxion-modal-box { padding: 76px 18px 80px !important; }
    #notif-modal .pyxion-modal-close { top: 12px; right: 12px; }
}
body.light-mode #notif-modal .pyxion-modal-box {
    background: radial-gradient(70% 45% at 0% 0%, rgba(167, 139, 250, 0.3), transparent 70%), rgba(246, 243, 255, 0.97);
}

body .whatsnew-modal,
body .fav-modal-box,
body .cp-dc-box,
body .pp-screenie-view-box,
body .upp-screenie-view-box,
body .confirm-modal-box,
body .dev-note-modal-box,
body .profile-modal-box {
    background:
        radial-gradient(130% 70% at 0% 0%, rgba(255, 255, 255, 0.17), transparent 52%),
        linear-gradient(155deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.025) 45%, rgba(255, 255, 255, 0.06) 100%),
        rgba(15, 11, 38, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-top-color: rgba(255, 255, 255, 0.38);
    border-left-color: rgba(255, 255, 255, 0.26);
    border-radius: 24px;
    backdrop-filter: blur(30px) saturate(165%);
    -webkit-backdrop-filter: blur(30px) saturate(165%);
    box-shadow:
        0 50px 100px -20px rgba(0, 0, 0, 0.7),
        0 18px 36px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 1px 0 0 rgba(255, 255, 255, 0.14),
        inset 0 -24px 48px rgba(124, 58, 237, 0.14);
    animation: glassRise 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
body .whatsnew-modal-overlay,
body #fav-modal,
body #cp-delete-confirm-overlay,
body .dev-note-modal-overlay {
    background: rgba(4, 3, 14, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    perspective: 1400px;
}
body.light-mode .whatsnew-modal,
body.light-mode .fav-modal-box,
body.light-mode .cp-dc-box {
    background:
        radial-gradient(130% 70% at 0% 0%, rgba(255, 255, 255, 0.9), transparent 55%),
        linear-gradient(155deg, rgba(255, 255, 255, 0.7), rgba(240, 235, 255, 0.55)),
        rgba(255, 255, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.8);
}
