/* ============================================
   Beta Welcome Popup — 4-Screen Flow
   ============================================ */

/* --- Overlay --- */
.beta-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: betaFadeIn 0.2s ease;
}

@keyframes betaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes betaModalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* --- Modal Card --- */
.beta-modal {
  width: 100%;
  max-width: 380px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 18px;
  overflow-x: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
  animation: betaModalIn 0.2s ease;
  -webkit-overflow-scrolling: touch;
}

/* --- Screen 1: Welcome --- */

.beta-dark-section {
  background: #0D0B1A;
  padding: 28px 20px 22px;
  text-align: center;
  position: relative;
}

.beta-logo-box {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(83, 74, 183, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border: 1.5px solid rgba(179, 157, 255, 0.25);
}

.beta-logo-text {
  font-family: 'Gmarket Sans', 'Pretendard Variable', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #B39DFF;
  letter-spacing: -0.3px;
}

.beta-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.beta-subtitle {
  font-size: 13px;
  color: #B39DFF;
  line-height: 1.5;
}

.beta-subtitle strong {
  font-weight: 700;
}

.beta-light-section {
  background: #fff;
  padding: 20px 20px 18px;
}

/* Benefits */
.beta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid #CECBF6;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #534AB7;
  margin-bottom: 14px;
}

.beta-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #534AB7;
}

.beta-benefits {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.beta-benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.beta-check-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}

.beta-benefit-text {
  font-size: 14px;
  color: #222;
  line-height: 1.5;
  font-weight: 500;
}

.beta-benefit-text strong {
  font-weight: 700;
  color: #111;
}

/* CTA Button */
.beta-cta-btn {
  width: 100%;
  height: 48px;
  background: #534AB7;
  border: none;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 0 16px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: opacity 0.1s, transform 0.1s;
  font-family: inherit;
}

.beta-cta-btn:active {
  opacity: 0.85;
  transform: scale(0.98);
}

.beta-cta-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.beta-cta-text {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.beta-cta-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Draw Box */
.beta-draw-box {
  background: #EEEDFE;
  border: 1.5px solid #CECBF6;
  border-radius: 14px;
  padding: 14px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 14px;
  transition: background 0.15s, transform 150ms ease;
}

.beta-draw-box:hover {
  background: #E4E2FA;
}

.beta-draw-box:active {
  transform: scale(0.98);
}

.beta-draw-box.disabled {
  cursor: default;
  opacity: 0.5;
}

.beta-draw-box.disabled:hover {
  background: #EEEDFE;
}

.beta-draw-box.disabled:active {
  opacity: 0.5;
  transform: none;
}

.beta-draw-box.done {
  cursor: default;
  opacity: 1;
  align-items: center;
}

.beta-draw-box.done:hover {
  background: #EEEDFE;
}

.beta-draw-box.done:active {
  transform: none;
}

.beta-draw-left {
  flex: 1;
}

.beta-draw-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #534AB7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.beta-draw-title {
  font-size: 13px;
  font-weight: 700;
  color: #3C3489;
  margin-bottom: 3px;
}

.beta-draw-desc {
  font-size: 11px;
  color: #534AB7;
  line-height: 1.5;
}

.beta-draw-right {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  flex-direction: column;
}

.beta-ticket-stack {
  position: relative;
  width: 58px;
  height: 48px;
}

.beta-ticket-card {
  position: absolute;
  width: 52px;
  height: 30px;
  border-radius: 8px;
  background: #534AB7;
  border: 0.5px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
}

.beta-ticket-card.back {
  top: 0;
  left: 6px;
  opacity: 0.28;
  transform: rotate(-7deg);
}

.beta-ticket-card.mid {
  top: 7px;
  left: 3px;
  opacity: 0.6;
  transform: rotate(-2.5deg);
}

.beta-ticket-card.front {
  top: 14px;
  left: 0;
  opacity: 1;
}

.beta-draw-hint {
  font-size: 9px;
  font-weight: 600;
  color: #534AB7;
  margin-top: 3px;
}

/* Done state */
.beta-done-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #B8B2E0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.beta-done-content {
  flex: 1;
  min-width: 0;
}

.beta-done-title {
  font-size: 13px;
  font-weight: 700;
  color: #3C3489;
  margin-bottom: 2px;
}

.beta-done-sub {
  font-size: 11px;
  color: #7B6FA8;
  line-height: 1.4;
}

.beta-done-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  color: #534AB7;
}

/* Close X */
.beta-close-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
  transition: background 0.15s;
}

.beta-close-x:hover {
  background: rgba(255, 255, 255, 0.2);
}

.beta-close-x:active {
  background: rgba(255, 255, 255, 0.25);
}

/* --- Screen 2: Feedback Form --- */

.beta-form-header {
  background: #0D0B1A;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.beta-back-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.beta-back-btn:active {
  background: rgba(255, 255, 255, 0.2);
}

.beta-form-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.beta-form-body {
  background: #fff;
  padding: 22px 20px 20px;
}

/* Stars */
.beta-stars {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

.beta-star {
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: transform 0.1s;
}

.beta-star:active {
  transform: scale(1.15);
}

.beta-star svg {
  width: 40px;
  height: 40px;
}

/* Textarea */
.beta-textarea-wrap {
  position: relative;
  margin-bottom: 16px;
}

.beta-textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px 14px;
  border: 1.5px solid #E5E7EB;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.6;
  resize: none;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
  color: #222;
}

.beta-textarea::placeholder {
  color: #B0B0B0;
}

.beta-textarea:focus {
  border-color: #534AB7;
}

.beta-char-count {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 12px;
  color: #B0B0B0;
}

.beta-char-count.valid {
  color: #534AB7;
}

/* Submit */
.beta-submit-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, opacity 0.1s;
}

.beta-submit-btn.disabled {
  background: #E5E7EB;
  color: #B0B0B0;
  cursor: not-allowed;
}

.beta-submit-btn.active {
  background: #534AB7;
  color: #fff;
}

.beta-submit-btn.active:active {
  opacity: 0.85;
}

/* --- Screen 3: Draw Animation --- */

.beta-draw-screen {
  background: #0D0B1A;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
}

.beta-fire-btn {
  padding: 14px 32px;
  background: linear-gradient(135deg, #6D28D9, #8B5CF6);
  border: none;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  z-index: 2;
  transition: opacity 0.1s, transform 0.1s;
}

.beta-fire-btn:active {
  opacity: 0.85;
  transform: scale(0.96);
}

.beta-draw-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.beta-draw-number {
  position: absolute;
  font-size: 64px;
  font-weight: 900;
  color: #fff;
  z-index: 3;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.25s, transform 0.25s;
  text-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

.beta-draw-number.visible {
  opacity: 1;
  transform: scale(1);
}

/* --- Screen 4: Result --- */

.beta-result {
  text-align: center;
}

.beta-result-dark {
  background: #0D0B1A;
  padding: 36px 20px 28px;
  text-align: center;
}

.beta-result-number {
  font-size: 56px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  margin-bottom: 10px;
  text-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
}

.beta-result-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.beta-result-sub {
  font-size: 14px;
  color: #B39DFF;
}

.beta-result-light {
  background: #fff;
  padding: 22px 20px 20px;
  text-align: center;
}

.beta-result-credits {
  background: #EEEDFE;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.beta-result-credits-label {
  font-size: 13px;
  color: #7B6FA8;
  margin-bottom: 4px;
}

.beta-result-credits-value {
  font-size: 26px;
  font-weight: 800;
  color: #534AB7;
}

.beta-home-btn {
  width: 100%;
  height: 48px;
  background: #534AB7;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.1s;
}

.beta-home-btn:active {
  opacity: 0.85;
}
