@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400&family=DM+Serif+Display:ital@0;1&display=swap');

:root {
  --glass-white: rgba(255,255,255,0.72);
  --glass-border: rgba(255,255,255,0.60);
  --glass-shadow: 0 32px 64px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.05);
  --glass-inner: inset 0 1px 0 rgba(255,255,255,0.9);
  --blur: saturate(1.8) blur(28px);

  --ink: #0f0f14;
  --ink-2: #3a3a4a;
  --ink-3: #7a7a8a;
  --rose: #c8001a;
  --rose-glow: rgba(200,0,26,0.22);

  --live-green: #30d158;
  --live-green-glow: rgba(48,209,88,0.38);

  --bg-from: #f5f0f2;
  --bg-to: #ede8ef;

  --r-panel: 36px;
  --r-stage: 36px;
  --r-btn: 999px;
  --r-pill: 999px;
  --r-field: 18px;

  --font-body: 'DM Sans', sans-serif;
  --font-display: 'DM Serif Display', serif;
}

#rg-app,
#rg-app * {
  box-sizing: border-box;
}

#rg-app {
  font-family: var(--font-body);
  color: var(--ink);
  position: relative;
  background: transparent;
  min-height: auto;
  padding: 0;
  max-width: 1100px;
  margin: 0 auto;
}

.rg-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  width: 100%;
  padding: 0;
  align-items: stretch;
  min-height: auto;
}

.rg-panel,
.rg-stage {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.58);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow:
    0 14px 32px rgba(0,0,0,0.05),
    inset 0 1px 0 rgba(255,255,255,0.85);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  backdrop-filter: saturate(1.4) blur(18px);
}

.rg-panel::after,
.rg-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(170deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 40%);
  pointer-events: none;
}

.rg-panel {
  border-radius: var(--r-panel);
  padding: 0;
}

.rg-panel-inner {
  padding: 36px 32px 40px;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  z-index: 1;
}

.rg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 22px;
}

.rg-dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
  min-height: 6px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 8px var(--rose-glow);
  animation: rg-pulse 2.4s ease-in-out infinite;
  display: inline-block;
}

.rg-dot-live {
  background: var(--live-green);
  box-shadow: 0 0 8px var(--live-green-glow);
}

@keyframes rg-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.75);
  }
}

.rg-headline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 46px;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 18px;
}

.rg-headline em {
  font-style: italic;
  color: var(--rose);
}

.rg-lead {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 32px;
  max-width: 26ch;
}

.rg-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 10px;
}

.rg-select-shell {
  position: relative;
}

.rg-select-shell select {
  width: 100%;
  height: 60px;
  padding: 16px 52px 16px 20px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-field);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 4px 12px rgba(0,0,0,0.04);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: none !important;
  text-indent: 0;
}

.rg-select-shell select::-ms-expand {
  display: none;
}

.rg-select-shell select:focus {
  border-color: rgba(200,0,26,0.35);
  box-shadow: 0 0 0 4px rgba(200,0,26,0.08), inset 0 1px 0 rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.72);
}

.rg-chevron {
  position: absolute;
  right: 20px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -8px;
  pointer-events: none;
  display: block;
  z-index: 2;
}

.rg-chevron::before,
.rg-chevron::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 8px;
  height: 2px;
  background: var(--ink-3);
  border-radius: 999px;
}

.rg-chevron::before {
  left: 0;
  transform: rotate(45deg);
  transform-origin: center;
}

.rg-chevron::after {
  right: 0;
  transform: rotate(-45deg);
  transform-origin: center;
}

.rg-btn-primary {
  margin-top: 28px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 19px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(160deg, #d4001c 0%, #960014 100%);
  border: none;
  border-radius: var(--r-btn);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 10px 20px rgba(200,0,26,0.18),
    0 3px 8px rgba(0,0,0,0.08);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s;
}

.rg-btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,0.18), rgba(255,255,255,0));
  border-radius: inherit;
}

.rg-btn-primary:hover {
  transform: translateY(-1px) scale(1.005);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.2) inset,
    0 14px 26px rgba(200,0,26,0.22),
    0 5px 12px rgba(0,0,0,0.10);
}

.rg-btn-primary:active {
  transform: translateY(0) scale(0.99);
}

.rg-btn-primary.rg-loading {
  opacity: 0.8;
  pointer-events: none;
}

.rg-license-box {
  margin-top: auto;
  padding-top: 24px;
}

.rg-license-text {
  margin: 0 0 14px;
  font-size: 11px;
  line-height: 1.55;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  max-width: 24ch;
}

.rg-license-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rg-license-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px 0 10px;
  text-decoration: none;
  color: var(--ink-2);
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.85),
    0 4px 10px rgba(0,0,0,0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.rg-license-link:hover {
  transform: translateY(-1px);
  border-color: rgba(200,0,26,0.18);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 8px 18px rgba(0,0,0,0.06);
}

.rg-license-link img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  border-radius: 4px;
}

.rg-license-link span {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: var(--rose);
}

.rg-stage {
  border-radius: var(--r-stage);
  display: flex;
  flex-direction: column;
  padding: 16px;
  min-height: 640px;
}

.rg-stage-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 4px 14px;
  position: relative;
  z-index: 1;
}

.rg-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 10px 18px;
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: var(--r-pill);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 4px 12px rgba(0,0,0,0.04);
}

.rg-hint {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

#rg-viewer {
  flex: 1;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 30%, rgba(255,255,255,0.85) 0%, rgba(240,233,237,0.9) 60%, rgba(228,218,224,0.95) 100%);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.95), 0 8px 20px rgba(0,0,0,0.04);
  position: relative;
  z-index: 1;
  min-height: 520px;
}

#rg-viewer-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  pointer-events: none;
}

#rg-viewer-empty svg {
  opacity: 0.3;
}

@media (max-width: 960px) {
  .rg-shell {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }

  .rg-headline {
    font-size: 38px;
  }

  #rg-viewer {
    min-height: 400px;
  }

  .rg-stage {
    min-height: auto;
  }

  .rg-stage-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}