/* ================================================
   STEP 1 SHARED STYLES
   Landing Page & Create Page Step 1 공유 스타일

   NOTE: 통합 ID/클래스 체계 사용 (step1- 접두사)
   ================================================ */

/* ================================================
   UPLOAD IMAGE WRAPPER (Landing 단순화 버전)
   circle 없이 이미지만 표시
   ================================================ */

.upload-image-wrapper {
  width: 840px;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

.upload-image-wrapper:hover {
  transform: scale(1.02);
}

.upload-image-wrapper:focus {
  outline: none;
}

.upload-image-wrapper .sample-character {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 우측 하단 업로드 아이콘 버튼 */
.upload-image-wrapper .upload-icon-btn {
  position: absolute !important;
  bottom: 40px !important;
  right: 40px !important;
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  background: var(--button-gradient) !important;
  border: none !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-button);
  transition: var(--transition-normal);
  z-index: 10;
}

.upload-image-wrapper .upload-icon-btn:hover {
  transform: scale(1.1);
}

.upload-image-wrapper .upload-icon-btn img {
  width: 28px !important;
  height: 28px !important;
}

@media (max-width: 900px) {
  .upload-image-wrapper {
    width: 100%;
    max-width: 540px;
    height: 320px;
  }
}

@media (max-width: 768px) {
  .upload-image-wrapper {
    max-width: 400px;
  }

  .upload-image-wrapper .upload-icon-btn {
    width: 48px;
    height: 48px;
    bottom: 16px;
    right: 16px;
  }

  .upload-image-wrapper .upload-icon-btn img {
    width: 24px;
    height: 24px;
  }
}

/* Step 1 Container */
.step1-core-container {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* Upload Section */
.step1-upload-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.step1-upload-area {
  width: 280px;
  height: 280px;
  border-radius: var(--radius-lg);
  background: var(--card-bg-gradient);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.step1-upload-area:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(185, 126, 245, 0.25);
}

.step1-upload-area:focus {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
}

.step1-upload-area.dragover {
  border: 3px dashed var(--purple);
  background: rgba(185, 126, 245, 0.1);
}

.step1-upload-area.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.step1-upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  height: 100%;
  position: relative;
}

.step1-upload-inner img {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
}

.step1-upload-icon-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--button-gradient);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-button);
  transition: var(--transition-normal);
}

.step1-upload-icon-btn:hover {
  transform: scale(1.1);
}

.step1-upload-icon-btn img {
  width: 24px;
  height: 24px;
}

.step1-upload-btn {
  padding: 14px 32px;
  background: var(--button-gradient);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-button);
  transition: var(--transition-normal);
}

.step1-upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0px 6px 20px rgba(185, 126, 245, 0.4);
}

.step1-upload-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.step1-upload-btn.btn-loading {
  position: relative;
  color: transparent;
}

.step1-upload-btn.btn-loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: step1-spin 0.8s linear infinite;
}

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

/* Preview Section (업로드 후 표시) */
.step1-preview-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.step1-preview-section.hidden {
  display: none;
}

.step1-preview-box {
  width: 280px;
  height: 280px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card-bg-gradient);
  box-shadow: var(--shadow-card);
}

.step1-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Name Input Section */
.step1-name-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 320px;
}

.step1-name-input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  transition: var(--transition-normal);
  background: var(--white);
}

.step1-name-input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(185, 126, 245, 0.15);
}

.step1-name-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.step1-name-hint {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin: 0;
}

/* Next Button */
.step1-next-btn {
  padding: 18px 48px;
  background: var(--button-gradient);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-button);
  transition: var(--transition-normal);
  margin-top: 16px;
}

.step1-next-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0px 8px 25px rgba(185, 126, 245, 0.5);
}

.step1-next-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Responsive Step1 */
@media (max-width: 768px) {
  .step1-upload-area,
  .step1-preview-box {
    width: 240px;
    height: 240px;
  }

  .step1-name-input {
    font-size: 16px;
    padding: 14px 16px;
  }

  .step1-next-btn {
    width: 100%;
    max-width: 280px;
    padding: 16px 32px;
    font-size: 16px;
  }
}

/* ================================================
   STEP STATUS MODAL (Loading)
   업로드 중 로딩 모달
   ================================================ */

.step1-status-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.step1-status-modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.step1-status-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 90%;
}

.step1-status-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-light);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: step1-spin 1s linear infinite;
  margin: 0 auto 20px;
}

.step1-status-text {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}

/* ================================================
   ERROR MESSAGE
   ================================================ */

.step1-error-message {
  background: #fee;
  color: #c00;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  text-align: center;
  margin-top: 16px;
  max-width: 400px;
  width: 100%;
}

.step1-error-message.hidden {
  display: none;
}

.step1-error-message.success {
  background: #e8f5e9;
  color: #27ae60;
}

