.results-title {
  font-size: clamp(18px, 1.8vw, 30px);
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  margin-top: 6px;
}
:root {
  --bob-bg: #08030f;
  --bob-deep: #12072a;
  --bob-hot: #ff3d9a;
  --bob-hot-2: #ffb347;
  --bob-cyan: #23f4ff;
  --bob-neon: #c6ff00;
  --bob-white: #fef7ff;
}

@keyframes screenShake {
  0% {
    transform: translate3d(0, 0, 0);
  }
  20% {
    transform: translate3d(-6px, 4px, 0);
  }
  40% {
    transform: translate3d(8px, -6px, 0);
  }
  60% {
    transform: translate3d(-4px, 6px, 0);
  }
  80% {
    transform: translate3d(6px, -4px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

* {
  box-sizing: border-box;
}

body.bob-body {
  margin: 0;
  font-family: "Bebas Neue", "Impact", "Arial Black", sans-serif;
  background: radial-gradient(circle at top, #1c0c3d 0%, #06020a 55%, #020107 100%);
  color: var(--bob-white);
  min-height: 100vh;
}

.flash-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
  opacity: 0;
  pointer-events: none;
  z-index: 999;
}

.flash-overlay.active {
  animation: flashBoom 0.6s ease-out 1;
}

.bob-wrap {
  min-height: 100vh;
  padding: 48px 72px 56px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.bob-wrap.quake {
  animation: screenShake 0.45s ease-in-out;
}

.bob-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}

.bob-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.title-group h1 {
  margin: 10px 0 8px;
  font-size: clamp(48px, 4vw, 92px);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.title-group p {
  margin: 0;
  font-size: clamp(18px, 1.6vw, 30px);
  color: rgba(255, 255, 255, 0.72);
}

.title-badge {
  display: inline-block;
  padding: 6px 16px;
  border: 2px solid var(--bob-neon);
  border-radius: 999px;
  font-size: clamp(14px, 1.2vw, 22px);
  letter-spacing: 1px;
  color: var(--bob-neon);
  text-transform: uppercase;
  box-shadow: 0 0 18px rgba(198, 255, 0, 0.4);
}

.bob-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
  transition: all 0.3s ease;
}

.bob-nav.collapsed {
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  pointer-events: none;
}

.nav-toggle,
.console-toggle {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(8, 6, 18, 0.8);
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(12px, 0.9vw, 18px);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.edge-toggle {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: auto;
  transition: opacity 0.2s ease;
  z-index: 20;
}

.edge-toggle button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.edge-toggle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.edge-left {
  left: 0;
}

.edge-left::before {
  left: 0;
}

.edge-right {
  right: 0;
}

.edge-right::before {
  right: 0;
}

.edge-toggle:hover {
  opacity: 1;
}

.nav-toggle.active,
.console-toggle.active {
  transform: rotate(90deg);
  color: var(--bob-neon);
  border-color: rgba(198, 255, 0, 0.6);
}

.bob-nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: clamp(14px, 1vw, 20px);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.bob-nav a:hover,
.bob-nav a.active {
  color: var(--bob-white);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 16px rgba(35, 244, 255, 0.35);
}

.bob-stage {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(480px, 2.2fr);
  gap: 28px;
  flex: 1;
}

.bob-stage.collapsed {
  grid-template-columns: minmax(0, 1fr);
}

.bob-stage.collapsed .bob-console {
  display: none;
}

.console-toggle {
  align-self: flex-start;
}

.bob-console {
  background: linear-gradient(180deg, rgba(255, 61, 154, 0.12), rgba(35, 244, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 28px 28px 24px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
}

.console-title {
  font-size: clamp(22px, 1.8vw, 32px);
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.control-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 0;
  font-size: clamp(16px, 1.2vw, 22px);
}

.control-grid label {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.7);
}

.control-grid input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(6, 4, 18, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  font-size: clamp(16px, 1.2vw, 22px);
  color: var(--bob-white);
}

 .control-grid input[type="checkbox"] {
   width: auto;
   padding: 0;
   height: 22px;
   margin: 6px 0 0;
   accent-color: var(--bob-neon);
 }

.control-actions {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.action-btn,
.ghost-btn {
  border: none;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: clamp(16px, 1.2vw, 22px);
  cursor: pointer;
  letter-spacing: 1px;
}

.action-btn {
  padding: 18px 48px;
  font-size: clamp(22px, 2vw, 36px);
}

.go-btn {
  min-width: clamp(160px, 16vw, 260px);
}

.go-btn.hidden {
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
}

.action-btn {
  background: linear-gradient(120deg, var(--bob-hot), var(--bob-hot-2));
  color: #1b0518;
  box-shadow: 0 0 24px rgba(255, 61, 154, 0.45);
}

.action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ghost-btn {
  background: transparent;
  color: var(--bob-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.control-error {
  min-height: 22px;
  color: #ffb3d7;
  font-size: clamp(14px, 1vw, 18px);
}

.bob-visual {
  display: grid;
  gap: 18px;
}

.visual-stage {
  position: relative;
  height: clamp(340px, 46vh, 520px);
  border-radius: 32px;
  background: radial-gradient(circle at 20% 20%, rgba(35, 244, 255, 0.25), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(255, 61, 154, 0.3), transparent 50%),
    linear-gradient(135deg, rgba(18, 6, 34, 0.95), rgba(6, 2, 10, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.45);
  perspective: 1200px;
  transform: translate3d(var(--wobble-x, 0px), var(--wobble-y, 0px), 0)
    rotate(var(--wobble-rot, 0deg));
  transition: transform 0.12s ease;
}

.stage-center {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.visual-stage.wobble {
  will-change: transform;
}

.visual-stage.active {
  animation: stagePulse 0.7s infinite alternate;
}

.halo {
  font-size: clamp(48px, 4vw, 96px);
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--bob-neon);
  text-shadow: 0 0 30px rgba(198, 255, 0, 0.6);
  z-index: 3;
  padding: 0 6vw;
  text-align: center;
  font-family: "Orbitron", "Rajdhani", "Audiowide", "Bebas Neue", "Impact", sans-serif;
  font-weight: 700;
  line-height: 1.15;
}

.burst-layer,
.beam-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.particle-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.rain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.rain-overlay.active {
  opacity: 1;
}

.rain-drop {
  position: absolute;
  width: 2px;
  height: 120px;
  background: linear-gradient(180deg, rgba(35, 244, 255, 0), rgba(35, 244, 255, 0.9));
  opacity: 0.85;
  animation: rainFall var(--rain-duration, 1.6s) linear infinite;
  animation-delay: var(--rain-delay, 0s);
}

.particle {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
  opacity: 0;
  animation: particleFly 1.4s ease-out forwards;
}

.visual-stage.active .burst-layer,
.visual-stage.active .beam-layer {
  opacity: 1;
}

.burst-layer {
  background: radial-gradient(circle, rgba(255, 61, 154, 0.4), transparent 55%),
    radial-gradient(circle at 80% 60%, rgba(35, 244, 255, 0.4), transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(255, 179, 71, 0.4), transparent 55%);
  animation: burstSpin 4s linear infinite;
}

.beam-layer {
  background-image: repeating-linear-gradient(
      120deg,
      rgba(35, 244, 255, 0.25),
      rgba(35, 244, 255, 0.25) 6px,
      transparent 6px,
      transparent 24px
    ),
    repeating-linear-gradient(
      -120deg,
      rgba(255, 61, 154, 0.2),
      rgba(255, 61, 154, 0.2) 6px,
      transparent 6px,
      transparent 22px
    );
  animation: beamMove 1.8s linear infinite;
}

.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.result-card {
  background: rgba(12, 6, 24, 0.8);
  border: 1px solid rgba(35, 244, 255, 0.45);
  border-radius: 20px;
  padding: 18px;
  min-height: 120px;
  display: grid;
  align-content: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  transition: all 0.5s ease;
  transform-style: preserve-3d;
}

.result-card.reveal {
  opacity: 1;
  transform: translateY(0) scale(1) rotateX(0deg);
  box-shadow: 0 0 30px rgba(255, 61, 154, 0.35);
}

.result-card.flip {
  animation: flipCard 0.9s ease-out forwards;
}

.result-title {
  font-size: clamp(16px, 1.4vw, 24px);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.result-value {
  font-size: clamp(24px, 2.4vw, 40px);
  color: var(--bob-cyan);
  text-shadow: 0 0 14px rgba(35, 244, 255, 0.6);
}

.result-rank {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: clamp(12px, 1vw, 18px);
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
}

.bob-footer {
  display: flex;
  justify-content: space-between;
  font-size: clamp(18px, 1.4vw, 26px);
  letter-spacing: 1px;
  padding: 12px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes burstSpin {
  0% {
    transform: rotate(0deg) scale(1);
  }
  100% {
    transform: rotate(360deg) scale(1.2);
  }
}

@keyframes beamMove {
  0% {
    transform: translateX(-20%);
  }
  100% {
    transform: translateX(20%);
  }
}

@keyframes stagePulse {
  0% {
    box-shadow: inset 0 0 50px rgba(255, 61, 154, 0.4);
  }
  100% {
    box-shadow: inset 0 0 80px rgba(35, 244, 255, 0.5);
  }
}

@keyframes flashBoom {
  0% {
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes particleFly {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--x), var(--y), 0) scale(0.2);
    opacity: 0;
  }
}

@keyframes flipCard {
  0% {
    transform: translateY(30px) rotateX(80deg) scale(0.9);
  }
  100% {
    transform: translateY(0) rotateX(0deg) scale(1);
  }
}

@keyframes rainFall {
  0% {
    transform: translateY(-120%);
    opacity: 0;
  }
  20% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(140%);
    opacity: 0;
  }
}

@media (max-width: 1200px) {
  .bob-stage {
    grid-template-columns: 1fr;
  }

  .bob-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
