/* ─────────────────────────────────────────────────────────────
   App-Themed Closed Testing Join Group Dialog — STwebsite
   ───────────────────────────────────────────────────────────── */
.testing-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.testing-dialog-overlay.open {
  opacity: 1;
  visibility: visible;
}

.testing-dialog {
  --app-accent: #B5C8E2;
  --app-accent-bg: rgba(181, 200, 226, 0.12);
  --app-accent-border: rgba(181, 200, 226, 0.3);
  --app-glow: rgba(181, 200, 226, 0.15);

  position: relative;
  width: 100%;
  max-width: 440px;
  background: #1D1C1B;
  border: 1px solid var(--app-accent-border, rgba(200, 198, 197, 0.15));
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px var(--app-glow, transparent);
  padding: 2rem 1.75rem 1.75rem;
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  color: #E5E2E1;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow: hidden;
}

.testing-dialog::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--app-accent, #C8C6C5);
  box-shadow: 0 0 12px var(--app-accent, #C8C6C5);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.testing-dialog-overlay.open .testing-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.testing-dialog-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8D909F;
  font-size: 1.1rem;
  line-height: 1;
  transition: color 0.2s, background-color 0.2s;
}

.testing-dialog-close:hover {
  color: #E5E2E1;
  background: rgba(200, 198, 197, 0.1);
}

.testing-dialog-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.testing-dialog-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--app-accent-bg, rgba(181, 200, 226, 0.12));
  color: var(--app-accent, #B5C8E2);
  border: 1px solid var(--app-accent-border, rgba(181, 200, 226, 0.2));
  flex-shrink: 0;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.testing-dialog-badge {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  background: var(--app-accent-bg, rgba(181, 200, 226, 0.12));
  color: var(--app-accent, #B5C8E2);
  border: 1px solid var(--app-accent-border, rgba(181, 200, 226, 0.2));
  display: inline-block;
  transition: all 0.3s ease;
}

.testing-dialog h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #E5E2E1;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.testing-dialog > p {
  font-size: 0.9rem;
  color: #C3C6D4;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.testing-dialog-steps {
  list-style: none;
  margin: 0 0 1.5rem 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.testing-dialog-steps li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: #C3C6D4;
  line-height: 1.5;
}

.testing-dialog-step-num {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--app-accent, #C8C6C5);
  color: #111110;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.testing-dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.testing-dialog-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  width: 100%;
}

.testing-dialog-split-actions {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.testing-dialog-split-actions .btn {
  flex: 1;
  min-width: 0;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

.btn-join-group {
  background: var(--app-accent-bg, rgba(181, 200, 226, 0.12));
  color: var(--app-accent, #B5C8E2);
  border: 1px solid var(--app-accent-border, rgba(181, 200, 226, 0.3));
}

.btn-join-group:hover {
  background: var(--app-accent-border, rgba(181, 200, 226, 0.25));
  color: #FFFFFF;
}

.btn-web-testing {
  background: rgba(255, 255, 255, 0.06);
  color: #E5E2E1;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-web-testing:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-continue-play {
  background: var(--app-accent, #C8C6C5);
  color: #111110;
}

.btn-continue-play:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 20px var(--app-glow, rgba(200, 198, 197, 0.25));
  transform: translateY(-1px);
}

@media (max-width: 420px) {
  .testing-dialog-split-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .testing-dialog {
    padding: 1.5rem 1.25rem 1.25rem;
  }
}
