/* KASH RIOT — Rage HUD. Values and level changes come only from round events. */
.rage {
  --rage-color: #b6f83e;
  --rage-rgb: 182, 248, 62;
  display: none;
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  padding: 11px 14px 10px;
  gap: 8px;
  color: #f8f2e7;
  border: 2px solid #655750;
  border-top: 4px solid var(--rage-color);
  border-radius: 4px 18px 4px 18px;
  background: linear-gradient(120deg, rgba(var(--rage-rgb), .13), transparent 48%), linear-gradient(160deg, #282326, #100e15 64%);
  box-shadow: inset 0 0 0 3px #121016, inset 0 0 0 4px #383138, 0 7px 0 #07060a, 0 13px 25px #0009;
}
#stage.bonus .rage { display: grid; }
.rage[data-level="1"] { --rage-color: #ffd640; --rage-rgb: 255, 214, 64; }
.rage[data-level="2"] { --rage-color: #ff714b; --rage-rgb: 255, 113, 75; }
.rage[data-level="3"] { --rage-color: #cf9cff; --rage-rgb: 207, 156, 255; }
.rage::before, .rage::after { content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #ab9c88; box-shadow: inset 0 -2px 1px #262028; pointer-events: none; }
.rage::before { left: 6px; top: 7px; }
.rage::after { right: 6px; bottom: 7px; }
.rage-h { display: flex; align-items: center; gap: 7px; font: 24px/1 var(--display); letter-spacing: -.02em; }
.rage-h b { color: var(--rage-color); }
.rage-h small { margin-left: auto; padding: 4px 5px; border: 1px solid #5f5356; color: #d1c3b8; font: 700 13px/1 var(--ui); letter-spacing: .04em; white-space: nowrap; }
.rage-bolt { flex: 0 0 17px; height: 27px; background: var(--rage-color); clip-path: polygon(42% 0, 100% 0, 64% 36%, 100% 36%, 13% 100%, 37% 54%, 0 54%); transform: rotate(7deg); }
.rage-current { display: flex; align-items: center; gap: 7px; margin-top: 7px; min-width: 0; }
.rage-current i { width: 5px; height: 5px; background: var(--rage-color); box-shadow: 0 0 7px rgba(var(--rage-rgb), .7); transform: rotate(45deg); }
.rage-current strong { font: 21px/1 var(--display); letter-spacing: -.025em; }
.rage-current > span { margin-left: auto; font: 700 11px/1 var(--ui); letter-spacing: .09em; color: var(--rage-color); }
.rage-caption { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; font: 700 11px/1 var(--ui); color: #bdaeae; letter-spacing: .11em; }
.rage-caption strong { color: #fff4df; font: 700 16px/1 var(--ui); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.rage-bar { position: relative; height: 20px; border: 2px solid #08070b; outline: 1px solid #504249; background: #06070a; overflow: hidden; transform: skewX(-9deg); }
.rage-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(180deg, #fff8c9 0, var(--rage-color) 16%, var(--rage-color) 65%, rgba(var(--rage-rgb), .5)); box-shadow: 3px 0 10px rgba(var(--rage-rgb), .8); transition: width .5s cubic-bezier(.2,.8,.2,1), background .25s; }
.rage-fill::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 3px; background: #fff9d9; }
.rage-segments { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 12px, #08070bd9 12px 15px); }
.rage-mk { position: absolute; inset: 0 auto 0 0; width: 3px; background: #fff5dc; box-shadow: 0 0 0 2px #07070a; }
.rage-levels { position: relative; height: 16px; margin-top: 4px; }
.rl { position: absolute; top: 0; transform: translateX(-50%); font: 700 12px/1 var(--ui); color: #a99699; font-variant-numeric: tabular-nums; }
.rl:first-child { transform: none; }
.rl:last-child { transform: translateX(-100%); }
.rl.done { color: #ece2ca; }
.rl.on { color: var(--rage-color); font-weight: 800; }
.rl.on::after { content: ''; position: absolute; bottom: -3px; left: 0; right: 0; height: 2px; background: var(--rage-color); }
.rage-next { display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 5px 0; border-top: 1px solid #4b3b3e; border-bottom: 1px solid #4b3b3e; font: 700 13px/1.15 var(--ui); letter-spacing: -.02em; color: #ebdfd4; white-space: nowrap; }
.rage-next b { color: var(--rage-color); font: 14px/1 var(--display); white-space: nowrap; }
.rage-perks { display: flex; justify-content: space-between; gap: 8px; font: 700 12px/1 var(--ui); color: #cbbcbc; letter-spacing: .01em; white-space: nowrap; }
.rage-perks b { font: 17px/1 var(--display); color: #fff5e2; }
.rage-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rage.heat-gained .rage-bar { animation: rage-charge .45s ease-out; }
.rage.level-changed { animation: rage-upgrade .7s ease-out; }
@keyframes rage-charge { 20% { filter: brightness(1.5); } }
@keyframes rage-upgrade { 20% { border-color: #fff4d6; box-shadow: inset 0 0 0 3px #121016, 0 0 25px rgba(var(--rage-rgb), .5), 0 7px 0 #07060a; } }

/* Phone bonus layout: replace the large logo, keeping reels and controls in place. */
.port .rage { grid-template-columns: 300px minmax(0, 1fr); grid-template-areas: 'identity gauge' 'perks next'; align-items: center; gap: 8px 28px; padding: 12px 22px; border-width: 3px; border-top-width: 6px; border-radius: 8px 26px 8px 26px; }
.port .rage-identity { grid-area: identity; }
.port .rage-gauge { grid-area: gauge; }
.port .rage-h { font-size: 40px; gap: 9px; }
.port .rage-h small { display: none; }
.port .rage-bolt { flex-basis: 25px; height: 42px; }
.port .rage-current { margin-top: 11px; gap: 10px; }
.port .rage-current strong { font-size: 31px; }
.port .rage-current > span { display: none; }
.port .rage-current i { width: 8px; height: 8px; }
.port .rage-caption { font-size: 20px; margin-bottom: 6px; }
.port .rage-caption strong { font-size: 26px; }
.port .rage-bar { height: 24px; border-width: 2px; }
.port .rage-segments { background-size: 27px 100%; background-image: linear-gradient(90deg, transparent 0 22px, #08070bd9 22px 27px); }
.port .rage-levels { height: 20px; margin-top: 6px; }
.port .rl { font-size: 22px; }
.port .rage-next { grid-area: next; font-size: 26px; padding: 8px 0; }
.port .rage-next b { font-size: 27px; }
.port .rage-perks { grid-area: perks; display: grid; gap: 3px; font-size: 22px; }
.port .rage-perks b { font-size: 24px; }
#stage.calm .rage, #stage.calm .rage-bar { animation: none; }
#stage.calm .rage-fill { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .rage, .rage-bar { animation: none !important; }
  .rage-fill { transition: none; }
}
