:root {
  --vg-accent: #ffffff;
  --vg-win: #4aff8f;
  --vg-loss: #ff4a5b;
  --vg-radius: 14px;
  --vg-radius-sm: 10px;
}
* { box-sizing: border-box }
html, body {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--matte-bg-base);
  color: var(--matte-text-primary);
  margin: 0;
  min-height: 100vh;
}

.vg-coin-icon {
  display: inline-block;
  width: 1.05em; height: 1.05em;
  vertical-align: -0.18em;
  background-image: url('/sciencework/vg/assets/voidcoin.png');
  background-size: contain; background-position: center; background-repeat: no-repeat;
  flex-shrink: 0;
}
.vg-coin-icon-md { width: 1.25em; height: 1.25em; vertical-align: -0.22em }

.vg-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; max-width: 1240px; margin: 0 auto; gap: 16px;
}
.vg-brand { display: flex; align-items: center; gap: 12px; min-width: 0 }
.vg-brand-title { font-size: 18px; font-weight: 600; line-height: 1.2 }
.vg-brand-sub   { font-size: 12px; color: var(--matte-text-muted); margin-top: 2px }
.vg-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 14px 0 12px; height: 34px;
  border: 1px solid var(--matte-border-default);
  background: var(--matte-bg-card); color: var(--matte-text-primary);
  border-radius: 8px; text-decoration: none;
  font-size: 13px; font-weight: 500; font-family: inherit;
  transition: border-color .15s, background .15s, color .15s;
  flex-shrink: 0;
}
.vg-back-btn:hover  { border-color: var(--matte-border-hover); background: var(--matte-bg-hover) }
.vg-back-btn .arr   { font-size: 16px; line-height: 1; margin-top: -1px }
.vg-header-right { display: flex; gap: 10px; align-items: center }
.vg-user-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--matte-bg-card); border: 1px solid var(--matte-border-default);
  border-radius: 8px; padding: 7px 12px;
  height: 34px;
}
.vg-user-pill .uname { font-size: 13.5px; font-weight: 500 }
.vg-user-pill .coins {
  font-size: 13px; color: var(--matte-text-secondary); margin-left: 6px;
  display: inline-flex; align-items: center; gap: 4px;
  transition: color .15s;
}
.vg-user-pill.is-empty {
  border-color: rgba(255, 74, 91, 0.55);
  background: rgba(255, 74, 91, 0.06);
}
.vg-user-pill.is-empty .coins { color: #ff6b7a; font-weight: 600 }
.vg-user-pill.is-empty .uname { color: var(--matte-text-primary) }
.vg-signout {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--matte-border-default);
  color: var(--matte-text-secondary); border-radius: 8px;
  padding: 0 12px 0 10px; height: 34px;
  font-size: 12.5px; font-weight: 500; font-family: inherit; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.vg-signout svg { width: 14px; height: 14px; flex-shrink: 0 }
.vg-signout:hover { border-color: var(--matte-border-hover); color: var(--matte-text-primary); background: var(--matte-bg-hover) }
.vg-settings-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--matte-border-default);
  color: var(--matte-text-secondary); border-radius: 8px;
  width: 34px; height: 34px; padding: 0;
  font-family: inherit; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  line-height: 1;
}
.vg-settings-btn svg { width: 15px; height: 15px }
.vg-settings-btn:hover { border-color: var(--matte-border-hover); color: var(--matte-text-primary); background: var(--matte-bg-hover) }
.vg-settings-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: vg-fade .2s ease-out;
}
.vg-settings-card {
  width: min(440px, 100%);
  background: var(--matte-bg-elevated);
  border: 1px solid var(--matte-border-default);
  border-radius: 12px;
  padding: 26px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.55);
  animation: vg-pop .22s ease-out;
}
.vg-settings-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px }
.vg-settings-head h2 { font-size: 18px; font-weight: 700; margin: 0 }
.vg-settings-close {
  background: transparent; border: 0; color: var(--matte-text-secondary);
  font-size: 24px; line-height: 1; cursor: pointer; padding: 4px 8px;
  border-radius: 6px;
}
.vg-settings-close:hover { color: var(--matte-text-primary); background: var(--matte-bg-hover) }

.vg-auth-wrap {
  display: flex; justify-content: center; align-items: center;
  min-height: calc(100vh - 100px); padding: 40px 20px;
}
.vg-auth-card {
  width: min(440px, 100%);
  background: var(--matte-bg-elevated);
  border: 1px solid var(--matte-border-default);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--matte-shadow-lg);
  animation: vg-pop .25s ease-out;
}
.vg-auth-title { margin: 0 0 6px; font-size: 24px; font-weight: 600; letter-spacing: -0.01em }
.vg-auth-sub   { margin: 0 0 22px; color: var(--matte-text-secondary); font-size: 14px; line-height: 1.55 }
.vg-auth-tabs  { display: flex; gap: 4px; background: var(--matte-bg-elevated); border-radius: 10px; padding: 4px; margin-bottom: 18px }
.vg-tab {
  flex: 1 1 0; background: transparent; border: 0; color: var(--matte-text-secondary);
  border-radius: 8px; padding: 9px 0; font-size: 13.5px; font-weight: 500; font-family: inherit;
  cursor: pointer; transition: background .15s, color .15s;
}
.vg-tab.active { background: var(--matte-bg-hover); color: var(--matte-text-primary) }
.vg-form       { display: flex; flex-direction: column; gap: 14px }
.vg-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--matte-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em }
.vg-form input {
  width: 100%; padding: 11px 13px; border-radius: 8px;
  border: 1px solid var(--matte-border-default); background: var(--matte-bg-card);
  color: var(--matte-text-primary); font-size: 14px; font-family: inherit;
  text-transform: none; letter-spacing: normal; font-weight: 400;
  transition: border-color .15s, background .15s;
}
.vg-form input:focus  { outline: none; border-color: var(--matte-border-hover); background: var(--matte-bg-hover) }
.vg-btn {
  padding: 12px 18px; border: 1px solid transparent; border-radius: 8px;
  font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.vg-btn-primary { color: #000; background: var(--vg-accent); border-color: var(--vg-accent) }
.vg-btn-primary:hover { background: #f5f5f5; border-color: #f5f5f5 }
.vg-btn:disabled { opacity: 0.5; cursor: not-allowed }
.vg-form-error { font-size: 12.5px; color: var(--vg-loss); min-height: 16px }
.vg-form-hint  { font-size: 12px; color: var(--matte-text-muted); margin-top: 4px }

.vg-main {
  max-width: 1240px; margin: 0 auto; padding: 0 24px 60px;
  animation: vg-fade .4s ease-out;
}
.vg-balance-row { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 16px; margin-bottom: 28px }
.vg-balance-card {
  background: var(--matte-bg-card); border: 1px solid var(--matte-border-default);
  border-radius: 12px; padding: 18px 22px;
  display: flex; flex-direction: column; justify-content: center;
  min-width: 0;
  transition: border-color .2s, background .2s;
}
.vg-balance-card.is-empty {
  border-color: rgba(255, 74, 91, 0.45);
  background: linear-gradient(180deg, rgba(255, 74, 91, 0.05), var(--matte-bg-card));
}
.vg-balance-card.is-empty .vg-balance-value { color: #ff6b7a }
.vg-balance-card.is-empty .vg-balance-label { color: #ff6b7a }
.vg-balance-hint {
  margin-top: 10px;
  font-size: 12px; line-height: 1.4;
  color: #ff8b94;
  background: rgba(255, 74, 91, 0.06);
  border: 1px solid rgba(255, 74, 91, 0.22);
  border-radius: 8px;
  padding: 8px 10px;
}
.vg-balance-label { font-size: 11px; font-weight: 600; color: var(--matte-text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px }
.vg-balance-value {
  font-weight: 700; letter-spacing: -0.02em; line-height: 1;
  display: flex; align-items: center; gap: 0.18em;
  white-space: nowrap; overflow: hidden;
  min-width: 0;
  font-size: 32px;
}
.vg-balance-value .num {
  font-variant-numeric: tabular-nums;
  min-width: 0; overflow: hidden; text-overflow: clip;
}
.vg-coin-suffix   { font-size: 14px; color: var(--matte-text-secondary); font-weight: 500; margin-left: 2px }
.vg-balance-topup {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start; margin-top: 12px;
  padding: 7px 12px 7px 10px; border-radius: 8px;
  border: 1px solid rgba(255, 199, 90, 0.40);
  background: transparent;
  color: #ffd06a; font-family: inherit; font-size: 12.5px; font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.vg-balance-topup svg { width: 14px; height: 14px; flex-shrink: 0 }
.vg-balance-topup:hover {
  color: #ffe9a8; border-color: rgba(255, 210, 110, 0.85);
  background: rgba(255, 199, 90, 0.06);
}
.vg-balance-btns { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; margin-top: 12px; }
.vg-balance-btns .vg-balance-topup { margin-top: 0; }
.vg-balance-free { border-color: rgba(91, 206, 3, 0.45); color: #8aff2f; }
.vg-balance-free:hover { color: #b6ff8a; border-color: rgba(138, 255, 47, 0.85); background: rgba(138, 255, 47, 0.07); }
.vg-balance-free.disabled { opacity: .5; pointer-events: none; }
.vg-balance-recent { gap: 6px }
.vg-recent-list { display: flex; flex-direction: column; gap: 4px; max-height: 110px; overflow: auto }
.vg-recent-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 13px; color: var(--matte-text-secondary) }
.vg-recent-row .game { color: var(--matte-text-primary) }
.vg-recent-row .delta { font-weight: 600 }
.vg-recent-row .delta.win  { color: var(--vg-win) }
.vg-recent-row .delta.topup { color: #ffd06a }
.vg-recent-row .delta.loss { color: var(--vg-loss) }
.vg-recent-row .ts { font-size: 11.5px; color: var(--matte-text-muted) }

.vg-section { margin-bottom: 28px }
.vg-section-title { font-size: 16px; font-weight: 600; margin: 0 0 14px; letter-spacing: -0.01em }

.vg-games-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.vg-game-card {
  background: var(--matte-bg-card); border: 1px solid var(--matte-border-default);
  border-radius: 12px; padding: 18px; text-decoration: none;
  color: var(--matte-text-primary); display: flex; flex-direction: column; gap: 12px;
  transition: transform .15s, border-color .15s, background .15s;
}
.vg-game-card:hover { border-color: var(--matte-border-hover); background: var(--matte-bg-hover) }
.vg-game-card.vg-game-soon { opacity: 0.55; cursor: not-allowed; pointer-events: none }
.vg-game-art {
  height: 96px; border-radius: 8px;
  background: var(--matte-bg-elevated);
  border: 1px solid var(--matte-border-subtle);
  display: flex; align-items: center; justify-content: center;
  color: var(--matte-text-secondary); font-size: 42px; font-weight: 300;
}
.vg-icon-lg  { width: 42px; height: 42px; stroke-width: 1.5 }
.vg-icon     { width: 1em; height: 1em; vertical-align: -0.15em; flex-shrink: 0 }
.vg-tile-svg { width: 22px; height: 22px }

.vg-shop-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 14px; height: 34px; border-radius: 8px;
  background: rgba(255,212,74,0.06);
  border: 1px solid rgba(255,212,74,0.35);
  color: #ffd44a; text-decoration: none;
  font-size: 13px; font-weight: 500; font-family: inherit;
  transition: background .15s, border-color .15s, color .15s;
  margin-right: 10px;
}
.vg-shop-cta:hover { background: rgba(255,212,74,0.14); border-color: rgba(255,212,74,0.65); color: #ffe28a }
.vg-finance-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 14px; height: 34px; border-radius: 8px;
  background: rgba(124,92,255,0.08);
  border: 1px solid rgba(124,92,255,0.4);
  color: #b9a7ff; text-decoration: none;
  font-size: 13px; font-weight: 600; font-family: inherit;
  transition: background .15s, border-color .15s, color .15s;
  margin-right: 10px;
}
.vg-finance-cta:hover { background: rgba(124,92,255,0.16); border-color: rgba(124,92,255,0.7); color: #d3c6ff }
.vg-finance-banner {
  display: flex; align-items: center; gap: 18px;
  margin: 4px 0 26px; padding: 18px 22px; border-radius: 16px;
  text-decoration: none; color: inherit;
  background: linear-gradient(110deg, rgba(124,92,255,0.16), rgba(124,92,255,0.04) 60%, rgba(22,199,132,0.06));
  border: 1px solid rgba(124,92,255,0.32);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.vg-finance-banner:hover { border-color: rgba(124,92,255,0.6); transform: translateY(-2px); box-shadow: 0 12px 34px -16px rgba(124,92,255,0.5) }
.vg-finance-banner-icon { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: rgba(124,92,255,0.16); border: 1px solid rgba(124,92,255,0.3); color: #c2b2ff }
.vg-finance-banner-icon svg { width: 26px; height: 26px }
.vg-finance-banner-text { flex: 1; min-width: 0 }
.vg-finance-banner-title { font-size: 17px; font-weight: 700; color: #efeaff; letter-spacing: -.01em }
.vg-finance-banner-sub { font-size: 13px; color: #9a9ab0; margin-top: 3px; line-height: 1.45 }
.vg-finance-banner-go { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; height: 38px; border-radius: 10px; background: rgba(124,92,255,0.9); color: #fff; font-weight: 600; font-size: 14px }
.vg-finance-banner-go svg { width: 17px; height: 17px }
@media (max-width: 620px) { .vg-finance-banner { flex-wrap: wrap; gap: 12px } .vg-finance-banner-go { width: 100% ; justify-content: center } }

.vg-game-card { position: relative }
.vg-perk-pip {
  position: absolute; top: 10px; right: 10px;
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,212,74,0.15);
  border: 1px solid rgba(255,212,74,0.5);
  color: #ffd44a;
  padding: 4px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  box-shadow: 0 0 12px rgba(255,212,74,0.15);
}
.vg-perk-pip.is-2x { background: rgba(74,255,143,0.15); border-color: rgba(74,255,143,0.5); color: var(--vg-win) }

.vg-row-avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative }
.vg-row-avatar img { width: 22px; height: 22px; display: block; image-rendering: -webkit-optimize-contrast }

.vg-row-avatar::before { content: none }
.vg-row-avatar.r2, .vg-row-avatar.r3, .vg-row-avatar.r4,
.vg-row-avatar.r5, .vg-row-avatar.r6 { isolation: isolate }
.vg-row-avatar.r2::before,
.vg-row-avatar.r3::before,
.vg-row-avatar.r4::before,
.vg-row-avatar.r5::before,
.vg-row-avatar.r6::before {
  content: ''; position: absolute; inset: -2px; border-radius: 50%; z-index: -1;
}
.vg-row-avatar.r2, .vg-row-avatar.r3, .vg-row-avatar.r4,
.vg-row-avatar.r5, .vg-row-avatar.r6, .vg-row-avatar.r7 { isolation: isolate }
.vg-row-avatar.r2::before,
.vg-row-avatar.r3::before,
.vg-row-avatar.r4::before,
.vg-row-avatar.r5::before,
.vg-row-avatar.r6::before,
.vg-row-avatar.r7::before {
  content: ''; position: absolute; inset: -2px; border-radius: 50%; z-index: -1;
}
.vg-row-avatar.r2::before { background: radial-gradient(circle at 50% 50%, rgba(74,255,143,0.45), transparent 60%) }
.vg-row-avatar.r3::before { background: radial-gradient(circle at 50% 50%, rgba(74,174,255,0.50), transparent 60%) }
.vg-row-avatar.r4::before { background: radial-gradient(circle at 50% 50%, rgba(180,120,255,0.55), transparent 60%) }
.vg-row-avatar.r5::before { background: radial-gradient(circle at 50% 50%, rgba(255,212,74,0.60), transparent 60%) }
.vg-row-avatar.r6::before { background: radial-gradient(circle at 50% 50%, rgba(255,90,90,0.65),  transparent 60%) }

.vg-row-avatar.r7 {
  animation: vg-insane-pulse 1.4s ease-in-out infinite;
}
.vg-row-avatar.r7::before {
  background: radial-gradient(circle at 50% 50%, rgba(255, 30, 30, 0.95), rgba(255, 60, 60, 0.55) 35%, transparent 70%);
  inset: -5px;
  animation: vg-insane-halo 1.4s ease-in-out infinite;
}
@keyframes vg-insane-pulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(255,40,40,0.7)) drop-shadow(0 0 12px rgba(255,40,40,0.45)) }
  50%      { filter: drop-shadow(0 0 8px rgba(255,80,80,1.0)) drop-shadow(0 0 22px rgba(255,40,40,0.75)) }
}
@keyframes vg-insane-halo {
  0%, 100% { opacity: 0.75 }
  50%      { opacity: 1.0  }
}

.vg-row-badge { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-left: 6px; vertical-align: 1px; flex-shrink: 0 }
.vg-row-badge.badge-dot--4aaeff      { background: #4aaeff; box-shadow: 0 0 8px rgba(74,174,255,0.6) }
.vg-row-badge.badge-dot--ff5d6e      { background: #ff5d6e; box-shadow: 0 0 8px rgba(255,93,110,0.6) }
.vg-row-badge.badge-dot--4aff8f      { background: #4aff8f; box-shadow: 0 0 8px rgba(74,255,143,0.6) }
.vg-row-badge.badge-star--ffd44a     { background: #ffd44a; clip-path: polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%); width: 12px; height: 12px; border-radius: 0; box-shadow: 0 0 6px rgba(255,212,74,0.7) }
.vg-row-badge.badge-lucky            { background: var(--vg-win); width: 11px; height: 11px; border-radius: 4px; transform: rotate(45deg); box-shadow: 0 0 8px rgba(74,255,143,0.7) }
.vg-row-badge.badge-gambler          { background: #ffd44a; width: 12px; height: 12px; border-radius: 3px; box-shadow: 0 0 6px rgba(255,212,74,0.7); position: relative }
.vg-row-badge.badge-gambler::after   { content: '?'; position: absolute; top: -2px; left: 2px; font-size: 9px; color: #050505; font-weight: 800; line-height: 1 }
.vg-row-badge.badge-whale            { background: linear-gradient(135deg, #ffe14a, #ff8e2e); width: 12px; height: 9px; border-radius: 2px 2px 0 0; box-shadow: 0 0 8px rgba(255,212,74,0.6); position: relative }
.vg-row-badge.badge-whale::after     { content: ''; position: absolute; top: -3px; left: 1px; width: 10px; height: 4px; background: linear-gradient(90deg, #ffe14a, #ff8e2e); clip-path: polygon(0% 100%, 25% 0%, 50% 100%, 75% 0%, 100% 100%) }
.vg-row-badge.badge-void_glow        { background: #0a0a0a; box-shadow: 0 0 12px rgba(160,140,255,0.9), 0 0 24px rgba(60,40,150,0.6); border: 1px solid rgba(160,140,255,0.6); animation: vg-void-pulse 2.4s ease-in-out infinite; width: 12px; height: 12px }
@keyframes vg-void-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(160,140,255,0.9), 0 0 24px rgba(60,40,150,0.6) }
  50%      { box-shadow: 0 0 18px rgba(200,180,255,1),   0 0 36px rgba(100,80,200,0.9) }
}

@keyframes vg-shine {
  0%   { background-position: -200% 0 }
  100% { background-position:  200% 0 }
}
.vg-art-coinflip  { background: radial-gradient(circle at 30% 30%, #2a2a2a, #050505) }
.vg-art-mines     { background: linear-gradient(135deg, #1a0a0a, #050505) }
.vg-art-plinko    { background: linear-gradient(135deg, #0a1a14, #050505) }
.vg-art-blackjack { background: linear-gradient(135deg, #100a18, #050505) }
.vg-art-roulette  { background: linear-gradient(135deg, #181008, #050505) }
.vg-art-crash     { background: linear-gradient(135deg, #1a0a14, #050505) }
.vg-art-memory {
  background:
    radial-gradient(circle at 30% 30%, rgba(74, 174, 255, 0.10), transparent 45%),
    radial-gradient(circle at 70% 30%, rgba(255,  93, 110, 0.10), transparent 45%),
    radial-gradient(circle at 30% 70%, rgba(255, 212,  74, 0.09), transparent 45%),
    radial-gradient(circle at 70% 70%, rgba(74,  255, 143, 0.10), transparent 45%),
    linear-gradient(135deg, #0c1018, #050505);
}
.vg-art-tower {
  background:
    linear-gradient(180deg, rgba(255, 212, 74, 0.12), transparent 55%),
    linear-gradient(0deg, rgba(255, 74, 91, 0.10), transparent 45%),
    linear-gradient(135deg, #14100a, #050505);
}
.vg-art-dice {
  background:
    radial-gradient(circle at 70% 30%, rgba(255, 212, 74, 0.12), transparent 50%),
    radial-gradient(circle at 30% 70%, rgba(74, 174, 255, 0.10), transparent 50%),
    linear-gradient(135deg, #0e1018, #050505);
}
.vg-art-uncrossable {
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 196, 74, 0.12), transparent 55%),
    radial-gradient(circle at 50% 90%, rgba(124, 92, 255, 0.10), transparent 55%),
    linear-gradient(135deg, #14140e, #050505);
}
.vg-art-slide {
  background:
    radial-gradient(circle at 30% 40%, rgba(120, 65, 238, 0.16), transparent 55%),
    radial-gradient(circle at 75% 65%, rgba(255, 184, 0, 0.10), transparent 55%),
    linear-gradient(135deg, #0c0c20, #050505);
}
.vg-game-name { font-size: 15px; font-weight: 600 }
.vg-game-desc { font-size: 13px; color: var(--matte-text-secondary); line-height: 1.45 }

.vg-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px }
@media (max-width: 760px) { .vg-two-col { grid-template-columns: 1fr } .vg-balance-row { grid-template-columns: 1fr } }
.vg-feed, .vg-leaderboard {
  background: var(--matte-bg-card); border: 1px solid var(--matte-border-default);
  border-radius: var(--vg-radius); padding: 12px 4px; max-height: 460px; overflow-y: auto;
}
.vg-feed-row, .vg-lb-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 16px; font-size: 13px;
}

.vg-feed-row,
.vg-lb-row,
.vg-feed-row .name,
.vg-feed-row .game,
.vg-feed-row .delta,
.vg-feed-row .rank,
.vg-feed-row .coins,
.vg-lb-row .name,
.vg-lb-row .game,
.vg-lb-row .rank,
.vg-lb-row .coins {
  text-shadow:
    -1px -1px 0 rgba(0,0,0,0.85),
     1px -1px 0 rgba(0,0,0,0.85),
    -1px  1px 0 rgba(0,0,0,0.85),
     1px  1px 0 rgba(0,0,0,0.85),
     0    0   4px rgba(0,0,0,0.75);
}
.vg-feed-row .vg-coin-icon,
.vg-lb-row   .vg-coin-icon,
.vg-feed-row .vg-row-badge,
.vg-lb-row   .vg-row-badge,
.vg-feed-row .vg-row-avatar,
.vg-lb-row   .vg-row-avatar {
  filter: drop-shadow(0 0 1px rgba(0,0,0,0.95))
          drop-shadow(0 0 2px rgba(0,0,0,0.7));
}
.vg-feed-row:not(:last-child), .vg-lb-row:not(:last-child) { border-bottom: 1px solid rgba(0,0,0,0.35) }
.vg-feed-row .name { flex: 1 1 auto; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.vg-feed-row .game { color: var(--matte-text-muted); font-size: 12px }
.vg-feed-row .delta { font-weight: 600; min-width: 70px; text-align: right }
.vg-feed-row .delta.win  { color: var(--vg-win) }
.vg-feed-row .delta.loss { color: var(--vg-loss) }
.vg-lb-row .rank { width: 26px; color: var(--matte-text-muted); font-variant-numeric: tabular-nums }
.vg-lb-row .name { flex: 1 1 auto; font-weight: 500 }
.vg-lb-row .coins { font-weight: 600; color: var(--matte-text-primary); font-variant-numeric: tabular-nums }
.vg-wheel-card {
  display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: center;
  background: var(--matte-bg-card); border: 1px solid var(--matte-border-default);
  border-radius: var(--vg-radius); padding: 22px;
}
@media (max-width: 720px) {
  .vg-wheel-card { grid-template-columns: 1fr; gap: 20px; text-align: center }
  .vg-wheel-stage { margin: 0 auto }
  .vg-wheel-info { align-items: center }
  .vg-wheel-info .vg-btn { align-self: center }
  .vg-wheel-tier-label { text-align: center }
}
.vg-wheel-stage { position: relative; width: 220px; height: 230px }
.vg-wheel {
  width: 220px; height: 220px;
  transform: rotate(0deg);
  transition: transform 4.2s cubic-bezier(0.17, 0.67, 0.05, 1);
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.4));
}
.vg-wheel-pointer {
  position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 22px solid var(--vg-accent);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
  pointer-events: none;
}
.vg-wheel-info {
  display: grid; grid-template-rows: auto auto auto auto auto; gap: 10px;
  align-content: center;
}
.vg-wheel-sub {
  font-size: 14px; color: var(--matte-text-secondary); line-height: 1.45;
}
.vg-wheel-info .vg-btn { justify-self: start; min-width: 180px; padding: 11px 18px }
.vg-wheel-result { font-size: 16px; font-weight: 600; min-height: 22px }
.vg-wheel-result.win { color: var(--vg-win) }
.vg-wheel-result.big { color: #ffd44a }
.vg-wheel-text { font-family: 'Poppins', sans-serif; font-weight: 700; fill: #fff; pointer-events: none }
.vg-wheel-tier-label {
  font-size: 11px; font-weight: 600; color: var(--matte-text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px;
}
.vg-wheel-tiers {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.vg-wheel-tier {
  background: var(--matte-bg-elevated); border: 1px solid var(--matte-border-default);
  border-radius: 9px; padding: 8px 4px; text-align: center; line-height: 1.2;
}
.vg-wheel-tier .amt {
  display: block; font-size: 14px; font-weight: 700;
  color: var(--matte-text-primary); font-variant-numeric: tabular-nums;
}
.vg-wheel-tier .pct {
  display: block; font-size: 10px; color: var(--matte-text-muted); margin-top: 3px;
}
.vg-wheel-tier.gold {
  border-color: rgba(255, 212, 74, 0.4);
  background: linear-gradient(135deg, rgba(255, 212, 74, 0.10), rgba(0, 0, 0, 0.2));
}
.vg-wheel-tier.gold .amt { color: #ffd44a }

.vg-vip {
  color: var(--vg-win) !important;
  font-family: 'Playwrite GB S', 'Playwrite England SemiJoined', cursive !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
  display: inline-flex; align-items: center; gap: 8px;
}
.vg-owner-tag {
  display: inline-block;
  font-family: 'Poppins', system-ui, sans-serif !important;
  font-weight: 700;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(74, 255, 143, 0.14);
  color: var(--vg-win);
  border: 1px solid rgba(74, 255, 143, 0.35);
  line-height: 1.25;
  vertical-align: middle;
  white-space: nowrap;
  flex-shrink: 0;
}
.vg-empty { color: var(--matte-text-muted); padding: 16px; text-align: center; font-size: 13px }

.vg-cf-wrap { max-width: 720px; margin: 0 auto; padding: 0 24px 60px }
.vg-cf-coin {
  width: 180px; height: 180px; margin: 30px auto;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,0.5));
  position: relative;
  transform-style: preserve-3d;
}
.vg-cf-coin-face {
  position: absolute; inset: 0;
  border-radius: 50%;
  background-image: url('/sciencework/vg/assets/voidcoin.png');
  background-size: contain; background-position: center; background-repeat: no-repeat;
  backface-visibility: hidden;
}
.vg-cf-coin-back {
  transform: rotateY(180deg);
  filter: invert(1) hue-rotate(180deg);
}
.vg-cf-coin.flipping  { animation: vg-flip 1.1s cubic-bezier(0.4, 0, 0.2, 1); }
.vg-cf-coin.flipping-tails { animation: vg-flip-tails 1.1s cubic-bezier(0.4, 0, 0.2, 1); }
.vg-cf-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px }
.vg-cf-row .vg-btn { flex: 0 0 auto; min-width: 110px }
.vg-btn-pick {
  background: var(--matte-bg-card); border: 1px solid var(--matte-border-default);
  color: var(--matte-text-primary);
}
.vg-btn-pick:hover { border-color: var(--matte-border-hover); background: var(--matte-bg-hover) }
.vg-btn-pick.active { border-color: rgba(255,255,255,0.4); background: var(--matte-bg-hover) }
.vg-cf-bet-row { display: flex; gap: 10px; justify-content: center; align-items: center; margin: 16px 0 }
.vg-cf-bet-row input {
  width: 140px; padding: 12px 14px; border-radius: var(--vg-radius-sm);
  border: 1px solid var(--matte-border-default); background: var(--matte-bg-elevated);
  color: var(--matte-text-primary); font-size: 16px; font-weight: 600; text-align: center;
  font-family: inherit; font-variant-numeric: tabular-nums;
}
.vg-cf-result { text-align: center; min-height: 56px; padding: 16px 0 }
.vg-cf-result-win   { color: var(--vg-win);  font-size: 18px; font-weight: 600 }
.vg-cf-result-loss  { color: var(--vg-loss); font-size: 18px; font-weight: 600 }

@keyframes vg-pop  { from { opacity: 0; transform: translateY(8px) scale(.98) } to { opacity: 1; transform: none } }
@keyframes vg-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes vg-flip { 0% { transform: rotateY(0)   } 100% { transform: rotateY(1800deg)  } }
@keyframes vg-flip-tails { 0% { transform: rotateY(0) } 100% { transform: rotateY(1980deg) } }
@keyframes vg-coin-pop { 0% { transform: scale(.7); opacity: 0 } 100% { transform: none; opacity: 1 } }

.vg-pill-topup {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; margin-left: 4px; padding: 0;
  border: 1px solid rgba(255, 199, 90, 0.40);
  background: rgba(255, 199, 90, 0.06);
  color: #ffd06a; border-radius: 6px;
  line-height: 1; font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.vg-pill-topup svg { width: 12px; height: 12px }
.vg-pill-topup:hover { border-color: rgba(255, 199, 90, 0.75); background: rgba(255, 199, 90, 0.14); color: #ffe9a8 }
.vg-pill-topup:hover {
  color: #ffe9a8; border-color: rgba(255, 210, 110, 0.95);
  background: linear-gradient(180deg, rgba(255, 215, 120, 0.32), rgba(255, 170, 60, 0.18));
  box-shadow: 0 0 14px rgba(255, 200, 80, 0.36);
}
.vg-pill-topup:active { transform: scale(0.94) }

.vg-feed-row.is-topup { background: linear-gradient(90deg, rgba(255, 200, 80, 0.10), rgba(255, 200, 80, 0) 60%) }
.vg-feed-row.is-topup .delta.topup { color: #ffd06a; font-weight: 600 }
.vg-feed-row.is-topup .game { color: #ffd06a }

.vg-modal {
  position: fixed; inset: 0; z-index: 1500;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: vg-fade .18s ease-out;
}
.vg-modal-backdrop {
  position: absolute; inset: 0; background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.vg-modal-card {
  position: relative; z-index: 1;
  width: min(540px, 100%); max-height: calc(100vh - 48px);
  background: var(--matte-bg-elevated);
  border: 1px solid var(--matte-border-default);
  border-radius: 12px;
  padding: 24px 26px 20px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
  overflow-y: auto;
  animation: vg-pop .22s ease-out;
}
.vg-modal-close {
  position: absolute; top: 12px; right: 14px;
  background: transparent; border: none; color: var(--matte-text-muted);
  line-height: 1; cursor: pointer;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; font-family: inherit;
  transition: color .15s, background .15s;
}
.vg-modal-close svg { width: 16px; height: 16px }
.vg-modal-close:hover { color: var(--matte-text-primary); background: var(--matte-bg-hover) }

.vg-coins-card { width: min(540px, 100%) }
.vg-coins-head { text-align: center; margin: 4px 0 16px }
.vg-coins-secured {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 18px;
  padding: 10px 14px;
  background: var(--matte-bg-card);
  border: 1px solid var(--matte-border-subtle);
  border-radius: 8px;
  font-size: 11.5px; line-height: 1.45;
  color: var(--matte-text-secondary);
}
.vg-coins-secured svg { width: 16px; height: 16px; color: #4aff8f; flex-shrink: 0 }
.vg-coins-secured strong { color: var(--matte-text-primary); font-weight: 600 }
.vg-coins-title-row {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
}
.vg-coins-title-icon {
  width: 22px; height: 22px; color: #ffd06a; flex-shrink: 0;
}
.vg-coins-title {
  font-size: 20px; font-weight: 600; color: var(--matte-text-primary);
  letter-spacing: -0.01em;
}
.vg-coins-sub { font-size: 13px; color: var(--matte-text-secondary); margin-top: 6px }
.vg-coins-body { display: flex; flex-direction: column; gap: 16px }

.vg-coins-section {
  background: var(--matte-bg-card);
  border: 1px solid var(--matte-border-subtle);
  border-radius: 10px;
  padding: 16px 18px;
}
.vg-coins-section-h {
  display: flex; align-items: center; gap: 7px;
  font-size: 10.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--matte-text-muted); margin-bottom: 12px;
}
.vg-coins-section-h svg { width: 13px; height: 13px; flex-shrink: 0; opacity: 0.8 }
.vg-coins-packs-wrap { border-color: rgba(255, 200, 80, 0.25) }
.vg-coins-packs-wrap .vg-coins-section-h { color: #ffd06a }
.vg-coins-packs { display: flex; flex-direction: column; gap: 10px }
.vg-coins-pack {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px;
  align-items: center;
  background: var(--matte-bg-base);
  border: 1px solid var(--matte-border-default);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--matte-text-primary); font-family: inherit; cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s;
}
.vg-coins-pack:hover {
  border-color: rgba(255, 200, 80, 0.40);
  background: var(--matte-bg-hover);
}
.vg-coins-pack-label { font-size: 14.5px; font-weight: 600 }
.vg-coins-pack-coins { font-size: 14px; color: #ffd06a; font-weight: 600; justify-self: end }
.vg-coins-pack-price {
  grid-column: 2; font-size: 13px; font-weight: 600; color: var(--matte-text-secondary);
  justify-self: end;
}
.vg-coins-pack-desc {
  grid-column: 1 / -1; font-size: 11.5px; color: var(--matte-text-muted);
  margin-top: 3px; line-height: 1.45;
}

.vg-coins-or {
  text-align: center; font-size: 10.5px; color: var(--matte-text-muted);
  text-transform: uppercase; letter-spacing: 1.4px;
  display: flex; align-items: center; gap: 12px;
  margin: 2px 0;
}
.vg-coins-or::before, .vg-coins-or::after {
  content: ''; flex: 1; height: 1px; background: var(--matte-border-subtle);
}

.vg-coins-amount-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px }
.vg-coins-amount { font-size: 24px; font-weight: 700; color: var(--matte-text-primary); letter-spacing: -0.01em }
.vg-coins-price  { font-size: 17px; font-weight: 600; color: #ffd06a; font-variant-numeric: tabular-nums }
.vg-coins-custom input[type=range] {
  width: 100%; appearance: none; -webkit-appearance: none;
  height: 4px; border-radius: 2px; outline: none;
  background: rgba(255, 255, 255, 0.08);
  margin: 8px 0 4px;
}
.vg-coins-custom input[type=range]::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 14px; height: 14px; border-radius: 3px;
  background: #ffd06a;
  border: none;
  cursor: pointer;
}
.vg-coins-custom input[type=range]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 3px;
  background: #ffd06a;
  border: none;
  cursor: pointer;
}
.vg-coins-range-labels {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--matte-text-muted); margin-top: 6px;
}
.vg-coins-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 14px;
  padding: 12px 16px;
  background: #ffd06a;
  color: #1a1206;
  border: 1px solid #ffd06a;
  border-radius: 8px;
  font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.vg-coins-cta svg { width: 15px; height: 15px; flex-shrink: 0 }
.vg-coins-cta:hover    { background: #ffdc88; border-color: #ffdc88 }
.vg-coins-cta:disabled { background: rgba(255, 208, 106, 0.35); border-color: rgba(255, 208, 106, 0.35); cursor: not-allowed }
.vg-coins-link {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 8px;
  padding: 10px 12px; background: transparent;
  border: 1px solid var(--matte-border-default);
  color: var(--matte-text-secondary);
  border-radius: 8px;
  font-size: 13px; font-family: inherit; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.vg-coins-link svg { width: 13px; height: 13px; flex-shrink: 0 }
.vg-coins-link:hover {
  color: var(--matte-text-primary);
  border-color: var(--matte-border-hover);
  background: var(--matte-bg-hover);
}
.vg-coins-fineprint {
  font-size: 11px; color: var(--matte-text-muted); text-align: center;
  line-height: 1.6; padding: 0 12px;
}

.vg-coins-summary {
  display: flex; justify-content: space-between; align-items: baseline;
  background: var(--matte-bg-card);
  border: 1px solid rgba(255, 200, 80, 0.22);
  border-radius: 8px;
  padding: 14px 18px;
}
.vg-coins-sum-label { font-size: 14.5px; font-weight: 600 }
.vg-coins-sum-price { font-size: 18px; font-weight: 700; color: #ffd06a; font-variant-numeric: tabular-nums; letter-spacing: -0.01em }

.vg-coins-form { display: flex; flex-direction: column; gap: 12px }
.vg-coins-fallback-note {
  font-size: 11.5px; line-height: 1.5; color: var(--matte-text-muted);
  background: var(--matte-bg-card); border: 1px solid var(--matte-border-default);
  border-radius: 8px; padding: 9px 12px; margin: 12px 0;
}
.vg-coins-card.vg-coins-card-wide { width: min(560px, 100%) }
.vg-coins-embed-wrap {
  position: relative;
  width: 100%; height: min(620px, 72vh);
  border: 1px solid var(--matte-border-default);
  border-radius: 10px; overflow: hidden;
  background: var(--matte-bg-card);
}
.vg-coins-embed {
  width: 100%; height: 100%; border: 0; display: block;
}
.vg-coins-embed-loading {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: var(--matte-bg-card);
}
.vg-coins-embed-foot {
  display: flex; flex-direction: column; gap: 4px; align-items: center;
  margin-top: 10px; text-align: center;
  font-size: 11.5px; color: var(--matte-text-muted); line-height: 1.5;
}
.vg-coins-embed-foot a { color: #ffd06a; text-decoration: none }
.vg-coins-embed-foot a:hover { text-decoration: underline }
.vg-stripe-mount {
  min-height: 220px;
  background: var(--matte-bg-card);
  border: 1px solid var(--matte-border-default);
  border-radius: 10px;
  padding: 14px;
  display: flex; flex-direction: column;
}
.vg-stripe-mount .vg-coins-loading { padding: 60px 0 }
.vg-coins-field { display: flex; flex-direction: column; gap: 6px; min-width: 0 }
.vg-coins-field > span {
  font-size: 10.5px; font-weight: 600; color: var(--matte-text-muted);
  text-transform: uppercase; letter-spacing: 0.8px;
}
.vg-coins-field input {
  background: var(--matte-bg-card); border: 1px solid var(--matte-border-default);
  border-radius: 8px; padding: 11px 13px;
  color: var(--matte-text-primary); font-size: 14px; font-family: inherit;
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color .15s, background .15s;
}
.vg-coins-field input:focus { border-color: var(--matte-border-hover); background: var(--matte-bg-hover) }
.vg-coins-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
}
.vg-coins-err {
  font-size: 12.5px; color: var(--vg-loss);
  background: rgba(255, 74, 91, 0.06); border: 1px solid rgba(255, 74, 91, 0.22);
  border-radius: 8px; padding: 10px 14px;
  line-height: 1.4;
}
.vg-coins-loading {
  font-size: 13.5px; color: var(--matte-text-muted); text-align: center;
  padding: 40px 0;
}

.vg-coins-waiting { text-align: center; padding: 24px 0 16px }
.vg-coins-spinner {
  width: 40px; height: 40px; margin: 0 auto 16px;
  border-radius: 50%; border: 3px solid var(--matte-border-default);
  border-top-color: #ffd06a;
  animation: vg-spin 0.9s linear infinite;
}
@keyframes vg-spin { to { transform: rotate(360deg) } }
.vg-coins-waiting-h { font-size: 16px; font-weight: 600; color: var(--matte-text-primary); letter-spacing: -0.01em }
.vg-coins-waiting-sub { font-size: 12.5px; color: var(--matte-text-muted); margin-top: 6px }

.vg-coins-success { text-align: center; padding: 14px 0 6px }
.vg-coins-success-check {
  width: 48px; height: 48px; margin: 0 auto 16px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: rgba(74, 255, 143, 0.12);
  color: #4aff8f;
  border: 1px solid rgba(74, 255, 143, 0.30);
  animation: vg-coin-pop .28s ease-out;
}
.vg-coins-success-check svg { width: 24px; height: 24px }
.vg-coins-success-h { font-size: 16px; font-weight: 600; color: var(--matte-text-primary); letter-spacing: -0.01em }
.vg-coins-success-amt {
  font-size: 32px; font-weight: 700; margin: 10px 0 6px;
  color: #ffd06a; letter-spacing: -0.01em;
}
.vg-coins-success-bal { font-size: 13px; color: var(--matte-text-secondary); margin-bottom: 6px }

.vg-bc-modal .vg-bc-card {
  width: min(440px, 100%);
  text-align: center;
  padding: 28px 26px 22px;
}
.vg-bc-icon {
  width: 52px; height: 52px;
  margin: 4px auto 16px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid;
}
.vg-bc-icon svg { width: 24px; height: 24px }
.vg-bc-title {
  font-size: 18px; font-weight: 600; color: var(--matte-text-primary);
  letter-spacing: -0.01em; margin-bottom: 8px;
}
.vg-bc-message {
  font-size: 13.5px; line-height: 1.6;
  color: var(--matte-text-secondary);
  margin-bottom: 18px;
  text-align: left;
}
.vg-bc-message p { margin: 0 0 10px }
.vg-bc-message p:last-child { margin-bottom: 0 }
.vg-bc-ul { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px }
.vg-bc-ul li {
  padding-left: 18px; position: relative;
  font-size: 13px; color: var(--matte-text-primary);
}
.vg-bc-ul li::before {
  content: ''; position: absolute; left: 4px; top: 8px;
  width: 4px; height: 4px; border-radius: 2px;
  background: currentColor; opacity: 0.5;
}
.vg-bc-actions {
  display: flex; flex-direction: column; gap: 8px;
}
.vg-bc-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 16px;
  background: #ffd06a; color: #1a1206;
  border: 1px solid #ffd06a; border-radius: 8px;
  font-size: 14px; font-weight: 600;
  text-decoration: none; font-family: inherit;
  transition: background .15s, border-color .15s;
}
.vg-bc-cta:hover { background: #ffdc88; border-color: #ffdc88 }
.vg-bc-cta svg { flex-shrink: 0 }
.vg-bc-dismiss {
  width: 100%; padding: 10px 12px;
  background: transparent; border: 1px solid var(--matte-border-default);
  color: var(--matte-text-secondary); border-radius: 8px;
  font-size: 13px; font-family: inherit; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.vg-bc-dismiss:hover { border-color: var(--matte-border-hover); color: var(--matte-text-primary); background: var(--matte-bg-hover) }

.vg-event-overlay {
  position: fixed; inset: 0; z-index: 9999;
  overflow: hidden;
  user-select: none; -webkit-user-select: none;
  pointer-events: none;
}
.vg-event-blocker {
  position: absolute; inset: 0;
  background: transparent;
  pointer-events: auto;
}
.vg-event-countdown-wrap {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  z-index: 10003;
}
.vg-event-countdown {
  font-size: clamp(96px, 22vw, 220px); font-weight: 800;
  color: #ffd44a; letter-spacing: -0.02em; line-height: 1;
  text-shadow: 0 4px 30px rgba(255, 212, 74, 0.45), 0 0 80px rgba(255, 212, 74, 0.25);
  font-variant-numeric: tabular-nums;
}
.vg-event-pulse { animation: vgEventPulse 0.9s ease-out }
@keyframes vgEventPulse {
  0%   { transform: scale(0.6); opacity: 0 }
  30%  { transform: scale(1.15); opacity: 1 }
  100% { transform: scale(1); opacity: 1 }
}
.vg-event-coins {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 10002;
}
.vg-event-coin {
  position: absolute; top: -80px;
  width: 44px; height: 44px;
  background: transparent; border: none; padding: 0;
  cursor: pointer;
  pointer-events: auto;
  transform: translateY(0) rotate(0deg);
  animation: vgCoinFall var(--vg-fall-duration, 5000ms) linear forwards;
  filter: drop-shadow(0 4px 14px rgba(255,200,80,0.40));
  transition: transform .12s ease;
}
.vg-event-coin.big   { filter: drop-shadow(0 6px 22px rgba(255,200,80,0.55)) }
.vg-event-coin.small { filter: drop-shadow(0 3px 9px rgba(255,200,80,0.35)) }
.vg-event-coin:hover { transform: scale(1.12) }
.vg-event-coin:active { transform: scale(0.92) }
.vg-event-coin-inner {
  display: block; width: 100%; height: 100%;
  background: url('/sciencework/vg/assets/voidcoin.png') center/contain no-repeat;
}
@keyframes vgCoinFall {
  0%   { transform: translateY(0) rotate(0deg) }
  100% { transform: translateY(110vh) rotate(var(--vg-fall-rotation, 360deg)) }
}
.vg-event-coin-popped {
  animation: vgCoinPop .32s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
  pointer-events: none;
}
@keyframes vgCoinPop {
  0%   { transform: scale(1)    rotate(0);    opacity: 1; filter: drop-shadow(0 2px 6px rgba(255,200,80,0.25)) }
  50%  { transform: scale(1.25) rotate(8deg); opacity: 0.9; filter: drop-shadow(0 2px 10px rgba(255,200,80,0.35)) }
  100% { transform: scale(1.55) rotate(18deg); opacity: 0; filter: drop-shadow(0 0 12px rgba(255,200,80,0.30)) }
}
.vg-event-coin-fail {
  animation: vgCoinFail .35s ease-out forwards !important;
}
@keyframes vgCoinFail {
  0%   { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 12px rgba(255,74,91,0.6)) }
  100% { transform: scale(1.2); opacity: 0 }
}
.vg-event-pop {
  position: fixed;
  pointer-events: none; z-index: 10004;
  color: #4aff8f; font-weight: 800; font-size: 32px;
  text-shadow:
    0 0 24px rgba(74, 255, 143, 0.95),
    0 0 10px rgba(74, 255, 143, 0.7),
    0 2px 5px rgba(0, 0, 0, 0.9);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  animation: vgPopFloat 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  font-family: 'Poppins', system-ui, sans-serif;
}
@keyframes vgPopFloat {
  0%   { transform: translate(-50%, -50%) scale(0.4); opacity: 0 }
  15%  { transform: translate(-50%, -60%) scale(1.35); opacity: 1 }
  60%  { transform: translate(-50%, -130%) scale(1.1); opacity: 1 }
  100% { transform: translate(-50%, -260%) scale(1.05); opacity: 0 }
}
.vg-event-burst {
  position: fixed;
  width: 120px; height: 120px;
  margin-left: -60px; margin-top: -60px;
  border-radius: 50%;
  pointer-events: none; z-index: 10003;
  background: radial-gradient(circle, rgba(255, 235, 150, 0.85) 0%, rgba(255, 200, 80, 0.55) 30%, rgba(255, 200, 80, 0.15) 55%, rgba(255, 200, 80, 0) 80%);
  animation: vgBurstRing 0.6s ease-out forwards;
}
@keyframes vgBurstRing {
  0%   { transform: scale(0.25); opacity: 1 }
  50%  { transform: scale(1.2);  opacity: 0.8 }
  100% { transform: scale(2.4);  opacity: 0 }
}
.vg-event-hud {
  position: fixed; top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 10005;
  display: flex; gap: 20px;
  padding: 8px 16px;
  background: rgba(10, 10, 10, 0.78);
  border: 1px solid var(--matte-border-default);
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.vg-event-hud-item { display: flex; flex-direction: column; align-items: center; min-width: 84px }
.vg-event-hud-label {
  font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--matte-text-muted); margin-bottom: 2px;
}
.vg-event-hud-val {
  font-size: 17px; font-weight: 700; color: var(--matte-text-primary);
  display: flex; align-items: center; gap: 5px; line-height: 1.1;
}
.vg-event-hud-val .vg-coin-icon { width: 15px; height: 15px }
.vg-event-hud-time { color: #ffd44a }
.vg-event-end {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 10006;
  text-align: center;
  background: var(--matte-bg-elevated);
  border: 1px solid var(--matte-border-default);
  border-radius: 12px;
  padding: 30px 36px;
  max-width: 360px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.55);
  pointer-events: auto;
  animation: vg-pop .22s ease-out;
}
.vg-event-end-h { font-size: 13px; font-weight: 600; color: var(--matte-text-muted); margin-bottom: 10px; letter-spacing: 0.10em; text-transform: uppercase }
.vg-event-end-amt {
  font-size: 44px; font-weight: 700; color: #ffd06a;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.vg-event-end-amt .vg-coin-icon { width: 32px; height: 32px }
.vg-feed-row.is-event { background: linear-gradient(90deg, rgba(255, 200, 80, 0.10), rgba(255, 200, 80, 0) 60%) }
.vg-feed-row.is-event .delta.event { color: #ffd44a; font-weight: 600 }
.vg-feed-row.is-event .game { color: #ffd44a }
.vg-recent-row .delta.event { color: #ffd44a }
@media (max-width: 640px) {
  .vg-event-countdown { font-size: 140px }
  .vg-event-hud { gap: 14px; padding: 7px 12px }
  .vg-event-hud-item { min-width: 70px }
}
