/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #000;
  --bg-card: rgba(255, 255, 255, 0.04);
  --border-card: rgba(255, 255, 255, 0.08);
  --text-primary: #fff;
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-tertiary: rgba(255, 255, 255, 0.3);
  --accent: #3182f6;
  --accent-hover: #1b64da;
  --error: #f04452;
  --radius: 16px;
  --radius-sm: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Header ===== */
.beta-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
}

.back-link {
  color: var(--text-secondary);
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.back-link:hover {
  color: var(--text-primary);
}

.header-logo img {
  height: 24px;
  width: auto;
  opacity: 0.7;
}

/* ===== Progress Bar ===== */
.progress-bar-container {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  z-index: 99;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 1px 1px 0;
}

/* ===== Form Container ===== */
.form-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* ===== Steps ===== */
.step {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 40px;
  opacity: 0;
  transform: translateX(80px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.step.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.step.exit-left {
  opacity: 0;
  transform: translateX(-80px);
}

.step.exit-right {
  opacity: 0;
  transform: translateX(80px);
}

.step-content {
  width: 100%;
  max-width: 440px;
}

/* ===== Step Typography ===== */
.step-number {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.step-title {
  font-size: clamp(26px, 6vw, 36px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.step-desc {
  font-size: clamp(15px, 3.5vw, 17px);
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 36px;
}

.step-icon {
  margin-bottom: 28px;
  opacity: 0.8;
}

/* ===== Input Group ===== */
.input-group {
  position: relative;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 20px;
  font-weight: 500;
  padding: 16px 0 12px;
  outline: none;
  transition: border-color var(--transition);
  caret-color: var(--accent);
  resize: none;
}

.form-textarea {
  min-height: 120px;
  line-height: 1.6;
  font-size: 18px;
}

.form-input:focus {
  border-color: var(--accent);
}

.floating-label {
  position: absolute;
  left: 0;
  top: 18px;
  font-size: 18px;
  color: var(--text-tertiary);
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: left;
}

.form-input:focus ~ .floating-label,
.form-input:not(:placeholder-shown) ~ .floating-label {
  top: -4px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.form-textarea ~ .floating-label {
  top: 18px;
}

.form-textarea:focus ~ .floating-label,
.form-textarea:not(:placeholder-shown) ~ .floating-label {
  top: -4px;
}

.input-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus ~ .input-line {
  width: 100%;
}

/* ===== Error Message ===== */
.error-msg {
  font-size: 13px;
  color: var(--error);
  min-height: 20px;
  margin-top: 6px;
  margin-bottom: 4px;
  transition: var(--transition);
}

/* ===== Chip Group (Industry) ===== */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.chip {
  cursor: pointer;
}

.chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.chip-label {
  display: inline-block;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: 50px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  user-select: none;
}

.chip:hover .chip-label {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.chip input:checked + .chip-label {
  background: rgba(49, 130, 246, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Privacy Box ===== */
.privacy-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  overflow: hidden;
}

.privacy-scroll {
  max-height: 200px;
  overflow-y: auto;
  padding: 20px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-secondary);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.privacy-scroll::-webkit-scrollbar {
  width: 4px;
}

.privacy-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.privacy-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.privacy-scroll h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.privacy-scroll h5 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 16px;
  margin-bottom: 4px;
}

/* ===== Checkbox ===== */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 8px;
}

.checkbox-group input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkmark {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.checkmark svg {
  opacity: 0;
  transform: scale(0.5);
  transition: var(--transition);
}

.checkbox-group input:checked + .checkmark {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-group input:checked + .checkmark svg {
  opacity: 1;
  transform: scale(1);
}

.checkbox-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.checkbox-text em {
  font-style: normal;
  color: var(--error);
  font-weight: 600;
}

/* ===== Step Actions ===== */
.step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
}

.btn-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 40px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-next:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(49, 130, 246, 0.25);
}

.btn-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-start {
  width: 100%;
  padding: 18px;
  font-size: 18px;
}

.btn-submit {
  position: relative;
}

.btn-submit.loading {
  color: transparent;
  pointer-events: none;
}

.btn-submit.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-prev {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-prev:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* ===== Complete Step ===== */
.step-complete {
  text-align: center;
}

.check-circle {
  margin-bottom: 24px;
}

.check-circle-ring {
  stroke-dasharray: 190;
  stroke-dashoffset: 190;
  animation: drawCircle 0.6s 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.check-path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: drawCheck 0.4s 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes drawCircle {
  to { stroke-dashoffset: 0; }
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

.step-complete .step-title {
  margin-bottom: 16px;
}

.step-complete .step-desc {
  margin-bottom: 40px;
}

.step-complete .btn-next {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
}

.step-complete .btn-next:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--text-primary);
  box-shadow: none;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .beta-header {
    padding: 14px 16px;
  }

  .step {
    padding: 72px 20px 32px;
    align-items: flex-start;
    padding-top: 100px;
  }

  .step[data-step="0"],
  .step[data-step="6"] {
    align-items: center;
    padding-top: 80px;
  }

  .step-content {
    max-width: 100%;
  }

  .chip-label {
    padding: 8px 16px;
    font-size: 14px;
  }

  .privacy-scroll {
    max-height: 160px;
    padding: 16px;
  }

  .btn-next {
    padding: 14px 32px;
  }

  .step-actions {
    margin-top: 24px;
  }
}

@media (min-width: 769px) {
  .step {
    padding-top: 80px;
  }

  .step-content {
    max-width: 480px;
  }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
