:root {
  --bg-color: #1e293b;
  --panel-bg: rgba(11, 20, 49, 0.8);
  --border-color: rgba(30, 45, 92, 0.5);
  --text-main: #f8fafc;
  --text-muted: #ffffff;
  --accent-yellow: #ffffff;
  --accent-blue: #3b82f6;
  --accent-green: #00e676;
  --accent-cyan: #00e5ff;
  --accent-purple: #9333ea;
  --bg-gradient-angle: 180deg;
  --bg-gradient-start: #1b2735;
  --bg-gradient-end: #090a0f;
  --bg-glow-x: 43%;
  --bg-glow-y: 73%;
  --bg-horizon-glow-opacity: 0.16;
  --bg-glow-opacity: 0.08;
  --star-tile-size: 2000px;
  --star-speed-mult: 1.05;
  --star-opacity-mult: 1;
  --star-density-mult: 1;
  --starfield-glow-opacity: 0.8;
  --ui-runtime-scale: 1;

  /* UI Layout Variables */
  --hud-top: 18px;
  --hud-left: 18px;
  --dev-bottom: 9px;
  --dev-left: 24px;
  --sidebar-width: 381px;
  --app-padding-left: 170px;
  --app-gap: 0px;
  --font-family-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-scale: 1;
  --hud-stack-gap: 10px;
  --hud-top-row-gap: 10px;
  --hud-stats-gap: 24px;
  --bucket-body-top-color: #2563eb;
  --bucket-body-bottom-color: #1e3a8a;
  --bucket-border-color: rgba(255, 255, 255, 0.3);
  --bucket-inner-color: rgba(0, 0, 0, 0.3);
  --bucket-border-radius: 12px;
  --bucket-value-color: #ffffff;
  --bucket-value-font-size: 20px;
  --bucket-value-pad-x: 12px;
  --bucket-value-y: 46px;
  --bucket-badge-bg: rgba(0, 0, 0, 0.45);
  --bucket-badge-color: #ffffff;
  --bucket-badge-radius: 6px;
  --bucket-badge-width: 58px;
  --bucket-badge-height: 18px;
  --bucket-badge-pad-x: 10px;
  --bucket-badge-font-size: 12px;
  --bucket-badge-value-x: 16px;
  --bucket-badge-value-y: -5px;
  --bucket-level-color: rgba(255, 255, 255, 0.8);
  --bucket-level-font-size: 16px;
  --bucket-level-pad-right: 12px;
  --bucket-level-y: 46px;
  --bucket-exp-bg: rgba(0, 0, 0, 0.4);
  --bucket-exp-pad: 12px;
  --bucket-exp-height: 10px;
  --bucket-exp-y: 20px;
  --bucket-exp-radius: 5px;
  --bucket-exp-start: #4ade80;
  --bucket-exp-end: #22c55e;
  --bucket-inner-height: 20px;
  --bucket-inner-radius: 6px;
  --skin-meta-justify: center;
  --skin-status-font-family: var(--font-family-main);
  --skin-status-font-size: 1rem;
  --skin-status-font-weight: 800;
  --skin-status-letter-spacing: 0.05em;
  --skin-status-line-height: 1.1;
  --skin-status-text-align: center;
  --skin-status-transform: uppercase;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  position: relative;
  font-family: var(--font-family-main);
  font-size: calc(16px * var(--font-scale));
  background-color: var(--bg-color);
  color: var(--text-main);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--bg-glow-x, 50%) var(--bg-glow-y, 84%), rgba(59, 130, 246, var(--bg-horizon-glow-opacity, 0.16)), transparent 34%),
    radial-gradient(circle at var(--bg-glow-x, 50%) var(--bg-glow-y, 84%), rgba(34, 211, 238, var(--bg-glow-opacity, 0.08)), transparent 24%),
    linear-gradient(var(--bg-gradient-angle), var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
}

.star-layer {
  position: absolute;
  top: 0;
  left: 0;
  background: transparent;
  width: var(--star-size, 1px);
  height: var(--star-size, 1px);
  box-shadow: var(--star-shadows, none);
  opacity: calc(var(--star-opacity, 1) * var(--star-opacity-mult, 1));
  animation: animStar calc(var(--star-duration, 50s) * var(--star-speed-mult, 1)) linear infinite;
  will-change: transform;
}

.star-layer::after {
  content: "";
  position: absolute;
  top: var(--star-tile-size, 2000px);
  left: 0;
  width: var(--star-size, 1px);
  height: var(--star-size, 1px);
  background: transparent;
  box-shadow: var(--star-shadows, none);
}

#stars {
  --star-size: 1px;
  --star-duration: 50s;
  --star-opacity: 0.95;
  --star-speed-mult: 1.05;
}

#stars2 {
  --star-size: 2px;
  --star-duration: 100s;
  --star-opacity: 0.85;
  --star-speed-mult: 1.05;
}

#stars3 {
  --star-size: 3px;
  --star-duration: 150s;
  --star-opacity: 0.75;
  --star-speed-mult: 1.05;
}

.starfield-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at var(--bg-glow-x, 50%) var(--bg-glow-y, 84%), rgba(59, 130, 246, 0.14), transparent 32%),
    radial-gradient(circle at var(--bg-glow-x, 50%) var(--bg-glow-y, 84%), rgba(34, 211, 238, 0.08), transparent 22%);
  mix-blend-mode: screen;
  opacity: var(--starfield-glow-opacity, 0.8);
}

@keyframes animStar {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(calc(var(--star-tile-size, 2000px) * -1));
  }
}

/* UI Scale Wrapper */
#ui-scale-root {
  position: fixed;
  top: 0;
  left: 0;
  width: 1366px;
  height: 768px;
  transform-origin: top left;
  z-index: 1;
  /* transform is set dynamically by JS */
}

#app {
  display: flex;
  width: 1366px;
  height: 768px;
  padding: 24px 24px 24px var(--app-padding-left);
  gap: var(--app-gap);
  position: relative;
}

/* HUD (Top-Left) */
.hud {
  position: absolute;
  top: var(--hud-top);
  left: var(--hud-left);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: var(--hud-stack-gap);
  min-width: 320px;
  padding: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.hud button,
.hud [role="button"],
.hud .boost-dock {
  pointer-events: auto;
}

.hud-top-row {
  display: flex;
  align-items: center;
  gap: var(--hud-top-row-gap);
}

.hud .level-container {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.hud-star-balance {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0;
  margin-left: 4px;
  background: transparent;
  border: none;
}

.hud-stats {
  display: flex;
  justify-content: space-between;
  gap: var(--hud-stats-gap);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.stat-value-score {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--accent-yellow);
  line-height: 1;
}

.stat-value-balls {
  font-size: 2rem;
  font-weight: 900;
  color: white;
  line-height: 1;
}

.stat-value-income {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent-green);
  line-height: 1;
}

.hud-star-icon {
  width: 30px;
  height: 30px;
  display: block;
  flex: 0 0 auto;
}

.stat-value-star {
  font-size: 2.00rem;
  font-weight: 900;
  color: #fde68a;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.25);
  min-width: 24px;
  text-align: right;
}

.sub-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hud-income-box,
.hud-balls-box {
  display: flex;
  flex-direction: column;
}

/* Plinko Board Container */
.board-container {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: default;
}

.board-container canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  aspect-ratio: 1 / 1;
}

/* ---- FIRST DROP HINT ---- */
#first-drop-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 10;
  animation: hint-float 1.2s ease-in-out infinite;
}

#first-drop-hint .hint-arrow {
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 20px solid #ffd800;
  filter: drop-shadow(0 0 8px #ffd800aa);
}

#first-drop-hint .hint-text {
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffd800;
  text-shadow: 0 0 10px #ffd800aa;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

#first-drop-hint.hidden {
  display: none;
}

@keyframes hint-float {

  0%,
  100% {
    transform: translate(-50%, -60%);
    opacity: 1;
  }

  50% {
    transform: translate(-50%, -50%);
    opacity: 0.7;
  }
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  height: 720px;
  display: flex;
  flex-direction: column;
  overflow: visible;
  /* Changed from hidden to allow shadow/glow if needed */
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  justify-content: space-between;
  background: transparent;
  padding: 12px 0;
  gap: 8px;
  position: relative;
  z-index: 10;
}

.tab-btn {
  flex: 1;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.08), rgba(15, 23, 42, 0.62));
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.84);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.1s;
  z-index: 2;
  min-height: 54px;
  position: relative;
  overflow: visible;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 0 rgba(0, 0, 0, 0.3);
}

.tab-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  transition: transform 0.2s;
  opacity: 0.88;
}

.tab-btn.active .tab-icon {
  transform: scale(1.15);
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

.tab-btn:hover:not(.active) {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.12), rgba(30, 41, 59, 0.72));
  color: white;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 5px 0 rgba(0, 0, 0, 0.3);
}

.tab-btn.active {
  color: white;
  transform: translateY(2px);
}

.tab-alert-badge {
  position: absolute;
  top: -6px;
  right: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.72), transparent 28%),
    radial-gradient(circle at 50% 62%, rgba(248, 113, 113, 0.46), transparent 58%),
    linear-gradient(to bottom, #ff6b6b, #dc2626);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.95), 0 8px 16px rgba(220, 38, 38, 0.45);
  pointer-events: none;
  transform-origin: 50% 60%;
  animation: tabBadgePulse 1.15s ease-in-out infinite;
}

.tab-alert-badge.hidden {
  display: none;
}

@keyframes tabBadgePulse {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 0 0 rgba(255, 99, 99, 0));
  }

  35% {
    transform: scale(1.12) rotate(-10deg);
    filter: drop-shadow(0 0 10px rgba(255, 99, 99, 0.55));
  }

  70% {
    transform: scale(0.98) rotate(10deg);
    filter: drop-shadow(0 0 14px rgba(255, 99, 99, 0.7));
  }
}

/* Active Colors per Tab with 3D Shadows */
.tab-btn[data-tab="upgrades"].active {
  background: linear-gradient(to bottom, #2563eb, #1d4ed8);
  box-shadow: 0 2px 0 #1e3a8a !important;
}

.tab-btn[data-tab="prestige"].active {
  background: linear-gradient(to bottom, #eab308, #ca8a04);
  box-shadow: 0 2px 0 #854d0e !important;
}

.tab-btn[data-tab="skins"].active {
  background: linear-gradient(to bottom, #06b6d4, #0891b2);
  box-shadow: 0 2px 0 #155e75 !important;
}

.tab-btn[data-tab="achievements"].active {
  background: linear-gradient(to bottom, #f59e0b, #d97706);
  box-shadow: 0 2px 0 #92400e !important;
}

.tab-btn[data-tab="settings"].active {
  background: linear-gradient(to bottom, #9333ea, #7e22ce);
  box-shadow: 0 2px 0 #581c87 !important;
}

.tab-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) !important;
}

/* Tab Content */
.tab-content-container {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scroll-behavior: auto;
}

.tab-content-container.drag-scrolling {
  cursor: grabbing;
}

.tab-content-container::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.tab-content-container button,
.tab-content-container input,
.tab-content-container select,
.tab-content-container textarea,
.tab-content-container a {
  user-select: auto;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  font-size: 1.25rem;
  font-weight: 900;
  margin-bottom: 24px;
  letter-spacing: 0.1em;
  color: white;
  text-transform: uppercase;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Shared upgrade-style surfaces */
.upgrade-item,
.achievement-item,
.prestige-perk-row,
.skin-item,
.setting-row,
.dev-controls,
.modal,
.prestige-req-card,
.prestige-stat,
.achievement-toast {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

@media (hover: hover) and (pointer: fine) {

  .upgrade-item:hover,
  .achievement-item:hover,
  .prestige-perk-row:hover:not(:disabled),
  .skin-item:hover,
  .setting-row:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(145deg, #162136, #0a0f1d);
    transform: scale(0.995);
  }
}

.upgrade-item::before,
.achievement-item::before,
.skin-item::before,
.setting-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 28%),
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.14), transparent 42%),
    radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.12), transparent 38%);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

.upgrade-item>*,
.achievement-item>*,
.skin-item>*,
.setting-row>* {
  position: relative;
  z-index: 1;
}

.buy-btn,
.prestige-btn-main,
.got-it-btn,
.reset-btn,
.dev-btn,
.toggle,
.sub-tab-btn,
.achievement-status-btn {
  font-weight: 900;
}

/* Upgrades specific */
.upgrades-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upgrade-item {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  font-family: var(--font-family-main);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(15, 23, 42, 0.72)),
    rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 4px solid rgba(59, 130, 246, 0.58);
}

.upgrade-item::after {
  content: "";
  position: absolute;
  inset: auto 12px 10px 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  pointer-events: none;
  z-index: 0;
}

.upgrade-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  position: relative;
  box-shadow: inset -4px -4px 8px rgba(0, 0, 0, 0.4), inset 4px 4px 8px rgba(255, 255, 255, 0.2);
}

.upgrade-icon::after {
  content: '';
  position: absolute;
  top: 15%;
  left: 15%;
  width: 30%;
  height: 30%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
}

.upgrade-info {
  flex: 1;
}

.upgrade-name {
  font-family: var(--font-family-main);
  font-weight: 900;
  font-size: 1rem;
  color: var(--text-main);
}

.upgrade-desc {
  font-family: var(--font-family-main);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ---- UPGRADE TOOLTIP ---- */
.upgrade-desc-tip {
  display: block;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
  line-height: 1.3;
}

.buy-btn {
  flex: 0 0 92px;
  width: 92px;
  height: 44px;
  border-radius: 12px;
  font-family: var(--font-family-main);
  font-weight: 900;
  font-size: 1.1rem;
  line-height: 1;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  background: linear-gradient(to bottom, #2563eb, #1d4ed8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 0 #1e3a8a;
  transition: all 0.1s;
  margin-left: auto;
  margin-right: 2px;
  overflow: visible;
}

.buy-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #1e3a8a;
}

.buy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}


/* Completed upgrade state: MAX should feel earned, not merely unaffordable. */
.upgrade-item.upgrade-maxed {
  border-left-color: rgba(250, 204, 21, 0.72);
}

.buy-btn.upgrade-max-btn,
.buy-btn.upgrade-max-btn:disabled {
  opacity: 1;
  cursor: default;
  pointer-events: none;
  color: #fef3c7;
  border: 1px solid rgba(250, 204, 21, 0.48);
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.34), transparent 24%),
    linear-gradient(to bottom, #7c5b17 0%, #4a3410 56%, #2a1c08 100%);
  box-shadow:
    0 3px 0 #171006,
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 14px rgba(250, 204, 21, 0.16);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65), 0 0 8px rgba(250, 204, 21, 0.25);
}

/* MAX is a completed-state badge, so remove the button sheen line. */
.buy-btn.upgrade-max-btn::after,
.buy-btn.upgrade-max-btn:disabled::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

/* Prestige Tab specific */
.prestige-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prestige-info .section-title {
  margin-bottom: 12px;
}

.prestige-panel-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prestige-hero-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.18), transparent 38%),
    radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.16), transparent 34%),
    rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.prestige-hero-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.prestige-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent-cyan);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.prestige-hero-head h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: white;
}

.prestige-hero-head p {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.5;
  max-width: 28ch;
}

.prestige-hero-badge {
  min-width: 106px;
  padding: 12px 14px;
  text-align: center;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(250, 204, 21, 0.18), rgba(15, 23, 42, 0.88));
  border: 1px solid rgba(250, 204, 21, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.prestige-hero-badge span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.prestige-hero-badge strong {
  display: block;
  color: var(--accent-yellow);
  font-size: 1.5rem;
  line-height: 1;
  text-shadow: 0 0 18px rgba(250, 204, 21, 0.22);
}

.prestige-progress {
  padding: 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.prestige-progress-head,
.prestige-progress-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.prestige-progress-head {
  margin-bottom: 10px;
}

.prestige-progress-head span,
.prestige-progress-foot span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.prestige-progress-head strong {
  color: white;
  font-size: 0.84rem;
}

.prestige-progress-value {
  margin-left: auto;
  text-align: right;
  font-size: 0.74rem;
  line-height: 1.15;
  font-weight: 800;
  max-width: 66%;
  white-space: normal;
}

.prestige-progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.prestige-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-yellow));
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.35);
}

.prestige-progress-foot {
  margin-top: 10px;
}

.prestige-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.prestige-loop-action {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}

.prestige-double-btn {
  min-width: 150px;
  min-height: 44px;
  padding: 0 14px;
  border: none;
  border-radius: 12px;
  color: #fff7d6;
  font-family: var(--font-family-main);
  font-weight: 950;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.32), transparent 24%),
    linear-gradient(to bottom, #facc15, #d97706);
  box-shadow:
    0 4px 0 #92400e,
    0 12px 22px rgba(250, 204, 21, 0.18),
    0 0 20px rgba(250, 204, 21, 0.18);
  transition: transform 0.18s, box-shadow 0.18s, filter 0.18s, opacity 0.18s;
}

.prestige-double-btn::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -48%;
  width: 44%;
  transform: skewX(-18deg) translateX(0);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.62), transparent);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.prestige-double-btn:not(:disabled) {
  animation: prestigeDoublePulse 2.8s ease-in-out infinite;
}

.prestige-double-btn:not(:disabled)::after {
  animation: prestigeDoubleSweep 2.8s ease-in-out infinite;
}

.prestige-double-btn:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    0 6px 0 #92400e,
    0 15px 26px rgba(250, 204, 21, 0.22),
    0 0 26px rgba(250, 204, 21, 0.24);
}

.prestige-double-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #92400e,
    0 8px 16px rgba(0, 0, 0, 0.2);
}

.prestige-double-btn:disabled {
  cursor: default;
  opacity: 0.64;
  filter: grayscale(0.18);
  animation: none;
}

.prestige-double-btn.prestige-double-ready {
  opacity: 1;
  color: white;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.36), transparent 24%),
    linear-gradient(to bottom, #38bdf8, #2563eb);
  box-shadow:
    0 4px 0 #1e3a8a,
    0 0 22px rgba(56, 189, 248, 0.25);
}

.prestige-double-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 1px 0 rgba(120, 53, 15, 0.55));
}

.prestige-double-btn span {
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

.prestige-double-status {
  margin-top: -4px;
  padding: 8px 12px;
  border-radius: 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.3;
  background: rgba(2, 6, 23, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.prestige-double-status.prestige-double-ready {
  color: #e0f2fe;
  border-color: rgba(56, 189, 248, 0.28);
  background:
    radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.18), transparent 55%),
    rgba(14, 30, 56, 0.58);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.12);
}

.prestige-double-status.prestige-double-available {
  color: #fff7d6;
  border-color: rgba(250, 204, 21, 0.18);
}

.prestige-double-status.prestige-double-disabled,
.prestige-double-status.prestige-double-locked {
  color: rgba(226, 232, 240, 0.72);
}

@keyframes prestigeDoublePulse {

  0%,
  100% {
    filter: brightness(1);
    box-shadow:
      0 4px 0 #92400e,
      0 12px 22px rgba(250, 204, 21, 0.18),
      0 0 20px rgba(250, 204, 21, 0.18);
  }

  50% {
    filter: brightness(1.06);
    box-shadow:
      0 4px 0 #92400e,
      0 14px 26px rgba(250, 204, 21, 0.24),
      0 0 28px rgba(250, 204, 21, 0.32);
  }
}

@keyframes prestigeDoubleSweep {

  0%,
  18% {
    opacity: 0;
    transform: skewX(-18deg) translateX(0);
  }

  32% {
    opacity: 0.92;
  }

  52%,
  100% {
    opacity: 0;
    transform: skewX(-18deg) translateX(360%);
  }
}

.prestige-loop-stats {
  margin-top: 2px;
}

.prestige-stat {
  padding: 16px 14px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(15, 23, 42, 0.72)),
    rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.prestige-stat span {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.prestige-stat strong {
  color: white;
  font-size: 1.2rem;
}

.prestige-perk-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prestige-perk-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px 16px;
  color: white;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.prestige-perk-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-yellow));
  opacity: 0.85;
}

.prestige-perk-meta,
.prestige-perk-side {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prestige-perk-side {
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.prestige-perk-row:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.prestige-perk-name {
  font-weight: 800;
  font-size: 0.98rem;
}

.prestige-perk-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.prestige-perk-level {
  color: var(--accent-cyan);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.prestige-buy-btn {
  flex: 0 0 92px;
  width: 92px;
  height: 44px;
  border-radius: 12px;
  font-family: var(--font-family-main);
  font-weight: 900;
  font-size: 1.1rem;
  line-height: 1;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  background: linear-gradient(to bottom, #2563eb, #1d4ed8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 0 #1e3a8a;
  transition: all 0.1s;
  margin-right: 2px;
  overflow: visible;
}

.prestige-buy-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #1e3a8a;
}

.prestige-buy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.prestige-btn-main {
  width: min(240px, 100%);
  min-height: 44px;
  padding: 0 18px;
  border: none;
  background: linear-gradient(to bottom, #22c55e, #16a34a);
  color: white;
  font-weight: 900;
  font-size: 0.96rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  align-self: center;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s, filter 0.18s;
  box-shadow: 0 4px 0 #166534;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prestige-btn-main:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow:
    0 6px 0 #166534,
    0 16px 30px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(34, 197, 94, 0.14),
    0 0 22px rgba(34, 197, 94, 0.16);
}

.prestige-btn-main:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.prestige-btn-main:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #166534,
    0 8px 16px rgba(0, 0, 0, 0.2),
    inset 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* Skins Tab specific */
.skins-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 2px 8px 8px 0;
}

.skin-item {
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  height: 204px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(15, 23, 42, 0.72)),
    rgba(30, 41, 59, 0.56);
  border-color: rgba(148, 163, 184, 0.08);
}

.skin-item.active {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.55), 0 0 18px rgba(34, 197, 94, 0.18);
}

.skin-item.active .skin-preview {
  filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.45));
}

.skin-item.locked {
  opacity: 1;
  filter: none;
}

.skin-item.locked .skin-preview,
.skin-item.locked .skin-level-badge {
  opacity: 0.55;
  filter: grayscale(0.45);
}

.skin-item.locked .skin-buy-btn {
  opacity: 1;
  filter: none;
}

.skin-item.unlocked:hover {
  transform: translateY(-2px) scale(1.01);
}

.skin-lock-icon {
  position: absolute;
  width: 26px;
  height: 26px;
  z-index: 2;
  opacity: 0.95;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}

.skin-preview {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent !important;
}

.skin-preview-canvas {
  width: 72px;
  height: 72px;
  display: block;
}



.skin-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: 0;
  box-shadow: none;
}

.skin-core-pin {
  inset: 0;
  border-radius: 50%;
}

.skin-star {
  position: absolute;
  width: 22px;
  height: 22px;
  z-index: 1;
  filter: none;
}

.skin-shine {
  display: none;
}

.skin-emoji {
  font-size: 1.8rem;
  z-index: 1;
}

.skin-name {
  font-weight: 800;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

.skin-meta-row {
  width: 100%;
  display: flex;
  justify-content: var(--skin-meta-justify, center);
  align-items: center;
  gap: 8px;
}

.skin-status {
  font-family: var(--skin-status-font-family, var(--font-family-main));
  font-size: var(--skin-status-font-size, 1rem);
  font-weight: var(--skin-status-font-weight, 800);
  letter-spacing: var(--skin-status-letter-spacing, 0.05em);
  line-height: var(--skin-status-line-height, 1.1);
  text-align: var(--skin-status-text-align, center);
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-muted);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
  text-transform: var(--skin-status-transform, uppercase);
  white-space: nowrap;
}

.skin-status.skin-status-locked {
  white-space: normal;
}

.skin-item.active .skin-status,
.skin-status.status-active {
  background: linear-gradient(to bottom, #22c55e, #15803d);
  color: white;
  box-shadow: 0 3px 0 #14532d;
}

.skin-buy-btn {
  width: 86px;
  height: 40px;
  border: none;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(to bottom, #84cc16, #3f6212);
  box-shadow: 0 4px 0 #365314;
  cursor: pointer;
  color: #ffffff;
  position: relative;
  z-index: 3;
}

.skin-buy-btn img {
  width: 18px;
  height: 18px;
  display: block;
}

.skin-buy-btn:disabled,
.skin-buy-btn.skin-buy-btn-disabled {
  cursor: not-allowed;
  opacity: 0.48;
  filter: grayscale(0.65) saturate(0.55);
  background: linear-gradient(to bottom, rgba(100, 116, 139, 0.82), rgba(51, 65, 85, 0.86));
  box-shadow: 0 3px 0 rgba(15, 23, 42, 0.72);
  transform: none;
}

.skin-buy-btn:disabled img,
.skin-buy-btn.skin-buy-btn-disabled img {
  opacity: 0.72;
}

.skin-buy-btn:disabled .skin-buy-cost,
.skin-buy-btn.skin-buy-btn-disabled .skin-buy-cost {
  opacity: 0.78;
}

.skin-buy-cost {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1;
}

.skin-level-badge {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #dbeafe;
  text-transform: uppercase;
}

.skin-level-badge:empty {
  display: none;
}

.skin-item.locked .skin-status {
  background: transparent;
  color: #ffffff;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  letter-spacing: 0.02em;
}

.skin-item.locked .skin-level-badge {
  color: #93c5fd;
}


/* Make unlocked skin cards behave like a single tap target while keeping buy/ad buttons clickable. */
.skin-item.unlocked .skin-preview,
.skin-item.unlocked .skin-preview-canvas,
.skin-item.unlocked .skin-lock-icon,
.skin-item.unlocked .skin-name,
.skin-item.unlocked .skin-rarity,
.skin-item.unlocked .skin-status {
  pointer-events: none;
}

.skin-item .skin-buy-btn,
.skin-item .skin-ad-btn {
  pointer-events: auto;
}

/* Sub Tab Navigation */
.sub-tab-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px;
  border-radius: 16px;
  position: relative;
  z-index: 1;
}

.sub-tab-indicator {
  position: absolute;
  top: 6px;
  left: 6px;
  width: calc(33.333% - 8px);
  height: calc(100% - 12px);
  border-radius: 12px;
  transition:
    left 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.2s ease,
    box-shadow 0.2s ease;
  z-index: 0;
}

/* Sub Tab Indicator Colors */
.sub-tab-nav:has([data-sub-tab="balls"].active) .sub-tab-indicator {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  box-shadow: 0 4px 0 #164e63, 0 8px 15px rgba(6, 182, 212, 0.3);
  left: 6px;
}

.sub-tab-nav:has([data-sub-tab="pins"].active) .sub-tab-indicator {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 4px 0 #1e3a8a, 0 8px 15px rgba(37, 99, 235, 0.3);
  left: calc(33.333% + 1px);
}

.sub-tab-nav:has([data-sub-tab="buckets"].active) .sub-tab-indicator {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 0 #92400e, 0 8px 15px rgba(245, 158, 11, 0.3);
  left: calc(66.666% - 2px);
}

.sub-tab-btn {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.75rem;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease, text-shadow 0.18s ease;
  letter-spacing: 0.1em;
  z-index: 2;
}

.sub-tab-btn.active {
  color: white;
  transform: translateY(-1px) scale(1.02);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.22);
}

.sub-tab-btn:hover:not(.active) {
  color: white;
  transform: translateY(-1px);
}

.sub-tab-panel {
  opacity: 0;
  transition: opacity 0.15s ease;
  will-change: opacity;
}

.sub-tab-panel.is-visible {
  opacity: 1;
}

.sub-tab-panel.is-hiding {
  opacity: 0;
}

/* Settings Tab specific */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(15, 23, 42, 0.68)),
    rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 4px solid rgba(34, 211, 238, 0.45);
}

.setting-label {
  font-weight: 700;
  font-size: 0.95rem;
}

.toggle-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.setting-slider-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  max-width: 240px;
}

.setting-slider {
  flex: 1;
  min-width: 0;
}

.setting-percent {
  min-width: 52px;
  text-align: right;
  font-weight: 900;
  font-size: 0.8rem;
  color: var(--accent-yellow);
}

.toggle {
  width: 44px;
  height: 24px;
  background: #1e293b;
  border-radius: 20px;
  padding: 3px;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
}

.toggle-on {
  background: var(--accent-green) !important;
}

.toggle-knob {
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-knob.active {
  transform: translateX(20px);
}

.toggle-label {
  font-weight: 900;
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 25px;
}

.reset-btn {
  margin-top: 12px;
  padding: 16px;
  background: #991b1b;
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

#reset-game-btn {
  background: linear-gradient(180deg, #ef4444 0%, #991b1b 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom-color: rgba(0, 0, 0, 0.45);
  box-shadow:
    0 4px 0 #5f1111,
    0 10px 18px rgba(239, 68, 68, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(0);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

#reset-game-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

#reset-game-btn:active {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 #5f1111,
    0 5px 10px rgba(239, 68, 68, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Level System (Inside HUD) */
.level-bar-bg {
  position: relative;
  height: 24px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.level-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(to right, #6b21a8, #9333ea);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.level-text {
  position: relative;
  z-index: 2;
  font-weight: 900;
  font-size: 1rem;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 10000;
}

.modal {
  width: min(100%, 520px);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(11, 20, 49, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transform: scale(var(--ui-runtime-scale, 1));
  transform-origin: center;
}

.modal-offline {
  max-width: 440px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.16), transparent 34%),
    radial-gradient(circle at 86% 100%, rgba(250, 204, 21, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(8, 15, 35, 0.95));
  border-color: rgba(34, 211, 238, 0.14);
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.5),
    0 0 42px rgba(34, 211, 238, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.modal-offline::before {
  content: "";
  position: absolute;
  inset: 0 18px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.7), rgba(250, 204, 21, 0.45), transparent);
  pointer-events: none;
}

.modal-offline>* {
  position: relative;
  z-index: 1;
}

.offline-modal-actions {
  display: grid;
  grid-template-columns: minmax(130px, 0.82fr) minmax(190px, 1.18fr);
  gap: 12px;
}

.modal-offline .offline-modal-actions .modal-primary-btn,
.modal-offline .offline-modal-actions .modal-secondary-btn {
  width: 100%;
  align-self: stretch;
}

.offline-collect-btn {
  min-width: 0;
  background: linear-gradient(180deg, #64748b 0%, #334155 100%);
  box-shadow:
    0 4px 0 #1e293b,
    0 10px 22px rgba(15, 23, 42, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.modal-primary-btn.offline-double-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  overflow: hidden;
  font-size: 1.18rem;
  letter-spacing: 0.06em;
  color: #ffffff;
  text-shadow:
    0 2px 0 rgba(120, 53, 15, 0.82),
    0 0 3px rgba(120, 53, 15, 0.9),
    0 3px 8px rgba(6, 33, 43, 0.38);
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.62), transparent 24%),
    linear-gradient(180deg, #fff7ad 0%, #facc15 58%, #f59e0b 100%);
  box-shadow:
    0 4px 0 #a16207,
    0 0 22px rgba(250, 204, 21, 0.24),
    0 12px 24px rgba(250, 204, 21, 0.2);
  transform-origin: center;
}

.offline-double-btn:not(:disabled) {
  animation: offlineDoubleButtonGlow 2.8s ease-in-out infinite;
  will-change: transform, filter, box-shadow;
}

.offline-double-btn::after {
  content: "";
  position: absolute;
  inset: -35% auto -35% -46%;
  width: 42%;
  transform: skewX(-18deg) translateX(0);
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.18),
      rgba(255, 255, 255, 0.68),
      rgba(255, 255, 255, 0.2),
      transparent);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.offline-double-btn:not(:disabled)::after {
  animation: offlineDoubleButtonSweep 2.8s ease-in-out infinite;
}

.offline-double-btn>* {
  position: relative;
  z-index: 1;
}

.offline-double-btn:not(:disabled) .offline-double-icon-shell {
  animation: boostReadyPulse 2.8s ease-in-out infinite;
  transform-origin: center;
  will-change: transform, filter;
}

.offline-double-btn:not(:disabled) .offline-double-icon-shine {
  animation: boostReadyShimmer 2.8s ease-in-out infinite;
}

.offline-double-btn:disabled {
  cursor: default;
  opacity: 0.62;
  filter: grayscale(0.2);
  animation: none;
}

.offline-double-btn:disabled::after {
  animation: none;
  opacity: 0;
}

.offline-double-icon-shell {
  position: relative;
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 7px;
  flex: 0 0 auto;
}

.offline-double-icon-art,
.offline-double-icon-shine {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.offline-double-icon-art {
  filter:
    drop-shadow(0 1px 0 rgba(120, 53, 15, 0.9)) drop-shadow(0 0 3px rgba(120, 53, 15, 0.82)) drop-shadow(0 3px 6px rgba(6, 33, 43, 0.32));
}

.offline-double-icon-shine {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  filter:
    brightness(0) invert(1) drop-shadow(0 0 4px rgba(255, 255, 255, 0.72));
  mix-blend-mode: screen;
  clip-path: polygon(-42% 100%, -18% 100%, 42% 0, 18% 0);
}

@keyframes offlineDoubleButtonGlow {

  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
    box-shadow:
      0 4px 0 #a16207,
      0 0 22px rgba(250, 204, 21, 0.24),
      0 12px 24px rgba(250, 204, 21, 0.2);
  }

  46% {
    transform: scale(1.018);
    filter: brightness(1.06);
    box-shadow:
      0 4px 0 #a16207,
      0 0 30px rgba(250, 204, 21, 0.36),
      0 14px 28px rgba(245, 158, 11, 0.27);
  }
}

@keyframes offlineDoubleButtonSweep {

  0%,
  22% {
    opacity: 0;
    transform: skewX(-18deg) translateX(0);
  }

  34% {
    opacity: 0.72;
  }

  58% {
    opacity: 0;
    transform: skewX(-18deg) translateX(360%);
  }

  100% {
    opacity: 0;
    transform: skewX(-18deg) translateX(360%);
  }
}

.reset-modal {
  max-width: 520px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.modal-icon-danger {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.18);
}

.modal-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-kicker {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.modal-kicker-danger {
  color: #f87171;
}

.modal-title {
  font-size: 1.55rem;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: var(--text-main);
}

.modal-title-danger {
  color: #fecaca;
}

.modal-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  font-weight: 600;
}

.modal-strong {
  color: white;
}

.modal-stat-card {
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(15, 23, 42, 0.72);
}

.modal-stat-card-info {
  border-color: rgba(0, 229, 255, 0.18);
  background:
    radial-gradient(circle at 90% 10%, rgba(125, 211, 252, 0.1), transparent 35%),
    linear-gradient(180deg, rgba(0, 229, 255, 0.09), rgba(15, 23, 42, 0.74));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 28px rgba(8, 47, 73, 0.2);
}

.modal-stat-card-danger {
  border-color: rgba(248, 113, 113, 0.16);
  background: linear-gradient(180deg, rgba(248, 113, 113, 0.08), rgba(15, 23, 42, 0.7));
}

.modal-stat-label {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.modal-stat-value {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--accent-yellow);
}

.modal-offline .modal-icon-info {
  color: #22d3ee;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.16), rgba(14, 116, 144, 0.22));
  box-shadow:
    0 0 20px rgba(34, 211, 238, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.modal-offline .modal-stat-value {
  color: #ffffff;
  text-shadow:
    0 0 16px rgba(250, 204, 21, 0.26),
    0 3px 8px rgba(0, 0, 0, 0.28);
}

.modal-stat-text {
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1.5;
  font-weight: 600;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}



.got-it-btn {
  background: var(--accent-yellow);
  color: #451a03;
  font-weight: 900;
  font-size: 1.25rem;
  padding: 14px 40px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
}

.modal-primary-btn,
.modal-secondary-btn,
.modal-danger-btn {
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 14px;
  border: none;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.modal-primary-btn:hover,
.modal-secondary-btn:hover,
.modal-danger-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.modal-primary-btn:active,
.modal-secondary-btn:active,
.modal-danger-btn:active {
  transform: translateY(1px);
}

.modal-primary-btn {
  align-self: flex-end;
  color: #0f172a;
  background: linear-gradient(180deg, #fde68a 0%, #fbbf24 100%);
  box-shadow: 0 4px 0 #a16207, 0 10px 22px rgba(251, 191, 36, 0.18);
}

.modal-secondary-btn {
  color: #e2e8f0;
  background: linear-gradient(180deg, #475569 0%, #334155 100%);
  box-shadow: 0 4px 0 #1e293b, 0 10px 22px rgba(15, 23, 42, 0.22);
}

.modal-danger-btn {
  color: white;
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
  box-shadow: 0 4px 0 #7f1d1d, 0 10px 22px rgba(239, 68, 68, 0.22);
}

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
}

/* Achievement List */
.achievements-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.skins-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.achievements-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.achievement-claim-all-btn {
  width: auto;
  min-width: 116px;
  height: 38px;
  padding: 4px 12px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.achievement-item,
.skin-item,
.upgrade-item {
  content-visibility: visible;
  contain-intrinsic-size: auto;
}

.achievement-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 102px;
  align-items: center;
  column-gap: 10px;
  min-height: 102px;
  padding: 13px 12px;
  font-family: var(--font-family-main);
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(15, 23, 42, 0.74)),
    rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 4px solid rgba(245, 158, 11, 0.58);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.achievement-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 30%, transparent 70%, rgba(255, 255, 255, 0.02));
  pointer-events: none;
}

.achievement-item:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 158, 11, 0.18);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(245, 158, 11, 0.08);
}

.achievement-item.unlocked {
  border-color: rgba(245, 158, 11, 0.3);
}

.achievement-item.locked {
  border-color: rgba(255, 255, 255, 0.04);
  opacity: 0.6;
}

.achievement-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  border-radius: 50%;
  margin-right: 0;
  position: relative;
  box-shadow: inset -4px -4px 8px rgba(0, 0, 0, 0.4), inset 4px 4px 8px rgba(255, 255, 255, 0.2);
}

.achievement-icon::after {
  content: '';
  position: absolute;
  top: 15%;
  left: 15%;
  width: 30%;
  height: 30%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
}

.achievement-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  color: inherit;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.24));
}

.achievement-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.achievement-name {
  font-family: var(--font-family-main);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.08;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.achievement-desc {
  font-family: var(--font-family-main);
  font-size: 0.78rem;
  line-height: 1.18;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.achievement-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  min-width: 102px;
}

.achievement-status-text {
  display: block;
  font-size: 1rem;
  line-height: 1;
  font-weight: 900;
}

.achievement-status-reward {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 900;
  color: #fde68a;
  letter-spacing: 0.06em;
}

.achievement-status-reward img {
  width: 16px;
  height: 16px;
  display: block;
}

.achievement-status-btn {
  color: white;
  font-weight: 900;
  font-size: 0.95rem;
  width: 102px;
  height: 48px;
  padding: 4px 10px 3px;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(to bottom, #3b82f6, #1d4ed8);
  box-shadow: 0 4px 0 #1e3a8a, 0 8px 18px rgba(59, 130, 246, 0.18);
  cursor: pointer;
}

.achievement-status-btn:disabled {
  background: linear-gradient(to bottom, #64748b, #334155);
  box-shadow: 0 4px 0 #1e293b, 0 8px 18px rgba(0, 0, 0, 0.16);
  color: #e2e8f0;
  opacity: 0.72;
  cursor: default;
}

.achievement-item.claimable .achievement-status-btn {
  background: linear-gradient(to bottom, #60a5fa, #2563eb);
  box-shadow: 0 4px 0 #1d4ed8, 0 10px 20px rgba(37, 99, 235, 0.25);
}

.achievement-item.claimed .achievement-status-btn {
  background: linear-gradient(to bottom, #fde68a, #f59e0b);
  box-shadow: 0 4px 0 #b45309, 0 10px 20px rgba(245, 158, 11, 0.22);
  color: white;
  opacity: 1 !important;
}

.achievement-item.claimed .achievement-status-reward {
  display: none;
}

.achievement-item.claimed .achievement-status-text {
  color: white;
  font-size: 1.15rem;
}

.achievement-item.disabled .achievement-status-btn {
  background: linear-gradient(to bottom, #64748b, #475569);
  box-shadow: 0 4px 0 #334155, 0 8px 16px rgba(0, 0, 0, 0.18);
  color: #cbd5e1;
}

.achievement-item.disabled .achievement-icon {
  filter: grayscale(0.25);
  opacity: 0.9;
}

/* Achievement Toast */
.achievement-toast {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-96px) scale(var(--ui-runtime-scale, 1));
  transform-origin: top center;
  width: min(380px, calc(100vw - 32px));
  min-width: 320px;
  min-height: 88px;
  padding: 12px 14px 12px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 500;
  pointer-events: none;
  overflow: hidden;
  isolation: isolate;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--toast-accent, #facc15) 58%, rgba(255, 255, 255, 0.18));
  background:
    radial-gradient(circle at 14% 22%, color-mix(in srgb, var(--toast-accent, #facc15) 36%, transparent), transparent 30%),
    radial-gradient(circle at 92% 18%, rgba(255, 255, 255, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(7, 12, 27, 0.98) 58%, rgba(2, 6, 23, 0.99));
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.56),
    0 0 0 1px rgba(255, 255, 255, 0.055) inset,
    0 0 28px color-mix(in srgb, var(--toast-accent, #facc15) 28%, transparent);
}

.achievement-toast::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.14) 42%, transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 44%);
  transform: translateX(-64%);
  opacity: 0;
  pointer-events: none;
}

.achievement-toast::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  z-index: 1;
  background: linear-gradient(180deg, #fff7cc, var(--toast-accent, #facc15), rgba(15, 23, 42, 0));
  box-shadow: 0 0 18px var(--toast-accent, #facc15);
  pointer-events: none;
}

.achievement-toast .toast-icon {
  position: relative;
  z-index: 2;
  width: 58px;
  height: 58px;
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 58px;
  color: var(--toast-accent, var(--accent-yellow));
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.34), transparent 28%),
    linear-gradient(180deg, color-mix(in srgb, var(--toast-accent, #facc15) 36%, rgba(255, 255, 255, 0.08)), rgba(15, 23, 42, 0.94));
  border: 1px solid color-mix(in srgb, var(--toast-accent, #facc15) 44%, rgba(255, 255, 255, 0.18));
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.28),
    0 0 18px color-mix(in srgb, var(--toast-accent, #facc15) 28%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.achievement-toast .toast-icon svg {
  width: 34px;
  height: 34px;
  stroke: currentColor;
  color: inherit;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.28));
}

.achievement-toast .toast-body {
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.achievement-toast .toast-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.achievement-toast .toast-label {
  flex: 1;
  min-width: 0;
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--toast-accent, var(--accent-yellow));
  text-shadow: 0 0 12px color-mix(in srgb, var(--toast-accent, #facc15) 42%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.achievement-toast .toast-reward {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0.04em;
  color: #fff7d6;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.26), transparent 34%),
    linear-gradient(180deg, #fbbf24, #b45309);
  border: 1px solid rgba(255, 247, 214, 0.36);
  box-shadow: 0 6px 14px rgba(180, 83, 9, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
}

.achievement-toast .toast-reward.hidden {
  display: none;
}

.achievement-toast .toast-name {
  font-size: 1.08rem;
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: 0.01em;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.34);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.achievement-toast .toast-desc {
  font-size: 0.80rem;
  line-height: 1.28;
  color: rgba(226, 232, 240, 0.82);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.achievement-toast.toast-show {
  animation: toastSlideIn 0.48s cubic-bezier(0.24, 1.32, 0.44, 1) forwards;
}

.achievement-toast.toast-show::before {
  animation: toastSheen 1.15s ease-out 0.12s both;
}

.achievement-toast.toast-hide {
  animation: toastSlideOut 0.32s ease-in forwards;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(-50%) translateY(-96px) scale(calc(var(--ui-runtime-scale, 1) * 0.96));
    opacity: 0;
  }

  72% {
    transform: translateX(-50%) translateY(6px) scale(var(--ui-runtime-scale, 1));
    opacity: 1;
  }

  to {
    transform: translateX(-50%) translateY(0) scale(var(--ui-runtime-scale, 1));
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(-50%) translateY(0) scale(var(--ui-runtime-scale, 1));
    opacity: 1;
  }

  to {
    transform: translateX(-50%) translateY(-96px) scale(calc(var(--ui-runtime-scale, 1) * 0.98));
    opacity: 0;
  }
}

@keyframes toastSheen {
  from {
    transform: translateX(-68%);
    opacity: 0;
  }

  20% {
    opacity: 0.82;
  }

  to {
    transform: translateX(74%);
    opacity: 0;
  }
}

/* Custom Scrollbar */

.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.hidden {
  display: none !important;
}

/* Developer Panel */
.dev-panel {
  position: absolute;
  bottom: var(--dev-bottom);
  left: var(--dev-left);
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
}

.dev-toggle {
  width: 44px;
  height: 44px;
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dev-toggle:hover {
  background: rgba(30, 41, 59, 0.9);
  color: white;
  border-color: var(--accent-blue);
}

.visual-toggle {
  border-color: rgba(0, 229, 255, 0.4);
}

.visual-toggle:hover {
  border-color: var(--accent-cyan);
}

.visual-controls {
  border-color: var(--accent-cyan);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9), inset 0 0 20px rgba(6, 182, 212, 0.12);
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(1120px, calc(100vw - 40px));
  max-width: 1120px;
  max-height: min(560px, calc(100vh - 60px));
  min-height: 0;
  overflow: hidden;
  grid-template-columns: none;
  padding: 20px;
  border-width: 2px;
  border-style: solid;
  border-radius: 24px;
}

.visual-sections-shell {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 229, 255, 0.55) rgba(255, 255, 255, 0.08);
}

.visual-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.visual-panel-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.visual-panel-kicker {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.visual-panel-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-main);
}

.visual-panel-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 500px;
}

.visual-panel-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.visual-sections {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 280px;
  grid-template-rows: repeat(2, auto);
  gap: 14px;
  align-items: start;
  width: max-content;
  min-width: 100%;
  min-height: 0;
  padding-bottom: 6px;
}

.visual-sections-shell::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.visual-sections-shell::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.visual-sections-shell::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.55);
  border-radius: 999px;
  border: 2px solid rgba(11, 20, 49, 0.95);
}

.visual-sections-shell::-webkit-scrollbar-corner {
  background: rgba(255, 255, 255, 0.08);
}

.visual-section {
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 280px;
  max-width: 280px;
  min-height: 0;
  overflow: hidden;
}

.visual-section-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.visual-section-title {
  font-size: 0.98rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.visual-section-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.visual-section-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: visible;
  padding-right: 4px;
}

.visual-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.visual-control-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.visual-control-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.visual-control-value {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  font-weight: 900;
  letter-spacing: 0.03em;
  text-align: right;
  white-space: nowrap;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}

.visual-control-input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(0, 229, 255, 0.28);
  background: rgba(0, 0, 0, 0.28);
  color: white;
  padding: 8px 10px;
  font-family: var(--font-family-main);
  font-size: 0.8rem;
}

.visual-control-input[type="range"] {
  padding: 0;
  height: 28px;
  accent-color: var(--accent-cyan);
}

.visual-control-input[type="color"] {
  height: 36px;
  padding: 3px;
}

.visual-control-input[type="text"],
.visual-control-select {
  min-height: 38px;
}

.visual-control-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.12);
}

.visual-reset-btn {
  align-self: flex-end;
}

@media (max-width: 1100px) {
  .visual-controls {
    width: min(94vw, 920px);
    max-height: calc(100vh - 90px);
  }

  .visual-panel-header {
    flex-direction: column;
  }

  .visual-sections {
    grid-auto-columns: 240px;
  }

  .visual-section {
    width: 240px;
    max-width: 240px;
  }

  .visual-panel-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.visual-controls .dev-group {
  margin-bottom: 0;
}

.visual-reset-btn {
  padding: 7px 10px;
  min-width: 56px;
  font-size: 0.68rem;
  line-height: 1;
}

.dev-controls:not(.visual-controls) {
  display: grid;
  grid-template-columns: repeat(3, 280px);
  gap: 8px 24px;
  background: rgba(11, 20, 49, 0.95);
  backdrop-filter: blur(16px);
  padding: 24px;
  border-radius: 24px;
  border: 2px solid var(--accent-blue);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9), inset 0 0 20px rgba(59, 130, 246, 0.1);
  max-height: 680px;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: max-content;
}

.dev-controls:not(.visual-controls) hr {
  grid-column: 1 / -1;
  width: 100%;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 10px 0;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dev-btn {
  padding: 10px 16px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.dev-btn:hover {
  background: var(--accent-blue);
  color: white;
  transform: scale(1.05);
}

.dev-btn:active {
  transform: scale(0.95);
}

.dev-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.dev-group label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  justify-content: space-between;
}

.dev-group span {
  color: var(--accent-cyan);
}

.dev-group input[type="range"] {
  width: 100%;
  cursor: pointer;
}

.dev-control-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dev-control-inline input[type="range"] {
  flex: 1;
  min-width: 0;
}

.dev-number-input {
  width: 64px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--accent-cyan);
  color: white;
  border-radius: 4px;
  font-size: 0.7rem;
  padding: 2px 4px;
  flex: 0 0 auto;
}

.dev-number-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.12);
}

/* Portrait modda döndür uyarısı */
#rotate-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #0a0a1a;
  z-index: 99999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: white;
  font-family: sans-serif;
  text-align: center;
}

#rotate-overlay svg {
  animation: spin-hint 1.5s ease-in-out infinite alternate;
}

@keyframes spin-hint {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(90deg);
  }
}

@media screen and (orientation: portrait) {
  #rotate-overlay {
    display: flex;
  }
}


/* Mobile anti-flicker/performance tuning */
@media (hover: none),
(pointer: coarse) {
  .tab-content {
    animation: none;
  }

  .upgrade-item:hover,
  .achievement-item:hover,
  .prestige-perk-row:hover:not(:disabled),
  .skin-item:hover,
  .setting-row:hover {
    transform: none;
  }

  .upgrade-item,
  .achievement-item,
  .prestige-perk-row,
  .skin-item,
  .setting-row,
  .prestige-hero-card,
  .prestige-stat,
  .modal,
  .achievement-toast {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .buy-btn,
  .prestige-buy-btn,
  .prestige-btn-main,
  .prestige-double-btn,
  .tab-btn,
  .skin-buy-btn,
  .skin-ad-btn,
  .achievement-status-btn {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
}


/* --- Full Launch MVP: Rewarded Boost Dock --- */
.boost-dock {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 86px;
  margin-top: 2px;
}

.boost-card {
  --boost-accent: #facc15;
  position: relative;
  width: 86px;
  min-height: 86px;
  border: none;
  border-radius: 0;
  padding: 8px;
  color: white;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  cursor: pointer;
  text-align: left;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), filter 0.14s ease, box-shadow 0.14s ease;
}

.boost-card:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.boost-card:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}

.boost-card:disabled {
  cursor: default;
  opacity: 0.62;
  filter: grayscale(0.25);
  pointer-events: none;
}

.boost-card.boost-ready {
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--boost-accent) 30%, transparent));
  overflow: hidden;
}

.boost-card.boost-ready:hover:not(:disabled) {
  filter: brightness(1.08) drop-shadow(0 0 10px color-mix(in srgb, var(--boost-accent) 36%, transparent));
}

.boost-card.boost-ready .boost-icon-shell {
  position: relative;
  z-index: 1;
  animation: boostReadyPulse 2.8s ease-in-out infinite;
  transform-origin: center;
  will-change: transform, filter;
}

.boost-card.boost-active .boost-icon-shell,
.boost-card:disabled .boost-icon-shell {
  animation: none;
}

.boost-card.boost-ready .boost-icon-shine {
  animation: boostReadyShimmer 2.8s ease-in-out infinite;
}

.boost-card.boost-active .boost-icon-shine,
.boost-card:disabled .boost-icon-shine {
  display: none;
}

.boost-card.boost-active {
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--boost-accent) 28%, transparent), transparent 52%),
    linear-gradient(180deg, rgba(12, 18, 28, 0.96), rgba(22, 31, 42, 0.95));
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--boost-accent) 58%, rgba(255, 255, 255, 0.18));
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.36),
    0 0 18px color-mix(in srgb, var(--boost-accent) 28%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.boost-card.boost-cooldown {
  background: transparent;
  box-shadow: none;
}

.boost-card.boost-cooldown .boost-icon-art {
  display: none;
}

.boost-card-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 8px;
  width: 100%;
}

.boost-icon-art {
  width: 62px;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35));
}

.boost-icon-shell {
  position: relative;
  display: inline-flex;
  width: 62px;
  height: 62px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
}

.boost-icon-shine {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  filter:
    brightness(0) invert(1) drop-shadow(0 0 4px rgba(255, 255, 255, 0.72));
  mix-blend-mode: screen;
  clip-path: polygon(-42% 100%, -18% 100%, 42% 0, 18% 0);
}

.boost-status {
  display: none;
}

.boost-bar-track {
  display: none;
  position: relative;
  width: 100%;
  height: 16px;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.08),
    inset 0 -2px 4px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.boost-card.boost-active .boost-bar-track {
  display: block;
}

.boost-card.boost-active .boost-bar-track .boost-status {
  display: flex;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  line-height: 1;
  transform: translateY(0.5px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.boost-card.boost-active[data-boost-id="autoFrenzy"] .boost-bar-track .boost-status {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.boost-bar-fill {
  display: block;
  width: 0%;
  height: 100%;
  position: relative;
  z-index: 1;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 46%),
    linear-gradient(90deg, color-mix(in srgb, var(--boost-accent) 74%, white), var(--boost-accent));
  box-shadow:
    0 0 12px color-mix(in srgb, var(--boost-accent) 38%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -2px 4px rgba(0, 0, 0, 0.12);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.2s ease;
  overflow: hidden;
}

.boost-card.boost-active .boost-bar-fill {
  filter: saturate(1.15) brightness(1.05);
}

.boost-bar-fill::after {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  top: 3px;
  height: 35%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  opacity: 0.62;
  pointer-events: none;
}

.boost-spawn {
  animation: boostSpawn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center;
  will-change: transform, opacity, filter;
}

@keyframes boostSpawn {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.78);
    filter: brightness(0.9);
  }

  72% {
    opacity: 1;
    transform: translateY(-1px) scale(1.08);
    filter: brightness(1.08);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes boostReadyPulse {

  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }

  46% {
    transform: scale(1.06);
    filter: brightness(1.12);
  }
}

@keyframes boostReadyShimmer {

  0%,
  24% {
    clip-path: polygon(-42% 100%, -18% 100%, 42% 0, 18% 0);
    opacity: 0;
  }

  38% {
    opacity: 0.62;
  }

  62% {
    clip-path: polygon(58% 100%, 82% 100%, 142% 0, 118% 0);
    opacity: 0;
  }

  100% {
    clip-path: polygon(58% 100%, 82% 100%, 142% 0, 118% 0);
    opacity: 0;
  }
}

/* --- Full Launch MVP: Rewarded Skin UI --- */
.skin-rarity {
  margin-top: -6px;
  margin-bottom: 3px;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #93c5fd;
  text-align: center;
}

.skin-unlock-stack {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.skin-ad-btn {
  height: 40px;
  min-width: 84px;
  padding: 0 12px;
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  box-shadow: 0 4px 0 #1e3a8a;
  cursor: pointer;
  position: relative;
  z-index: 3;
}

.skin-ad-btn img {
  width: 21px;
  height: 21px;
  display: block;
}

.skin-ad-btn span {
  font-size: 0.84rem;
  line-height: 1;
}

.skin-ad-btn:disabled,
.skin-ad-btn.skin-ad-btn-disabled {
  cursor: not-allowed;
  opacity: 0.58;
  filter: grayscale(0.45);
  transform: none;
  box-shadow: 0 2px 0 #78350f;
}

.skin-ad-unavailable {
  color: #fca5a5 !important;
  font-size: 0.7rem;
  line-height: 1.05;
  max-width: 92px;
  white-space: normal;
}

.skin-unlock-stack .skin-buy-btn {
  width: 62px;
  height: 36px;
}

.rewarded-skin {
  border-color: rgba(250, 204, 21, 0.24);
}

.bucket-placeholder-card {
  min-height: 176px;
  justify-content: center;
  align-items: center;
}

.bucket-placeholder-preview {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bucket-placeholder-icon {
  font-size: 2.5rem;
  line-height: 1;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35));
}

/* --- Full Launch MVP: Achievement Road --- */
.achievement-road-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 2px 8px;
  padding-top: 4px;
}

.achievement-road-title {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.achievement-road-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.68rem;
  font-weight: 800;
  margin-top: 2px;
}

.achievement-road-line {
  flex: 1;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--road-color, #f59e0b), transparent);
  opacity: 0.75;
}

.achievement-progress-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
  column-gap: 9px;
  margin-top: 8px;
  min-height: 10px;
  color: #cbd5e1;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.achievement-progress-track {
  width: 90px;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.achievement-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.achievement-progress-label {
  min-width: 0;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  font-variant-numeric: tabular-nums;
}

.achievement-emoji {
  display: none;
}

/* --- Full Launch MVP: Reward modals / ad state --- */
.reward-modal {
  max-width: 540px;
}

.reward-modal-icon {
  font-size: 1.4rem;
}

.reward-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.reward-stat-value {
  color: #fff;
  font-size: 1.55rem;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.reward-stat-value-hot {
  color: #fde68a;
}

.reward-actions-equal {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.reward-actions-equal .modal-primary-btn,
.reward-actions-equal .modal-secondary-btn {
  width: 100%;
  align-self: stretch;
}

.reward-actions-equal .modal-secondary-btn img {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-left: 3px;
}

.ad-loading-overlay {
  z-index: 11000;
}

.ad-loading-card {
  min-width: 260px;
  min-height: 160px;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #fff;
  font-weight: 900;
  text-align: center;
  transform: scale(var(--ui-runtime-scale, 1));
  transform-origin: center;
}

.ad-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.18);
  border-top-color: #fbbf24;
  animation: adSpin 0.8s linear infinite;
}

@keyframes adSpin {
  to {
    transform: rotate(360deg);
  }
}

.reward-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px) scale(var(--ui-runtime-scale, 1));
  transform-origin: bottom center;
  z-index: 12000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(520px, calc(100vw - 32px));
  padding: 10px 14px 10px 12px;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  font-size: 0.88rem;
  line-height: 1.15;
  letter-spacing: 0.02em;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(51, 65, 85, 0.98), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  pointer-events: none;
  opacity: 0;
}

.reward-toast::before {
  content: "i";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  font-size: 0.78rem;
  font-weight: 950;
  color: #e0f2fe;
  background: linear-gradient(180deg, #38bdf8, #2563eb);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.reward-toast-success {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.20), transparent 28%),
    linear-gradient(180deg, rgba(34, 197, 94, 0.98), rgba(21, 128, 61, 0.98));
  border-color: rgba(187, 247, 208, 0.32);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.40), 0 0 20px rgba(34, 197, 94, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.reward-toast-success::before {
  content: "✓";
  color: #ecfdf5;
  background: linear-gradient(180deg, #86efac, #16a34a);
}

.reward-toast-error {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(239, 68, 68, 0.98), rgba(127, 29, 29, 0.98));
  border-color: rgba(254, 202, 202, 0.32);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.40), 0 0 20px rgba(239, 68, 68, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.reward-toast-error::before {
  content: "!";
  color: #fff1f2;
  background: linear-gradient(180deg, #fca5a5, #dc2626);
}

.reward-toast-warning {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.20), transparent 28%),
    linear-gradient(180deg, rgba(245, 158, 11, 0.98), rgba(146, 64, 14, 0.98));
  border-color: rgba(254, 240, 138, 0.32);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.40), 0 0 20px rgba(245, 158, 11, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.reward-toast-warning::before {
  content: "!";
  color: #fffbeb;
  background: linear-gradient(180deg, #fde68a, #d97706);
}

.reward-toast.toast-show {
  animation: rewardToastIn 0.24s ease-out both;
}

.reward-toast.toast-hide {
  animation: rewardToastOut 0.22s ease-in both;
}

@keyframes rewardToastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 14px) scale(calc(var(--ui-runtime-scale, 1) * 0.96));
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(var(--ui-runtime-scale, 1));
  }
}

@keyframes rewardToastOut {
  from {
    opacity: 1;
    transform: translate(-50%, 0) scale(var(--ui-runtime-scale, 1));
  }

  to {
    opacity: 0;
    transform: translate(-50%, 14px) scale(calc(var(--ui-runtime-scale, 1) * 0.96));
  }
}

@media (max-width: 900px) {
  .reward-actions-equal {
    grid-template-columns: 1fr;
  }

  .offline-modal-actions {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   CrazyGames Mobile/WebView Fix
   - Removes blue tap/focus rectangle around buttons and panels
   - Keeps sidebar content scrollable but hides every scrollbar/slider
   ========================================================== */
html,
body {
  overflow: hidden !important;
  overscroll-behavior: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

*,
*::before,
*::after {
  -webkit-tap-highlight-color: transparent !important;
}

*:focus,
*:focus-visible,
*:active {
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

button,
[role="button"],
a,
canvas,
.tab-btn,
.sub-tab-btn,
.upgrade-item,
.skin-item,
.setting-row,
.achievement-item,
.prestige-perk-row,
.prestige-buy-btn,
.prestige-btn-main,
.buy-btn,
.boost-card,
.toggle,
.achievement-status-btn,
.skin-buy-btn,
.skin-ad-btn {
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  touch-action: manipulation;
}

.sidebar {
  overflow: hidden !important;
}

.tab-content-container,
.custom-scrollbar,
.visual-sections-shell,
.dev-controls {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.tab-content-container::-webkit-scrollbar,
.custom-scrollbar::-webkit-scrollbar,
.visual-sections-shell::-webkit-scrollbar,
.dev-controls::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}

.tab-content-container::-webkit-scrollbar-track,
.custom-scrollbar::-webkit-scrollbar-track,
.visual-sections-shell::-webkit-scrollbar-track,
.dev-controls::-webkit-scrollbar-track,
.tab-content-container::-webkit-scrollbar-thumb,
.custom-scrollbar::-webkit-scrollbar-thumb,
.visual-sections-shell::-webkit-scrollbar-thumb,
.dev-controls::-webkit-scrollbar-thumb,
.tab-content-container::-webkit-scrollbar-corner,
.custom-scrollbar::-webkit-scrollbar-corner,
.visual-sections-shell::-webkit-scrollbar-corner,
.dev-controls::-webkit-scrollbar-corner {
  background: transparent !important;
  border: 0 !important;
}


/* ==========================================================
   Glow clipping / overflow fix
   - Keeps tab icon and badge positions unchanged
   - Prevents tab alert glow from bleeding outside the badge
   - Converts scroll-content glow pulses to inner glows so they
     do not hit the tab-content-container boundary abruptly
   ========================================================== */

/* Sidebar itself should not clip the tab row. The scroll viewport below
   remains clipped/scrollable, so gameplay layout does not change. */
.sidebar {
  overflow: visible !important;
}

/* The alert badge is slightly smaller and the highlight is pushed further
   into the corner so it no longer washes over the ! character. */
.tab-alert-badge {
  top: -5px;
  right: -3px;
  width: 18px;
  height: 18px;
  font-size: 0.82rem;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    inset 0 -2px 6px rgba(127, 29, 29, 0.38),
    0 2px 4px rgba(15, 23, 42, 0.28);
  filter: none !important;
  text-shadow:
    0 1px 1px rgba(127, 29, 29, 0.75),
    0 0 2px rgba(0, 0, 0, 0.24);
}

.tab-alert-badge::before,
.tab-alert-badge::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
}

.tab-alert-badge::before {
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.58), transparent 18%),
    radial-gradient(circle at 48% 64%, rgba(248, 113, 113, 0.42), transparent 54%);
  opacity: 0.82;
}

.tab-alert-badge::after {
  inset: 3px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.14), transparent 62%);
  opacity: 0;
  animation: tabBadgeInnerGlow 1.15s ease-in-out infinite;
}

/* Override the old badge keyframes that used filter: drop-shadow(). */
@keyframes tabBadgePulse {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
    filter: none;
  }

  35% {
    transform: scale(1.1) rotate(-8deg);
    filter: none;
  }

  70% {
    transform: scale(0.98) rotate(8deg);
    filter: none;
  }
}

@keyframes tabBadgeInnerGlow {

  0%,
  100% {
    opacity: 0.08;
  }

  45% {
    opacity: 0.34;
  }

  70% {
    opacity: 0.22;
  }
}

/* Keep active tab feedback without adding a glow outside the icon. */
.tab-btn.active .tab-icon {
  filter: none;
}

/* Scroll area: keep the real scroll clipping, but give light effects
   breathing room and fade the viewport edges to avoid hard stops. */
.tab-content-container {
  padding: 18px 0 28px 0;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-padding-block: 18px 28px;
  -webkit-mask-image: linear-gradient(to bottom,
      transparent 0,
      #000 18px,
      #000 calc(100% - 22px),
      transparent 100%);
  mask-image: linear-gradient(to bottom,
      transparent 0,
      #000 18px,
      #000 calc(100% - 22px),
      transparent 100%);
}

/* Keep scroll-list highlights inside their own cards/buttons. */
.tab-content-container .skin-item.active,
.tab-content-container .achievement-item.claimable,
.tab-content-container .setting-row,
.tab-content-container .prestige-perk-row,
.tab-content-container .prestige-stat,
.tab-content-container .prestige-req-card {
  overflow: hidden;
  isolation: isolate;
}

.tab-content-container .skin-item.active {
  box-shadow:
    inset 0 0 0 1px rgba(34, 197, 94, 0.55),
    inset 0 0 22px rgba(34, 197, 94, 0.14),
    0 4px 15px rgba(0, 0, 0, 0.20);
}

.tab-content-container .skin-item.active .skin-preview {
  filter: none;
}

.tab-content-container .prestige-progress-fill,
.tab-content-container .boost-bar-fill {
  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.18),
    inset 0 -2px 4px rgba(0, 0, 0, 0.12);
}

.tab-content-container .prestige-btn-main:not(:disabled):hover,
.tab-content-container .achievement-item.claimable .achievement-status-btn,
.tab-content-container .achievement-item.claimed .achievement-status-btn,
.tab-content-container .achievement-status-btn {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 18px rgba(59, 130, 246, 0.10),
    0 4px 0 rgba(30, 58, 138, 0.95);
}

/* --- Cleanup: remove the thin decorative line/sheen on upgrade and achievement cards --- */
.upgrade-item::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

.achievement-item::before {
  content: none !important;
  display: none !important;
  background: none !important;
}

/* --- Fix: claimed achievement button should keep its yellow/orange bottom lip, not the shared blue one --- */
.tab-content-container .achievement-item.claimed .achievement-status-btn {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.10),
    inset 0 0 18px rgba(245, 158, 11, 0.12),
    0 4px 0 #b45309,
    0 10px 20px rgba(245, 158, 11, 0.22) !important;
}

/* --- Fix: disabled Claim All button should use the same gray lip as its body, not the shared blue lip --- */
.tab-content-container .achievement-claim-all-btn:disabled {
  background: linear-gradient(to bottom, #64748b, #334155);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 18px rgba(100, 116, 139, 0.10),
    0 4px 0 #1e293b,
    0 8px 18px rgba(0, 0, 0, 0.16) !important;
  color: #e2e8f0;
  opacity: 0.72;
}


/* --- Mobile UX: toggle setting cards can be tapped anywhere, sliders stay unchanged --- */
.setting-row.toggle-setting-row {
  cursor: pointer;
}

.setting-row.toggle-setting-row:active {
  transform: scale(0.985);
}


/* --- Settings polish: arcade energy sliders and power-capsule switches --- */
.settings-list .setting-row {
  min-height: 58px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(15, 23, 42, 0.74)),
    rgba(15, 23, 42, 0.62);
  border-color: rgba(148, 163, 184, 0.10);
  border-left-color: rgba(34, 211, 238, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -10px 24px rgba(2, 6, 23, 0.18),
    0 8px 18px rgba(0, 0, 0, 0.18);
}

.settings-list .setting-label {
  font-weight: 900;
  letter-spacing: 0.01em;
  color: rgba(248, 250, 252, 0.96);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.32);
}

.settings-list .setting-slider-group {
  max-width: 248px;
  gap: 12px;
}

.settings-list .setting-slider {
  --setting-slider-fill: 50%;
  --slider-start: #22d3ee;
  --slider-end: #2563eb;
  --slider-glow: rgba(34, 211, 238, 0.30);
  -webkit-appearance: none;
  appearance: none;
  height: 12px;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  touch-action: pan-x;
  background:
    linear-gradient(90deg,
      var(--slider-start) 0%,
      var(--slider-end) var(--setting-slider-fill),
      rgba(15, 23, 42, 0.94) var(--setting-slider-fill),
      rgba(2, 6, 23, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.46),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    0 0 14px var(--slider-glow);
}

.settings-list #slider-sound {
  --slider-start: #22d3ee;
  --slider-end: #2563eb;
  --slider-glow: rgba(34, 211, 238, 0.28);
}

.settings-list #slider-music {
  --slider-start: #a78bfa;
  --slider-end: #ec4899;
  --slider-glow: rgba(168, 85, 247, 0.28);
}

.settings-list .setting-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.72);
  background:
    radial-gradient(circle at 32% 28%, #ffffff 0 18%, rgba(255, 255, 255, 0.58) 19% 34%, transparent 35%),
    linear-gradient(145deg, #e0f2fe, var(--slider-start) 46%, var(--slider-end) 100%);
  box-shadow:
    0 0 0 3px rgba(15, 23, 42, 0.72),
    0 0 16px var(--slider-glow),
    0 5px 9px rgba(0, 0, 0, 0.34),
    inset -4px -5px 8px rgba(15, 23, 42, 0.30),
    inset 3px 3px 7px rgba(255, 255, 255, 0.42);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.settings-list .setting-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.72);
  background:
    radial-gradient(circle at 32% 28%, #ffffff 0 18%, rgba(255, 255, 255, 0.58) 19% 34%, transparent 35%),
    linear-gradient(145deg, #e0f2fe, var(--slider-start) 46%, var(--slider-end) 100%);
  box-shadow:
    0 0 0 3px rgba(15, 23, 42, 0.72),
    0 0 16px var(--slider-glow),
    0 5px 9px rgba(0, 0, 0, 0.34),
    inset -4px -5px 8px rgba(15, 23, 42, 0.30),
    inset 3px 3px 7px rgba(255, 255, 255, 0.42);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.settings-list .setting-slider::-moz-range-track {
  height: 12px;
  border-radius: 999px;
  background: transparent;
  border: none;
}

.settings-list .setting-slider:active::-webkit-slider-thumb {
  transform: scale(1.12);
  filter: brightness(1.08);
}

.settings-list .setting-slider:active::-moz-range-thumb {
  transform: scale(1.12);
  filter: brightness(1.08);
}

.settings-list .setting-percent {
  min-width: 54px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fde68a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 10px rgba(0, 0, 0, 0.18);
}

.settings-list .toggle-group {
  gap: 10px;
}

.settings-list .toggle {
  width: 58px;
  height: 30px;
  padding: 4px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #334155 0%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.46),
    inset 0 -1px 0 rgba(255, 255, 255, 0.07),
    0 5px 10px rgba(0, 0, 0, 0.22);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.settings-list .toggle-on {
  background:
    linear-gradient(135deg, #22d3ee 0%, #00e676 52%, #22c55e 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.20),
    inset 0 -3px 6px rgba(4, 120, 87, 0.34),
    0 0 16px rgba(34, 197, 94, 0.32),
    0 5px 10px rgba(0, 0, 0, 0.20);
}

.settings-list .toggle:active {
  transform: scale(0.96);
}

.settings-list .toggle-knob {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #ffffff 0 18%, rgba(255, 255, 255, 0.68) 19% 36%, transparent 37%),
    linear-gradient(145deg, #f8fafc 0%, #cbd5e1 100%);
  box-shadow:
    0 3px 7px rgba(0, 0, 0, 0.35),
    inset -3px -4px 7px rgba(15, 23, 42, 0.24),
    inset 3px 3px 6px rgba(255, 255, 255, 0.58);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease, background 0.18s ease;
}

.settings-list .toggle-knob.active {
  transform: translateX(28px);
  background:
    radial-gradient(circle at 32% 28%, #ffffff 0 18%, rgba(255, 255, 255, 0.72) 19% 36%, transparent 37%),
    linear-gradient(145deg, #ffffff 0%, #dcfce7 100%);
  box-shadow:
    0 0 14px rgba(255, 255, 255, 0.32),
    0 3px 8px rgba(0, 0, 0, 0.30),
    inset -3px -4px 7px rgba(5, 150, 105, 0.20),
    inset 3px 3px 6px rgba(255, 255, 255, 0.62);
}

.settings-list .toggle-label {
  min-width: 36px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: rgba(203, 213, 225, 0.92);
  text-align: center;
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0.04em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 4px 10px rgba(0, 0, 0, 0.16);
}

.settings-list .toggle-on+.toggle-label {
  background: rgba(6, 78, 59, 0.58);
  border-color: rgba(52, 211, 153, 0.28);
  color: #ecfdf5;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 12px rgba(34, 197, 94, 0.16);
}

/* =========================================================
   SETTINGS SLIDER FIX: align fill with thumb position
   - Moves colored fill from the input background to the track.
   - Adds half-thumb padding so 1% does not leak past the left thumb.
   ========================================================= */
#tab-settings .setting-slider-group {
  flex: 0 1 264px !important;
  width: 264px !important;
  min-width: 0 !important;
  max-width: 264px !important;
  gap: 8px !important;
}

#tab-settings .setting-slider {
  display: block !important;
  width: 100% !important;
  --slider-value: 50%;
  --slider-thumb-size: 24px;
  --slider-track-height: 12px;
  --slider-thumb-shift: 0px;
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  box-sizing: border-box !important;
  padding-left: calc(var(--slider-thumb-size) / 2) !important;
  padding-right: calc(var(--slider-thumb-size) / 2) !important;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  overflow: visible !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  outline: none;
  touch-action: pan-x;
}

#tab-settings .setting-slider::-webkit-slider-runnable-track {
  height: var(--slider-track-height) !important;
  box-sizing: border-box !important;
  border-radius: 999px;
  background:
    linear-gradient(90deg,
      var(--slider-start, #22d3ee) 0%,
      var(--slider-end, #2563eb) var(--slider-value, 50%),
      rgba(15, 23, 42, 0.94) var(--slider-value, 50%),
      rgba(2, 6, 23, 0.92) 100%);
  background-repeat: no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.46),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    0 0 14px var(--slider-glow, rgba(34, 211, 238, 0.30));
}

#tab-settings .setting-slider::-moz-range-track {
  height: var(--slider-track-height) !important;
  box-sizing: border-box !important;
  border-radius: 999px;
  background:
    linear-gradient(90deg,
      var(--slider-start, #22d3ee) 0%,
      var(--slider-end, #2563eb) var(--slider-value, 50%),
      rgba(15, 23, 42, 0.94) var(--slider-value, 50%),
      rgba(2, 6, 23, 0.92) 100%);
  background-repeat: no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

#tab-settings .setting-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: var(--slider-thumb-size) !important;
  height: var(--slider-thumb-size) !important;
  border-radius: 50%;
  margin-top: calc((var(--slider-track-height) - var(--slider-thumb-size)) / 2) !important;
  transform: translateX(var(--slider-thumb-shift, 0px));
  transform-origin: 50% 50% !important;
  border: 2px solid rgba(255, 255, 255, 0.72);
  background:
    radial-gradient(circle at 32% 28%, #ffffff 0 18%, rgba(255, 255, 255, 0.58) 19% 34%, transparent 35%),
    linear-gradient(145deg, #e0f2fe, var(--slider-start, #22d3ee) 46%, var(--slider-end, #2563eb) 100%);
  box-shadow:
    0 0 0 3px rgba(15, 23, 42, 0.72),
    0 0 16px var(--slider-glow, rgba(34, 211, 238, 0.30)),
    0 5px 9px rgba(0, 0, 0, 0.34),
    inset -4px -5px 8px rgba(15, 23, 42, 0.30),
    inset 3px 3px 7px rgba(255, 255, 255, 0.42);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

#tab-settings .setting-slider::-moz-range-thumb {
  width: var(--slider-thumb-size) !important;
  height: var(--slider-thumb-size) !important;
  border-radius: 50%;
  transform: translateX(var(--slider-thumb-shift, 0px));
  transform-origin: 50% 50% !important;
  border: 2px solid rgba(255, 255, 255, 0.72);
  background:
    radial-gradient(circle at 32% 28%, #ffffff 0 18%, rgba(255, 255, 255, 0.58) 19% 34%, transparent 35%),
    linear-gradient(145deg, #e0f2fe, var(--slider-start, #22d3ee) 46%, var(--slider-end, #2563eb) 100%);
  box-shadow:
    0 0 0 3px rgba(15, 23, 42, 0.72),
    0 0 16px var(--slider-glow, rgba(34, 211, 238, 0.30)),
    0 5px 9px rgba(0, 0, 0, 0.34),
    inset -4px -5px 8px rgba(15, 23, 42, 0.30),
    inset 3px 3px 7px rgba(255, 255, 255, 0.42);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

#tab-settings .setting-slider:hover::-webkit-slider-thumb,
#tab-settings .setting-slider:focus-visible::-webkit-slider-thumb {
  transform: translateX(var(--slider-thumb-shift, 0px)) scale(1.06);
  filter: brightness(1.08);
}

#tab-settings .setting-slider:hover::-moz-range-thumb,
#tab-settings .setting-slider:focus-visible::-moz-range-thumb {
  transform: translateX(var(--slider-thumb-shift, 0px)) scale(1.06);
  filter: brightness(1.08);
}

#tab-settings .setting-slider:active::-webkit-slider-thumb {
  transform: translateX(var(--slider-thumb-shift, 0px)) scale(0.98) !important;
}

#tab-settings .setting-slider:active::-moz-range-thumb {
  transform: translateX(var(--slider-thumb-shift, 0px)) scale(0.98) !important;
}

#tab-settings #slider-sound {
  --slider-start: #22d3ee;
  --slider-end: #2563eb;
  --slider-glow: rgba(34, 211, 238, 0.28);
}

#tab-settings #slider-music {
  --slider-start: #a78bfa;
  --slider-end: #ec4899;
  --slider-glow: rgba(168, 85, 247, 0.28);
}

/* --- Prestige 2X ready state polish ---
   Ready state is no longer styled like a clickable rewarded button.
   It becomes a passive active-bonus badge, while PRESTIGE NOW keeps the action. */
.prestige-double-btn .prestige-double-icon-slot {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  position: relative;
  z-index: 1;
}

.prestige-double-btn .prestige-double-icon-slot img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 0 rgba(120, 53, 15, 0.55));
}

.prestige-double-btn .prestige-double-check {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(187, 247, 208, 0.42);
  color: #bbf7d0;
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.prestige-double-btn.prestige-double-ready,
.prestige-double-btn.prestige-double-ready:disabled {
  cursor: default;
  pointer-events: none;
  opacity: 1;
  filter: none;
  color: #bbf7d0;
  background:
    radial-gradient(circle at 24% 18%, rgba(34, 197, 94, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(6, 78, 59, 0.42));
  border: 1px solid rgba(34, 197, 94, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 0 18px rgba(34, 197, 94, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.20);
  animation: none !important;
  transform: none !important;
}

.prestige-double-btn.prestige-double-ready::after {
  content: none !important;
  display: none !important;
  animation: none !important;
}

.prestige-double-btn.prestige-double-ready:hover,
.prestige-double-btn.prestige-double-ready:active {
  transform: none !important;
  filter: none !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 0 18px rgba(34, 197, 94, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.20) !important;
}

.prestige-double-status.prestige-double-ready {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.26);
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 197, 94, 0.12), transparent 58%),
    rgba(6, 78, 59, 0.22);
  box-shadow: none;
}

.prestige-btn-main.prestige-x2-ready,
.tab-content-container .prestige-btn-main.prestige-x2-ready:not(:disabled):hover {
  border: 1px solid rgba(250, 204, 21, 0.42);
  box-shadow:
    0 4px 0 #166534,
    0 0 0 2px rgba(250, 204, 21, 0.10),
    0 0 18px rgba(250, 204, 21, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
}

.prestige-btn-main.prestige-x2-ready:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow:
    0 6px 0 #166534,
    0 0 0 2px rgba(250, 204, 21, 0.12),
    0 0 22px rgba(250, 204, 21, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
}

/* --- Prestige button hover shadow fix: keep the lower 3D lip green instead of inherited blue --- */
.tab-content-container .prestige-btn-main:not(:disabled):hover {
  background: linear-gradient(to bottom, #22c55e, #16a34a);
  box-shadow:
    0 6px 0 #166534,
    0 16px 30px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(34, 197, 94, 0.14),
    0 0 22px rgba(34, 197, 94, 0.16) !important;
}

.tab-content-container .prestige-btn-main.prestige-x2-ready:not(:disabled):hover {
  background: linear-gradient(to bottom, #22c55e, #16a34a);
  box-shadow:
    0 6px 0 #166534,
    0 0 0 2px rgba(250, 204, 21, 0.12),
    0 0 22px rgba(250, 204, 21, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
}


/* ==========================================================
   UI Visual Polish 1/2/3
   - Achievement progress rows now use a fixed bar + label grid.
   - Achievement cards use fixed icon/content/action columns.
   - CrazyGames/mobile WebView repaint flicker is reduced by avoiding
     content-visibility delayed painting on scrollable cards.
   ========================================================== */
.achievement-item {
  display: grid !important;
  grid-template-columns: 64px minmax(0, 1fr) 102px !important;
  align-items: center !important;
  column-gap: 10px !important;
  min-height: 102px;
  padding: 13px 12px !important;
}

.achievement-icon {
  justify-self: center;
  margin-right: 0 !important;
}

.achievement-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.achievement-name,
.achievement-desc {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.achievement-action {
  min-width: 102px !important;
  align-items: flex-end !important;
  justify-content: center;
}

.achievement-progress-row {
  display: grid !important;
  grid-template-columns: 90px minmax(0, 1fr) !important;
  align-items: center !important;
  column-gap: 9px !important;
  width: 100%;
}

.achievement-progress-track {
  width: 90px !important;
  flex: 0 0 90px !important;
}

.achievement-progress-label {
  min-width: 0;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  font-variant-numeric: tabular-nums;
}

.achievement-item,
.skin-item,
.upgrade-item,
.setting-row {
  content-visibility: visible !important;
  contain-intrinsic-size: auto !important;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.tab-content-container .achievement-item,
.tab-content-container .skin-item,
.tab-content-container .upgrade-item,
.tab-content-container .setting-row {
  contain: layout paint style;
}

.tab-content-container .achievement-item>*,
.tab-content-container .skin-item>*,
.tab-content-container .upgrade-item>*,
.tab-content-container .setting-row>* {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* --- Daily Systems / Retention quick actions and modals --- */
.sidebar-quick-actions {
  position: absolute;
  right: calc(24px + var(--sidebar-width) + 12px);
  top: 40px;
  z-index: 120;
  display: flex;
  gap: 12px;
  pointer-events: auto;
}

.hud-action-btn {
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--btn-bg);
  box-shadow:
    inset 0 1px 0 var(--btn-glow),
    0 4px 0 var(--btn-shadow),
    0 8px 16px var(--btn-glow-shadow);
  transition: transform 0.1s ease, filter 0.1s ease, box-shadow 0.1s ease;
}

.hud-action-btn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.32));
}

#hud-tasks-btn {
  --btn-bg: linear-gradient(to bottom, #06b6d4, #0891b2);
  --btn-shadow: #155e75;
  --btn-glow-shadow: rgba(6, 182, 212, 0.25);
  --btn-glow: rgba(255, 255, 255, 0.22);
}

#hud-daily-btn {
  --btn-bg: linear-gradient(to bottom, #eab308, #ca8a04);
  --btn-shadow: #854d0e;
  --btn-glow-shadow: rgba(234, 179, 8, 0.25);
  --btn-glow: rgba(255, 255, 255, 0.30);
}

#hud-spin-btn {
  grid-column: 2;
  grid-row: 2;
  --btn-bg: linear-gradient(to bottom, #9333ea, #7e22ce);
  --btn-shadow: #581c87;
  --btn-glow-shadow: rgba(147, 51, 234, 0.25);
  --btn-glow: rgba(255, 255, 255, 0.22);
}

.hud-action-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow:
    inset 0 1px 0 var(--btn-glow),
    0 6px 0 var(--btn-shadow),
    0 12px 20px var(--btn-glow-shadow);
}

.hud-action-btn:active {
  transform: translateY(2px);
  filter: brightness(0.95);
  box-shadow:
    inset 0 1px 0 var(--btn-glow),
    0 2px 0 var(--btn-shadow),
    0 4px 8px var(--btn-glow-shadow);
}

.hud-action-btn.hud-action-ready {
  animation: hudActionReadyPulse 1.55s ease-in-out infinite;
}

@keyframes hudActionReadyPulse {

  0%,
  100% {
    box-shadow:
      inset 0 1px 0 var(--btn-glow),
      0 4px 0 var(--btn-shadow),
      0 0 0 rgba(250, 204, 21, 0),
      0 8px 16px var(--btn-glow-shadow);
  }

  50% {
    box-shadow:
      inset 0 1px 0 var(--btn-glow),
      0 4px 0 var(--btn-shadow),
      0 0 22px rgba(250, 204, 21, 0.65),
      0 12px 24px var(--btn-glow-shadow);
  }
}

.hud-action-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 950;
  background: linear-gradient(180deg, #ff6b6b, #dc2626);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.95), 0 8px 16px rgba(220, 38, 38, 0.45);
  pointer-events: none;
}

.reward-modal {
  position: relative;
  width: min(100%, 580px);
  max-height: min(92vh, 690px);
  overflow: hidden;
}

.daily-tasks-modal,
.daily-reward-modal,
.spin-wheel-modal {
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.13), transparent 32%),
    radial-gradient(circle at 86% 100%, rgba(250, 204, 21, 0.11), transparent 36%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(8, 15, 35, 0.96));
}

.modal-close-icon-btn {
  position: absolute;
  top: 13px;
  right: 13px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  color: #e2e8f0;
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.modal-close-icon-btn:hover {
  filter: brightness(1.12);
}

.title-only-header {
  padding-right: 38px;
}

.daily-tasks-body,
.daily-reward-body,
.spin-wheel-body {
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: none;
}

.daily-tasks-body::-webkit-scrollbar,
.daily-reward-body::-webkit-scrollbar,
.spin-wheel-body::-webkit-scrollbar {
  width: 0;
}

.daily-hero-card,
.spin-status-card {
  border-radius: 20px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--reward-accent, #facc15) 28%, transparent), transparent 34%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.74));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 28px rgba(0, 0, 0, 0.22);
  margin-bottom: 12px;
}

.daily-hero-topline,
.spin-status-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.reward-eyebrow,
.daily-hero-topline small,
.spin-status-topline small {
  display: block;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--reward-accent, #facc15);
}

.reward-main-title,
.daily-hero-main strong,
.spin-status-topline strong {
  display: block;
  margin-top: 2px;
  color: #fff;
  font-size: 1.22rem;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.daily-countdown,
.daily-task-reset,
.spin-countdown {
  margin-top: 10px;
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 800;
}

.daily-countdown.is-ready,
.daily-task-reset.is-ready,
.spin-countdown.is-ready {
  color: #86efac;
}

.daily-streak-pill,
.daily-task-progress-pill,
.spin-free-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.daily-streak-pill span,
.daily-task-progress-pill span,
.spin-free-pill span {
  color: #94a3b8;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.daily-streak-pill strong,
.daily-task-progress-pill strong,
.spin-free-pill strong {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 950;
}

.daily-streak-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.daily-day-card {
  min-height: 92px;
  border-radius: 16px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(15, 23, 42, 0.66);
}

.daily-day-card.active,
.daily-day-card.claimed {
  border-color: color-mix(in srgb, var(--reward-accent, #facc15) 45%, rgba(255, 255, 255, 0.1));
  background: linear-gradient(180deg, color-mix(in srgb, var(--reward-accent, #facc15) 18%, rgba(15, 23, 42, 0.78)), rgba(15, 23, 42, 0.66));
}

.daily-day-card span {
  color: #94a3b8;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.daily-day-card strong {
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.08;
  font-weight: 950;
}

.daily-day-card em {
  color: #facc15;
  font-size: 0.56rem;
  font-style: normal;
  font-weight: 900;
}

.reward-part-stars {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.reward-star-icon {
  width: 15px;
  height: 15px;
  object-fit: contain;
  vertical-align: -2px;
}

.reward-part-separator {
  display: block;
  opacity: 0.55;
}

.daily-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.daily-task-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 96px;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(15, 23, 42, 0.66);
}

.daily-task-card.completed {
  border-color: rgba(134, 239, 172, 0.3);
}

.daily-task-card.claimed {
  opacity: 0.72;
}

.daily-task-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.22), rgba(14, 116, 144, 0.24));
}

.daily-task-title {
  color: #fff;
  font-weight: 950;
  font-size: 0.96rem;
}

.daily-task-desc {
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 2px;
}

.daily-task-progress-track {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 7px;
  background: rgba(255, 255, 255, 0.08);
}

.daily-task-progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  width: var(--task-progress, 0%);
  background: linear-gradient(90deg, #22d3ee, #facc15);
}

.daily-task-progress-label {
  color: #e2e8f0;
  font-size: 0.68rem;
  font-weight: 900;
  margin-top: 4px;
}

.daily-task-claim-btn {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 0;
  color: #0f172a;
  font-weight: 950;
  cursor: pointer;
  background: linear-gradient(180deg, #fde68a, #f59e0b);
  box-shadow: 0 3px 0 #92400e;
}

.daily-task-claim-btn:disabled {
  cursor: default;
  opacity: 0.55;
  filter: grayscale(0.25);
}

.spin-wheel-wrap {
  position: relative;
  width: 282px;
  height: 282px;
  margin: 14px auto 12px;
}

.spin-wheel-disc {
  --spin-transition-ms: 0ms;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  border: 9px solid rgba(255, 255, 255, 0.12);
  background: conic-gradient(var(--spin-wheel-gradient, #22c55e 0deg 45deg, #38bdf8 45deg 90deg, #facc15 90deg 135deg, #a855f7 135deg 180deg, #f97316 180deg 225deg, #14b8a6 225deg 270deg, #fb7185 270deg 315deg, #22c55e 315deg 360deg));
  box-shadow: inset 0 0 0 8px rgba(2, 6, 23, 0.28), 0 18px 38px rgba(0, 0, 0, 0.33);
  overflow: hidden;
  transform: rotate(var(--spin-rotation, 0deg));
  transition: transform var(--spin-transition-ms) cubic-bezier(0.12, 0.72, 0.1, 1);
}

.spin-wheel-disc.is-spinning {
  pointer-events: none;
}

.spin-wheel-disc::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 36% 26%, #fff7ad, #facc15 52%, #a16207 100%);
  box-shadow: 0 0 0 6px rgba(2, 6, 23, 0.36), 0 8px 18px rgba(0, 0, 0, 0.26);
}

.spin-pointer {
  position: absolute;
  left: 50%;
  top: -5px;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 17px solid transparent;
  border-right: 17px solid transparent;
  border-top: 32px solid #fff;
  z-index: 4;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.45));
}

.spin-center-button {
  position: absolute;
  z-index: 5;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  width: 68px;
  height: 68px;
  background: transparent;
  color: #451a03;
  font-weight: 950;
  pointer-events: none;
}

.spin-segment-label {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88px;
  margin-left: -44px;
  transform-origin: 50% 0;
  transform: rotate(var(--label-rotation)) translateY(-115px) rotate(var(--label-upright));
  text-align: center;
  color: white;
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1.05;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.52);
}

.reward-result-card {
  padding: 10px 12px;
  border-radius: 16px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.16), rgba(15, 23, 42, 0.72));
  border: 1px solid rgba(134, 239, 172, 0.18);
}

.spin-prize-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.spin-ad-btn {
  color: #fff;
  background: linear-gradient(180deg, #38bdf8, #2563eb);
  box-shadow: 0 4px 0 #1e3a8a, 0 10px 22px rgba(59, 130, 246, 0.18);
}

.reward-actions-equal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.reward-actions-equal .modal-primary-btn {
  width: 100%;
  align-self: stretch;
}

@media (max-height: 650px) {
  .sidebar-quick-actions {
    top: 40px;
    display: flex;
    gap: 8px;
  }

  .hud-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .hud-action-btn img {
    width: 24px;
    height: 24px;
  }

  .reward-modal {
    max-height: 94vh;
    padding: 18px;
    gap: 12px;
  }

  .spin-wheel-wrap {
    width: 225px;
    height: 225px;
    margin: 8px auto;
  }

  .spin-segment-label {
    transform: rotate(var(--label-rotation)) translateY(-91px) rotate(var(--label-upright));
    font-size: 0.52rem;
  }

  .daily-day-card {
    min-height: 78px;
  }

  .daily-task-card {
    grid-template-columns: 38px minmax(0, 1fr) 86px;
    padding: 9px;
  }
}

/* --- Requested panel cleanup + example-game visual sync --- */
.daily-tasks-modal,
.daily-reward-modal,
.spin-wheel-modal {
  width: min(100%, 640px) !important;
  max-width: 640px !important;
  padding: 26px !important;
  gap: 18px !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.16), transparent 34%),
    radial-gradient(circle at 86% 100%, rgba(250, 204, 21, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(8, 15, 35, 0.95)) !important;
  border-color: rgba(34, 211, 238, 0.14) !important;
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.5),
    0 0 42px rgba(34, 211, 238, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.daily-tasks-modal::before,
.daily-reward-modal::before,
.spin-wheel-modal::before {
  content: "";
  position: absolute;
  inset: 0 18px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.7), rgba(250, 204, 21, 0.45), transparent);
  pointer-events: none;
}

.daily-tasks-modal>*,
.daily-reward-modal>*,
.spin-wheel-modal>* {
  position: relative;
  z-index: 1;
}

.daily-tasks-modal .modal-header,
.daily-reward-modal .daily-reward-header,
.spin-wheel-modal .spin-wheel-header {
  min-height: 58px !important;
  padding-right: 64px !important;
  align-items: center !important;
  text-align: left !important;
}

.daily-tasks-modal .modal-copy,
.daily-reward-modal .modal-copy,
.spin-wheel-modal .modal-copy {
  align-items: flex-start !important;
  text-align: left !important;
}

.daily-tasks-modal .modal-title,
.daily-reward-modal .modal-title,
.spin-wheel-modal .modal-title {
  font-size: 1.82rem !important;
  line-height: 1.02 !important;
  letter-spacing: 0.075em !important;
  text-transform: uppercase !important;
}

.daily-tasks-modal>.modal-close-icon-btn,
.daily-reward-modal>.modal-close-icon-btn,
.spin-wheel-modal>.modal-close-icon-btn {
  top: 8px !important;
  right: 8px !important;
  z-index: 4 !important;
  width: 50px !important;
  height: 50px !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 15px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
  font-size: 2rem !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  background: linear-gradient(180deg, #ef4444 0%, #991b1b 100%) !important;
  box-shadow:
    0 4px 0 #5f1111,
    0 10px 18px rgba(239, 68, 68, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
  transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease !important;
}

.daily-tasks-modal>.modal-close-icon-btn:hover,
.daily-reward-modal>.modal-close-icon-btn:hover,
.spin-wheel-modal>.modal-close-icon-btn:hover {
  filter: brightness(1.08) !important;
  transform: translateY(-1px) !important;
}

.daily-tasks-modal>.modal-close-icon-btn:active,
.daily-reward-modal>.modal-close-icon-btn:active,
.spin-wheel-modal>.modal-close-icon-btn:active {
  transform: translateY(3px) !important;
  box-shadow:
    0 1px 0 #5f1111,
    0 5px 10px rgba(239, 68, 68, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

.daily-tasks-body,
.daily-reward-body,
.spin-wheel-body {
  display: flex !important;
  flex-direction: column !important;
  overflow-y: auto !important;
  overflow-x: visible !important;
  scrollbar-width: none !important;
}

.daily-tasks-body::-webkit-scrollbar,
.daily-reward-body::-webkit-scrollbar,
.spin-wheel-body::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

.daily-panel-actions {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

.daily-panel-actions .modal-primary-btn,
.spin-wheel-modal .modal-primary-btn,
.spin-wheel-modal .modal-secondary-btn,
.daily-reward-modal .modal-primary-btn,
.daily-tasks-modal .modal-primary-btn {
  width: 100% !important;
  min-height: 60px !important;
  align-self: stretch !important;
  font-size: 1.05rem !important;
  letter-spacing: 0.07em !important;
  border-radius: 18px !important;
}

.daily-tasks-body {
  gap: 12px !important;
}

.daily-tasks-list {
  gap: 11px !important;
}

.daily-task-card {
  grid-template-columns: 52px minmax(0, 1fr) 116px !important;
  gap: 12px !important;
  min-height: 88px !important;
  padding: 13px !important;
  border-radius: 18px !important;
  background:
    radial-gradient(circle at 90% 10%, rgba(125, 211, 252, 0.08), transparent 35%),
    linear-gradient(180deg, rgba(0, 229, 255, 0.055), rgba(15, 23, 42, 0.68)) !important;
  border-color: rgba(125, 211, 252, 0.13) !important;
}

.daily-task-icon {
  width: 52px !important;
  height: 52px !important;
  border-radius: 16px !important;
  font-size: 1.55rem !important;
}

.daily-task-title {
  font-size: 1.04rem !important;
  line-height: 1.05 !important;
}

.daily-task-desc {
  font-size: 0.80rem !important;
  line-height: 1.15 !important;
}

.daily-task-progress-label {
  font-size: 0.76rem !important;
}

.daily-task-claim-btn {
  min-height: 48px !important;
  border-radius: 15px !important;
  font-size: 0.88rem !important;
}

/* Daily Reward: match example 3+3+weekly calendar layout */
.daily-reward-modal {
  width: min(100%, 660px) !important;
  max-width: 660px !important;
}

.daily-reward-body {
  gap: 16px !important;
}

.daily-hero-card {
  padding: 20px 22px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background:
    radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--reward-accent, #facc15) 28%, transparent), transparent 34%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.74)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 28px rgba(0, 0, 0, 0.22) !important;
}

.daily-hero-topline {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  min-width: 0 !important;
}

.reward-kicker {
  color: color-mix(in srgb, var(--reward-accent, #facc15) 74%, #ffffff) !important;
  font-size: 0.86rem !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
}

.reward-main-value {
  margin-top: 7px !important;
  color: #ffffff !important;
  font-size: 2.05rem !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  overflow-wrap: anywhere !important;
}

.daily-streak-pill {
  flex: 0 0 auto !important;
  min-width: 106px !important;
  padding: 11px 12px !important;
  border-radius: 17px !important;
  text-align: center !important;
  background: rgba(2, 6, 23, 0.42) !important;
  border: 1px solid color-mix(in srgb, var(--reward-accent, #facc15) 30%, rgba(255, 255, 255, 0.08)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.daily-streak-pill span {
  display: block !important;
  color: color-mix(in srgb, var(--reward-accent, #facc15) 74%, #ffffff) !important;
  font-size: 0.70rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0.13em !important;
}

.daily-streak-pill strong {
  display: block !important;
  margin-top: 5px !important;
  color: #ffffff !important;
  font-size: 1.55rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

.daily-countdown {
  margin-top: 10px !important;
  color: #cbd5e1 !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
}

.daily-countdown.is-ready {
  color: #86efac !important;
}

.daily-cycle-note {
  margin-top: 12px !important;
  color: rgba(226, 232, 240, 0.72) !important;
  font-size: 0.90rem !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
}

.daily-streak-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(144px, 1.22fr) !important;
  grid-template-rows: repeat(2, minmax(104px, auto)) !important;
  grid-template-areas:
    "d1 d2 d3 d7"
    "d4 d5 d6 d7" !important;
  gap: 13px !important;
  margin-top: 0 !important;
}

.daily-day-card {
  min-height: 104px !important;
  padding: 14px 10px !important;
  border-radius: 19px !important;
  gap: 8px !important;
  position: relative !important;
  overflow: hidden !important;
  text-align: center !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--reward-accent, #facc15) 13%, transparent), transparent 54%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.56)) !important;
}

.daily-day-card[data-day="1"] {
  grid-area: d1;
}

.daily-day-card[data-day="2"] {
  grid-area: d2;
}

.daily-day-card[data-day="3"] {
  grid-area: d3;
}

.daily-day-card[data-day="4"] {
  grid-area: d4;
}

.daily-day-card[data-day="5"] {
  grid-area: d5;
}

.daily-day-card[data-day="6"] {
  grid-area: d6;
}

.daily-day-card[data-day="7"] {
  grid-area: d7;
}

.daily-day-card::after {
  content: "";
  position: absolute;
  inset: auto 10px 8px 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--reward-accent, #facc15) 36%, transparent), transparent);
  pointer-events: none;
}

.daily-day-label {
  color: color-mix(in srgb, var(--reward-accent, #facc15) 75%, #ffffff) !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.10em !important;
}

.daily-day-reward {
  max-width: 100% !important;
  color: #ffffff !important;
  font-size: 0.95rem !important;
  line-height: 1.12 !important;
  font-weight: 900 !important;
  overflow-wrap: anywhere !important;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.38) !important;
}

.daily-day-reward span {
  font-size: inherit !important;
  color: inherit !important;
}

.daily-day-state {
  color: rgba(226, 232, 240, 0.58) !important;
  font-size: 0.64rem !important;
  line-height: 1 !important;
  font-style: normal !important;
  font-weight: 900 !important;
  letter-spacing: 0.12em !important;
}

.daily-day-card.claimed .daily-day-state {
  color: #bbf7d0 !important;
}

.daily-day-card.active {
  transform: translateY(-1px) !important;
  border-color: color-mix(in srgb, var(--reward-accent, #facc15) 72%, rgba(255, 255, 255, 0.10)) !important;
  box-shadow: 0 0 22px color-mix(in srgb, var(--reward-accent, #facc15) 22%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

.daily-day-card.active .daily-day-state {
  color: #ffffff !important;
}

.daily-day-weekly {
  min-height: 221px !important;
  justify-content: center !important;
  padding: 18px 12px !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 50% 12%, color-mix(in srgb, var(--reward-accent, #a855f7) 30%, transparent), transparent 44%),
    linear-gradient(180deg, rgba(69, 26, 120, 0.52), rgba(8, 15, 35, 0.72)) !important;
}

.daily-day-weekly .daily-day-label {
  font-size: 0.95rem !important;
}

.daily-day-weekly .daily-day-reward {
  font-size: 1.15rem !important;
  line-height: 1.14 !important;
}

.daily-day-weekly .daily-day-state {
  font-size: 0.76rem !important;
}

.daily-day-weekly::before {
  content: "7";
  position: absolute;
  top: 9px;
  right: 12px;
  color: rgba(255, 255, 255, 0.08);
  font-size: 4.25rem;
  line-height: 1;
  font-weight: 900;
  pointer-events: none;
}

/* Spin Wheel: match example wheel/pointer/result bubble */
.spin-wheel-modal {
  width: min(100%, 620px) !important;
  max-width: 620px !important;
  background:
    radial-gradient(circle at 50% 18%, rgba(250, 204, 21, 0.14), transparent 30%),
    radial-gradient(circle at 10% 5%, rgba(56, 189, 248, 0.16), transparent 34%),
    radial-gradient(circle at 92% 95%, rgba(168, 85, 247, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.985), rgba(7, 13, 30, 0.965)) !important;
}

.spin-wheel-modal .spin-wheel-body {
  min-height: 388px !important;
  gap: 10px !important;
  justify-content: center !important;
  overflow: visible !important;
}

.spin-daily-status {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  width: 100% !important;
  margin-bottom: 2px !important;
  padding: 12px 14px !important;
  border-radius: 17px !important;
  background: rgba(2, 6, 23, 0.36) !important;
  border: 1px solid rgba(125, 211, 252, 0.12) !important;
  color: rgba(226, 232, 240, 0.76) !important;
  font-size: 0.82rem !important;
  line-height: 1.15 !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

.spin-daily-status strong {
  color: #fef3c7 !important;
  text-align: right !important;
}

.spin-wheel-modal .spin-wheel-wrap {
  position: relative !important;
  width: 388px !important;
  height: 388px !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  isolation: isolate !important;
  overflow: visible !important;
}

.spin-wheel-wrap::before,
.spin-wheel-wrap::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.spin-wheel-wrap::before {
  inset: 7px;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.22), transparent 30%),
    radial-gradient(circle, rgba(250, 204, 21, 0.28), transparent 65%);
  filter: blur(12px);
  opacity: 0.95;
}

.spin-wheel-wrap::after {
  inset: 18px;
  z-index: -1;
  background: rgba(2, 6, 23, 0.34);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.36);
}

.spin-wheel-modal .spin-wheel-disc {
  --spin-wheel-gradient:
    #22c55e 0deg 45deg,
    #38bdf8 45deg 90deg,
    #facc15 90deg 135deg,
    #fde047 135deg 180deg,
    #f59e0b 180deg 225deg,
    #16a34a 225deg 270deg,
    #f97316 270deg 315deg,
    #14b8a6 315deg 360deg;
  position: relative !important;
  width: 368px !important;
  height: 368px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle, transparent 0 34px, rgba(15, 23, 42, 0.18) 35px 37px, transparent 38px),
    repeating-conic-gradient(from -22.5deg, rgba(255, 255, 255, 0.26) 0deg 1deg, transparent 1deg 45deg),
    conic-gradient(var(--spin-wheel-gradient)) !important;
  border: 9px solid #f8fafc !important;
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.43),
    0 0 0 6px rgba(250, 204, 21, 0.43),
    0 0 0 11px rgba(120, 53, 15, 0.42),
    inset 0 0 0 8px rgba(15, 23, 42, 0.20),
    inset 0 18px 30px rgba(255, 255, 255, 0.16),
    inset 0 -24px 36px rgba(15, 23, 42, 0.25) !important;
  transform-origin: 50% 50% !important;
  will-change: transform !important;
  transition: transform var(--spin-transition-ms, 3050ms) cubic-bezier(0.07, 0.82, 0.08, 1) !important;
}

.spin-wheel-modal .spin-wheel-disc::before {
  content: "" !important;
  position: absolute !important;
  inset: 8px !important;
  border-radius: 50% !important;
  pointer-events: none !important;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.78) 0deg 2.2deg, transparent 2.2deg 22.5deg) !important;
  -webkit-mask: radial-gradient(circle, transparent 0 158px, #000 159px 168px, transparent 169px) !important;
  mask: radial-gradient(circle, transparent 0 158px, #000 159px 168px, transparent 169px) !important;
  opacity: 0.72 !important;
}

.spin-wheel-modal .spin-wheel-disc::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.20) 0%, rgba(0, 0, 0, 0.32) 100%) !important;
  pointer-events: none !important;
}

.spin-wheel-modal .spin-pointer {
  position: absolute !important;
  top: -8px !important;
  left: 50% !important;
  z-index: 5 !important;
  width: 48px !important;
  height: 60px !important;
  transform: translateX(-50%) !important;
  border: 0 !important;
  background: linear-gradient(180deg, #ffffff 0%, #fef3c7 24%, #f59e0b 100%) !important;
  clip-path: polygon(50% 100%, 6% 0, 94% 0) !important;
  filter: drop-shadow(0 6px 7px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 10px rgba(250, 204, 21, 0.35)) !important;
  animation: spinPointerIdle 1.15s ease-in-out infinite alternate !important;
}

.spin-wheel-modal .spin-pointer::after {
  content: "";
  position: absolute;
  inset: 7px 13px 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
}

.spin-wheel-modal .spin-wheel-disc.is-spinning {
  filter: brightness(1.08) saturate(1.14) !important;
  box-shadow:
    0 24px 52px rgba(0, 0, 0, 0.46),
    0 0 0 6px rgba(250, 204, 21, 0.58),
    0 0 36px rgba(250, 204, 21, 0.36),
    inset 0 0 0 8px rgba(15, 23, 42, 0.20),
    inset 0 0 42px rgba(255, 255, 255, 0.18) !important;
}

.spin-wheel-modal.is-wheel-spinning .spin-pointer,
.spin-wheel-modal:has(.spin-wheel-disc.is-spinning) .spin-pointer {
  animation: spinPointerTap 0.12s linear infinite alternate !important;
}

.spin-center-button {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  z-index: 7 !important;
  width: 90px !important;
  height: 90px !important;
  transform: translate(-50%, -50%) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #7c2d12 !important;
  font-size: 1.18rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0.06em !important;
  background:
    radial-gradient(circle at 35% 25%, #ffffff 0 8%, transparent 9%),
    linear-gradient(180deg, #fff7ad 0%, #facc15 48%, #d97706 100%) !important;
  border: 5px solid rgba(120, 53, 15, 0.38) !important;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.32),
    inset 0 3px 0 rgba(255, 255, 255, 0.58),
    inset 0 -5px 0 rgba(120, 53, 15, 0.20),
    0 0 24px rgba(250, 204, 21, 0.42) !important;
  pointer-events: none !important;
  user-select: none !important;
}

.spin-center-button.is-ready {
  cursor: pointer !important;
  pointer-events: auto !important;
  animation: centerPulse 1.6s infinite ease-in-out !important;
}

@keyframes centerPulse {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1) !important;
    box-shadow:
      0 8px 18px rgba(0, 0, 0, 0.32),
      inset 0 3px 0 rgba(255, 255, 255, 0.58),
      inset 0 -5px 0 rgba(120, 53, 15, 0.20),
      0 0 24px rgba(250, 204, 21, 0.42) !important;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.06) !important;
    box-shadow:
      0 12px 24px rgba(0, 0, 0, 0.36),
      inset 0 3px 0 rgba(255, 255, 255, 0.62),
      inset 0 -5px 0 rgba(120, 53, 15, 0.20),
      0 0 36px rgba(250, 204, 21, 0.68) !important;
  }
}

.spin-wheel-modal.is-wheel-spinning .spin-center-button,
.spin-wheel-modal:has(.spin-wheel-disc.is-spinning) .spin-center-button {
  filter: brightness(1.06) saturate(1.08) !important;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.34),
    inset 0 3px 0 rgba(255, 255, 255, 0.58),
    inset 0 -5px 0 rgba(120, 53, 15, 0.20),
    0 0 30px rgba(250, 204, 21, 0.58) !important;
}

.spin-wheel-modal .spin-segment-label {
  --segment-angle: 0deg;
  --segment-flip: 0deg;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  z-index: 1 !important;
  width: 88px !important;
  margin-left: -44px !important;
  color: #ffffff !important;
  font-size: 0.82rem !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  text-align: center !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
  text-shadow: 0 2px 0 rgba(15, 23, 42, 0.34), 0 2px 7px rgba(0, 0, 0, 0.48) !important;
  transform-origin: 50% 0 !important;
  transform: rotate(var(--segment-angle)) translateY(-141px) rotate(var(--segment-flip, 0deg)) !important;
  pointer-events: none !important;
}

.spin-segment-label-inner {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  min-height: 30px !important;
  transform: translateY(-50%) !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.42)) !important;
}

.spin-prize-chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  max-width: 88px !important;
  min-height: 24px !important;
  padding: 2px 6px !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  background: rgba(2, 6, 23, 0.18) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
  white-space: nowrap !important;
}

.spin-prize-chip img {
  width: 16px !important;
  height: 16px !important;
  object-fit: contain !important;
}

.spin-prize-value,
.spin-prize-cash-top,
.spin-prize-cash-bottom {
  display: block !important;
  color: #ffffff !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

.spin-prize-cash-bottom {
  margin-top: 1px !important;
  font-size: 0.62rem !important;
  opacity: 0.92 !important;
}

.spin-result-bubble {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  z-index: 8 !important;
  width: 158px !important;
  min-height: 92px !important;
  padding: 14px 16px !important;
  border-radius: 28px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  transform: translate(-50%, -50%) scale(1) !important;
  color: #ffffff !important;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--result-accent, #facc15) 34%, transparent), transparent 58%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.86)) !important;
  border: 1px solid color-mix(in srgb, var(--result-accent, #facc15) 48%, rgba(255, 255, 255, 0.15)) !important;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.42),
    0 0 26px color-mix(in srgb, var(--result-accent, #facc15) 26%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  pointer-events: none !important;
  animation: spinResultBubbleIn 0.34s cubic-bezier(0.18, 0.9, 0.22, 1.18) both !important;
}

.spin-result-bubble span {
  display: block !important;
  color: color-mix(in srgb, var(--result-accent, #facc15) 78%, #ffffff) !important;
  font-size: 0.78rem !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: 0.14em !important;
}

.spin-result-bubble strong {
  display: block !important;
  margin-top: 6px !important;
  color: #ffffff !important;
  font-size: 1.22rem !important;
  line-height: 1.06 !important;
  font-weight: 900 !important;
  overflow-wrap: anywhere !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.38) !important;
}

.spin-wheel-modal #spin-result.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.reward-actions-equal,
.reward-actions-double {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
}

.reward-actions-equal .modal-primary-btn,
.reward-actions-double .modal-primary-btn {
  width: 100% !important;
  align-self: stretch !important;
}

@keyframes spinPointerIdle {
  from {
    transform: translateX(-50%) translateY(0);
  }

  to {
    transform: translateX(-50%) translateY(3px);
  }
}

@keyframes spinPointerTap {
  from {
    transform: translateX(-50%) rotate(-5deg);
  }

  to {
    transform: translateX(-50%) rotate(5deg);
  }
}

@keyframes spinResultBubbleIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.62) rotate(-5deg);
    filter: blur(2px);
  }

  72% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08) rotate(1deg);
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0);
  }
}

@media (max-width: 640px),
(max-height: 720px) {

  .daily-tasks-modal,
  .daily-reward-modal,
  .spin-wheel-modal {
    width: min(100%, 590px) !important;
    max-width: 590px !important;
    padding: 20px !important;
    gap: 14px !important;
  }

  .daily-tasks-modal .modal-title,
  .daily-reward-modal .modal-title,
  .spin-wheel-modal .modal-title {
    font-size: 1.56rem !important;
  }

  .modal-title-countdown {
    font-size: 0.95rem !important;
    margin-left: 6px !important;
  }

  .daily-panel-actions .modal-primary-btn,
  .spin-wheel-modal .modal-primary-btn,
  .daily-reward-modal .modal-primary-btn,
  .daily-tasks-modal .modal-primary-btn {
    min-height: 54px !important;
    font-size: 0.96rem !important;
  }

  .daily-task-card {
    grid-template-columns: 46px minmax(0, 1fr) 98px !important;
    min-height: 74px !important;
    padding: 10px !important;
  }

  .daily-task-icon {
    width: 46px !important;
    height: 46px !important;
    font-size: 1.35rem !important;
  }

  .daily-task-title {
    font-size: 0.92rem !important;
  }

  .daily-task-desc {
    font-size: 0.70rem !important;
  }

  .daily-task-progress-label {
    font-size: 0.66rem !important;
  }

  .daily-task-claim-btn {
    min-height: 42px !important;
    font-size: 0.74rem !important;
  }

  .daily-hero-card {
    padding: 16px 18px !important;
  }

  .reward-main-value {
    font-size: 1.72rem !important;
  }

  .daily-cycle-note {
    font-size: 0.78rem !important;
  }

  .daily-streak-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(128px, 1.18fr) !important;
    grid-template-rows: repeat(2, minmax(88px, auto)) !important;
    gap: 10px !important;
  }

  .daily-day-card {
    min-height: 88px !important;
    padding: 11px 8px !important;
    gap: 6px !important;
  }

  .daily-day-label {
    font-size: 0.72rem !important;
  }

  .daily-day-reward {
    font-size: 0.85rem !important;
  }

  .daily-day-state {
    font-size: 0.56rem !important;
  }

  .daily-day-weekly {
    min-height: 186px !important;
  }

  .daily-day-weekly .daily-day-reward {
    font-size: 1.05rem !important;
  }

  .spin-wheel-modal .spin-wheel-body {
    min-height: 336px !important;
  }

  .spin-daily-status {
    padding: 10px 12px !important;
    font-size: 0.72rem !important;
  }

  .spin-wheel-modal .spin-wheel-wrap {
    width: 322px !important;
    height: 322px !important;
  }

  .spin-wheel-modal .spin-wheel-disc {
    width: 302px !important;
    height: 302px !important;
    border-width: 8px !important;
  }

  .spin-wheel-modal .spin-wheel-disc::before {
    -webkit-mask: radial-gradient(circle, transparent 0 127px, #000 128px 136px, transparent 137px) !important;
    mask: radial-gradient(circle, transparent 0 127px, #000 128px 136px, transparent 137px) !important;
  }

  .spin-wheel-modal .spin-pointer {
    width: 42px !important;
    height: 52px !important;
  }

  .spin-wheel-modal .spin-center-button {
    width: 74px !important;
    height: 74px !important;
    font-size: 0.98rem !important;
  }

  .spin-wheel-modal .spin-segment-label {
    width: 74px !important;
    margin-left: -37px !important;
    font-size: 0.68rem !important;
    transform: rotate(var(--segment-angle)) translateY(-114px) rotate(var(--segment-flip, 0deg)) !important;
  }

  .spin-wheel-modal .spin-prize-chip {
    max-width: 82px !important;
  }

  .spin-prize-value,
  .spin-prize-cash-top,
  .spin-prize-cash-bottom {
    font-size: 0.72rem !important;
  }

  .spin-result-bubble {
    width: 138px !important;
    min-height: 78px !important;
  }

  .spin-result-bubble strong {
    font-size: 1.04rem !important;
  }
}

@media (max-height: 610px) {

  .daily-tasks-modal,
  .daily-reward-modal,
  .spin-wheel-modal {
    padding: 16px !important;
    gap: 10px !important;
  }

  .daily-cycle-note {
    display: none !important;
  }

  .modal-title-countdown {
    font-size: 0.85rem !important;
    margin-left: 5px !important;
  }

  .daily-streak-grid {
    grid-template-rows: repeat(2, minmax(74px, auto)) !important;
    gap: 8px !important;
  }

  .daily-day-card {
    min-height: 74px !important;
    padding: 9px 6px !important;
  }

  .daily-day-reward {
    font-size: 0.76rem !important;
  }

  .daily-day-weekly {
    min-height: 156px !important;
  }

  .spin-wheel-modal .spin-wheel-body {
    min-height: 278px !important;
  }

  .spin-wheel-modal .spin-wheel-wrap {
    width: 262px !important;
    height: 262px !important;
  }

  .spin-wheel-modal .spin-wheel-disc {
    width: 244px !important;
    height: 244px !important;
  }

  .spin-wheel-modal .spin-wheel-disc::before {
    -webkit-mask: radial-gradient(circle, transparent 0 101px, #000 102px 109px, transparent 110px) !important;
    mask: radial-gradient(circle, transparent 0 101px, #000 102px 109px, transparent 110px) !important;
  }

  .spin-wheel-modal .spin-center-button {
    width: 62px !important;
    height: 62px !important;
    font-size: 0.84rem !important;
  }

  .spin-wheel-modal .spin-segment-label {
    width: 64px !important;
    margin-left: -32px !important;
    font-size: 0.58rem !important;
    transform: rotate(var(--segment-angle)) translateY(-90px) rotate(var(--segment-flip, 0deg)) !important;
  }
}

/* --- v3: keep quick-action modal close buttons fixed at panel top-right --- */
.daily-tasks-modal,
.daily-reward-modal,
.spin-wheel-modal {
  position: relative !important;
  overflow: hidden !important;
}

.daily-tasks-modal>.modal-close-icon-btn,
.daily-reward-modal>.modal-close-icon-btn,
.spin-wheel-modal>.modal-close-icon-btn {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  left: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  z-index: 30 !important;
  flex: 0 0 auto !important;
}

@media (max-width: 520px),
(max-height: 700px) {

  .daily-tasks-modal>.modal-close-icon-btn,
  .daily-reward-modal>.modal-close-icon-btn,
  .spin-wheel-modal>.modal-close-icon-btn {
    top: 8px !important;
    right: 8px !important;
  }
}


/* --- v4: Daily Tasks uses per-task claim only, no Claim All footer --- */
.daily-tasks-modal>.daily-panel-actions {
  display: none !important;
}

.daily-tasks-modal .daily-tasks-body {
  padding-bottom: 2px !important;
}

.modal-title-countdown {
  display: inline-block !important;
  font-size: 1.12rem !important;
  color: #facc15 !important;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.35) !important;
  margin-left: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  vertical-align: middle !important;
  text-transform: none !important;
}

/* --- v5: Daily Tasks final pass: 5 tasks, reward chip instead of LOCKED, thick in-bar progress --- */
.daily-tasks-modal {
  width: min(100%, 640px) !important;
  max-width: 640px !important;
  max-height: min(94vh, 710px) !important;
}

.daily-tasks-modal .modal-title {
  font-size: 2.08rem !important;
  letter-spacing: 0.08em !important;
}

.daily-tasks-modal .daily-tasks-body {
  padding-bottom: 4px !important;
}

.daily-tasks-list {
  gap: 12px !important;
}

.daily-task-card {
  grid-template-columns: 54px minmax(0, 1fr) 122px !important;
  gap: 13px !important;
  min-height: 98px !important;
  padding: 14px !important;
  align-items: center !important;
  border-radius: 20px !important;
  border: 1px solid rgba(125, 211, 252, 0.16) !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(34, 211, 238, 0.14), transparent 34%),
    radial-gradient(circle at 88% 20%, rgba(250, 204, 21, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.80), rgba(8, 15, 35, 0.74)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 8px 18px rgba(0, 0, 0, 0.18) !important;
}

.daily-task-card.completed:not(.claimed) {
  border-color: rgba(250, 204, 21, 0.45) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 22px rgba(250, 204, 21, 0.13), 0 8px 18px rgba(0, 0, 0, 0.22) !important;
}

.daily-task-card.claimed {
  opacity: 0.76 !important;
  filter: saturate(0.92) !important;
}

.daily-task-icon {
  width: 54px !important;
  height: 54px !important;
  border-radius: 17px !important;
  color: #f8fafc !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 0 rgba(15, 23, 42, 0.52), 0 10px 18px rgba(0, 0, 0, 0.18) !important;
}

.daily-task-icon .task-svg {
  width: 26px !important;
  height: 26px !important;
  display: block !important;
}

/* Play Time (Sarı/Altın Degrade) */
.daily-task-icon.task-icon-playTimeSeconds {
  background:
    radial-gradient(circle at 32% 18%, rgba(255, 255, 255, 0.30), transparent 28%),
    linear-gradient(180deg, #facc15, #ca8a04) !important;
}

/* Balls Dropped (Pembe/Rose Degrade) */
.daily-task-icon.task-icon-ballsDropped {
  background:
    radial-gradient(circle at 32% 18%, rgba(255, 255, 255, 0.30), transparent 28%),
    linear-gradient(180deg, #ec4899, #be185d) !important;
}

/* Upgrades Bought (Açık Mavi Degrade) */
.daily-task-icon.task-icon-upgradesBought {
  background:
    radial-gradient(circle at 32% 18%, rgba(255, 255, 255, 0.30), transparent 28%),
    linear-gradient(180deg, #38bdf8, #0369a1) !important;
}

/* Cash Earned (Yeşil Degrade) */
.daily-task-icon.task-icon-cashEarned {
  background:
    radial-gradient(circle at 32% 18%, rgba(255, 255, 255, 0.30), transparent 28%),
    linear-gradient(180deg, #4ade80, #15803d) !important;
}

/* Boosts Used (Mor Degrade) */
.daily-task-icon.task-icon-boostsUsed {
  background:
    radial-gradient(circle at 32% 18%, rgba(255, 255, 255, 0.30), transparent 28%),
    linear-gradient(180deg, #c084fc, #7e22ce) !important;
}

.daily-task-title-row {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

.daily-task-title {
  font-size: 1.08rem !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

.daily-task-desc {
  margin-top: 4px !important;
  font-size: 0.82rem !important;
  line-height: 1.12 !important;
  color: rgba(226, 232, 240, 0.84) !important;
  font-weight: 800 !important;
}

.daily-task-progress-track {
  position: relative !important;
  height: 20px !important;
  margin-top: 10px !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  background: rgba(2, 6, 23, 0.58) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.30) !important;
}

.daily-task-progress-fill {
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  width: var(--task-progress, 0%) !important;
  height: 100% !important;
  border-radius: inherit !important;
  background:
    linear-gradient(90deg, #22d3ee, #facc15) !important;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.26) !important;
}

.daily-task-progress-label {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  color: #ffffff !important;
  font-size: 0.76rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.035em !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.75) !important;
}

.daily-task-side {
  display: flex !important;
  align-items: stretch !important;
  justify-content: center !important;
  min-width: 0 !important;
}

.daily-task-reward-chip {
  width: 100% !important;
  min-height: 54px !important;
  padding: 8px 7px !important;
  border-radius: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  text-align: center !important;
  color: #fff !important;
  border: 1px solid rgba(250, 204, 21, 0.28) !important;
  background:
    radial-gradient(circle at 35% 18%, rgba(255, 255, 255, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(250, 204, 21, 0.22), rgba(146, 64, 14, 0.32)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 4px 0 rgba(92, 47, 6, 0.55) !important;
}

.daily-task-reward-chip span {
  color: rgba(254, 243, 199, 0.78) !important;
  font-size: 0.56rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.10em !important;
}

.daily-task-reward-chip strong {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  color: #fff !important;
  font-size: 0.82rem !important;
  line-height: 1.04 !important;
  font-weight: 950 !important;
}

.daily-task-reward-chip .reward-part-separator {
  display: inline !important;
  margin: 0 2px !important;
}

.daily-task-claim-btn {
  width: 100% !important;
  min-height: 54px !important;
  border-radius: 16px !important;
  font-size: 0.94rem !important;
  letter-spacing: 0.07em !important;
  color: #0f172a !important;
  background: linear-gradient(180deg, #86efac, #22c55e) !important;
  box-shadow: 0 4px 0 #166534, 0 0 16px rgba(34, 197, 94, 0.25) !important;
}

.daily-task-claim-btn.is-claimed,
.daily-task-claim-btn:disabled {
  color: #e2e8f0 !important;
  opacity: 0.72 !important;
  filter: grayscale(0.25) !important;
  background: linear-gradient(180deg, #475569, #1e293b) !important;
  box-shadow: 0 4px 0 #0f172a !important;
}

@media (max-height: 700px) {
  .daily-tasks-modal {
    max-height: 94vh !important;
    padding: 18px !important;
  }

  .daily-task-card {
    grid-template-columns: 48px minmax(0, 1fr) 108px !important;
    min-height: 86px !important;
    padding: 10px !important;
    gap: 10px !important;
  }

  .daily-task-icon {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.34rem !important;
  }

  .daily-task-title {
    font-size: 0.94rem !important;
  }

  .daily-task-desc {
    font-size: 0.70rem !important;
  }

  .daily-task-progress-track {
    height: 18px !important;
    margin-top: 7px !important;
  }

  .daily-task-progress-label {
    font-size: 0.66rem !important;
  }

  .daily-task-reward-chip,
  .daily-task-claim-btn {
    min-height: 46px !important;
    border-radius: 14px !important;
  }

  .daily-task-reward-chip strong {
    font-size: 0.72rem !important;
  }
}


/* --- v6: Daily task live progress + quick action alert badges match tab-nav badges --- */
.hud-action-badge {
  top: -5px !important;
  right: -3px !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden !important;
  isolation: isolate !important;
  color: #fff !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.72), transparent 28%),
    radial-gradient(circle at 50% 62%, rgba(248, 113, 113, 0.46), transparent 58%),
    linear-gradient(to bottom, #ff6b6b, #dc2626) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    inset 0 -2px 6px rgba(127, 29, 29, 0.38),
    0 2px 4px rgba(15, 23, 42, 0.28) !important;
  filter: none !important;
  text-shadow:
    0 1px 1px rgba(127, 29, 29, 0.75),
    0 0 2px rgba(0, 0, 0, 0.24) !important;
  pointer-events: none !important;
  transform-origin: 50% 60% !important;
  animation: tabBadgePulse 1.15s ease-in-out infinite !important;
}

.hud-action-badge::before,
.hud-action-badge::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
}

.hud-action-badge::before {
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.58), transparent 18%),
    radial-gradient(circle at 48% 64%, rgba(248, 113, 113, 0.42), transparent 54%);
  opacity: 0.82;
}

.hud-action-badge::after {
  inset: 3px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.14), transparent 62%);
  opacity: 0;
  animation: tabBadgeInnerGlow 1.15s ease-in-out infinite;
}

.hud-action-badge.hidden {
  display: none !important;
}

.reward-result-card.daily-task-last-reward {
  display: none !important;
}


/* --- v7: Daily task claim buttons show the reward amount like reward chips --- */
.daily-task-claim-btn.is-ready {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  text-align: center !important;
  line-height: 1 !important;
  padding: 8px 7px !important;
}

.daily-task-claim-btn.is-ready>span {
  display: block !important;
  color: rgba(15, 23, 42, 0.86) !important;
  font-size: 0.58rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
}

.daily-task-claim-btn.is-ready>strong {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  color: #052e16 !important;
  font-size: 0.78rem !important;
  line-height: 1.04 !important;
  font-weight: 950 !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
}

.daily-task-claim-btn.is-ready .reward-part-separator {
  display: inline !important;
  margin: 0 2px !important;
}

.daily-task-claim-btn.is-ready .reward-star-icon {
  width: 14px !important;
  height: 14px !important;
  display: inline-block !important;
  vertical-align: -2px !important;
}

@media (max-height: 700px) {
  .daily-task-claim-btn.is-ready>span {
    font-size: 0.52rem !important;
  }

  .daily-task-claim-btn.is-ready>strong {
    font-size: 0.68rem !important;
  }

  .daily-task-claim-btn.is-ready .reward-star-icon {
    width: 12px !important;
    height: 12px !important;
  }
}

/* --- v10: Reward modal open/close animations + fixed spin center circle --- */
#daily-tasks-modal:not(.hidden),
#daily-reward-modal:not(.hidden),
#spin-wheel-modal:not(.hidden) {
  animation: quickRewardOverlayIn 0.18s ease-out both;
}

#daily-tasks-modal:not(.hidden)>.reward-modal,
#daily-reward-modal:not(.hidden)>.reward-modal,
#spin-wheel-modal:not(.hidden)>.reward-modal {
  animation: quickRewardPanelIn 0.28s cubic-bezier(0.18, 0.9, 0.22, 1.15) both;
  will-change: transform, opacity;
}

#daily-tasks-modal.modal-closing,
#daily-reward-modal.modal-closing,
#spin-wheel-modal.modal-closing {
  pointer-events: none !important;
  animation: quickRewardOverlayOut 0.20s ease-in both !important;
}

#daily-tasks-modal.modal-closing>.reward-modal,
#daily-reward-modal.modal-closing>.reward-modal,
#spin-wheel-modal.modal-closing>.reward-modal {
  animation: quickRewardPanelOut 0.20s cubic-bezier(0.4, 0, 0.6, 1) both !important;
}

@keyframes quickRewardOverlayIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes quickRewardOverlayOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes quickRewardPanelIn {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.94);
  }

  72% {
    opacity: 1;
    transform: translateY(-2px) scale(var(--ui-runtime-scale, 1));
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(var(--ui-runtime-scale, 1));
  }
}

@keyframes quickRewardPanelOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(var(--ui-runtime-scale, 1));
  }

  100% {
    opacity: 0;
    transform: translateY(14px) scale(0.94);
  }
}

.spin-wheel-modal .spin-center-button {
  width: 90px !important;
  height: 90px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  isolation: isolate !important;
  color: #7c2d12 !important;
  font-size: 1.18rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0.06em !important;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.42) 0 17%, rgba(255, 255, 255, 0.16) 18% 29%, transparent 30%),
    #facc15 !important;
  border: 4px solid rgba(146, 64, 14, 0.58) !important;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.28),
    0 0 0 2px rgba(255, 236, 153, 0.92),
    inset 0 2px 3px rgba(255, 255, 255, 0.24),
    inset 0 -2px 3px rgba(146, 64, 14, 0.08),
    0 0 22px rgba(250, 204, 21, 0.36) !important;
}

.spin-wheel-modal .spin-center-button::before,
.spin-wheel-modal .spin-center-button::after {
  content: none !important;
  display: none !important;
}

.spin-wheel-modal.is-wheel-spinning .spin-center-button,
.spin-wheel-modal:has(.spin-wheel-disc.is-spinning) .spin-center-button {
  filter: brightness(1.04) saturate(1.05) !important;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.30),
    0 0 0 2px rgba(255, 236, 153, 0.96),
    inset 0 2px 3px rgba(255, 255, 255, 0.24),
    inset 0 -2px 3px rgba(146, 64, 14, 0.08),
    0 0 28px rgba(250, 204, 21, 0.46) !important;
}

@media (max-width: 520px),
(max-height: 720px) {
  .spin-wheel-modal .spin-center-button {
    width: 66px !important;
    height: 66px !important;
    border-width: 4px !important;
    font-size: 0.90rem !important;
  }
}


/* --- v11: make used free spin button look disabled, not clickable --- */
.spin-wheel-modal #spin-free-btn.spin-free-used,
.spin-wheel-modal #spin-free-btn.spin-free-used:hover,
.spin-wheel-modal #spin-free-btn.spin-free-used:active,
.spin-wheel-modal #spin-free-btn.spin-free-used:focus-visible {
  cursor: not-allowed !important;
  pointer-events: none !important;
  transform: none !important;
  filter: grayscale(0.88) saturate(0.28) brightness(0.74) !important;
  color: rgba(226, 232, 240, 0.64) !important;
  text-shadow: none !important;
  background:
    linear-gradient(180deg, rgba(71, 85, 105, 0.72), rgba(30, 41, 59, 0.78)) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    inset 0 -1px 0 rgba(15, 23, 42, 0.42),
    0 2px 0 rgba(15, 23, 42, 0.56) !important;
  opacity: 0.62 !important;
}

.spin-wheel-modal #spin-free-btn.spin-free-used::before,
.spin-wheel-modal #spin-free-btn.spin-free-used::after {
  display: none !important;
  content: none !important;
}

/* --- Make daily reward button look claimed/disabled --- */
.daily-reward-modal #daily-claim-btn.daily-claimed,
.daily-reward-modal #daily-claim-btn.daily-claimed:hover,
.daily-reward-modal #daily-claim-btn.daily-claimed:active,
.daily-reward-modal #daily-claim-btn.daily-claimed:focus-visible {
  cursor: not-allowed !important;
  pointer-events: none !important;
  transform: none !important;
  filter: grayscale(0.88) saturate(0.28) brightness(0.74) !important;
  color: rgba(226, 232, 240, 0.64) !important;
  text-shadow: none !important;
  background:
    linear-gradient(180deg, rgba(71, 85, 105, 0.72), rgba(30, 41, 59, 0.78)) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    inset 0 -1px 0 rgba(15, 23, 42, 0.42),
    0 2px 0 rgba(15, 23, 42, 0.56) !important;
  opacity: 0.62 !important;
}

.daily-reward-modal #daily-claim-btn.daily-claimed::before,
.daily-reward-modal #daily-claim-btn.daily-claimed::after {
  display: none !important;
  content: none !important;
}

.spin-wheel-modal #spin-free-btn.spin-free-spinning,
.spin-wheel-modal #spin-free-btn.spin-free-spinning:hover,
.spin-wheel-modal #spin-free-btn.spin-free-spinning:active {
  cursor: wait !important;
  pointer-events: none !important;
  transform: none !important;
  filter: brightness(0.92) saturate(0.85) !important;
}

/* v12: Spin result now shows actual awarded cash + stars clearly. */
.spin-result-bubble {
  width: 184px !important;
  min-height: 104px !important;
  padding: 13px 14px !important;
}

.spin-result-bubble strong.spin-result-value {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: center !important;
  gap: 4px !important;
  width: 100% !important;
  margin-top: 7px !important;
  font-size: 1rem !important;
  line-height: 1 !important;
  overflow-wrap: normal !important;
}

.spin-result-part {
  display: grid !important;
  grid-template-columns: 42px 1fr !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
  min-height: 23px !important;
  padding: 3px 7px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.spin-result-part small {
  display: block !important;
  color: color-mix(in srgb, var(--result-accent, #facc15) 78%, #ffffff) !important;
  font-size: 0.55rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.08em !important;
  text-align: right !important;
  line-height: 1 !important;
  opacity: 0.96 !important;
}

.spin-result-part b {
  display: block !important;
  color: #ffffff !important;
  font-size: 0.90rem !important;
  font-weight: 950 !important;
  text-align: left !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.spin-result-plus {
  display: none !important;
}

@media (max-height: 650px) {
  .spin-result-bubble {
    width: 162px !important;
    min-height: 88px !important;
    padding: 10px 11px !important;
  }

  .spin-result-bubble strong.spin-result-value {
    gap: 3px !important;
    margin-top: 5px !important;
  }

  .spin-result-part {
    min-height: 20px !important;
    padding: 2px 6px !important;
    grid-template-columns: 36px 1fr !important;
  }

  .spin-result-part small {
    font-size: 0.50rem !important;
  }

  .spin-result-part b {
    font-size: 0.78rem !important;
  }
}


/* v13: Keep spin result text clean and remove the chip/background behind result values. */
.spin-result-bubble strong.spin-result-value {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.spin-result-part {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* --- Spin Wheel compact live daily status + ad icon --- */
.spin-wheel-modal .spin-daily-status {
  display: none !important;
}

.spin-wheel-modal .spin-daily-status.is-ready {
  color: #fef3c7 !important;
  border-color: rgba(250, 204, 21, 0.26) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.16), transparent 56%),
    rgba(2, 6, 23, 0.36) !important;
  box-shadow: 0 0 22px rgba(250, 204, 21, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.spin-wheel-modal .spin-main-status {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  font-weight: 950 !important;
  letter-spacing: 0.07em !important;
}

.spin-wheel-modal .spin-bonus-status {
  display: none !important;
}

.spin-ad-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
}

.spin-ad-btn .spin-ad-btn-icon {
  width: 24px !important;
  height: 24px !important;
  object-fit: contain !important;
  display: block !important;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.28)) !important;
  pointer-events: none !important;
}

.spin-ad-btn span {
  display: inline-block !important;
}

.spin-ad-btn:disabled .spin-ad-btn-icon,
.spin-ad-btn[aria-disabled="true"] .spin-ad-btn-icon {
  opacity: 0.72 !important;
  filter: grayscale(0.15) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18)) !important;
}

/* v16: Daily Reward polish */
#daily-claim-btn:disabled {
  color: #ffffff !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.32) !important;
}

.daily-day-card::after {
  content: none !important;
  display: none !important;
}

/* Daily Reward claimed cards - clearer completed state */
.daily-day-card.claimed {
  background:
    radial-gradient(circle at 88% 14%, rgba(134, 239, 172, 0.26), transparent 30%),
    radial-gradient(circle at 18% 100%, rgba(20, 184, 166, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(10, 31, 48, 0.92), rgba(4, 15, 31, 0.88)) !important;
  border-color: rgba(52, 211, 153, 0.46) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 18px rgba(16, 185, 129, 0.16),
    0 12px 24px rgba(0, 0, 0, 0.18) !important;
}

.daily-day-card.claimed:not(.daily-day-weekly)::before {
  content: "✓";
  position: absolute;
  right: 10px;
  bottom: -18px;
  color: rgba(134, 239, 172, 0.08);
  font-size: 5rem;
  line-height: 1;
  font-weight: 950;
  pointer-events: none;
  z-index: 0;
}

.daily-day-card.claimed::after {
  content: "✓" !important;
  position: absolute !important;
  inset: 9px 9px auto auto !important;
  width: 25px !important;
  height: 25px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.62), transparent 28%),
    linear-gradient(180deg, rgba(52, 211, 153, 0.96), rgba(5, 150, 105, 0.94)) !important;
  border: 1px solid rgba(187, 247, 208, 0.58) !important;
  color: #ffffff !important;
  font-size: 1rem !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  box-shadow:
    0 0 0 2px rgba(2, 6, 23, 0.62),
    0 8px 18px rgba(16, 185, 129, 0.24) !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

.daily-day-card.claimed .daily-day-label,
.daily-day-card.claimed .daily-day-reward,
.daily-day-card.claimed .daily-day-state {
  position: relative !important;
  z-index: 1 !important;
}

.daily-day-card.claimed .daily-day-label {
  color: #86efac !important;
  width: 100% !important;
  padding-right: 0 !important;
  text-align: center !important;
  text-shadow: 0 0 12px rgba(16, 185, 129, 0.20) !important;
}

.daily-day-card.claimed .daily-day-reward {
  color: rgba(255, 255, 255, 0.94) !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.42) !important;
}

.daily-day-card.claimed .daily-day-state {
  align-self: center !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 22px !important;
  padding: 5px 10px 4px !important;
  border-radius: 999px !important;
  background: rgba(16, 185, 129, 0.18) !important;
  border: 1px solid rgba(134, 239, 172, 0.38) !important;
  color: #bbf7d0 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 12px rgba(16, 185, 129, 0.12) !important;
}

.daily-day-card.claimed.daily-day-weekly {
  background:
    radial-gradient(circle at 80% 12%, rgba(134, 239, 172, 0.26), transparent 30%),
    radial-gradient(circle at 50% 26%, rgba(168, 85, 247, 0.24), transparent 43%),
    linear-gradient(180deg, rgba(23, 57, 62, 0.76), rgba(8, 15, 35, 0.78)) !important;
}

.daily-day-card.claimed.daily-day-weekly::before {
  color: rgba(134, 239, 172, 0.09) !important;
}

.daily-day-card.active:not(.claimed) .daily-day-state {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 22px !important;
  padding: 5px 10px 4px !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--reward-accent, #facc15) 24%, transparent) !important;
  border: 1px solid color-mix(in srgb, var(--reward-accent, #facc15) 48%, rgba(255, 255, 255, 0.12)) !important;
  box-shadow: 0 0 16px color-mix(in srgb, var(--reward-accent, #facc15) 18%, transparent) !important;
}

/* v14: Spin wheel prize labels are now compact icon chips.
   The wheel still feels like a real prize wheel while stopped labels stay readable. */
.spin-wheel-modal .spin-segment-label {
  width: 82px !important;
  margin-left: -41px !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.015em !important;
  transform: rotate(var(--segment-angle)) translateY(-141px) rotate(var(--segment-flip, 0deg)) !important;
}

.spin-wheel-modal .spin-segment-label-inner {
  gap: 3px !important;
  min-height: 26px !important;
  transform: translateY(-50%) !important;
}

.spin-wheel-modal .spin-prize-chip {
  min-width: 42px !important;
  max-width: 74px !important;
  min-height: 25px !important;
  padding: 3px 7px !important;
  gap: 3px !important;
  border-radius: 999px !important;
  background:
    radial-gradient(circle at 35% 18%, rgba(255, 255, 255, 0.30), transparent 28%),
    rgba(2, 6, 23, 0.24) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 3px 8px rgba(0, 0, 0, 0.18) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.spin-wheel-modal .spin-prize-cash {
  background:
    radial-gradient(circle at 35% 18%, rgba(255, 255, 255, 0.34), transparent 28%),
    rgba(15, 23, 42, 0.28) !important;
}

.spin-wheel-modal .spin-prize-star {
  background:
    radial-gradient(circle at 35% 18%, rgba(255, 255, 255, 0.38), transparent 28%),
    rgba(120, 53, 15, 0.26) !important;
}

.spin-wheel-modal .spin-prize-boost {
  min-width: 66px !important;
  background:
    radial-gradient(circle at 35% 18%, rgba(255, 255, 255, 0.30), transparent 28%),
    rgba(20, 83, 45, 0.24) !important;
}

.spin-wheel-modal .spin-prize-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: 15px !important;
  height: 15px !important;
  border-radius: 999px !important;
  color: #0f172a !important;
  background: rgba(255, 255, 255, 0.86) !important;
  font-size: 0.68rem !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  text-shadow: none !important;
}

.spin-wheel-modal .spin-prize-boost-icon {
  color: #713f12 !important;
  background: rgba(254, 243, 199, 0.92) !important;
  font-size: 0.62rem !important;
}

.spin-wheel-modal .spin-prize-chip img {
  width: 15px !important;
  height: 15px !important;
}

.spin-wheel-modal .spin-prize-value,
.spin-wheel-modal .spin-prize-cash-value {
  display: inline-block !important;
  color: #ffffff !important;
  font-size: 0.82rem !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  letter-spacing: 0.01em !important;
  white-space: nowrap !important;
}

.spin-wheel-modal .spin-prize-cash-top,
.spin-wheel-modal .spin-prize-cash-bottom {
  display: none !important;
}

.spin-wheel-modal .spin-wheel-disc.is-spinning .spin-segment-label {
  opacity: 0.88 !important;
}

@media (max-height: 650px) {
  .spin-wheel-modal .spin-segment-label {
    width: 70px !important;
    margin-left: -35px !important;
    transform: rotate(var(--segment-angle)) translateY(-115px) rotate(var(--segment-flip, 0deg)) !important;
  }

  .spin-wheel-modal .spin-prize-chip {
    min-width: 36px !important;
    max-width: 70px !important;
    min-height: 22px !important;
    padding: 2px 6px !important;
  }

  .spin-wheel-modal .spin-prize-boost {
    min-width: 54px !important;
  }

  .spin-wheel-modal .spin-prize-value,
  .spin-wheel-modal .spin-prize-cash-value {
    font-size: 0.70rem !important;
  }

  .spin-wheel-modal .spin-prize-icon,
  .spin-wheel-modal .spin-prize-chip img {
    width: 13px !important;
    height: 13px !important;
  }
}

/* v14: Spin boost result bubble now names the exact boost and shows stack/max status clearly. */
.spin-result-part.spin-result-part-boost {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  min-height: 46px !important;
  width: 100% !important;
  text-align: center !important;
}

.spin-result-part.spin-result-part-boost small {
  text-align: center !important;
  color: color-mix(in srgb, var(--result-accent, #facc15) 86%, #ffffff) !important;
  font-size: 0.54rem !important;
  letter-spacing: 0.12em !important;
}

.spin-result-part.spin-result-part-boost b {
  text-align: center !important;
  color: #ffffff !important;
  font-size: 0.94rem !important;
  line-height: 1 !important;
  white-space: normal !important;
  text-wrap: balance !important;
}

.spin-result-part.spin-result-part-boost em {
  display: block !important;
  color: rgba(255, 255, 255, 0.78) !important;
  font-size: 0.58rem !important;
  line-height: 1 !important;
  font-style: normal !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
  white-space: nowrap !important;
}

.spin-result-part.spin-result-part-boost.is-maxed b {
  color: color-mix(in srgb, var(--result-accent, #facc15) 72%, #ffffff) !important;
}

.spin-result-part.spin-result-part-boost.is-maxed em {
  color: #fde68a !important;
}

@media (max-height: 650px) {
  .spin-result-part.spin-result-part-boost {
    min-height: 40px !important;
    gap: 2px !important;
  }

  .spin-result-part.spin-result-part-boost b {
    font-size: 0.82rem !important;
  }

  .spin-result-part.spin-result-part-boost em {
    font-size: 0.52rem !important;
  }
}


/* =========================================================
   v15 FIX: Unity-like fixed reward panels + fixed Spin Wheel
   ---------------------------------------------------------
   The quick-action modals keep a fixed design resolution.
   Only the whole panel is scaled by --ui-runtime-scale, just
   like a Unity Canvas. Children no longer resize individually
   via viewport media queries, so spin reward chips stay locked
   to the wheel positions.
   ========================================================= */
#daily-tasks-modal,
#daily-reward-modal,
#spin-wheel-modal {
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  overflow: hidden !important;
}

#daily-tasks-modal>.reward-modal,
#daily-reward-modal>.reward-modal,
#spin-wheel-modal>.reward-modal {
  flex: 0 0 auto !important;
  max-width: none !important;
  max-height: none !important;
  transform: scale(var(--ui-runtime-scale, 1)) !important;
  transform-origin: center center !important;
}

#daily-tasks-modal>.daily-tasks-modal {
  width: 640px !important;
  min-width: 640px !important;
  height: 690px !important;
  min-height: 690px !important;
  padding: 26px !important;
  gap: 18px !important;
  overflow: hidden !important;
}

#daily-reward-modal>.daily-reward-modal {
  width: 660px !important;
  min-width: 660px !important;
  height: 690px !important;
  min-height: 690px !important;
  padding: 26px !important;
  gap: 18px !important;
  overflow: hidden !important;
}

#spin-wheel-modal>.spin-wheel-modal {
  width: 620px !important;
  min-width: 620px !important;
  height: 650px !important;
  min-height: 650px !important;
  padding: 26px !important;
  gap: 18px !important;
  overflow: hidden !important;
}

#daily-tasks-modal .modal-header,
#daily-reward-modal .modal-header,
#spin-wheel-modal .modal-header {
  flex: 0 0 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
}

#daily-tasks-modal .daily-tasks-body,
#daily-reward-modal .daily-reward-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

#daily-reward-modal .daily-panel-actions,
#spin-wheel-modal #spin-actions {
  flex: 0 0 60px !important;
  min-height: 60px !important;
  max-height: 60px !important;
}

#spin-wheel-modal .spin-wheel-body {
  flex: 0 0 424px !important;
  width: 100% !important;
  height: 424px !important;
  min-height: 424px !important;
  max-height: 424px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  overflow: visible !important;
}

#spin-wheel-modal .spin-wheel-wrap {
  position: relative !important;
  flex: 0 0 auto !important;
  width: 388px !important;
  min-width: 388px !important;
  max-width: 388px !important;
  height: 388px !important;
  min-height: 388px !important;
  max-height: 388px !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  transform: none !important;
}

#spin-wheel-modal .spin-wheel-disc {
  width: 368px !important;
  min-width: 368px !important;
  max-width: 368px !important;
  height: 368px !important;
  min-height: 368px !important;
  max-height: 368px !important;
  border-width: 9px !important;
  transform-origin: 50% 50% !important;
}

#spin-wheel-modal .spin-wheel-disc::before {
  -webkit-mask: radial-gradient(circle, transparent 0 158px, #000 159px 168px, transparent 169px) !important;
  mask: radial-gradient(circle, transparent 0 158px, #000 159px 168px, transparent 169px) !important;
}

#spin-wheel-modal .spin-pointer {
  width: 48px !important;
  height: 60px !important;
  top: -8px !important;
}

#spin-wheel-modal .spin-center-button {
  width: 90px !important;
  height: 90px !important;
  font-size: 1.18rem !important;
}

#spin-wheel-modal .spin-segment-label {
  width: 82px !important;
  margin-left: -41px !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.015em !important;
  transform: rotate(var(--segment-angle)) translateY(-141px) rotate(var(--segment-flip, 0deg)) !important;
  transform-origin: 50% 0 !important;
}

#spin-wheel-modal .spin-segment-label-inner {
  gap: 3px !important;
  min-height: 26px !important;
  transform: translateY(-50%) !important;
}

#spin-wheel-modal .spin-prize-chip {
  min-width: 42px !important;
  max-width: 74px !important;
  min-height: 25px !important;
  padding: 3px 7px !important;
  gap: 3px !important;
}

#spin-wheel-modal .spin-prize-boost {
  min-width: 66px !important;
}

#spin-wheel-modal .spin-prize-value,
#spin-wheel-modal .spin-prize-cash-value {
  font-size: 0.82rem !important;
  white-space: nowrap !important;
}

#spin-wheel-modal .spin-prize-icon,
#spin-wheel-modal .spin-prize-chip img {
  width: 15px !important;
  height: 15px !important;
}

#spin-wheel-modal .spin-result-bubble {
  width: 184px !important;
  min-height: 104px !important;
  padding: 13px 14px !important;
}

#spin-wheel-modal .spin-result-part {
  grid-template-columns: 42px 1fr !important;
  min-height: 23px !important;
}

#spin-wheel-modal .spin-result-part small {
  font-size: 0.55rem !important;
}

#spin-wheel-modal .spin-result-part b {
  font-size: 0.90rem !important;
}

/* =========================================================
   v16 FIX: compact reward/task panels + all modal audit
   ---------------------------------------------------------
   v15 locked Daily Reward / Daily Tasks to fixed 690px height.
   That kept the panel stable, but it also created a spacer area
   because the body was flex: 1 and the action button was pushed
   to the bottom. These overrides keep the Unity-like fixed design
   width and fixed child sizes, but let non-wheel panels fit their
   real content height.
   ========================================================= */

/* Keep quick-action overlays centered and prevent big-screen over-scaling. */
#daily-tasks-modal>.reward-modal,
#daily-reward-modal>.reward-modal,
#spin-wheel-modal>.reward-modal,
#offline-modal>.modal,
#reset-modal>.modal,
#ad-loading-overlay>.modal {
  --reward-modal-scale-safe: min(var(--ui-runtime-scale, 1), 1);
  transform: scale(var(--reward-modal-scale-safe)) !important;
  transform-origin: center center !important;
}

/* Daily Tasks: width stays fixed, height fits the 5 task cards. */
#daily-tasks-modal>.daily-tasks-modal {
  width: 640px !important;
  min-width: 640px !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: 700px !important;
  padding: 26px !important;
  gap: 18px !important;
  justify-content: flex-start !important;
  overflow: hidden !important;
}

#daily-tasks-modal .modal-header {
  flex: 0 0 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
}

#daily-tasks-modal .daily-tasks-body {
  flex: 0 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: 572px !important;
  padding-bottom: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

#daily-tasks-modal .daily-tasks-list {
  margin: 0 !important;
  padding: 0 !important;
}

/* Daily Reward: width stays fixed, panel wraps hero + calendar + button. */
#daily-reward-modal>.daily-reward-modal {
  width: 660px !important;
  min-width: 660px !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: 650px !important;
  padding: 26px !important;
  gap: 18px !important;
  justify-content: flex-start !important;
  overflow: hidden !important;
}

#daily-reward-modal .modal-header {
  flex: 0 0 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
}

#daily-reward-modal .daily-reward-body {
  flex: 0 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: 476px !important;
  padding-bottom: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

#daily-reward-modal .daily-panel-actions {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin-top: 0 !important;
}

#daily-reward-modal .daily-panel-actions .modal-primary-btn {
  min-height: 60px !important;
}

/* Spin Wheel still needs a fixed stage so reward chips never drift. */
#spin-wheel-modal>.spin-wheel-modal {
  width: 620px !important;
  min-width: 620px !important;
  height: 650px !important;
  min-height: 650px !important;
  max-height: 650px !important;
  padding: 26px !important;
  gap: 18px !important;
  justify-content: flex-start !important;
  overflow: hidden !important;
}

#spin-wheel-modal .modal-header {
  flex: 0 0 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
}

#spin-wheel-modal .spin-wheel-body {
  flex: 0 0 424px !important;
  height: 424px !important;
  min-height: 424px !important;
  max-height: 424px !important;
}

#spin-wheel-modal #spin-actions {
  flex: 0 0 60px !important;
  min-height: 60px !important;
  max-height: 60px !important;
  margin-top: 0 !important;
}

/* Smaller landscape/embedded frames: keep the same layout, only scale the shell down. */
@media (max-height: 650px),
(max-width: 760px) {

  #daily-tasks-modal>.daily-tasks-modal,
  #daily-reward-modal>.daily-reward-modal,
  #spin-wheel-modal>.spin-wheel-modal {
    padding: 22px !important;
    gap: 14px !important;
  }

  #daily-tasks-modal>.daily-tasks-modal {
    max-height: 680px !important;
  }

  #daily-reward-modal>.daily-reward-modal {
    max-height: 625px !important;
  }
}

/* Entrance/exit animations also use the safe scale, otherwise animation-fill keeps the old transform. */
#daily-tasks-modal:not(.hidden)>.reward-modal,
#daily-reward-modal:not(.hidden)>.reward-modal,
#spin-wheel-modal:not(.hidden)>.reward-modal {
  animation-name: quickRewardPanelInV16 !important;
}

#daily-tasks-modal.modal-closing>.reward-modal,
#daily-reward-modal.modal-closing>.reward-modal,
#spin-wheel-modal.modal-closing>.reward-modal {
  animation-name: quickRewardPanelOutV16 !important;
}

@keyframes quickRewardPanelInV16 {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(calc(var(--reward-modal-scale-safe, 1) * 0.94));
  }

  72% {
    opacity: 1;
    transform: translateY(-2px) scale(var(--reward-modal-scale-safe, 1));
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(var(--reward-modal-scale-safe, 1));
  }
}

@keyframes quickRewardPanelOutV16 {
  0% {
    opacity: 1;
    transform: translateY(0) scale(var(--reward-modal-scale-safe, 1));
  }

  100% {
    opacity: 0;
    transform: translateY(14px) scale(calc(var(--reward-modal-scale-safe, 1) * 0.94));
  }
}

/* =========================================================
   v17 FIX: keep Daily Reward cycle note visible
   ---------------------------------------------------------
   The UI now behaves like a Unity-style scaled panel system:
   content should not be hidden by small-screen media queries.
   This override cancels the older max-height rule that used
   display:none on .daily-cycle-note.
   ========================================================= */
#daily-reward-modal .daily-cycle-note,
.daily-reward-modal .daily-cycle-note,
.daily-cycle-note {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}


/* ==========================================================
   v17: Reward button text + Ad icon polish
   - Yellow reward buttons use warm bronze text instead of near-black.
   - Spin ad button uses ads.svg from JS and shows the icon larger.
   ========================================================== */
#daily-reward-modal #daily-claim-btn:not(:disabled):not(.daily-claimed),
#spin-wheel-modal #spin-free-btn:not(:disabled):not(.spin-free-used):not(.spin-free-spinning) {
  color: #713f12 !important;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.30),
    0 2px 4px rgba(120, 53, 15, 0.16) !important;
}

#daily-reward-modal #daily-claim-btn:not(:disabled):not(.daily-claimed):hover,
#spin-wheel-modal #spin-free-btn:not(:disabled):not(.spin-free-used):not(.spin-free-spinning):hover {
  color: #5f2f0a !important;
}

#spin-wheel-modal .spin-ad-btn {
  gap: 12px !important;
}

#spin-wheel-modal .spin-ad-btn .spin-ad-btn-icon {
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px !important;
  object-fit: contain !important;
  transform: scale(1.06) !important;
}

@media (max-width: 640px),
(max-height: 720px) {
  #spin-wheel-modal .spin-ad-btn .spin-ad-btn-icon {
    width: 32px !important;
    height: 32px !important;
    flex-basis: 32px !important;
  }
}
/* Spin Wheel fix: make unavailable ad spins clearly inactive, while adblock still calls CrazyGames SDK. */
#spin-wheel-modal .spin-ad-btn.spin-ad-disabled,
#spin-wheel-modal .spin-ad-btn.spin-ad-disabled:hover,
#spin-wheel-modal .spin-ad-btn.spin-ad-disabled:active,
#spin-wheel-modal .spin-ad-btn.spin-ad-disabled:focus-visible {
  cursor: not-allowed !important;
  pointer-events: none !important;
  transform: none !important;
  filter: grayscale(0.65) saturate(0.42) brightness(0.8) !important;
  color: rgba(226, 232, 240, 0.68) !important;
  text-shadow: none !important;
  background:
    linear-gradient(180deg, rgba(71, 85, 105, 0.76), rgba(30, 41, 59, 0.82)) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    inset 0 -1px 0 rgba(15, 23, 42, 0.42),
    0 2px 0 rgba(15, 23, 42, 0.56) !important;
  opacity: 0.68 !important;
}
