/*
 * White & Blue design system: storefront components (ds-*)
 * ─────────────────────────────────────────────────────────────
 * Always loaded. Uses the tokens in ds-tokens.css; the mapping of the old
 * theme variables lives in ds-legacy-theme.css.
 * No build step needed: this file is served as-is from /public/css.
 */

/* ── 3. Components ──────────────────────────────────────────────────── */

/* Layout */
.ds-container { width: 100%; max-width: var(--ds-container); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .ds-container { padding-inline: 24px; } }
.ds-section { margin-bottom: 32px; }
@media (min-width: 1024px) { .ds-section { margin-bottom: 40px; } }
.ds-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ds-section-title { font-size: 1.125rem; line-height: 1.4; font-weight: 700; color: var(--ds-text); margin: 0; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
@media (min-width: 768px) { .ds-section-title { font-size: 1.25rem; } }
.ds-section-title .ds-icon-tile { width: 32px; height: 32px; border-radius: 10px; background: var(--ds-primary-soft); color: var(--ds-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.ds-section-sub { margin: 2px 0 0; color: var(--ds-text-muted); font-size: 0.875rem; }
.ds-khmer { font-family: var(--ds-font-khmer); }
.ds-link { color: var(--ds-primary); font-weight: 600; font-size: 0.875rem; text-decoration: none; white-space: nowrap; }
.ds-link:hover { color: var(--ds-primary-hover); text-decoration: underline; }

/* Card */
.ds-card { background: var(--ds-bg); border: 1px solid var(--ds-border); border-radius: var(--ds-radius); box-shadow: var(--ds-shadow-sm); }
.ds-card-pad { padding: 16px; }
@media (min-width: 768px) { .ds-card-pad { padding: 20px; } }
.ds-card-title { font-size: 1rem; font-weight: 700; color: var(--ds-text); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.ds-step { width: 24px; height: 24px; border-radius: 999px; background: var(--ds-primary); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Buttons */
.ds-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: 0.9375rem; line-height: 1; text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; white-space: nowrap; user-select: none; }
.ds-btn:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
.ds-btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.875rem; border-radius: 8px; }
.ds-btn-lg { min-height: 52px; padding: 0 24px; font-size: 1rem; }
.ds-btn-block { width: 100%; }
.ds-btn-primary { background: var(--ds-primary); color: #FFFFFF; }
.ds-btn-primary:hover { background: var(--ds-primary-hover); color: #FFFFFF; }
.ds-btn-secondary { background: var(--ds-bg); color: var(--ds-text); border-color: var(--ds-border); }
.ds-btn-secondary:hover { border-color: var(--ds-primary-border); background: var(--ds-primary-soft); color: var(--ds-primary-hover); }
.ds-btn-ghost { background: transparent; color: var(--ds-primary); }
.ds-btn-ghost:hover { background: var(--ds-primary-soft); }
.ds-btn:disabled, .ds-btn[aria-disabled="true"] { background: #E2E8F0; color: #94A3B8; border-color: transparent; cursor: not-allowed; box-shadow: none; }

/* Badges */
.ds-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; line-height: 1.4; white-space: nowrap; border: 1px solid transparent; }
.ds-badge::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; flex-shrink: 0; }
.ds-badge-plain::before { display: none; }
.ds-badge-success { background: var(--ds-success-soft); color: var(--ds-success); border-color: #BBF7D0; }
.ds-badge-error { background: var(--ds-error-soft); color: var(--ds-error); border-color: #FECACA; }
.ds-badge-warning { background: var(--ds-warning-soft); color: var(--ds-warning); border-color: #FDE68A; }
.ds-badge-info { background: var(--ds-primary-soft); color: var(--ds-primary-hover); border-color: var(--ds-primary-border); }
.ds-badge-neutral { background: var(--ds-bg-subtle); color: var(--ds-text-muted); border-color: var(--ds-border); }

/* Inputs */
.ds-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--ds-text); margin-bottom: 6px; }
.ds-help { font-size: 0.8125rem; color: var(--ds-text-muted); margin-top: 6px; }
.ds-input { width: 100%; min-height: 44px; padding: 10px 14px; font-size: 0.9375rem; }
.ds-field-error { color: var(--ds-error); font-size: 0.8125rem; margin-top: 6px; }

/* Product card (Premium Accounts + games share it) */
.ds-grid-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 640px) { .ds-grid-products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .ds-grid-products { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .ds-grid-products { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.ds-grid-games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 640px) { .ds-grid-games { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .ds-grid-games { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 359px) { .ds-grid-products { grid-template-columns: minmax(0, 1fr); } .ds-grid-games { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.ds-product-card { position: relative; display: flex; flex-direction: column; height: 100%; background: var(--ds-bg); border: 1px solid var(--ds-border); border-radius: var(--ds-radius); overflow: hidden; text-decoration: none; color: var(--ds-text); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
a.ds-product-card:hover, .ds-product-card.is-link:hover { border-color: var(--ds-primary-border); box-shadow: var(--ds-shadow-md); }
.ds-product-card:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); border-color: var(--ds-primary); }
.ds-product-media { position: relative; aspect-ratio: 1 / 1; background: var(--ds-bg-subtle); overflow: hidden; }
.ds-product-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.ds-product-card:hover .ds-product-media img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .ds-product-media img, .ds-product-card { transition: none; } .ds-product-card:hover .ds-product-media img { transform: none; } }
/* Logo images (Premium Accounts brands): show the whole logo, never crop it */
.ds-product-media--contain { background: #fff; }
.ds-product-media--contain img { object-fit: contain; padding: 10%; box-sizing: border-box; }
.ds-product-flag { position: absolute; top: 8px; left: 8px; z-index: 1; }
.ds-product-body { display: flex; flex-direction: column; flex: 1; gap: 6px; padding: 12px; }
@media (min-width: 768px) { .ds-product-body { padding: 14px; } }
.ds-product-name { font-size: 0.9375rem; font-weight: 600; line-height: 1.35; color: var(--ds-text); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.ds-product-meta { font-size: 0.8125rem; color: var(--ds-text-muted); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-product-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.ds-price { font-size: 1.0625rem; font-weight: 700; color: var(--ds-text); letter-spacing: -0.01em; }
.ds-price small { font-size: 0.75rem; font-weight: 500; color: var(--ds-text-muted); margin-right: 4px; }
.ds-product-card .ds-btn { min-height: 40px; font-size: 0.875rem; }
.ds-product-card.is-disabled { opacity: .72; }
.ds-product-card.is-disabled .ds-product-media img { filter: grayscale(.6); }
.ds-overlay-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(248, 250, 252, .78); color: var(--ds-text-muted); font-weight: 700; font-size: .8125rem; text-align: center; padding: 8px; }

/* Game card name: Khmer and Latin names, centred */
.ds-game-name { font-size: 0.875rem; font-weight: 600; line-height: 1.3; text-align: center; margin: 0; color: var(--ds-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
@media (min-width: 768px) { .ds-game-name { font-size: 0.9375rem; } }

/* Selectable option (plans, payment methods) */
.ds-option { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px; background: var(--ds-bg); border: 1px solid var(--ds-border); border-radius: var(--ds-radius); cursor: pointer; transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease; color: var(--ds-text); }
.ds-option:hover { border-color: var(--ds-primary-border); }
.ds-option.is-selected, .ds-option[aria-checked="true"] { border-color: var(--ds-primary); background: var(--ds-primary-soft); box-shadow: inset 0 0 0 1px var(--ds-primary); }
.ds-option.is-disabled { cursor: not-allowed; opacity: .6; background: var(--ds-bg-subtle); }
.ds-option .ds-check { margin-left: auto; width: 20px; height: 20px; border-radius: 999px; border: 2px solid var(--ds-border); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; color: transparent; font-size: 12px; }
.ds-option.is-selected .ds-check, .ds-option[aria-checked="true"] .ds-check { border-color: var(--ds-primary); background: var(--ds-primary); color: #fff; }

/* Legacy payment method buttons (game page) in the new style */
.payment-method-btn { background: var(--ds-bg) !important; border: 1px solid var(--ds-border) !important; border-radius: var(--ds-radius) !important; color: var(--ds-text); }
.payment-method-btn:hover { border-color: var(--ds-primary-border) !important; }
.payment-method-btn.selected { border-color: var(--ds-primary) !important; background: var(--ds-primary-soft) !important; box-shadow: inset 0 0 0 1px var(--ds-primary); }
.payment-method-btn .tick-indicator { display: none; }
.payment-method-btn.selected .tick-indicator { display: block; border-top-color: var(--ds-primary) !important; }
.payment-method-btn.selected .tick-indicator i { color: #fff !important; }

/* Legacy game-page product cards */
.card-custom { background: var(--ds-bg); border: 1px solid var(--ds-border) !important; border-radius: var(--ds-radius); opacity: 1; color: var(--ds-text); }
.card-custom:hover { border-color: var(--ds-primary-border) !important; box-shadow: var(--ds-shadow-md); transform: none; }
.card-custom.selected, .card-custom.selected:focus, .card-custom.selected:active { background: var(--ds-primary-soft) !important; border: 1px solid var(--ds-primary) !important; box-shadow: inset 0 0 0 1px var(--ds-primary); }

/* Summary bar (product pages) */
.ds-summary-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--ds-bg); border-top: 1px solid var(--ds-border); box-shadow: 0 -8px 24px -16px rgba(15, 23, 42, .25); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.ds-summary-total { font-size: 1.125rem; font-weight: 700; color: var(--ds-text); }
/* Keep the footer clear of a fixed mobile summary bar, only on pages that have one. */
@media (max-width: 1023.98px) {
    body:has(.ds-summary-bar, #summaryBarMobile) .ds-footer { padding-bottom: 6rem; }
}

/* Empty / notice states */
.ds-empty { text-align: center; padding: 40px 16px; color: var(--ds-text-muted); }
.ds-empty-icon { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; background: var(--ds-primary-soft); color: var(--ds-primary); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.ds-empty-title { color: var(--ds-text); font-weight: 700; margin: 0 0 4px; }
.ds-notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 0.875rem; border: 1px solid var(--ds-primary-border); background: var(--ds-primary-soft); color: var(--ds-primary-hover); }
.ds-notice-error { border-color: #FECACA; background: var(--ds-error-soft); color: var(--ds-error); }
.ds-notice-success { border-color: #BBF7D0; background: var(--ds-success-soft); color: var(--ds-success); }
.ds-notice-warning { border-color: #FDE68A; background: var(--ds-warning-soft); color: var(--ds-warning); }

/* Tables */
.ds-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.875rem; }
.ds-table th { text-align: left; font-size: 0.75rem; font-weight: 600; color: var(--ds-text-muted); text-transform: uppercase; letter-spacing: .04em; padding: 12px 16px; background: var(--ds-bg-subtle); border-bottom: 1px solid var(--ds-border); white-space: nowrap; }
.ds-table td { padding: 14px 16px; border-bottom: 1px solid var(--ds-border); vertical-align: middle; color: var(--ds-text); }
.ds-table tbody tr:last-child td { border-bottom: 0; }
.ds-table tbody tr:hover td { background: #FBFDFF; }

/* Breadcrumb */
.ds-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.8125rem; color: var(--ds-text-muted); margin-bottom: 16px; }
.ds-breadcrumb a { color: var(--ds-text-muted); text-decoration: none; }
.ds-breadcrumb a:hover { color: var(--ds-primary); }
.ds-breadcrumb [aria-current] { color: var(--ds-text); font-weight: 600; }

/* Definition list */
.ds-dl { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: 10px 16px; margin: 0; font-size: 0.875rem; }
.ds-dl dt { color: var(--ds-text-muted); }
.ds-dl dd { margin: 0; color: var(--ds-text); font-weight: 500; overflow-wrap: anywhere; }

/* Status timeline */
.ds-steps { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.ds-steps li { flex: 1; min-width: 0; }
.ds-steps .bar { height: 4px; border-radius: 999px; background: var(--ds-border); margin-bottom: 8px; }
.ds-steps .label { font-size: 0.75rem; color: var(--ds-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-steps li.is-done .bar { background: var(--ds-primary); }
.ds-steps li.is-done .label { color: var(--ds-text); font-weight: 600; }
.ds-steps li.is-error .bar { background: var(--ds-error); }

/* Credential rows */
.ds-secret { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--ds-bg-subtle); border: 1px solid var(--ds-border); border-radius: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.875rem; overflow-wrap: anywhere; }
.ds-secret .value { flex: 1; min-width: 0; }
.ds-icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--ds-border); background: var(--ds-bg); color: var(--ds-text-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.ds-icon-btn:hover { color: var(--ds-primary); border-color: var(--ds-primary-border); }

/* Skeleton (loading) */
.ds-skeleton { background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 37%, #F1F5F9 63%); background-size: 400% 100%; animation: ds-shimmer 1.4s ease infinite; border-radius: 8px; }
@keyframes ds-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Pagination (Laravel tailwind view) */
nav[role="navigation"] span[aria-current="page"] > span { background: var(--ds-primary) !important; color: #fff !important; border-color: var(--ds-primary) !important; }

/* Utilities */
.ds-muted { color: var(--ds-text-muted); }
.ds-divider { height: 1px; background: var(--ds-border); border: 0; margin: 16px 0; }
.ds-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.ds-scroll-x::-webkit-scrollbar { display: none; }
.ds-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ── Footer (dark navy, ANAJAK STORE) ─────────────────────────── */
.ajf { background: #0F2742; color: #A8BCD0; position: relative; overflow: hidden; }
.ajf-skyline {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 1;
    max-height: 430px;
    min-height: 180px;
    overflow: hidden;
    background: linear-gradient(180deg, #071A2E 0%, #0B2541 72%, #0F2742 100%);
    border-bottom: 1px solid rgba(255,255,255,.10);
}
.ajf-skyline::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 88%, rgba(37, 99, 235, .24), transparent 58%);
    pointer-events: none;
}
.ajf-skyline img {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 100%;
    min-width: 920px;
    height: auto;
    transform: translateX(-50%);
    object-fit: contain;
    object-position: center bottom;
    display: block;
    filter: saturate(1.04) contrast(1.03);
}
@media (max-width: 767.98px) {
    .ajf-skyline { min-height: 160px; aspect-ratio: auto; }
    .ajf-skyline img { width: 480px; min-width: 480px; }
}
.ajf-main { padding-top: 40px; padding-bottom: 8px; position: relative; z-index: 1; }
.ajf-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 1023.98px) { .ajf-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 575.98px) { .ajf-grid { grid-template-columns: 1fr; gap: 24px; } }

.ajf-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.ajf-logo-icon { width: 34px; height: 34px; border-radius: 10px; background: rgba(96, 165, 250, .16); color: #60A5FA; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.ajf-logo-text { font-size: 1.125rem; font-weight: 800; letter-spacing: .04em; color: #FFFFFF; }
.ajf-logo-text span { color: #60A5FA; }
.ajf-desc { margin: 14px 0 0; font-size: .875rem; line-height: 1.7; max-width: 340px; }

.ajf-heading { margin: 4px 0 14px; font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #FFFFFF; }
.ajf-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ajf-links a { color: #A8BCD0; text-decoration: none; font-size: .875rem; transition: color .15s ease, padding-left .15s ease; }
.ajf-links a:hover { color: #60A5FA; padding-left: 4px; }

.ajf-socials { display: flex; gap: 10px; }
.ajf-social { width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,.10); color: #A8BCD0; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; text-decoration: none; transition: color .15s ease, border-color .15s ease, background-color .15s ease, transform .15s ease; }
.ajf-social:hover { color: #60A5FA; border-color: rgba(96,165,250,.55); background: rgba(96,165,250,.10); transform: translateY(-2px); }
.ajf-muted { font-size: .8125rem; color: rgba(168,188,208,.65); margin: 0; }

/* Oversized decorative brand text */
.ajf-watermark { position: relative; z-index: 0; text-align: center; pointer-events: none; user-select: none; margin-top: -6px; overflow: hidden; }
.ajf-watermark-text {
    display: inline-block;
    font-weight: 900;
    letter-spacing: .06em;
    white-space: nowrap;
    font-size: clamp(3rem, 11vw, 9rem);
    line-height: 1.05;
    padding-bottom: 8px;
    background: linear-gradient(180deg, rgba(96,165,250,.22) 0%, rgba(96,165,250,.10) 45%, rgba(15,39,66,0) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transform: translateY(12%);
}

/* Bottom bar */
.ajf-bottom { border-top: 1px solid rgba(255,255,255,.10); position: relative; z-index: 1; background: rgba(9, 25, 43, .55); }
.ajf-bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; padding-bottom: 14px; }
.ajf-copy { margin: 0; font-size: .8125rem; color: #A8BCD0; }
.ajf-accept { display: flex; align-items: center; gap: 8px; }
.ajf-accept-label { font-size: .8125rem; color: #A8BCD0; }
.ajf-pay { display: inline-flex; align-items: center; background: transparent; border: none; padding: 0; }
.ajf-pay img { height: 22px; width: auto; display: block; border-radius: 5px; }

/* ── 3D effects: section icons + product cards ────────────────── */

/* Shared: icons keep the 32px tile, contents render in 3D */
.fx-icon { perspective: 160px; overflow: visible; }

/* 3D diamond (Premium Accounts) */
.fx-gem { display: block; width: 22px; height: 22px; animation: fx-float 4s ease-in-out infinite; }
.fx-gem-spin { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; animation: fx-gem-sway 6.5s ease-in-out infinite alternate; }
.fx-gem-body { position: absolute; inset: 0; transform-style: preserve-3d; }
.fx-gem-body::before { /* crown */
    content: ""; position: absolute; left: 2px; right: 2px; top: 1px; height: 8px;
    clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%);
    background: linear-gradient(115deg, #DBEAFE 0%, #60A5FA 48%, #2563EB 100%);
    box-shadow: inset 0 1px 1px rgba(255,255,255,.7);
}
.fx-gem-body::after { /* pavilion */
    content: ""; position: absolute; left: 2px; right: 2px; top: 9px; bottom: 1px;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    background: linear-gradient(115deg, #93C5FD 0%, #3B82F6 42%, #1E40AF 100%);
    box-shadow: inset 0 -1px 2px rgba(30,64,175,.6);
}
.fx-gem-sheen { position: absolute; top: 1px; left: 6px; width: 4px; height: 15px;
    background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,0));
    transform: skewX(-18deg); filter: blur(.4px);
    animation: fx-sheen 3.4s ease-in-out infinite;
}
@keyframes fx-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
@keyframes fx-gem-sway { from { transform: rotateY(-17deg); } to { transform: rotateY(17deg); } }
@keyframes fx-sheen { 0%, 100% { opacity: .35; left: 6px; } 50% { opacity: 1; left: 11px; } }

/* 3D controller (All games) */
.fx-pad { display: block; width: 24px; height: 20px; animation: fx-float 4.4s ease-in-out infinite; }
.fx-pad-body { position: relative; display: block; width: 24px; height: 15px; margin-top: 2px;
    background: linear-gradient(180deg, #FFFFFF 0%, #DBEAFE 72%, #BFDBFE 100%);
    border-radius: 7px 7px 9px 9px;
    box-shadow: inset 0 -3px 4px rgba(37,99,235,.28), 0 2px 3px rgba(15,23,42,.18);
    transform-style: preserve-3d;
    animation: fx-pad-sway 7.5s ease-in-out infinite alternate;
}
.fx-pad-body::before, .fx-pad-body::after { /* grips */
    content: ""; position: absolute; bottom: -4px; width: 7px; height: 8px;
    background: linear-gradient(180deg, #EFF6FF, #BFDBFE);
    border-radius: 3px 3px 5px 5px;
    box-shadow: inset 0 -2px 3px rgba(37,99,235,.25);
}
.fx-pad-body::before { left: 1px; transform: rotate(12deg); }
.fx-pad-body::after { right: 1px; transform: rotate(-12deg); }
.fx-pad-dpad { position: absolute; left: 4px; top: 5px; width: 6px; height: 6px; }
.fx-pad-dpad::before, .fx-pad-dpad::after { content: ""; position: absolute; background: #3B82F6; border-radius: 1px; }
.fx-pad-dpad::before { left: 2px; top: 0; width: 2px; height: 6px; }
.fx-pad-dpad::after { left: 0; top: 2px; width: 6px; height: 2px; }
.fx-pad-btn { position: absolute; width: 3.5px; height: 3.5px; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #93C5FD, #2563EB);
    box-shadow: 0 .5px 1px rgba(15,23,42,.35);
}
.fx-pad-btn-a { right: 4px; top: 4px; }
.fx-pad-btn-b { right: 7.5px; top: 7.5px; }
@keyframes fx-pad-sway { from { transform: rotateZ(-7deg) rotateY(-8deg); } to { transform: rotateZ(7deg) rotateY(8deg); } }

/* Product card 3D tilt (transform itself is set by JS) */
#premium-accounts .ds-product-card,
#all-games .ds-product-card { transform-style: preserve-3d; }
#premium-accounts .ds-product-card.is-tilting,
#all-games .ds-product-card.is-tilting {
    will-change: transform;
    box-shadow: var(--ds-shadow-md), 0 14px 28px -14px rgba(37,99,235,.28);
    z-index: 2;
}
.ds-product-card.is-tilting .ds-product-media { transform-style: preserve-3d; }
.ds-product-card.is-tilting .ds-product-media img { transform: translateZ(18px) scale(1.03); }
.ds-product-card.is-tilting .ds-product-body { transform: translateZ(6px); }

/* Mobile/touch and reduced motion: no pointer effects, no floating loops */
@media (hover: none), (prefers-reduced-motion: reduce) {
    .fx-icon { transform: none !important; }
    .fx-gem, .fx-gem-spin, .fx-gem-sheen, .fx-pad, .fx-pad-body { animation: none !important; }
    .ds-product-card.is-tilting { will-change: auto; box-shadow: var(--ds-shadow-sm); }
    .ds-product-card.is-tilting .ds-product-media img { transform: none; }
}
