.rr-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  height: calc(100vh - 53px);
}

.rr-main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  overflow: hidden;
}

.rr-main canvas {
  display: block;
  max-height: 100%;
}

.rr-sidebar {
  background: var(--card);
  border-left: 1px solid var(--border);
  padding: 1rem;
  overflow-y: auto;
}

/* Overlays */
.rr-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10;
  gap: 0.75rem;
  transition: opacity 0.3s;
}
.rr-overlay.hidden { opacity: 0; pointer-events: none; }

.rr-overlay-title {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #f97316, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rr-overlay-sub {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.6;
}

.rr-start-btn {
  padding: 0.75rem 2.5rem;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

.rr-final-score {
  font-size: 5rem;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 0 30px rgba(251, 191, 36, 0.4);
  line-height: 1;
}

.rr-final-label {
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

.rr-final-level {
  color: #f97316;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Level flash */
.rr-level-flash {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 8;
  pointer-events: none;
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 30px rgba(249, 115, 22, 0.6);
  letter-spacing: 0.05em;
  animation: levelFlash 2s ease-out forwards;
}
.rr-level-flash.hidden { display: none; }

@keyframes levelFlash {
  0% { opacity: 0; transform: scale(0.5); background: rgba(249,115,22,0.3); }
  15% { opacity: 1; transform: scale(1.1); background: rgba(249,115,22,0.15); }
  30% { transform: scale(1); }
  70% { opacity: 1; }
  100% { opacity: 0; background: transparent; }
}

@media (max-width: 900px) {
  .rr-layout { grid-template-columns: 1fr; }
  .rr-sidebar { display: none; }
}
