html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--rw-bg-color);
  font-family: Arial, Helvetica, sans-serif;
}

:root {
  --rw-bg-color: #DDF7D9;
  --green: #3DBB59;
  --green-dark: #1E7B3C;
  --yellow: #F6D35D;
  --text: #1E3B2C;
  --shadow: rgba(21, 68, 42, 0.22);
}

#rw-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.bg-gradient {
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.85), rgba(255,255,255,0) 28%),
    radial-gradient(circle at 80% 10%, rgba(246,211,93,.38), rgba(246,211,93,0) 28%),
    linear-gradient(145deg, #DDF7D9 0%, #AEECC0 46%, #8EDDD7 100%);
}

.bg-color {
  background: var(--rw-bg-color);
}

.bg-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#rw-loader {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--text);
  text-align: center;
  padding: 24px;
  box-sizing: border-box;
  transition: opacity .35s ease, transform .35s ease;
}

#rw-loader.hidden {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}

#rw-logo {
  width: min(170px, 34vw);
  max-height: 160px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 10px 18px var(--shadow));
  animation: float 2.6s ease-in-out infinite;
}

#rw-title {
  margin: 0;
  font-size: clamp(34px, 7vw, 72px);
  line-height: .95;
  font-weight: 900;
  letter-spacing: -1.5px;
  color: var(--green-dark);
  text-shadow: 0 4px 0 rgba(255,255,255,.75), 0 12px 24px var(--shadow);
}

#rw-subtitle {
  margin: 12px 0 22px;
  max-width: 720px;
  font-size: clamp(16px, 2.5vw, 24px);
  font-weight: 700;
  color: rgba(30,59,44,.86);
}

#rw-card {
  width: min(620px, 92vw);
  padding: 22px 24px 24px;
  box-sizing: border-box;
  border-radius: 28px;
  border: 4px solid rgba(255,255,255,.72);
  background: rgba(255,255,255,.76);
  backdrop-filter: blur(10px);
  box-shadow: 0 22px 50px rgba(42,97,55,.20), inset 0 2px 0 rgba(255,255,255,.85);
}

#rw-loading-text {
  margin: 0 0 14px;
  font-size: clamp(16px, 2.6vw, 22px);
  font-weight: 800;
  color: var(--green-dark);
}

#rw-progress {
  position: relative;
  width: 100%;
  height: 30px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(30,123,60,.14);
  border: 3px solid rgba(30,123,60,.28);
  box-shadow: inset 0 3px 8px rgba(0,0,0,.10), 0 5px 14px rgba(30,123,60,.18);
}

#rw-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #44C767 0%, #76E272 52%, #F6D35D 100%);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.35), 0 0 18px rgba(69,199,103,.45);
}

#rw-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, transparent 34%, rgba(255,255,255,.36) 48%, transparent 62%, transparent 100%);
  transform: translateX(-100%);
  animation: shine 1.45s linear infinite;
}

#rw-percent {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 900;
  color: var(--green-dark);
}

#rw-tip {
  margin: 10px auto 0;
  max-width: 520px;
  min-height: 24px;
  font-size: clamp(14px, 2.1vw, 18px);
  font-weight: 700;
  color: rgba(30,59,44,.74);
}

#rw-play {
  display: none;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 12px 34px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #76E272, #36B954);
  color: white;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 0 #1E7B3C, 0 16px 28px rgba(30,123,60,.32);
}

/* Keep branding above the card; replace loading information with PLAY when ready. */
#rw-card.play-only > :not(#rw-play) {
  display: none;
}

#rw-card.play-only #rw-play {
  margin-top: 0;
}

#rw-play:active {
  transform: translateY(5px);
  box-shadow: 0 3px 0 #1E7B3C, 0 8px 16px rgba(30,123,60,.22);
}

#unity-canvas {
  position: fixed;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  background: #000;
  outline: none;
}

#unity-warning {
  position: fixed;
  z-index: 999;
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  width: min(760px, calc(100vw - 32px));
  display: none;
}

.banner {
  margin-bottom: 8px;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(0,0,0,.18);
}

.banner.warning { color: #463A00; background: #FFE97D; }
.banner.error { color: white; background: #C0392B; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

@keyframes shine {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}
