.roach_page {
  padding: 0 0 18px;
  font-family: Tahoma, Verdana, Arial, sans-serif;
  color: #2c2416;
}
.roach_frame {
  margin: 12px 10px 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 28px),
    linear-gradient(90deg, #5a3b22, #7a5434 8%, #6a482c 50%, #7a5434 92%, #4e321c);
  border: 1px solid #3a2616;
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 0 0 1px rgba(0, 0, 0, 0.25),
    0 2px 0 #2a1a10,
    0 8px 16px rgba(40, 24, 8, 0.18);
  padding: 8px;
}
.roach_titlebar {
  position: relative;
  height: 36px;
  margin-bottom: 8px;
  padding: 0 10px;
  line-height: 36px;
  color: #f6e7c1;
  background: linear-gradient(180deg, #3e5f86 0%, #2b476c 48%, #243e60 52%, #31527a 100%);
  border: 1px solid #1c3352;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  text-shadow: 0 -1px 0 #15283f;
}
.roach_mark {
  display: inline-block;
  width: 18px;
  height: 22px;
  margin-right: 8px;
  vertical-align: -6px;
  background: radial-gradient(circle at 40% 30%, #e7b07a, #5c3018 70%);
  border-radius: 50% 50% 46% 46%;
  box-shadow: 0 7px 0 -3px #2a1a10, inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.roach_title {
  font-weight: bold;
  font-size: 15px;
  letter-spacing: 0.3px;
}
.roach_balance {
  float: right;
  font-size: 12px;
  color: #d5e4f5;
}
.roach_balance b {
  color: #ffe08a;
  font-size: 14px;
}
.roach_stage {
  position: relative;
  min-height: 420px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.18), transparent 42%),
    linear-gradient(180deg, #efe2c8 0%, #e4d3b0 100%);
  border: 1px solid #8c704c;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), inset 0 0 24px rgba(90, 60, 20, 0.08);
  overflow: hidden;
}
.roach_menu,
.roach_mode {
  padding: 22px 18px 18px;
  text-align: center;
}
.roach_arena {
  display: flex;
  justify-content: center;
  gap: 10px;
  height: 168px;
  margin: 0 auto 18px;
  padding: 14px 16px 0;
  width: 280px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 16px),
    repeating-linear-gradient(90deg, #d7c4a2 0 2px, #cbb892 2px 64px);
  border: 1px solid #8d734c;
  border-radius: 6px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.15), 0 3px 0 rgba(80, 50, 20, 0.15);
}
.roach_arena_lane {
  position: relative;
  width: 64px;
  border-left: 1px dashed rgba(90, 60, 30, 0.25);
  border-right: 1px dashed rgba(90, 60, 30, 0.25);
}
.roach_arena_lane::before,
.roach_lane_bug {
  content: '';
  position: absolute;
  left: 50%;
  width: 28px;
  height: 40px;
  margin-left: -14px;
  background: radial-gradient(circle at 35% 28%, #e7b07a, #5c3018 68%, #24160e 100%);
  border-radius: 48% 48% 42% 42%;
  box-shadow: 0 8px 0 -2px #2a1a10;
}
.roach_arena_lane:nth-child(1)::before { bottom: 18px; background: radial-gradient(circle at 35% 28%, #e7b07a, #6b3a1f 70%); }
.roach_arena_lane:nth-child(2)::before { bottom: 62px; background: radial-gradient(circle at 35% 28%, #f0c090, #2c2416 72%); }
.roach_arena_lane:nth-child(3)::before { bottom: 36px; background: radial-gradient(circle at 35% 28%, #efc090, #a15a28 70%); }
.roach_play,
.roach_gold,
.roach_ghost {
  display: inline-block;
  min-width: 210px;
  margin: 4px 6px;
  padding: 12px 22px;
  font: bold 18px/1 Tahoma, Verdana, sans-serif;
  color: #fff;
  text-shadow: 0 -1px 0 #1d4e12;
  background: linear-gradient(180deg, #9ed866 0%, #62b232 46%, #3f8e1c 48%, #57a628 100%);
  border: 1px solid #2d6814;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 2px 0 #24560e, 0 5px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}
.roach_play:hover,
.roach_gold:hover,
.roach_ghost:hover { filter: brightness(1.05); }
.roach_play:active,
.roach_gold:active,
.roach_ghost:active { transform: translateY(1px); }
.roach_gold {
  text-shadow: 0 -1px 0 #6a4a08;
  background: linear-gradient(180deg, #ffe08a 0%, #e2b03a 46%, #c49216 48%, #e0b44a 100%);
  border-color: #8a6410;
  color: #3a2a08;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 2px 0 #7a5a10, 0 5px 8px rgba(0, 0, 0, 0.18);
}
.roach_gold:disabled,
.roach_play:disabled {
  filter: grayscale(0.4);
  cursor: default;
  opacity: 0.7;
}
.roach_ghost {
  min-width: 0;
  padding: 8px 14px;
  font-size: 13px;
  color: #2b4a6e;
  text-shadow: none;
  background: linear-gradient(180deg, #f7f9fb, #d9e4ef);
  border-color: #a9bdd1;
  box-shadow: inset 0 1px 0 #fff, 0 1px 0 #8ea4ba;
}
.roach_lead,
.roach_note {
  margin-top: 12px;
  color: #6d5a3e;
  font-size: 12px;
  line-height: 1.45;
}
.roach_cards {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: stretch;
}
.roach_card {
  flex: 1 1 0;
  max-width: 250px;
  padding: 16px 14px 14px;
  text-align: center;
  background: linear-gradient(180deg, #fffaf0, #f3e4c4);
  border: 1px solid #c4a36a;
  border-radius: 6px;
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 rgba(90, 60, 20, 0.08);
}
.roach_card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: #3e3118;
}
.roach_card p {
  min-height: 34px;
  margin: 0 0 10px;
  color: #6d5a3e;
  font-size: 12px;
  line-height: 1.4;
}
.roach_card .roach_wait {
  display: block;
  margin-bottom: 8px;
  color: #2b587a;
  font-size: 11px;
}
.roach_back {
  display: inline-block;
  margin-top: 14px;
  color: #2b587a;
  font-size: 12px;
}
.roach_error {
  margin: 8px 12px 0;
  color: #a33b2b;
  font-size: 12px;
  font-weight: bold;
}
.roach_lobby_head,
.roach_race_hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px 0;
  font-size: 12px;
  color: #5c4a32;
}
.roach_lobby_head b,
.roach_race_hud b { color: #2c2416; }
.roach_slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 16px 12px 8px;
}
.roach_slot {
  min-height: 118px;
  padding: 10px 4px;
  text-align: center;
  background: rgba(255, 255, 255, 0.35);
  border: 1px dashed #b89a6a;
  border-radius: 6px;
}
.roach_slot.filled {
  background: #fffaf0;
  border-style: solid;
  border-color: #c4a36a;
}
.roach_slot.me { box-shadow: inset 0 0 0 2px #5b88b5; }
.roach_slot .who {
  margin-top: 6px;
  font-size: 11px;
  font-weight: bold;
  color: #2c2416;
  word-break: break-word;
}
.roach_slot .tag {
  display: inline-block;
  margin-top: 3px;
  padding: 0 4px;
  font-size: 10px;
  color: #6d5a3e;
  background: #efe2c8;
  border-radius: 2px;
}
.roach_empty {
  display: block;
  margin-top: 28px;
  color: #a08860;
  font-size: 12px;
}
.roach_lobby_actions { text-align: center; padding: 4px 0 14px; }
.roach_board { padding: 0 8px 10px; }
.roach_track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 318px;
  margin-top: 6px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 18px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 25%),
    linear-gradient(180deg, #d9c7a6, #c3ae88);
  border: 1px solid #8d734c;
  border-radius: 4px;
  box-shadow: inset 0 0 0 3px rgba(92, 64, 32, 0.18);
  overflow: hidden;
}
.roach_finish {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 16px;
  background: repeating-linear-gradient(90deg, #1b1b1b 0 12px, #f4f4f4 12px 24px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
  z-index: 3;
}
.roach_finish span {
  position: absolute;
  left: 8px;
  top: 0;
  font-size: 10px;
  line-height: 16px;
  font-weight: bold;
  color: #ffe08a;
  text-shadow: 0 1px 0 #000;
}
.roach_lane {
  position: relative;
  border-right: 1px dashed rgba(80, 56, 28, 0.28);
}
.roach_lane:last-child { border-right: 0; }
.roach_lane.me { background: rgba(91, 136, 181, 0.1); }
.roach_lane.champ { background: rgba(226, 176, 58, 0.16); }
.roach_bug {
  position: absolute;
  left: 50%;
  width: 70px;
  height: 84px;
  margin-left: -35px;
  z-index: 2;
  pointer-events: none;
}
.roach_bug .shadow {
  position: absolute;
  left: 16px;
  bottom: 2px;
  width: 38px;
  height: 10px;
  background: rgba(40, 24, 8, 0.28);
  border-radius: 50%;
  filter: blur(0.4px);
}
.roach_bug .shell {
  position: absolute;
  left: 18px;
  top: 28px;
  width: 34px;
  height: 44px;
  background: radial-gradient(circle at 35% 26%, #f0c49a, currentColor 58%, #1a100a 100%);
  border-radius: 46% 46% 40% 40%;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(0, 0, 0, 0.2);
  z-index: 2;
}
.roach_bug .shell::after {
  content: '';
  position: absolute;
  left: 6px;
  right: 6px;
  top: 16px;
  height: 2px;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.12);
}
.roach_bug .head {
  position: absolute;
  left: 22px;
  top: 16px;
  width: 26px;
  height: 18px;
  background: radial-gradient(circle at 40% 35%, #4a3424, #24160e 70%);
  border-radius: 50%;
  z-index: 3;
}
.roach_bug .head::before,
.roach_bug .head::after {
  content: '';
  position: absolute;
  top: 6px;
  width: 4px;
  height: 4px;
  background: #f3e2a0;
  border-radius: 50%;
}
.roach_bug .head::before { left: 5px; }
.roach_bug .head::after { right: 5px; }
.roach_bug .ant {
  position: absolute;
  top: 2px;
  width: 2px;
  height: 18px;
  background: #24180f;
  border-radius: 2px;
  z-index: 1;
}
.roach_bug .ant.left { left: 28px; transform-origin: 50% 100%; animation: roachAntL 0.8s ease-in-out infinite; }
.roach_bug .ant.right { left: 40px; transform-origin: 50% 100%; animation: roachAntR 0.8s ease-in-out infinite; }
.roach_bug .leg {
  position: absolute;
  height: 3px;
  width: 18px;
  background: #2a1c12;
  border-radius: 2px;
  z-index: 1;
}
.roach_bug .leg.l1 { top: 36px; left: 2px; transform: rotate(24deg); transform-origin: 100% 50%; }
.roach_bug .leg.l2 { top: 48px; left: 0; transform: rotate(8deg); transform-origin: 100% 50%; }
.roach_bug .leg.l3 { top: 60px; left: 2px; transform: rotate(-16deg); transform-origin: 100% 50%; }
.roach_bug .leg.r1 { top: 36px; right: 2px; transform: rotate(-24deg); transform-origin: 0 50%; }
.roach_bug .leg.r2 { top: 48px; right: 0; transform: rotate(-8deg); transform-origin: 0 50%; }
.roach_bug .leg.r3 { top: 60px; right: 2px; transform: rotate(16deg); transform-origin: 0 50%; }
.roach_bug.run .leg.l1,
.roach_bug.run .leg.l3,
.roach_bug.run .leg.r2 { animation: roachLegL 0.12s linear infinite; }
.roach_bug.run .leg.r1,
.roach_bug.run .leg.r3,
.roach_bug.run .leg.l2 { animation: roachLegR 0.12s linear infinite; }
.roach_bug.run .shell { animation: roachBob 0.12s linear infinite; }
@keyframes roachAntL { 50% { transform: rotate(-18deg); } }
@keyframes roachAntR { 50% { transform: rotate(18deg); } }
@keyframes roachLegL {
  0% { transform: rotate(26deg); }
  50% { transform: rotate(-20deg); }
  100% { transform: rotate(26deg); }
}
@keyframes roachLegR {
  0% { transform: rotate(-26deg); }
  50% { transform: rotate(20deg); }
  100% { transform: rotate(-26deg); }
}
@keyframes roachBob {
  50% { transform: translateY(-2px); }
}
.roach_count {
  position: absolute;
  left: 0;
  right: 0;
  top: 78px;
  text-align: center;
  font: bold 72px/1 Tahoma, Verdana, sans-serif;
  color: #fff8e4;
  text-shadow: 0 3px 0 #5c3d18, 0 0 12px rgba(0, 0, 0, 0.35);
  z-index: 4;
  pointer-events: none;
}
.roach_pilots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 0;
  background: linear-gradient(180deg, #4e351f, #3a2716);
  border: 1px solid #2a1c10;
  border-top: 0;
  border-radius: 0 0 4px 4px;
}
.roach_pilot {
  padding: 8px 4px 10px;
  text-align: center;
  color: #f6e7c1;
}
.roach_pilot.me { background: rgba(91, 136, 181, 0.28); }
.roach_pilot.champ .roach_name { color: #ffe08a; }
.roach_ava {
  display: inline-block;
  width: 42px;
  height: 42px;
  border-radius: 3px;
  border: 1px solid #1c140c;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
  object-fit: cover;
  vertical-align: top;
  background: #6b3a1f center/cover no-repeat;
}
span.roach_ava {
  line-height: 42px;
  font-weight: bold;
  color: #fff8e4;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}
.roach_name {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.25;
  word-break: break-word;
}
.roach_name i {
  display: block;
  font-style: normal;
  font-size: 10px;
  color: #d7c4a3;
}
.roach_result {
  margin: 10px 8px 0;
  padding: 12px 12px 10px;
  text-align: center;
  background: linear-gradient(180deg, #fffaf0, #f4e4c0);
  border: 1px solid #c4a36a;
  border-radius: 6px;
  box-shadow: inset 0 1px 0 #fff;
}
.roach_result h3 {
  margin: 0 0 4px;
  font-size: 18px;
  color: #3e3118;
}
.roach_result p {
  margin: 0 0 10px;
  color: #6d5a3e;
  font-size: 13px;
}
.apps_icon_roach .apps_card_pic,
.apps_icon_roach.apps_featured_slide,
.apps_icon_roach.apps_featured_thumb_pic {
  background: linear-gradient(180deg, #e7d3ae 0%, #c4a36a 42%, #6b4a2a 100%);
}
.apps_icon_roach .apps_card_pic { position: relative; }
.apps_icon_roach .apps_card_pic::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 46%;
  width: 26px;
  height: 36px;
  margin: -18px 0 0 -13px;
  background: radial-gradient(circle at 35% 28%, #f0c49a, #5c3018 70%);
  border-radius: 48%;
  box-shadow: 0 8px 0 -2px #2a1a10;
}
