/* ИГРЫ: раздел «Игры» (games.js). Каркас раздела — общий с «Музыкой» (.music-view, .mv-head в vpnapp.css) */
.shell.games-open > .stage, .shell.games-open > .profile, .shell.games-open > .files-view, .shell.games-open > .music-view:not(.games-view) { display: none !important; }
.gm-ico { background: linear-gradient(135deg, rgba(245,158,11,.2), rgba(236,72,153,.2)) !important; }
.gm-h { background: linear-gradient(90deg, #fbbf24, #f472b6); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.gm-bal { flex: none; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #fcd34d; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.25); }
.gm-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px 28px; overscroll-behavior: contain; }
.gm-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gm-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; cursor: pointer; text-align: left; font: inherit; color: inherit;
  background: rgba(255,255,255,.035); border: 1px solid var(--line, rgba(255,255,255,.07)); transition: transform .18s, background .18s, border-color .18s, box-shadow .18s; }
.gm-card:hover { transform: translateY(-2px); background: rgba(255,255,255,.06); }
.gm-card.on { border-color: rgba(245,158,11,.55); background: linear-gradient(135deg, rgba(245,158,11,.14), rgba(236,72,153,.10)); box-shadow: 0 10px 30px rgba(236,72,153,.12); }
.gm-c-emo { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 14px; font-size: 26px; background: rgba(255,255,255,.06); }
.gm-c-m { display: flex; flex-direction: column; min-width: 0; }
.gm-c-m b { font-size: 15px; }
.gm-c-m small { font-size: 12px; color: var(--muted, #8a9690); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-dot, .gm-nav-dot { position: absolute; top: 8px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center;
  font: 800 11px/1 system-ui, sans-serif; font-style: normal; color: #fff; background: linear-gradient(135deg, #f59e0b, #ec4899); box-shadow: 0 0 0 2px var(--bg, #0b0f0d); }
.gm-stage { margin-top: 18px; animation: mv-in .22s ease; position: relative; }
.gm-wheel { max-width: 560px; margin: 0 auto; }
.gm-fine { margin: 22px auto 0; max-width: 760px; color: var(--muted, #8a9690); font-size: 12px; text-align: center; line-height: 1.5; }
.gm-empty { color: var(--muted, #8a9690); text-align: center; padding: 40px 0; }
.gm-game { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(240px, .85fr); gap: 22px; align-items: start; max-width: 900px; margin: 0 auto; }
.gm-side { display: flex; flex-direction: column; gap: 12px; }
.gm-state { font-size: 14px; font-weight: 600; min-height: 20px; }
.gm-go { height: 48px; border: 0; border-radius: 14px; cursor: pointer; font: inherit; font-size: 15px; font-weight: 800; color: #1a0d00;
  background: linear-gradient(135deg, #fbbf24, #f472b6); box-shadow: 0 10px 26px rgba(244,114,182,.28); transition: transform .15s, opacity .15s; }
.gm-go:hover:not(:disabled) { transform: translateY(-1px); } .gm-go:active:not(:disabled) { transform: scale(.97); }
.gm-go:disabled { opacity: .45; cursor: default; box-shadow: none; }
.gm-ghost { height: 40px; border-radius: 12px; cursor: pointer; font: inherit; font-weight: 600; color: var(--text, #e9efec); background: rgba(255,255,255,.05); border: 1px solid var(--line, rgba(255,255,255,.1)); }
.gm-result { padding: 14px; border-radius: 16px; text-align: center; animation: gm-pop .35s cubic-bezier(.2, 1.4, .4, 1); }
.gm-result.win { background: linear-gradient(135deg, rgba(45,212,191,.16), rgba(250,204,21,.12)); border: 1px solid rgba(250,204,21,.3); }
.gm-result.lose { background: rgba(255,255,255,.04); border: 1px solid var(--line, rgba(255,255,255,.08)); }
.gm-r-ico { font-size: 34px; } .gm-r-t { font-size: 16px; font-weight: 800; margin-top: 4px; } .gm-r-n { font-size: 12.5px; color: var(--muted, #8a9690); margin-top: 6px; }
@keyframes gm-pop { from { opacity: 0; transform: scale(.9); } }
.gm-odds { font-size: 13px; color: var(--muted, #8a9690); }
.gm-odds summary { cursor: pointer; font-weight: 600; }
.gm-odds ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.gm-odds li { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 9px; background: rgba(255,255,255,.035); color: var(--text, #e9efec); }
.gm-odds li.e { color: var(--muted, #8a9690); }
.gm-odds p { font-size: 12px; margin: 8px 0 0; }
/* скретч-карта */
.gm-ticket { border-radius: 22px; padding: 16px; background: linear-gradient(145deg, #1f2937, #111827 60%, #3b0764); border: 1px solid rgba(255,255,255,.08); box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.gm-t-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.gm-t-head b { font-size: 16px; } .gm-t-head small { color: #c4b5fd; font-size: 12px; }
.gm-t-area { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 1.15; background: #0f172a; user-select: none; touch-action: none; }
.gm-grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; }
.gm-grid span { display: grid; place-items: center; border-radius: 12px; font-size: clamp(26px, 6vw, 44px); background: rgba(255,255,255,.05); color: #94a3b8; transition: transform .3s, background .3s, box-shadow .3s; }
.gm-grid span.hit { background: linear-gradient(135deg, rgba(250,204,21,.3), rgba(244,114,182,.25)); box-shadow: 0 0 0 2px rgba(250,204,21,.7) inset; animation: gm-hit .7s ease 2; }
@keyframes gm-hit { 50% { transform: scale(1.12); } }
.gm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.gm-t-hint { position: absolute; inset: auto 0 14px; text-align: center; font-weight: 700; color: #1f2937; pointer-events: none; }
/* 50/50 */
.gm-coin { text-align: center; }
.gm-c-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; color: var(--muted, #aeb9b3); }
.gm-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; perspective: 1000px; }
.gm-flip { position: relative; aspect-ratio: .7; border: 0; padding: 0; background: none; cursor: pointer; font: inherit; color: inherit; transition: transform .2s, opacity .3s, filter .3s; }
.gm-flip:hover:not(:disabled) { transform: translateY(-4px) rotate(-1deg); }
.gm-flip:disabled { cursor: default; }
.gm-flip.pick .gm-in { animation: gm-wobble .5s ease-in-out infinite; }
.gm-flip.dim { opacity: .45; filter: grayscale(.6); }
.gm-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3, 1.3, .5, 1); }
.gm-flip.flipped .gm-in { transform: rotateY(180deg); animation: none; }
.gm-f { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border-radius: 20px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 1px solid rgba(255,255,255,.1); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.gm-f i { font-style: normal; font-size: clamp(38px, 8vw, 64px); }
.gm-f small { font-size: 13px; font-weight: 700; }
.gm-f.front { background: repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 10px, transparent 10px 20px), linear-gradient(145deg, #7c3aed, #db2777); color: #fff; }
.gm-f.front i { color: #fde68a; text-shadow: 0 0 18px rgba(253,230,138,.6); }
.gm-f.back { transform: rotateY(180deg); background: #111827; }
.gm-f.back.win { background: linear-gradient(145deg, #065f46, #0f766e 50%, #a16207); color: #fef9c3; }
.gm-f.back.lose { background: linear-gradient(145deg, #334155, #1e293b); color: #cbd5e1; }
@keyframes gm-wobble { 50% { transform: rotateY(18deg) scale(1.03); } }
/* конфетти */
.gm-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.gm-confetti i { position: absolute; top: -10px; width: 8px; height: 12px; border-radius: 2px; animation: gm-fall 1.8s cubic-bezier(.2, .6, .4, 1) forwards; }
@keyframes gm-fall { to { transform: translate(var(--dx), 420px) rotate(540deg); opacity: 0; } }
/* пункт меню */
.ia-games-nav .gm-nav-ico { position: relative; display: grid; place-items: center; width: 28px; height: 28px; margin: -3px 0; border-radius: 9px;
  background: linear-gradient(135deg, rgba(245,158,11,.16), rgba(236,72,153,.16)); transition: transform .15s, background .15s; }
.ia-games-nav:hover .gm-nav-ico { background: linear-gradient(135deg, rgba(245,158,11,.3), rgba(236,72,153,.3)); }
.ia-games-nav:active .gm-nav-ico { transform: scale(.88); }
.ia-games-nav .gm-nav-dot { top: -6px; right: -9px; min-width: 16px; height: 16px; font-size: 10px; }
@media (max-width: 860px) {
  .shell.games-open > .sidebar { display: none !important; }
  .shell.games-open .rail { display: flex !important; }
  .shell.games-open { grid-template-rows: minmax(0, 1fr) auto; }
  .gm-body { padding: 12px 12px 20px; }
  .gm-bal { display: none; }
  .gm-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .gm-card { flex-direction: column; text-align: center; gap: 6px; padding: 10px 6px; border-radius: 14px; }
  .gm-c-emo { width: 40px; height: 40px; font-size: 22px; }
  .gm-c-m b { font-size: 13px; } .gm-c-m small { font-size: 10.5px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .gm-dot { top: 4px; right: 4px; }
  .gm-game { grid-template-columns: 1fr; gap: 14px; }
  .gm-pair { gap: 12px; max-width: 360px; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) { .gm-in, .gm-flip, .gm-stage, .gm-result { transition: none; animation: none !important; } }
/* ИГРЫ+: задания дня и лидеры */
.gm-panel { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 18px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); }
.gm-q-head { display: flex; flex-direction: column; gap: 2px; } .gm-q-head b { font-size: 17px; } .gm-q-head small { color: var(--muted, #8a9690); font-size: 12.5px; }
.gm-q-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gm-q { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.04); }
.gm-q.done:not(.claimed) { background: linear-gradient(135deg, rgba(34,197,94,.16), rgba(14,165,233,.12)); box-shadow: inset 0 0 0 1px rgba(34,197,94,.35); }
.gm-q.claimed { opacity: .65; } .gm-q.all { border: 1px dashed rgba(245,158,11,.5); }
.gm-q-ico { font-size: 26px; width: 34px; text-align: center; }
.gm-q-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; } .gm-q-m b { font-size: 14px; } .gm-q-m small { font-size: 12px; color: var(--muted, #8a9690); }
.gm-q-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.gm-q-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #22c55e, #0ea5e9); transition: width .5s; }
.gm-q-ok { color: #22c55e; font-weight: 700; font-size: 13px; } .gm-q-wait { color: var(--muted, #8a9690); font-size: 12.5px; }
.gm-q-claim { animation: gm-pulse 1.6s infinite; }
@keyframes gm-pulse { 50% { box-shadow: 0 0 0 6px rgba(34,197,94,.18); } }
.gm-top-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.05); align-self: flex-start; }
.gm-top-tabs button { height: 32px; padding: 0 16px; border: 0; border-radius: 9px; background: none; color: var(--muted, #aeb9b3); font: inherit; font-weight: 700; cursor: pointer; }
.gm-top-tabs button.on { background: rgba(255,255,255,.1); color: var(--text, #e9efec); }
.gm-top-list { display: flex; flex-direction: column; gap: 6px; }
.gm-top-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.03); }
.gm-top-row.me { box-shadow: inset 0 0 0 1px rgba(14,165,233,.6); }
.gm-top-row.p1 { background: linear-gradient(90deg, rgba(250,204,21,.18), transparent); }
.gm-top-row.p2 { background: linear-gradient(90deg, rgba(203,213,225,.14), transparent); }
.gm-top-row.p3 { background: linear-gradient(90deg, rgba(251,146,60,.15), transparent); }
.gm-top-pl { width: 30px; text-align: center; font-weight: 800; font-size: 18px; }
.gm-top-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; font-weight: 800; color: #fff; background: hsl(var(--h, 210) 55% 42%); flex: none; }
.gm-top-av img { width: 100%; height: 100%; object-fit: cover; }
.gm-top-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.gm-top-s { font-size: 12.5px; color: var(--muted, #aeb9b3); white-space: nowrap; } .gm-top-s b { color: var(--text, #e9efec); }
.gm-top-hide { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted, #aeb9b3); }
