/* ============================================================
   TENNIS SCROLL PROGRESS BAR
   ============================================================ */

.stb-bar {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 800;
  height: 36px;
  background-color: #0B1A0B;
  border-bottom: 2px solid #5A8A3C;
  transform: translateY(-100%);
  transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

@media (min-width: 768px) {
  .stb-bar { top: 60px; }
}

.stb-bar.stb-visible {
  transform: translateY(0);
}

.stb-inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 10px;
  gap: 6px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---- Racket icon (left endpoint) ---- */
.stb-racket-wrap {
  flex-shrink: 0;
  width: 22px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stb-racket-svg {
  display: block;
  width: 22px;
  height: 34px;
  overflow: visible;
}

/* ---- Track (contains track line, fill, ball, AND trophy) ---- */
.stb-track-wrap {
  flex: 1;
  position: relative;
  height: 36px;
}

.stb-track-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  background-color: #2A5A2A;
  border-radius: 3px;
}

.stb-track-fill {
  position: absolute;
  left: 0;
  width: 0%;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  background: linear-gradient(90deg, #3F6828, #5A8A3C);
  border-radius: 3px;
  transition: width 0.12s linear;
}

/* ---- Ball ---- */
.stb-ball-container {
  position: absolute;
  left: 0%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: left 0.12s linear;
  z-index: 3;
}

.stb-ball {
  width: 13px;
  height: 13px;
  background: radial-gradient(circle at 38% 35%, #FFF176, #F9C500);
  border-radius: 50%;
  box-shadow: 0 0 7px rgba(255,235,80,0.75), 0 1px 3px rgba(0,0,0,0.45);
  position: relative;
}

/* ---- Trophy (right endpoint, lying on side, cup faces left) ---- */
.stb-track-wrap .stb-trophy-wrap {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  overflow: visible;
}

.stb-trophy-svg {
  display: block;
  width: 26px;
  height: 34px;
  overflow: visible;
  transform: rotate(0deg);
}

/* ---- Racket swing animation ---- */
.stb-swing-arm {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: rotate(-30deg);
}

.stb-racket-wrap.stb-swung .stb-swing-arm {
  animation: stb-racket-swing 0.55s ease-out forwards;
}

@keyframes stb-racket-swing {
  0%   { transform: rotate(-30deg); }
  55%  { transform: rotate(35deg); }
  78%  { transform: rotate(-5deg); }
  100% { transform: rotate(0deg); }
}

/* ---- Ball travels into trophy cup ---- */
.stb-ball-container.stb-sinking {
  animation: stb-sink 0.6s ease-in forwards !important;
  transition: none !important;
}

@keyframes stb-sink {
  0%   { transform: translate(-50%, -50%) scale(1);               opacity: 1; }
  30%  { transform: translate(calc(-50% + 14px), -30%) scale(0.8); opacity: 0.9; }
  65%  { transform: translate(calc(-50% + 28px), -8%) scale(0.5);  opacity: 0.75; }
  100% { transform: translate(calc(-50% + 38px), 10px) scale(0.05); opacity: 0; }
}

/* ---- Trophy gets hit and topples to the right ---- */
.stb-track-wrap .stb-trophy-wrap.stb-celebrating {
  transform-origin: 50% 100%;
  animation: stb-topple 0.75s ease-in forwards;
}

@keyframes stb-topple {
  0%   { transform: translateY(-50%) rotate(0deg); }
  15%  { transform: translateY(-52%) rotate(-10deg); }
  100% { transform: translateY(30px) rotate(90deg); }
}

/* ============================================================
   MATCH POINT BONUS POPUP
   ============================================================ */

.match-bonus {
  position: fixed;
  bottom: 22px;
  right: 20px;
  z-index: 8500;
  width: 300px;
  transform: translateY(180px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.55s cubic-bezier(0.34, 1.35, 0.64, 1), opacity 0.4s ease;
}

.match-bonus.match-bonus-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.match-bonus .match-bonus-header {
  background: linear-gradient(160deg, #1A3A1A 0%, #1A4A1A 55%, #0A1A0A 100%);
  border: 2px solid #5A8A3C;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.65), 0 0 0 1px rgba(90,138,60,0.15);
  transition: box-shadow 0.2s ease, border-radius 0.3s ease, border-bottom-color 0.3s ease;
}

.match-bonus.match-bonus-open .match-bonus-header {
  border-radius: 12px 12px 0 0;
  border-bottom-color: #1A4A1A;
}

.match-bonus .match-bonus-header:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.65), 0 0 0 4px rgba(90,138,60,0.28);
}

.match-bonus.match-bonus-visible .match-bonus-header {
  animation: match-bonus-pulse 1.8s ease-out 0.65s 3;
}

@keyframes match-bonus-pulse {
  0%   { box-shadow: 0 8px 32px rgba(0,0,0,0.65), 0 0 0 0 rgba(90,138,60,0.75); }
  55%  { box-shadow: 0 8px 32px rgba(0,0,0,0.65), 0 0 0 16px rgba(90,138,60,0); }
  100% { box-shadow: 0 8px 32px rgba(0,0,0,0.65), 0 0 0 0 rgba(90,138,60,0); }
}

.match-bonus .match-bonus-header-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 9px 14px;
  border-bottom: 1px solid rgba(90,138,60,0.18);
  background: linear-gradient(90deg, rgba(90,138,60,0.1) 0%, transparent 70%);
}

.match-bonus .match-bonus-flag { flex-shrink: 0; display: flex; align-items: center; }

.match-bonus .match-bonus-label {
  flex: 1;
  font-size: 11px;
  font-weight: 900;
  color: #5A8A3C;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.match-bonus .match-bonus-dismiss {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.match-bonus .match-bonus-dismiss:hover { background-color: rgba(255,255,255,0.1); }

.match-bonus .match-bonus-header-offer { padding: 12px 16px 10px; }

.match-bonus .match-bonus-header-brand {
  display: block;
  width: fit-content;
  font-size: 10px;
  font-weight: 800;
  color: #FF9900;
  background-color: rgba(15,15,15,0.75);
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.match-bonus .match-bonus-header-amount {
  font-size: 30px;
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.match-bonus .match-bonus-header-amount .match-bonus-amount-label {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0;
}

.match-bonus .match-bonus-header-trigger {
  font-size: 11px;
  color: rgba(255,255,255,0.42);
  line-height: 1.45;
}

.match-bonus .match-bonus-header-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px 10px 16px;
  background: rgba(90,138,60,0.08);
  border-top: 1px solid rgba(90,138,60,0.18);
}

.match-bonus .match-bonus-header-cta-label {
  font-size: 12px;
  font-weight: 800;
  color: #5A8A3C;
  letter-spacing: 0.3px;
}

.match-bonus .match-bonus-chevron {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: transform 0.25s ease;
}

.match-bonus.match-bonus-open .match-bonus-chevron { transform: rotate(180deg); }

.match-bonus .match-bonus-body {
  max-height: 0;
  overflow: hidden;
  background-color: #091509;
  border: 2px solid #5A8A3C;
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.match-bonus.match-bonus-open .match-bonus-body {
  max-height: 300px;
}

.match-bonus .match-bonus-body-inner {
  padding: 16px 16px 14px;
}

.match-bonus .match-bonus-congrats {
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 6px;
  line-height: 1.2;
}

.match-bonus .match-bonus-desc {
  font-size: 12px;
  color: #999999;
  line-height: 1.55;
  margin-bottom: 14px;
}

.match-bonus .match-bonus-offer {
  background-color: #1A4A1A;
  border: 1px solid #2A5A2A;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.match-bonus .match-bonus-brand {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #FF9900;
  background-color: #1A1A1A;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
  width: fit-content;
}

.match-bonus .match-bonus-cta-wrap { display: block; margin-bottom: 10px; }
.match-bonus .match-bonus-cta-wrap .match-bonus-cta { margin-bottom: 0; }

.match-bonus .match-bonus-offer-text {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
}

.match-bonus .match-bonus-cta {
  display: block;
  text-align: center;
  background-color: #5A8A3C;
  color: #0A1A0A;
  font-size: 14px;
  font-weight: 800;
  padding: 11px 16px;
  border-radius: 5px;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: background-color 0.15s ease;
}

.match-bonus .match-bonus-cta:hover {
  background-color: #3F6828;
  color: #0A1A0A;
  text-decoration: none;
}

.match-bonus .match-bonus-cta.btn-disabled {
  background-color: #AAAAAA;
  color: #EEEEEE;
  cursor: not-allowed;
  pointer-events: none;
}

.match-bonus .match-bonus-legal {
  font-size: 10px;
  color: #4A4A4A;
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 767px) {
  .match-bonus {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 16px;
  }
}
