/* =========================================
   GLOBAL (SOUTH PARK THEME) - FINAL (CLEAN V36)
========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Arial Black", Impact, sans-serif;
  background: linear-gradient(135deg, #b2e0ff 0%, #87c3ff 60%, #e0e9f2 100%);
  min-height: 100vh;
}
.app {
  max-width: 1400px;
  margin: auto;
  background: none;
  padding: 16px 6px 20px;
}
.disclaimer-footer {
  text-align: center;
  font-size: 10px;
  color: #444;
  opacity: 0.6;
  font-family: sans-serif;
  margin-top: 30px;
  margin-bottom: 10px;
  font-style: italic;
  width: 100%;
}

/* =========================================
   TRIBUNE
========================================= */
.tribune-wrapper {
  position: relative;
  margin-top: 0;
  animation: bounce 1s ease-in-out infinite;
  padding: 0 6px;
}
@keyframes bounce {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-5px); }
  60%  { transform: translateY(0); }
  80%  { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}
.tribune {
  width: 100%;
  height: 220px;
  min-height: 220px;
  background-image: url("tribun.png");
  background-color: transparent;
  background-size: cover;
  background-position: center;
  border: 3px solid #000;
  border-radius: 14px;
  box-shadow: 0 4px 0 #4c3e2a;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

/* =========================================
   OVERLAY & TWEETS
========================================= */
.tribune-overlay {
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 55 !important;
  pointer-events: none;
}
.tribune-left {
  display: flex;
  flex-direction: column;
  text-shadow: 2px 2px #ffffff;
}
.t-title { font-size: 22px; font-weight: 900; }
.t-sub   { font-size: 11px; opacity: 0.75; }
.tribune-right {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
/* Aesthetic panels (Prize & Flow) */
.ibox {
  min-width: 70px;
  text-align: center;
  pointer-events: auto;
  border: 2px solid #000;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 2px 3px 0 rgba(0,0,0,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
}
.ibox:hover {
  transform: translateY(-1px);
  box-shadow: 2px 4px 0 rgba(0,0,0,0.25);
}
.ibox.wide-ibox {
  min-width: 130px;
  padding: 4px 8px;
  flex: 1;
}
.ibox-prize {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #000;
}
.ibox-prize .label {
  font-size: 9px;
  font-weight: 900;
  color: #d97706;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  white-space: nowrap;
  text-align: center;
  padding: 0 4px;
  opacity: 0.85;
}
.ibox-prize .value {
  font-size: 14px;
  font-weight: 900;
  color: #000;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
  font-family: "Courier New", monospace;
}
.ibox-flow {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  border-color: #000;
}
.ibox-flow .label {
  font-size: 9px;
  font-weight: 900;
  color: #7e22ce;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.ibox-flow .value {
  font-size: 10px;
  font-weight: 700;
  color: #6b21a8;
  line-height: 1.2;
  opacity: 0.9;
}

/* Tweet cards */
.tribune-tweets {
  position: absolute;
  left: 0;
  right: 0;
  padding: 0 10px;
  display: flex;
  justify-content: space-between;
  z-index: 50 !important;
  pointer-events: none;
}
.tribune-tweets-left,
.tribune-tweets-right {
  display: flex;
  gap: 12px;
}
.tribune-tweets-left { padding-left: 8px; }
.tribune-tweets-right { padding-right: 8px; }
.tweet-card-sp {
  width: 175px;
  background: #fdf5e6;
  border: 3px solid #000;
  border-radius: 12px;
  padding: 6px 8px !important;
  box-shadow: 4px 4px 0 #4f3b25;
  pointer-events: auto;
  opacity: 1 !important;
  visibility: visible !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: auto !important;
}
.tweet-head-sp {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px !important;
}
.tweet-avatar-sp {
  width: 18px !important;
  height: 18px !important;
  border-radius: 50%;
  border: 2px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #000;
  flex-shrink: 0;
}
.tweet-avatar-sp img {
  width: 18px !important;
  height: 18px !important;
}
.trump-avatar-sp { background: #fcfc30; }
.elon-avatar-sp  { background: #50c878; }
.cz-avatar-sp    { background: #ff0000; }
.randy-avatar-sp { background: #ffa500; }
.tweet-user-sp {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}
.tweet-name-sp {
  font-size: 9px !important;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tweet-handle-sp { font-size: 9px; opacity: 0.7; }
.tweet-status-sp {
  font-size: 8px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 999px;
  border: 2px solid #000;
  white-space: nowrap;
}
.tweet-bubble-sp {
  margin-top: 4px;
  background: #fff;
  border: 2px solid #000;
  border-radius: 8px;
  padding: 6px 8px;
}
.tweet-text-sp {
  font-size: 9.5px !important;
  line-height: 1.1 !important;
  color: #111;
  margin: 0 !important;
}
.tweet-time-sp {
  margin-top: 4px;
  font-size: 9px !important;
  opacity: 0.6;
  text-align: right;
  font-style: italic;
}
.tweet-active-card .tweet-bubble-sp {
  background: #ffc2c2;
  animation: pulseActive 1s ease-in-out infinite;
}
@keyframes pulseActive {
  0%   { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); }
  50%  { box-shadow: 0 0 12px 4px rgba(255, 0, 0, 0.9); }
  100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

/* =========================================
   ARENA & TRACKS
========================================= */
.arena-layout { display: flex; gap: 10px; margin-top: 4px; align-items: stretch; }
.race-area {
  flex: 2.6;
  padding: 4px 6px;
  background: #a27a4e;
  border: 3px solid #000;
  border-radius: 16px;
  box-shadow: 0 6px 0 #4f3b25;
}
.tracks-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  transition: filter 0.5s ease;
}
.tracks-container.warming-up .track { filter: blur(6px) brightness(0.6); pointer-events: none; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

/* =========================================
   TRACK BASIC STYLES
========================================= */
.track {
  position: relative;
  height: 42px;
  border-radius: 24px;
  border: 3px solid #000;
  overflow: hidden;
  margin: 3px 0;
  transition: top .5s ease, order .5s ease, box-shadow .3s ease, transform .3s ease, filter .5s ease;
  background-color: #2a2a2a;
  border-left: 5px solid transparent;
}
.pumpfun-track {
  border-left-color: #A0D8EF;
  background-image: 
    repeating-linear-gradient(90deg, rgba(255,255,255,0.3) 0, rgba(255,255,255,0.3) 20px, transparent 20px, transparent 48px), 
    linear-gradient(90deg, #354c73, #486090, #5a73a3);
  background-size: 120px 100%, 100% 100%;
}
.fourmeme-track {
  border-left-color: #F0E68C;
  background-image: 
    repeating-linear-gradient(90deg, rgba(0,0,0,0.22) 0, rgba(0,0,0,0.22) 20px, transparent 20px, transparent 48px), 
    linear-gradient(90deg, #fdd835, #ffc107, #ffb300);
  background-size: 120px 100%, 100% 100%;
  filter: brightness(1.1);
}

.track-start {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 6%;
  width: 4px;
  background: #000;
  z-index: 2;
}
.track-finish {
  position: absolute;
  top: 5px;
  bottom: 5px;
  right: 6%;
  width: 4px;
  background: #cc0000;
  z-index: 2;
}
.track.leader-glow { box-shadow: 0 0 18px rgba(255,255,255,.75); transform: scale(1.01); z-index: 2; }
.track.rugged { filter: grayscale(100%) brightness(.5); border-left-color: #555 !important; }
.tracks-container.winner-mode .track,
.tracks-container.preparing .track { filter: blur(8px) brightness(.5); }

/* =========================================
   FX & OVERLAYS
========================================= */
.tracks-container.winner-mode .winner-overlay { opacity: 1; animation: popIn .5s forwards; }
@keyframes popIn {
  0%   { transform: scale(.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.tracks-container.preparing .roster-overlay { opacity: 1; }

/* Tombstone mode */
.tombstone-mode .runner-body { display: none; }
.tombstone-icon {
  display: none;
  font-size: 32px;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  filter: drop-shadow(2px 2px 0px #000);
  animation: none !important;
}
.tombstone-mode .tombstone-icon { display: block; }
.tombstone-mode .runner-token { top: -10px; animation: none !important; filter: grayscale(100%); }
@keyframes poof-scale {
  0%   { transform: translate(-50%, -50%) scale(0.1); opacity: 1; }
  50%  { opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}
.runner-info { display: flex; flex-direction: column; justify-content: center; font-size: 11px; }
.runner-symbol {
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.track.fourmeme-track .runner-symbol,
.track.fourmeme-track .runner-status { color: #000; text-shadow: none; }
@keyframes dustPoof {
  0%   { opacity: 0.9; transform: translate(0, 0); }
  100% { opacity: 0; transform: translate(-10px, -10px); }
}

/* =========================================
   PANELS & TABLE
========================================= */
.race-panels { display: flex; gap: 12px; }
.race-panel-col { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.race-panel {
  background: rgba(255, 255, 255, 0.8);
  border: 3px solid #000;
  border-radius: 12px;
  padding: 4px 6px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.current-race-panel {
  flex: 0;
  background: #fffbe0;
  border: 3px solid #000;
  padding: 6px;
  border-radius: 12px;
  box-shadow: 0 3px 0 #c4a55a;
}
.current-race-panel.active { background: #f0e6c5; animation: pulseSignal 1s ease-in-out infinite; }
@keyframes pulseSignal {
  0%   { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.6); }
  50%  { box-shadow: 0 0 14px 4px rgba(255, 0, 0, 0.9); }
  100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}
.ca-btn::selection { background: #7c3aed; }
.panel {
  flex: 1;
  padding: 6px;
  background: #f0e6c5;
  border: 3px solid #000;
  border-radius: 12px;
  box-shadow: 0 4px 0 #8b7d60;
}
.panel h3 { font-size: 13px; margin-bottom: 4px; }

/* =========================================
   LANDING HERO
========================================= */
.landing-hero {
  padding: 32px 20px 40px;
  background: linear-gradient(135deg, #b2e0ff 0%, #87c3ff 60%, #e0e9f2 100%);
  background-image: url("south-park-mountains.png"), linear-gradient(135deg, #b2e0ff 0%, #87c3ff 60%, #e0e9f2 100%);
  background-size: cover, cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  background-blend-mode: soft-light;
  opacity: 0.98;
  border-bottom: 4px solid rgba(0, 0, 0, 0.1);
}
.landing-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.6fr);
  gap: 32px;
  align-items: center;
  color: #02131f;
}
.landing-logo-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.landing-logo-text { font-weight: 700; font-size: 18px; letter-spacing: 0.04em; text-transform: uppercase; }
.landing-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.07);
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.landing-title { font-size: 32px; line-height: 1.1; margin-bottom: 10px; }
.landing-subtitle { font-size: 15px; line-height: 1.5; max-width: 480px; margin-bottom: 18px; }
.landing-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid #022c22;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: #022c22; color: #fefce8; }
.btn-primary:hover { background: #014037; }
.btn-ghost { background: rgba(255, 255, 255, 0.8); color: #022c22; }
.btn-ghost:hover { background: #ffffff; }
.landing-meta { display: flex; flex-direction: column; gap: 4px; font-size: 12px; opacity: 0.9; }
.landing-right { display: flex; flex-direction: column; gap: 10px; }
.landing-mini-card {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.mini-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mini-pill {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #ecfeff;
  border: 1px solid #06b6d4;
  font-weight: 600;
}
.pill-blue { background: #eef2ff; border-color: #4f46e5; }
.pill-gold { background: #fef9c3; border-color: #eab308; }
.mini-label { font-size: 13px; font-weight: 600; }
.mini-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mini-list li { display: flex; align-items: center; gap: 6px; }

/* =========================================
   EMPTY STATES & RULES
========================================= */
.pist-mini-rule {
  position: relative;
  display: block;
  overflow: hidden;
  margin-top: 8px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 2px solid #000;
  background: rgba(255,255,255,0.88);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
}
.pmr-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: nowrap; }
.pmr-pill {
  flex: 0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size: 10px;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 999px;
  border: 2px solid #000;
  background: rgba(0,0,0,0.08);
  white-space: nowrap;
}
.pmr-quote {
  flex: 1 1 auto;
  text-align: right;
  font-size: 10px;
  font-weight: 900;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}
.pmr-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 8px; margin-top: 6px; }
.pmr-lines span {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0.45);
  background: rgba(0,0,0,0.06);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pist-mini-rule.pist1 { box-shadow: 0 0 14px rgba(0,255,140,0.35), 3px 3px 0 rgba(0,0,0,0.55); }
.pist-mini-rule.pist2 { box-shadow: 0 0 14px rgba(0,160,255,0.35), 3px 3px 0 rgba(0,0,0,0.55); }
.pist-mini-rule.pist3 { box-shadow: 0 0 14px rgba(185,120,255,0.35), 3px 3px 0 rgba(0,0,0,0.55); }
.p3-vote-ui-compact { display: flex; flex-direction: column; align-items: flex-end; margin-right: 2px; }

/* =========================================
   MODALS
========================================= */
.rr-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20000;
  backdrop-filter: blur(2px);
}
.rr-modal.active { display: flex; }
.rr-modal-content {
  width: 90%;
  max-width: 380px;
  background: #fff;
  border: 3px solid #000;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  animation: rrPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes rrPopIn { from{transform:scale(0.8); opacity:0;} to{transform:scale(1); opacity:1;} }
.rr-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #eee;
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.rr-close {
  background: #f1f1f1;
  border: 2px solid #000;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.rr-close:hover { background: #ffcccc; }
#rrClaimForm input, #rrClaimForm select,
#p3ClaimForm input, #p3ClaimForm select {
  padding: 8px;
  border: 2px solid #ccc;
  border-radius: 6px;
  font-size: 13px;
  font-family: sans-serif;
  outline: none;
}
#rrClaimForm input:focus, #rrClaimForm select:focus,
#p3ClaimForm input:focus, #p3ClaimForm select:focus {
  border-color: #8b5cf6;
}
.rr-modal-foot {
  margin-top: 12px;
  font-size: 10px;
  color: #666;
  text-align: center;
  font-style: italic;
}

/* P3 help modal */
.p3-help-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 9998;
}

/* =========================================================
   Track 1 â€” How to vote (RR Holder) (LEFT PANEL)
   ========================================================= */
.p1-help-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 9998;
}
.p1-help-modal{
  position: fixed;
  left: 16px;
  top: 78px;
  width: min(420px, 92vw);
  max-height: min(70vh, 560px);
  overflow: auto;
  border-radius: 16px;
  border: 3px solid #000;
  background: rgba(255,255,255,0.97);
  box-shadow: 10px 10px 0 rgba(0,0,0,0.65);
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 9999;
}
body.p1-help-open .p1-help-backdrop{ opacity: 1; pointer-events: auto; }
body.p1-help-open .p1-help-modal{ opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.p1-help-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-bottom:2px solid rgba(0,0,0,0.25);
}
.p1-help-modal-title{ font-size: 12px; font-weight: 900; }
.p1-help-close{
  cursor:pointer;
  border:2px solid #000;
  background: rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 4px 8px;
  font-weight: 900;
}

.p1-help-modal-body{
  padding: 10px 12px 12px 12px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  color: #111;
}

.p1-help-topbox{
  border: 2px solid rgba(0,0,0,0.25);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.75);
  margin-bottom: 10px;
}
.p1-help-section{ margin: 8px 0 10px 0; }
.p1-help-section-title{ font-weight: 900; margin-bottom: 4px; }

.p1-help-dashed{
  border: 2px dashed rgba(0,0,0,0.45);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255,255,255,0.65);
}
.p1-help-info-row{
  display:flex;
  gap: 8px;
  align-items: flex-start;
}
.p1-help-info-ico{
  width: 18px;
  height: 18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 6px;
  background: rgba(0,0,0,0.08);
  border: 2px solid rgba(0,0,0,0.35);
  font-size: 12px;
  line-height: 1;
}

/* Mobile: keep it visible and not too tall */
@media (max-width: 720px){
  .p1-help-modal{ top: 66px; left: 10px; width: min(420px, 94vw); max-height: min(72vh, 520px); }
}

.p3-help-modal {
  position: fixed;
  right: 16px;
  top: 78px;
  width: min(420px, 92vw);
  max-height: min(70vh, 560px);
  overflow: auto;
  border-radius: 16px;
  border: 3px solid #000;
  background: rgba(255,255,255,0.97);
  box-shadow: 10px 10px 0 rgba(0,0,0,0.65);
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 9999;
}
.p3-help-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 2px solid rgba(0,0,0,0.25);
}
.p3-help-modal-title { font-size: 12px; font-weight: 900; }
.p3-help-close {
  cursor: pointer;
  border: 2px solid #000;
  background: rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 4px 8px;
  font-weight: 900;
}
.p3-help-modal-body {
  padding: 10px 12px 12px 12px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  color: #111;
}
.p3-help-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; margin: 10px 0; }
.p3-help-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 12px;
  border: 2px solid rgba(0,0,0,0.30);
  background: rgba(0,0,0,0.05);
}
.p3-help-code span { opacity: .85; }
.p3-help-note {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 2px dashed #000;
  background: rgba(0,0,0,0.06);
  font-size: 10px;
  font-weight: 900;
  opacity: .9;
}
body.p3-help-open .p3-help-backdrop { opacity: 1; pointer-events: auto; }
body.p3-help-open .p3-help-modal { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
@media (max-width: 520px){
.landing-title { font-size: 24px; }
.pmr-quote{ display:none; }
.pmr-lines{ grid-template-columns: 1fr; }
.p3-help-modal{
    left: 10px;
    right: 10px;
    top: auto;
    bottom: 12px;
    width: auto;
    max-height: 60vh;
  }
.p3-help-codes{ grid-template-columns: 1fr; }
}

/* =========================================
   HEADER & STATS
========================================= */
.race-panel-header-v2 {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0px 6px 0px;
  border-bottom: 2px solid rgba(0,0,0,0.1);
  min-height: 50px;
  margin-top: 8px;
}
.race-id-badge {
  position: absolute;
  top: -24px;
  right: 4px;
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  background: #000;
  padding: 3px 8px;
  border-radius: 6px;
  border: 2px solid #fff;
  box-shadow: 0 4px 0 rgba(0,0,0,0.3);
  z-index: 999;
  transform: rotate(2deg);
}
.how-to-vote-badge {
  position: absolute;
  top: -24px;
  left: 4px;
  font-family: "Arial", sans-serif;
  font-size: 10px;
  font-weight: 900;
  color: #000;
  background: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  border: 2px solid #000;
  box-shadow: 0 4px 0 rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 999;
  transform: rotate(-2deg);
  transition: transform 0.1s;
}
.how-to-vote-badge:hover {
  transform: scale(1.05) rotate(-2deg) translateY(-2px);
  background: #fdf5e6;
}
.how-to-vote-badge:active {
  transform: scale(0.95) rotate(-2deg);
  box-shadow: 0 2px 0 rgba(0,0,0,0.2);
}
.rph-left { display: flex; flex-direction: column; justify-content: center; flex: 1; }
.rph-title { font-size: 10px; font-weight: 900; color: #000; line-height: 1.1; margin-bottom: 2px; }
.rph-subtitle { font-size: 10px; color: #555; font-weight: 600; opacity: 0.85; }
.rph-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.rph-timer-box {
  font-family: "Courier New", monospace;
  font-size: 18px;
  font-weight: 900;
  background: #fff;
  border: 3px solid #000;
  border-radius: 8px;
  padding: 2px 12px;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.2);
  min-width: 70px;
  text-align: center;
}
.rph-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  flex: 1;
  gap: 4px;
}
.rph-row-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}
@media (max-width: 600px){
.race-panel-header-v2 { min-height: 45px; margin-top: 12px; }
.rph-title { font-size: 11px; max-width: 80px; }
.rph-subtitle { display: none; }
.race-id-badge {
    font-size: 9px;
    padding: 2px 6px;
    top: -20px;
    right: 0;
    transform: rotate(0deg);
  }
.how-to-vote-badge {
    font-size: 8px;
    padding: 3px 6px;
    top: -20px;
    left: 0;
    transform: rotate(0deg);
  }
.rph-timer-box {
    font-size: 14px;
    padding: 2px 6px;
    min-width: 50px;
    border-width: 2px;
  }
}
.claim-status-badge {
  font-size: 9px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
  border: 2px solid #000;
  cursor: pointer;
  text-transform: uppercase;
  white-space: nowrap;
}
.claim-status-badge[data-status="open"] { background: #4ade80; color: #064e3b; }
.claim-status-badge[data-status="closed"] { background: #f87171; color: #450a0a; opacity: 0.8; }
.claim-status-badge[data-status="waiting"] { background: #e5e7eb; color: #374151; }
.p3-help-modal.left-aligned { right: auto !important; left: 16px !important; }
.stats-grid-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; margin-bottom: 20px; }
.stats-col {
  background: #fff;
  border: 3px solid #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 0 rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
}
.stats-header { padding: 8px 10px; border-bottom: 2px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.stats-header h3 { font-size: 11px; font-weight: 900; margin: 0; text-transform: uppercase; }
.p1-header { background: #dcfce7; border-bottom-color: #86efac; }
.p2-header { background: #dbeafe; border-bottom-color: #93c5fd; }
.p3-header { background: #fef9c3; border-bottom-color: #fde047; }
.stats-badge { font-size: 9px; background: #000; color: #fff; padding: 2px 6px; border-radius: 4px; font-weight: bold; }
.stats-list { padding: 6px; font-size: 10px; max-height: 150px; overflow-y: auto; background: #fafafa; }
.stats-empty { text-align: center; color: #999; padding: 10px; font-style: italic; }
@media (max-width: 768px){
.stats-grid-container { grid-template-columns: 1fr; }
}
.tokenomics-body, .rules-body { padding: 10px; }
/* Hide vote bars + P3 vote button (as requested) */
#btnP3Vote { display: none !important; }
.prize-label {
  font-size: 9px;
  opacity: 0.85;
  margin-bottom: 2px;
  white-space: nowrap;
  letter-spacing: 0.3px;
  text-align: center;
  padding: 0 4px;
}

/* =========================================
   SIGNAL BLUR / OVERLAY
========================================= */
.signal-blur-active .track,
.signal-blur-active .empty-lane {
  filter: blur(4px) grayscale(0.6);
  pointer-events: none;
  transition: filter 0.5s ease;
}
@keyframes signalPopIn {
  0%   { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes blinker { 50% { opacity: 0; } }
.sac-body {
  padding: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.signal-blur-active .track.draft-filled { filter: blur(2px) grayscale(0.2); border-color: #22c55e !important; }

/* =========================================
   FINAL RUNNER SYSTEM
========================================= */
.track { overflow: visible !important; z-index: 1; }
.runner {
  position: absolute;
  /* Default: keep runner on start line until JS sets left */
  left: 6%;
  display: flex;
  gap: 6px;
  width: auto;
  height: auto;
   top: -6px;
  will-change: left, transform;
  z-index: 9999 !important;
  pointer-events: none;
}
.runner-character {
  width: 48px; height: 48px; position: relative; animation: running-bob 0.70s infinite ease-in-out;
}
/* Body (GIF) */
.runner-body {
  width: 44px;
  height: auto;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
/* Token head (clickable) */
.runner-token {
  width: 18px;
  height: 18px;
  position: absolute;
  top: 7px;
  left: 60%;
  transform: translateX(-50%);
  pointer-events: auto;
  cursor: pointer;
  border-radius: 50%;
  border: 2px solid #000;
  background-size: cover;
  background-position: center;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  z-index: 10;
}
@keyframes running-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-1.5px); }
}
.track:nth-child(2n) .runner-character { animation-delay: -0.2s; }
.track:nth-child(3n) .runner-character { animation-delay: -0.4s; }
.track:nth-child(5n) .runner-character { animation-delay: -0.1s; }
.track:nth-child(7n) .runner-character { animation-delay: -0.5s; }
.tracks-container.warming-up .runner { transition: none !important; }

/* =========================================
   CHAOS MODE & DYNAMIC RANK BADGES
========================================= */
.runner-body {
  --chaos-hue: 0deg;
  --chaos-sat: 100%;
  --chaos-bri: 100%;
  filter: hue-rotate(var(--chaos-hue)) saturate(var(--chaos-sat)) brightness(var(--chaos-bri)) !important;
}

.runner-symbol {
  display: flex;
  align-items: center; 
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}
.name-rank-bubble {
  width: 14px;
  height: 14px;
  background-color: #ffffff;
  border: 1px solid #000;
  border-radius: 50%;
  color: #000;
  font-size: 9px;
  font-weight: 800;
  font-family: "Arial", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.3);
  flex-shrink: 0;
}
.name-rank-bubble.nr-1 { background-color: #FFD700; } 
.name-rank-bubble.nr-2 { background-color: #CD7F32; }
.name-rank-bubble.nr-3 { background-color: #C0C0C0; color: #fff; }

.chart-section-wrapper {
    margin-top: 50px;
    padding-bottom: 60px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 1s ease;
}
.chart-section-wrapper .section-header {
    text-align: center;
    margin-bottom: 20px;
}
#main-chart-container {
    width: 96%;
    max-width: 1200px;
    height: 600px;
    margin: 0 auto;
    border: 4px solid #000;
    background: #000;
    border-radius: 16px;
    box-shadow: 0 10px 0 rgba(0,0,0,0.3);
    overflow: hidden;
}
#dexscreener-embed {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
.platform-start-badge {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    z-index: 5;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.5));
    pointer-events: none;
}

/* =======================================================
======================================================= */
.live-stats-wrapper {
    margin-top: 8px;
    background: #000;
    border: 3px solid #000;
    border-radius: 8px;
    overflow: hidden;
    font-family: "Courier New", monospace;
    box-shadow: 0 4px 0 rgba(0,0,0,0.3);
}
.stats-info-bar {
    background: #111;
    color: #ccc;
    font-size: 10px;
    padding: 4px 8px;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
}
.live-stats-table {
    width: 100%;
    border-collapse: collapse;
    color: #eee;
    font-size: 10px;
}
.live-stats-table th {
    background: #1a1a1a;
    text-align: left;
    padding: 6px 8px;
    font-weight: bold;
    color: #888;
    border-bottom: 1px solid #333;
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.5px;
}
.live-stats-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #222;
    white-space: nowrap;
    vertical-align: middle;
}
.live-stats-table tr:hover {
    background: #1f1f1f;
    cursor: pointer;
}

/* ==========================================================================
   MOBILE VERTICAL STADIUM
========================================================================== */
.mobile-channel-switch,
.mobile-bottom-nav {
    display: none !important;
}

/* ==========================================================================
   V3.0 TV STATIC (BLIZZARD MODE)
========================================================================== */
.tv-static-overlay {
    position: fixed;
    top: 60px; left: 0; right: 0; bottom: 60px;
    z-index: 2147483647;
    opacity: 0;
    pointer-events: none;
    background: #111;
    transition: opacity 0.02s;
}
.tv-static-overlay.active {
    opacity: 1;
    pointer-events: auto;
    animation: static-flicker 0.08s infinite;
}
@keyframes static-flicker {
    0% { opacity: 0.9; }
    25% { opacity: 1; }
    50% { opacity: 0.85; }
    75% { opacity: 1; }
    100% { opacity: 0.9; }
}
.tv-static-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: 
        repeating-radial-gradient(#000 0 0.0005%, #fff 0 0.005%),
        repeating-linear-gradient(#000 0 0.0005%, #fff 0 0.005%);
    background-size: 3px 3px; 
    background-blend-mode: difference;
    animation: shift-noise 0.2s linear infinite;
}
@keyframes shift-noise {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-10%, 10%); }
    40% { transform: translate(10%, -10%); }
    60% { transform: translate(-10%, 0); }
    80% { transform: translate(10%, 10%); }
    100% { transform: translate(0, 0); }
}

/* =========================================
========================================= */
.no-signal-wrapper {
    width: 100%;
    height: 320px;
    background: #000;
    position: relative;
    border: 4px solid #000;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    margin-top: 20px;
}
.color-bars {
    position: absolute;
    inset: 0;
    display: flex;
}
.color-bars span { flex: 1; height: 100%; }
.color-bars span:nth-child(1) { background: #e0e0e0; }
.color-bars span:nth-child(2) { background: #eabb00; }
.color-bars span:nth-child(3) { background: #00c3e3; }
.color-bars span:nth-child(4) { background: #00d648; }
.color-bars span:nth-child(5) { background: #d600d6; }
.color-bars span:nth-child(6) { background: #d60000; }
.color-bars span:nth-child(7) { background: #0000d6; }
.no-signal-text {
    z-index: 10;
    font-family: "Courier New", monospace;
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    background: #000;
    padding: 10px 20px;
    border: 2px solid #fff;
    animation: blink-text 2s infinite;
    text-shadow: 0 0 10px #fff;
    box-shadow: 0 0 15px rgba(0,0,0,0.8);
}
@keyframes blink-text { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ================================================= */
/* ================================================= */
@keyframes moveStripes {
    from { background-position: 0 0, 0 0; }
    to   { background-position: -120px 0, 0 0; }
}
.pumpfun-track, 
.fourmeme-track {
    animation: none; 
    background-position-x: 0px; 
}



/* =========================================
========================================= */
.tv-overlay { position:absolute; inset:0; overflow:hidden; }
.tv-overlay .tv-ov-bg {
  position:absolute;
  inset:-24px;
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 14px;
  align-content: center;
  justify-items: center;
  opacity: 0.18;
  transform: rotate(-4deg) scale(1.06);
  pointer-events:none;
  z-index: 0;
}
.tv-overlay .tv-ov-vignette{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:1;
  background:
    radial-gradient(circle at 30% 20%, rgba(0,255,204,0.10), transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(255,215,0,0.10), transparent 45%),
    radial-gradient(circle at 50% 50%, transparent 35%, rgba(0,0,0,0.55) 90%);
}
.tv-overlay .tv-ov-content{
  position:relative;
  z-index:2;
  padding: 10px 12px;
}
@keyframes tvLogoFloat {
  0%   { transform: translateY(0px) translateX(0px) scale(1); opacity: 0.95; }
  50%  { transform: translateY(-10px) translateX(6px) scale(1.02); opacity: 1; }
  100% { transform: translateY(0px) translateX(0px) scale(1); opacity: 0.95; }
}
.tv-overlay .tv-ov-logo{
  width: 48px;
  height: 48px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 8px 18px rgba(0,0,0,0.35);
  backdrop-filter: blur(2px);
  animation: tvLogoFloat 5.5s ease-in-out infinite;
}
.tv-overlay .tv-ov-logo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.2) contrast(1.08);
}
.tv-overlay .tv-ov-letter{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  font-size: 18px;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 2px 6px rgba(0,0,0,0.55);
}
.track.empty-lane {
    opacity: 0.4;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.2);
    display: flex;    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.empty-lane-text {
    font-family: 'Arial Black', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.1);
    letter-spacing: 2px;
    text-transform: uppercase;
    transform: skew(-10deg);
}

@media (max-width: 768px){
    body { padding-bottom: 70px; }
    .landing-hero { display: none !important; }
    .app { padding: 70px 6px 20px 6px; }
    .mobile-channel-switch {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 12px;
        position: fixed;
        top: 0; left: 0; right: 0;
        height: 60px;
        background: #fdf5e6;
        border-bottom: 3px solid #000;
        z-index: 9999;
        box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    }
    .tv-label {
        font-family: "Arial Black", sans-serif;
        font-size: 11px;
        font-weight: 900;
        margin-right: 4px;
    }
    .ch-btn {
        width: 40px; height: 40px;
        border: 2px solid #000;
        background: #fff;
        font-weight: 900;
        font-size: 16px;
        border-radius: 8px;
        box-shadow: 3px 3px 0 #000;
        cursor: pointer;
        transition: transform 0.1s;
    }
    .ch-btn.active {
        background: #000;
        color: #fff;
        transform: translate(2px, 2px);
        box-shadow: 1px 1px 0 #000;
    }
    .tribune-wrapper {
        height: 160px;
        margin-bottom: 15px;
        border-radius: 8px;
        border: 3px solid #000;
        background-color: #87c3ff;
        position: relative;
        overflow: hidden;
    }
    .tribune-overlay { display: none; }
    .tribune { border: none; box-shadow: none; }
    .tribune-tweets {
        position: static !important;
        display: inline-flex !important;
        gap: 15px;
    }
    .tweet-card-sp {
        width: 160px;
        flex-shrink: 0;
        white-space: normal;
        transform: rotate(-2deg);
        margin-top: 0;
    }
    .tweet-card-sp:nth-child(even) { transform: rotate(2deg); }
    .arena-layout { display: block !important; }
    .race-panel-col {
        display: none !important;
        width: 100% !important;
        margin-bottom: 20px;
    }
    .race-panel-col.active-channel {
        display: flex !important; 
        animation: channelFadeIn 0.3s ease-out;
    }
    @keyframes channelFadeIn {
        from { opacity: 0; transform: scale(0.95); }
        to { opacity: 1; transform: scale(1); }
    }
    .race-panel {
        border-width: 4px;
        box-shadow: 6px 6px 0 rgba(0,0,0,0.2);
    }
    .live-stats-table th:nth-child(2),
    .live-stats-table td:nth-child(2) { display: none; }
    .mobile-bottom-nav {
        display: flex !important;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 60px;
        background: #000;
        border-top: 3px solid #fff;
        z-index: 9999;
        padding: 0 10px;
    }
    .mobile-bottom-nav button {
        flex: 1;
        margin: 0 4px;
        padding: 10px 0;
        background: #fdf5e6;
        border: 2px solid #000;
        border-radius: 8px;
        font-weight: 900;
        font-size: 11px;
        text-transform: uppercase;
        box-shadow: 0 4px 0 #333;
        transform: translateY(-4px);
    }
    .mobile-bottom-nav button:active {
        transform: translateY(0);
        box-shadow: none;
    }
    .chart-section-wrapper {
        margin-top: 20px;
        padding-bottom: 80px;
    }
    #main-chart-container { height: 350px; }
    
    /* Tribune and Tweet Fixes */
    .tribune-wrapper {
        height: 200px !important;
        margin-bottom: 10px;
        position: relative !important;
        overflow: hidden;
        border: 3px solid #000;
        border-radius: 14px;
        background-color: #87c3ff;
    }

    .tribune {
        width: 100% !important;
        height: 100% !important;
        position: absolute !important;
        top: 0;
        left: 0;
        z-index: 1;
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
    }

    .tribune-tweets {
        position: absolute !important;
        top: 40px !important;
        left: 0 !important;
        right: 0 !important;
        display: flex !important;
        gap: 12px !important;
        overflow-x: auto !important;
        padding-left: 15px;
        padding-right: 15px;
        z-index: 10 !important;
        scrollbar-width: none;
        -ms-overflow-style: none;
        pointer-events: auto !important;
    }

    .tribune-tweets::-webkit-scrollbar {
        display: none;
    }

    .tweet-card-sp {
        width: 150px !important;
        min-width: 150px !important;
        flex-shrink: 0 !important;
        margin-top: 0 !important;
        transform: rotate(-2deg); 
    }
    
    .tweet-card-sp:nth-child(even) {
        transform: rotate(2deg);
    }
}


/* ================= LEADERBOARD (HIGH CONTRAST) ================= */
.rra-leaderboard{
  max-width: 100%;
  width: calc(100% - 24px);
  margin: 12px auto 14px auto;
  background: #f4efe6;
  color: #111;
  border: 3px solid #000;
  border-radius: 16px;
  padding: 14px 14px 10px 14px;
  box-shadow: 0 10px 0 rgba(0,0,0,0.18);
  position: relative;
  z-index: 9999;
  pointer-events: auto;
}

.rra-leaderboard *{ pointer-events:auto; }

.rra-leaderboard .lb-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.rra-leaderboard .lb-header h3{
  margin:0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .2px;
}

.rra-leaderboard .lb-note{
  font-size: 12px;
  font-weight: 800;
  opacity: 1;
  color:#111;
  text-align:right;
}

.rra-leaderboard .lb-tabs{
  display:flex;
  gap: 8px;
  margin: 10px 0 10px 0;
}

.rra-leaderboard .lb-tab{
  flex:1;
  padding: 10px 10px;
  background: #e9e2d6;
  color: #111;
  border: 3px solid #000;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 900;
  cursor:pointer;
  box-shadow: 0 4px 0 rgba(0,0,0,0.18);
}

.rra-leaderboard .lb-tab:hover{ transform: translateY(-1px); }
.rra-leaderboard .lb-tab.active{
  background: #111;
  color: #fff;
  box-shadow: 0 5px 0 rgba(0,0,0,0.28);
}

.rra-leaderboard .lb-tab.highlight{
  background: #ffd54a;
  color:#111;
}

.rra-leaderboard .lb-tab.highlight.active{
  background:#ffb300;
  color:#111;
}

.rra-leaderboard .lb-table{ display:none; }
.rra-leaderboard .lb-table.active{ display:block; }

.rra-leaderboard .lb-row.lb-head{
  background:#111;
  color:#fff;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 900;
  border-bottom: none;
}

.rra-leaderboard .lb-row{
  display:grid;
  grid-template-columns: 34px 1fr 80px;
  gap: 10px;
  align-items:center;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.18);
  font-weight: 800;
}

.rra-leaderboard .lb-row span{
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rra-leaderboard .lb-row span:last-child{
  text-align:right;
  font-variant-numeric: tabular-nums;
}

.rra-leaderboard .lb-empty{
  padding: 10px 6px;
  font-weight: 800;
  opacity: 0.85;
}

@media (max-width: 520px){
  .rra-leaderboard{ width: calc(100% - 16px); padding: 12px; }
  .rra-leaderboard .lb-tab{ padding: 9px 6px; font-size: 11px; }
  .rra-leaderboard .lb-row{ grid-template-columns: 30px 1fr 72px; padding: 8px 8px; }
}
/* ================= END LEADERBOARD ================= */

/* =========================================
   RRA LEADERBOARD MODAL
========================================= */
.rra-lb-tabs{
  display:flex;
  border-bottom:2px solid #000;
  background:#fff;
}
.rra-lb-tab{
  flex:1;
  text-align:center;
  padding:12px 5px;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
  background:#f3f4f6;
  border-right:1px solid #ddd;
  transition:all .2s;
  text-transform:uppercase;
}
.rra-lb-tab:last-child{border-right:none;}
.rra-lb-tab:hover{background:#e5e7eb;}
.rra-lb-tab.active{
  background:#fff;
  color:#7c3aed;
  box-shadow:inset 0 -3px 0 #7c3aed;
}

.rra-lb-body{
  max-height:400px;
  overflow-y:auto;
  background:#fff;
  padding:0;
}
.rra-lb-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 15px;
  border-bottom:1px solid #f0f0f0;
  font-family:"Courier New", monospace;
  font-size:12px;
}
.rra-lb-row:nth-child(odd){background:#fafafa;}
.rra-lb-row:nth-child(-n+3){background:#fffbeb;}

.rra-lb-rank-col{display:flex;align-items:center;gap:10px;font-weight:bold;}
.rra-lb-rank-badge{
  width:24px;height:24px;display:flex;align-items:center;justify-content:center;
  border-radius:50%;background:#eee;color:#555;font-size:11px;font-weight:900;
  border:1px solid #ccc;
}
.rra-lb-row:nth-child(1) .rra-lb-rank-badge{background:#fbbf24;color:#fff;border-color:#d97706;}
.rra-lb-row:nth-child(2) .rra-lb-rank-badge{background:#94a3b8;color:#fff;border-color:#64748b;}
.rra-lb-row:nth-child(3) .rra-lb-rank-badge{background:#b45309;color:#fff;border-color:#78350f;}

.rra-lb-wallet{color:#333;font-weight:600;}
.rra-lb-score{text-align:right;}
.rra-lb-score-main{font-weight:900;color:#000;font-size:13px;}
.rra-lb-score-sub{font-size:9px;color:#888;font-weight:600;text-transform:uppercase;}

/* -----------------------------
   Pist2 Big Prize Promo UI
   ----------------------------- */
.p2-promo-slot.hidden,
.p2-promo-banner.hidden { display: none !important; }

.p2-promo-slot{
  position: absolute;
  top: 62px; /* below header */
  right: 18px;
  z-index: 60;
  pointer-events: none;
}

.p2-promo-badge{
  width: 240px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: rgba(0,0,0,0.78);
  color: #fff;
  font-weight: 800;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.14);
  transform-origin: 50% 50%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}

.p2-promo-badge .title { font-size: 12px; letter-spacing: 0.8px; opacity: 0.9; }
.p2-promo-badge .prize { font-size: 26px; margin-top: 6px; }
.p2-promo-badge .count { font-size: 16px; margin-top: 6px; color: #66d9ff; }
.p2-promo-badge .state { font-size: 13px; margin-top: 10px; opacity: 0.9; }

.p2-promo-banner{
  position: absolute;
  top: 140px;           /* sits over lanes area */
  left: 50%;
  transform: translateX(-50%);
  width: min(780px, calc(100% - 48px));
  z-index: 55;
  pointer-events: none;
}

.p2-promo-banner .inner{
  padding: 18px 18px 16px;
  border-radius: 18px;
  background: rgba(0,0,0,0.62);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  text-align: center;
}

.p2-promo-banner .h1{
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.5px;
  color: #fff;
}

.p2-promo-banner .h2{
  margin-top: 6px;
  font-weight: 800;
  font-size: 16px;
  color: rgba(255,255,255,0.9);
}

.p2-promo-banner .h3{
  margin-top: 10px;
  font-weight: 800;
  font-size: 14px;
  color: #66d9ff;
}

@keyframes p2Spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes p2Pulse { 0% { transform: scale(1); } 50% { transform: scale(1.06); } 100% { transform: scale(1); } }

.p2-promo-badge.is-soon { animation: p2Pulse 1.2s ease-in-out infinite; }
.p2-promo-badge.is-live { animation: p2Spin 2.2s linear infinite; }




/* =========================================
   PIST2: BOUNCING BIG PRIZE BOX (DVD)
========================================= */
.bouncing-promo-box{
  position:absolute;
  width:260px;
  height:140px;
  border-radius:16px;
  background: rgba(25,25,25,0.92);
  border: 2px solid rgba(255,255,255,0.18);
  box-shadow: 0 10px 30px rgba(0,0,0,0.60);
  z-index: 60;
  pointer-events:none;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:8px;
  will-change: transform;
  text-align:center;
}

.bouncing-promo-box .bp-top{
  font-size:12px;
  letter-spacing:1.5px;
  font-weight:900;
  opacity:0.92;
}

.bouncing-promo-box .bp-prize{
  font-size:28px;
  font-weight:1000;
}

.bouncing-promo-box .bp-time{
  font-size:18px;
  font-weight:900;
  color:#00c6ff;
}

.bouncing-promo-box .bp-status{
  font-size:12px;
  font-weight:900;
  opacity:0.85;
}

.bouncing-promo-box.bp-hit{
  filter: hue-rotate(30deg) saturate(1.2);
}
/* PIST2 PROMO: keep ONLY the bouncing DVD box */
#pist2-promo-slot,
#pist2-promo-banner{
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
/* ===== PIST2 FINAL INTRO ===== */

.randy-final-intro {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 78%;
  max-width: 520px;
  padding: 34px 24px;
  background: rgba(0,0,0,0.82);
  border-radius: 18px;
  text-align: center;
  color: #fff;
  box-shadow:
    0 0 40px rgba(0,255,200,0.35),
    inset 0 0 30px rgba(0,255,200,0.15);
  animation: introBreath 3.5s ease-in-out infinite;
}

.intro-top {
  font-size: 18px;
  letter-spacing: 2px;
  opacity: 0.9;
  margin-bottom: 14px;
}

.intro-mid {
  font-size: 22px;
  letter-spacing: 3px;
  margin-bottom: 10px;
  color: #00ffcc;
}

.intro-time {
  font-family: monospace;
  font-size: 48px;
  font-weight: bold;
  letter-spacing: 3px;
  color: #00ffcc;
  text-shadow:
    0 0 12px rgba(0,255,200,0.8),
    0 0 30px rgba(0,255,200,0.4);
  margin-bottom: 12px;
}

.intro-bottom {
  font-size: 14px;
  opacity: 0.8;
  letter-spacing: 2px;
}

@keyframes introBreath {
  0%   { transform: translate(-50%, -50%) scale(1); }
  50%  { transform: translate(-50%, -50%) scale(1.035); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.randy-final-intro.danger .intro-time {
  color: #ff3b3b;
  text-shadow:
    0 0 15px rgba(255,60,60,0.9),
    0 0 40px rgba(255,60,60,0.6);
  animation: dangerPulse 0.6s infinite;
}

@keyframes dangerPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
/* === PIST2 VISUAL BOOST (FINAL OVERRIDE) === */
/* === PIST2 FINAL OVERRIDE (MUST BE LAST) === */
/* =========================================
   PIST2 HARD CLEAN PATCH (NO BLUR / NO PROMO / 
========================================= */

#col-pist2,
#col-pist2 .race-area,


#pist2-panel {
  background: #f3efe7 !important; 
}

#pist2-panel #tracks-container-2 .track,
#pist2-panel #tracks-container-2 .track * {
  filter: none !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
}

#pist2-panel #tracks-container-2 .track::before,
#pist2-panel #tracks-container-2 .track::after {
  content: none !important;
  display: none !important;
}

#pist2-panel #tracks-container-2 .track.p2-ghost-track {
  background: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.18) 0px,
    rgba(255,255,255,0.18) 18px,
    rgba(0,0,0,0.06) 18px,
    rgba(0,0,0,0.06) 36px
  ) !important;
}

#pist2-panel #tracks-container-2 .p2-ghost-label {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  padding: 6px 10px !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,0.85) !important;
  border: 2px solid #000 !important;
  font-weight: 900 !important;
  font-size: 12px !important;
  color: #000 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  pointer-events: none !important;
}
/* === FORCE X FEEDS UI (Pist2 altı) === */
.x-feeds-row{
  display:flex !important;
  gap:12px !important;
  margin:10px 0 14px !important;
  flex-wrap:wrap !important;
}

.x-feed-wrapper{
  background:#000 !important;
  color:#e7e9ea !important;
  border:2px solid #111 !important;
  border-radius:14px !important;
  padding:12px 14px !important;
  width:calc(50% - 6px) !important;
  box-sizing:border-box !important;
}

.x-feed-header{
  display:flex !important;
  justify-content:space-between !important;
  align-items:flex-start !important;
  margin-bottom:8px !important;
}

.x-feed-user{display:flex !important; gap:10px !important; align-items:center !important;}
.x-feed-avatar{
  width:40px !important; height:40px !important;
  border-radius:999px !important;
  background:#ffa500 !important;
  color:#000 !important;
  font-weight:900 !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
  border:2px solid #000 !important;
}

.x-feed-meta{line-height:1.1 !important;}
.x-feed-name{font-weight:900 !important; font-size:14px !important;}
.x-feed-handle{opacity:.75 !important; font-size:12px !important;}

.x-logo-icon{font-weight:900 !important; font-size:16px !important; opacity:.9 !important;}

.x-feed-content{
  background:#0b0b0b !important;
  border:1px solid #222 !important;
  border-radius:12px !important;
  padding:10px 12px !important;
  margin:8px 0 10px !important;
  font-size:13px !important;
  line-height:1.25 !important;
}

.x-feed-footer{
  display:flex !important;
  gap:10px !important;
  justify-content:space-between !important;
  opacity:.85 !important;
  font-size:12px !important;
}

@media (max-width: 900px){
  .x-feed-wrapper{width:100% !important;}
}
/* === PIST 2 BROADCAST TV OVERLAY (FINAL BALANCED SIZE) === */
.p2-broadcast-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(4px);
}

/* FIX: make sure hidden really hides (prevents dark blur ghost layer) */
.p2-broadcast-overlay.hidden,
#p2-tv-overlay.hidden {
  display: none !important;
  pointer-events: none !important;
}

.p2-poster-box {
  border: 4px solid #ffd700;
  padding: 20px 35px;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.25), inset 0 0 15px rgba(255, 215, 0, 0.15);
  background: radial-gradient(circle, #222 0%, #000 100%);
  transform: rotate(-2deg);
  max-width: 95%;
}

.p2-poster-title {
  font-family: "Impact", sans-serif;
  font-size: 2.8rem; 
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  text-shadow: 3px 3px 0px #000;
}

.p2-poster-prize {
  font-family: "Arial Black", sans-serif;
  font-size: 4.2rem;
  color: #0f0;
  text-shadow: 0 0 20px #0f0;
  margin: 8px 0;
  line-height: 1;
  animation: pulse-green 1.5s infinite alternate;
}

.p2-poster-time {
  font-size: 1.8rem; /* 1.4 -> 1.8 */
  color: #ffd700;
  font-weight: bold;
  background: #333;
  padding: 6px 16px;
  display: inline-block;
  margin-top: 12px;
  border: 2px solid #555;
  border-radius: 6px;
}

.p2-poster-sub {
  color: #999;
  font-size: 0.95rem;
  margin-top: 18px;
  font-style: italic;
}

.p2-warmup-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.5);
}

.p2-warmup-status {
  font-size: 1.3rem;
  color: #ff3333;
  font-weight: bold;
  letter-spacing: 4px;
  animation: blink 1s infinite;
  margin-bottom: 8px;
  background: rgba(0,0,0,0.6);
  padding: 6px 12px;
  border-radius: 6px;
}

.p2-warmup-timer {
  font-family: "Courier New", monospace;
  font-size: 5.5rem;
  color: #fff;
  font-weight: 900;
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
  line-height: 1;
}

.p2-warmup-info {
  font-size: 1rem;
  color: #00ccff;
  margin-top: 8px;
  text-transform: uppercase;
  background: rgba(0,0,0,0.7);
  padding: 4px 10px;
  border-radius: 4px;
}


@keyframes pulse-green {
  from { text-shadow: 0 0 10px #0f0; transform: scale(1); }
  to { text-shadow: 0 0 30px #0f0, 0 0 10px #fff; transform: scale(1.03); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@media (max-width: 600px) {
  .p2-poster-title { font-size: 1.8rem; }
  .p2-poster-prize { font-size: 2.8rem; }
  .p2-poster-time { font-size: 1.3rem; }
  .p2-warmup-timer { font-size: 3.5rem; }
}
.p2-tv-overlay{
  position:absolute;
  inset:0;
  z-index:9999;
  pointer-events:none;
}
.p2-tv-overlay.hidden{ display:none !important; }

.p2-tv-bg{
  position:absolute; inset:0;
  background:rgba(0,0,0,0.65);
}
.p2-tv-ui{
  position:absolute; inset:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:14px;
}

.p2-tv-status{ font-size:18px; font-weight:800; }
.p2-tv-timer{ font-size:64px; font-weight:900; }
.p2-tv-sub{ font-size:14px; }

.p2-tv-wall{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  justify-content:center;
  width:90%;
}

.p2-tv-token{
  width:80px; height:80px;
  border-radius:999px;
  background:rgba(0,0,0,0.6);
  border:2px solid cyan;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  transform:scale(0.3);
  opacity:0;
  transition:.35s;
}
.p2-tv-token.on{
  transform:scale(1);
  opacity:1;
}
.p2-tv-token img{ width:40px; height:40px; border-radius:999px; }
#pist2-panel .p2-broadcast-overlay{
  background: transparent !important;        
  backdrop-filter: none !important;            
  -webkit-backdrop-filter: none !important;
}

#pist2-panel .tv-overlay .tv-ov-vignette,
#tracks-container-2 .tv-overlay .tv-ov-vignette{
  display: none !important;
}
/* =========================
   P2 POSTER WARMUP OVERLAY
   ========================= */
#p2-poster-ov {
  position: absolute;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none; 
}

#p2-poster-ov .p2-ov-blur {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#p2-poster-ov .p2-poster-card {
  position: relative;
  width: min(520px, 86vw);
  padding: 26px 26px 18px;
  border: 4px solid #f6c400;
  border-radius: 14px;
  background: rgba(10,10,10,0.78);
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  transform: rotate(-2deg);
}

#p2-poster-ov .p2-poster-title {
  font-size: 40px;
  letter-spacing: 2px;
  font-weight: 900;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 0 rgba(0,0,0,0.8);
}

#p2-poster-ov .p2-poster-prize {
  margin-top: 10px;
  font-size: 86px;
  font-weight: 1000;
  text-align: center;
  color: #00ff3b;
  text-shadow: 0 0 18px rgba(0,255,59,0.55);
}

#p2-poster-ov .p2-poster-start {
  margin: 18px auto 0;
  width: fit-content;
  padding: 10px 18px;
  background: rgba(40,40,40,0.85);
  border: 2px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  font-size: 34px;
  font-weight: 900;
  color: #f6c400;
  letter-spacing: 1px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.35);
}

#p2-poster-ov .p2-poster-sub {
  margin-top: 14px;
  text-align: center;
  color: rgba(255,255,255,0.55);
  font-size: 15px;
  font-style: italic;
}

@media (max-width: 520px) {
  #p2-poster-ov .p2-poster-title { font-size: 32px; }
  #p2-poster-ov .p2-poster-prize { font-size: 64px; }
  #p2-poster-ov .p2-poster-start { font-size: 26px; }
}
// =====================================================
// PIST2 IDLE MODE (No trigger, no promo, no warmup)
// Blur + bouncing persona images (elon, trump, randy, cz)
// =====================================================

(function () {
  let idleOv = null;
  let sprites = [];

  const IMG_LIST = [
    "/frontend_v2/cz.jpg",
    "/frontend_v2/donny.jpg",
    "/frontend_v2/elan.jpg",
    "/frontend_v2/randy.jpg"
  ];

  function createIdleOverlay() {
    if (idleOv) return idleOv;

    const host =
      document.getElementById("tracks-container-2") ||
      document.getElementById("col-pist2") ||
      document.body;

    idleOv = document.createElement("div");
    idleOv.id = "pist2-idle-ov";
    idleOv.style.position = "absolute";
    idleOv.style.left = "0";
    idleOv.style.top = "0";
    idleOv.style.width = "100%";
    idleOv.style.height = "100%";
    idleOv.style.zIndex = "18";
    idleOv.style.pointerEvents = "none";
    idleOv.style.backdropFilter = "blur(6px)";
    idleOv.style.background = "rgba(0,0,0,0.25)";
    idleOv.style.overflow = "hidden";

    host.appendChild(idleOv);

    spawnSprites();
    animateSprites();

    return idleOv;
  }

  function removeIdleOverlay() {
    if (idleOv) {
      idleOv.remove();
      idleOv = null;
      sprites = [];
    }
  }

  function spawnSprites() {
    sprites = [];

    const W = idleOv.clientWidth;
    const H = idleOv.clientHeight;

    IMG_LIST.forEach(src => {
      const img = document.createElement("img");
      img.src = src;
      img.style.position = "absolute";
      img.style.width = "110px";
      img.style.height = "110px";
      img.style.borderRadius = "50%";
      img.style.opacity = "0.9";
      img.style.boxShadow = "0 0 25px rgba(255,255,255,0.35)";
      img.style.left = Math.random() * (W - 120) + "px";
      img.style.top = Math.random() * (H - 120) + "px";

      idleOv.appendChild(img);

      sprites.push({
        el: img,
        x: parseFloat(img.style.left),
        y: parseFloat(img.style.top),
        vx: (Math.random() * 2 + 1) * (Math.random() > 0.5 ? 1 : -1),
        vy: (Math.random() * 2 + 1) * (Math.random() > 0.5 ? 1 : -1),
        size: 110
      });
    });
  }

  function animateSprites() {
    if (!idleOv) return;

    const W = idleOv.clientWidth;
    const H = idleOv.clientHeight;

    sprites.forEach(s => {
      s.x += s.vx;
      s.y += s.vy;

      // çarpma – sekme
      if (s.x <= 0 || s.x + s.size >= W) s.vx *= -1;
      if (s.y <= 0 || s.y + s.size >= H) s.vy *= -1;

      s.el.style.left = s.x + "px";
      s.el.style.top = s.y + "px";
    });

    requestAnimationFrame(animateSprites);
  }

  // -----------------------------------------------------
  // -----------------------------------------------------
  setInterval(() => {
    try {
      const r = window.pist2Race || null;
      const promo = window.__p2PromoState || null;

      const phase = String(r?.phase || "unknown").toLowerCase();

      // Warmup / race / collecting varsa idle kapansın
      if (
        phase === "collecting" ||
        phase === "countdown" ||
        phase === "running" ||
        phase === "race" ||
        phase === "prep"
      ) {
        removeIdleOverlay();
        return;
      }

        const diff = promo.startAtMs - Date.now();
        if (diff <= 15 * 60 * 1000) {
          removeIdleOverlay();
          return;
        }
      }

      createIdleOverlay();

    } catch (e) {}
  }, 500);

})();
.tribune-right {
  display: none;
}

.tribune-top {
  justify-content: center;
}
/* --- PIST2 MOBILE STACK FIX --- */

.mobile-channel-switch {
  position: sticky;
  top: 0;
  z-index: 99999;
}

#pist2-panel {
  position: relative;
  isolation: isolate;
}

#pist2-warmup-ov {
  z-index: 50;
}
@media (max-width: 768px) {
  .tribune-tweets {
    top: 10px !important;
  }
}
