/* Analytics Center (Parity Rebuild 2025-09-27) */
#analytics-center-root { position:fixed; inset:0; z-index:14810; font-family:var(--font-mono,'VT323',monospace); opacity:0; visibility:hidden; pointer-events:none; transition:opacity 360ms cubic-bezier(.16,1,.3,1), visibility 0s linear 360ms; }
#analytics-center-root.is-open { opacity:1; visibility:visible; pointer-events:auto; transition:opacity 360ms cubic-bezier(.16,1,.3,1), visibility 0s linear 0s; }
#ac-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.70); backdrop-filter:blur(2px); opacity:0; transition:opacity 360ms cubic-bezier(.16,1,.3,1); }
#analytics-center-root.is-open #ac-backdrop { opacity:1; }
#ac-shell { position:absolute; left:50%; top:12vh; transform:translateX(-50%) translateY(-10px) scale(.985); width:min(1040px,92vw); max-height:calc(100vh - 24vh); display:flex; flex-direction:column; background:#101018; border:1px solid #00ff88; border-radius:20px; padding:22px 26px 22px; box-shadow:0 0 20px -6px rgba(0,255,136,0.42),0 0 2px 1px rgba(0,255,136,0.32) inset; box-sizing:border-box; opacity:0; overflow:hidden; transition: opacity 360ms cubic-bezier(.16,1,.3,1) 120ms, transform 360ms cubic-bezier(.16,1,.3,1) 120ms; }
#analytics-center-root.is-open #ac-shell { opacity:1; transform:translateX(-50%) translateY(0) scale(1); }
#ac-shell::before { content:""; position:absolute; inset:0; padding:1px; border-radius:20px; background:linear-gradient(90deg,#00ff88,#35ffc9); -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask-composite:exclude; pointer-events:none; }
@media (max-width:760px){ #ac-shell { top:8vh; max-height:calc(100vh - 16vh); padding:20px 20px 18px; } }
@media (max-width:560px){ #ac-shell { top:6vh; width:94vw; max-height:calc(100vh - 14vh); padding:18px 16px 18px; } }
@media (max-width:380px){ #ac-shell { padding:16px 12px; } }
#ac-header { display:flex; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap; padding:4px 0 8px; border-bottom:1px solid rgba(255,255,255,0.05); }
#ac-header h2 { margin:0; font-size:1.55rem; letter-spacing:1px; color:#00ff88; text-shadow:0 0 8px rgba(0,255,136,0.35); flex:1 1 auto; display:flex; align-items:center; gap:10px; }
#ac-header h2 .mdi { font-size:1.25rem; }
@media (max-width:560px){ #ac-header h2 { font-size:1.34rem; } }
#ac-actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.ac-icon-btn { display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; border-radius:10px; background: rgba(var(--dark-color-rgb), 0.6); border:1px solid var(--secondary-color); color: var(--primary-color); cursor:pointer; position:relative; font-size:16px; transition: background .15s ease, border-color .15s ease, transform .15s ease; opacity:.9; }
.ac-icon-btn .mdi { font-size:20px; line-height:1; }
.ac-icon-btn.ac-refresh { background:#FFD400; border:none; color:#000; font-weight:700; box-shadow:0 0 0 1px rgba(255,212,0,0.35),0 3px 10px -2px rgba(0,0,0,.7); }
.ac-icon-btn:hover:not(.ac-refresh), .ac-icon-btn:focus-visible:not(.ac-refresh){ background: rgba(var(--dark-color-rgb), 0.8); border-color: var(--primary-color); opacity: 1; transform: translateY(-1px); color: var(--primary-color); }
.ac-icon-btn.ac-refresh:hover, .ac-icon-btn.ac-refresh:focus-visible { filter:brightness(1.08); }
.ac-icon-btn:active { transform:scale(.94); }
#ac-main { flex:1; min-height:0; overflow:auto; padding:10px 4px 72px; display:flex; flex-direction:column; gap:26px; }
#ac-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:16px; }
.ac-stat { position:relative; padding:14px 14px 12px; background:#14141d; border:1px solid rgba(0,255,136,0.24); border-radius:16px; display:flex; flex-direction:column; gap:6px; min-height:110px; transition:background .2s, border-color .2s, transform .25s cubic-bezier(.16,1,.3,1); }
.ac-stat:hover { background:#1b1b27; border-color:#00ff88; }
.ac-stat h3 { margin:0; font-size:.72rem; letter-spacing:.6px; font-weight:600; color:#9fe; display:flex; align-items:center; gap:6px; }
.ac-stat-value { font-size:1.35rem; font-weight:700; letter-spacing:1px; color:#fff; text-shadow:0 0 6px rgba(0,255,136,0.35); }
.ac-stat-sub { font-size:.55rem; opacity:.62; letter-spacing:.7px; }
.ac-stat.updated { animation:acPulse .9s ease; }
@keyframes acPulse { 0%{ box-shadow:0 0 0 0 rgba(0,255,136,0.0);} 40%{ box-shadow:0 0 0 4px rgba(0,255,136,0.35);} 100%{ box-shadow:0 0 0 0 rgba(0,255,136,0.0);} }
#ac-grid.is-loading .ac-stat { position:relative; overflow:hidden; }
#ac-grid.is-loading .ac-stat::after { content:""; position:absolute; inset:0; background:linear-gradient(110deg, rgba(255,255,255,0.04) 15%, rgba(255,255,255,0.14) 30%, rgba(255,255,255,0.05) 45%); background-size:300% 100%; animation:acShimmer 2.2s infinite; }
@keyframes acShimmer { 0%{ background-position:0 0; } 100%{ background-position:200% 0; } }
#ac-future { background:#12121a; border:1px dashed rgba(0,255,136,0.35); border-radius:18px; padding:18px 18px 20px; display:flex; flex-direction:column; gap:12px; }
#ac-future h3 { margin:0; font-size:.78rem; letter-spacing:.6px; font-weight:600; color:#cfe; display:flex; align-items:center; gap:6px; }
#ac-future p { margin:0; font-size:.62rem; line-height:1.35; opacity:.75; }
#ac-footer { position:absolute; left:0; right:0; bottom:0; padding:12px 22px 18px; display:flex; justify-content:flex-end; gap:12px; background:linear-gradient(180deg,rgba(16,16,24,0.35),#101018 70%); border-top:1px solid rgba(255,255,255,0.08); backdrop-filter:blur(4px); }
#ac-live { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
/* Leaderboard panels - Desktop first */
.ac-stat.ac-leaderboard { min-height:280px; grid-column: span 1; }
.ac-leaderboard-content { flex:1; display:flex; flex-direction:column; gap:8px; overflow:auto; }
.ac-lb-list { display:flex; flex-direction:column; gap:7px; }
.ac-lb-row { display:flex; align-items:center; gap:10px; padding:8px 10px; background:rgba(0,255,136,0.06); border:1px solid rgba(0,255,136,0.15); border-radius:10px; font-size:.78rem; transition:background .2s, border-color .2s, transform .15s; }
.ac-lb-row:hover { background:rgba(0,255,136,0.12); border-color:rgba(0,255,136,0.3); }
.ac-lb-row[data-user-id]:hover { background:rgba(0,255,136,0.16); border-color:rgba(0,255,136,0.45); transform:translateY(-1px); box-shadow:0 2px 8px rgba(0,255,136,0.2); }
.ac-lb-row[data-user-id]:active { transform:translateY(0); }
.ac-lb-row.is-current-user { background:rgba(53,255,201,0.18); border-color:#00ff88; box-shadow:0 0 0 1px rgba(0,255,136,0.2) inset; }
.ac-lb-pos { min-width:36px; font-weight:700; color:#8ff6ff; letter-spacing:.5px; font-size:.82rem; }
.ac-lb-avatar { width:26px; height:26px; border-radius:50%; object-fit:cover; border:1px solid rgba(0,255,136,0.3); flex-shrink:0; }
.ac-lb-avatar-placeholder { font-size:26px; color:rgba(0,255,136,0.5); flex-shrink:0; }
.ac-lb-name { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#e5e5e5; min-width:0; }
.ac-lb-value { font-weight:700; color:#fff; min-width:60px; text-align:right; flex-shrink:0; }
.ac-lb-divider { text-align:center; padding:6px 0; color:rgba(255,255,255,0.3); font-size:.85rem; letter-spacing:1px; }
.ac-lb-empty { text-align:center; padding:20px; opacity:.6; font-size:.72rem; }
.ac-error { color:#ff6060; font-size:.7rem; text-align:center; }

/* Supporters specific styling */
.ac-supporters-total { display:flex; align-items:center; justify-content:center; gap:8px; padding:12px 10px; background:rgba(255,212,0,0.12); border:1px solid rgba(255,212,0,0.3); border-radius:12px; margin-bottom:10px; }
.ac-supporters-total .mdi { font-size:20px; color:#FFD400; }
.ac-supporters-total strong { font-size:1.1rem; font-weight:700; color:#FFD400; letter-spacing:1px; text-shadow:0 0 8px rgba(255,212,0,0.4); }
.ac-supporters-total-label { font-size:.65rem; opacity:.75; letter-spacing:.5px; color:#cfe; }

.ac-supporters-link { display:flex; justify-content:center; padding:10px 0 4px; }
.ac-bmc-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:10px 20px; background:#FFD400; color:#000; font-weight:700; font-size:.75rem; letter-spacing:.8px; border-radius:10px; text-decoration:none; transition:transform .2s, box-shadow .2s, filter .2s; box-shadow:0 0 0 1px rgba(255,212,0,0.4),0 3px 12px -2px rgba(0,0,0,.6); }
.ac-bmc-button .mdi { font-size:18px; }
.ac-bmc-button:hover, .ac-bmc-button:focus-visible { transform:translateY(-2px); box-shadow:0 0 0 1px rgba(255,212,0,0.6),0 6px 16px -2px rgba(0,0,0,.7); filter:brightness(1.1); }
.ac-bmc-button:active { transform:translateY(0); }



/* Tablet optimization (641px - 900px) */
@media (max-width:900px) and (min-width:641px){ 
  #ac-grid { grid-template-columns:1fr 1fr; }
  .ac-stat.ac-leaderboard { grid-column: span 1; }
}

/* Mobile landscape and smaller tablets (481px - 640px) */
@media (max-width:640px) and (min-width:481px){ 
  #ac-grid { grid-template-columns:1fr; } 
  #ac-main { padding:8px 2px 70px; }
  .ac-stat.ac-leaderboard { grid-column: span 1; min-height:240px; }
  .ac-lb-row { gap:8px; padding:7px 9px; font-size:.75rem; }
  .ac-lb-pos { min-width:32px; font-size:.78rem; }
  .ac-lb-avatar { width:24px; height:24px; }
  .ac-lb-avatar-placeholder { font-size:24px; }
  .ac-lb-value { min-width:55px; }
}

/* Mobile portrait (≤480px) */
@media (max-width:480px){ 
  #ac-grid { grid-template-columns:1fr; gap:12px; }
  .ac-stat.ac-leaderboard { grid-column: span 1; min-height:220px; }
  .ac-lb-row { gap:6px; padding:6px 8px; font-size:.7rem; }
  .ac-lb-pos { min-width:28px; font-size:.74rem; }
  .ac-lb-avatar { width:22px; height:22px; }
  .ac-lb-avatar-placeholder { font-size:22px; }
  .ac-lb-name { font-size:.7rem; }
  .ac-lb-value { min-width:50px; font-size:.72rem; }
  .ac-lb-divider { padding:4px 0; font-size:.78rem; }
}

@media (prefers-reduced-motion: reduce){ #analytics-center-root, #ac-shell, .ac-icon-btn, .ac-stat { transition:none !important; animation:none !important; } }

/* Glitch loading text (imported from profile-center) */
.pc-glitch-loading { position:relative; display:inline-block; animation:acGlitch 1.8s infinite; }
.pc-glitch-loading::before, .pc-glitch-loading::after { content:attr(data-text); position:absolute; left:0; top:0; width:100%; height:100%; background:#14141d; }
.pc-glitch-loading::before { left:2px; text-shadow:-2px 0 #ff00de; clip:rect(24px,999px,90px,0); animation:acGlitchBefore 3s infinite linear alternate-reverse; }
.pc-glitch-loading::after { left:-2px; text-shadow:-2px 0 #00fff9; clip:rect(85px,999px,140px,0); animation:acGlitchAfter 2.5s infinite linear alternate-reverse; }
@keyframes acGlitch { 0%,100%{ opacity:1; } 50%{ opacity:.85; } }
@keyframes acGlitchBefore { 0%{ clip:rect(61px,9999px,67px,0); } 5%{ clip:rect(33px,9999px,40px,0); } 10%{ clip:rect(17px,9999px,24px,0); } 15%{ clip:rect(84px,9999px,90px,0); } 20%{ clip:rect(50px,9999px,57px,0); } 25%{ clip:rect(10px,9999px,16px,0); } 30%{ clip:rect(70px,9999px,77px,0); } 35%{ clip:rect(25px,9999px,32px,0); } 40%{ clip:rect(55px,9999px,61px,0); } 45%{ clip:rect(5px,9999px,12px,0); } 50%{ clip:rect(80px,9999px,87px,0); } 55%{ clip:rect(30px,9999px,36px,0); } 60%{ clip:rect(65px,9999px,72px,0); } 65%{ clip:rect(20px,9999px,27px,0); } 70%{ clip:rect(45px,9999px,52px,0); } 75%{ clip:rect(75px,9999px,82px,0); } 80%{ clip:rect(15px,9999px,22px,0); } 85%{ clip:rect(60px,9999px,66px,0); } 90%{ clip:rect(35px,9999px,42px,0); } 95%{ clip:rect(8px,9999px,14px,0); } 100%{ clip:rect(50px,9999px,56px,0); } }
@keyframes acGlitchAfter { 0%{ clip:rect(26px,9999px,33px,0); } 5%{ clip:rect(54px,9999px,60px,0); } 10%{ clip:rect(72px,9999px,78px,0); } 15%{ clip:rect(18px,9999px,24px,0); } 20%{ clip:rect(41px,9999px,48px,0); } 25%{ clip:rect(63px,9999px,70px,0); } 30%{ clip:rect(7px,9999px,14px,0); } 35%{ clip:rect(46px,9999px,53px,0); } 40%{ clip:rect(82px,9999px,88px,0); } 45%{ clip:rect(28px,9999px,35px,0); } 50%{ clip:rect(12px,9999px,18px,0); } 55%{ clip:rect(58px,9999px,65px,0); } 60%{ clip:rect(37px,9999px,43px,0); } 65%{ clip:rect(76px,9999px,83px,0); } 70%{ clip:rect(22px,9999px,29px,0); } 75%{ clip:rect(51px,9999px,57px,0); } 80%{ clip:rect(68px,9999px,74px,0); } 85%{ clip:rect(14px,9999px,21px,0); } 90%{ clip:rect(48px,9999px,54px,0); } 95%{ clip:rect(32px,9999px,38px,0); } 100%{ clip:rect(66px,9999px,72px,0); } }

