/* 미니멀 무채색 디자인 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #fafafa;
  color: #333;
  line-height: 1.5;
  font-size: 14px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* 메인 헤더 */
.main-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 24px 0;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.header-content h1 {
  font-size: 1.8rem;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  color: #333;
}

.header-subtitle {
  font-size: 1rem;
  color: #666;
  font-weight: 400;
  margin: 0;
}

/* 메인 카드 */
.main-card {
  background: white;
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
}

.card-section {
  padding: 24px 0;
}

.card-section:first-child {
  padding-top: 0;
}

.card-section:last-child {
  padding-bottom: 0;
}

.section-icon {
  display: none;
}

.card-section h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 12px;
  text-align: center;
}

.section-description {
  color: #666;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.warning-color {
  color: #d63384;
}

.warning-text {
  color: #d63384;
  font-size: 11px;
  text-align: center;
  padding: 12px;
  border-radius: 6px;
}

/* 단계 섹션 */
.step {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
  display: none;
}

.step.active {
  display: block;
  animation: fadeInUp 0.5s ease;
}

/* 단계 헤더 */
.step-header {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.back-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  padding: 8px;
  margin-right: 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-btn:hover {
  background: #f5f5f5;
  color: #333;
}

.step h2 {
  font-size: 1.25rem;
  font-weight: 500;
  color: #222;
  margin: 0;
}

/* 입력 그룹 */
.input-group {
  display: flex;
  width: 100%;
  flex-direction: column;
  margin-bottom: 24px;
}

.input-wrap {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.input-group label {
  display: block;
  margin-top: 10px;
  margin-bottom: 15px;
  font-weight: 500;
  color: #444;
  font-size: 14px;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease;
  background: white;
  color: #333;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: #999;
}

.input-group select {
  cursor: pointer;
}

/* 버튼 */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 12px;
  display: inline-block;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn.primary {
  background: #333;
  color: white;
}

.btn.primary:hover {
  background: #555;
}

.btn.success {
  background: #666;
  color: white;
}

.btn.success:hover {
  background: #777;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn:disabled:hover {
  background: #333;
}

/* 파일 업로드 영역 */
.file-upload-area {
  border: 2px dashed #ccc;
  border-radius: 6px;
  padding: 40px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  margin-bottom: 24px;
  background: #fafafa;
}

.file-upload-area.has-files {
  padding: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.file-upload-area:hover {
  border-color: #999;
  background: #f5f5f5;
}

.file-upload-area.drag-over {
  border-color: #999;
  background: #f5f5f5;
}

.upload-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  color: #999;
}

.file-upload-area p {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.upload-link {
  color: #333;
  text-decoration: underline;
  cursor: pointer;
}

/* 업로드된 파일 목록 */
.uploaded-files-list {
  margin-top: 16px;
}

.uploaded-files-list h4 {
  color: #333;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
}

.uploaded-file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 13px;
}

.uploaded-file-item:last-child {
  margin-bottom: 0;
}

.uploaded-file-name {
  color: #333;
  font-weight: 500;
  flex: 1;
  margin-right: 12px;
  word-break: break-all;
}

.uploaded-file-size {
  color: #666;
  font-size: 12px;
}

.upload-placeholder {
  text-align: center;
  color: #999;
  padding: 20px;
}

/* 진행률 표시 */
.progress-container {
  margin: 24px 0;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: #f0f0f0;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: #333;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  color: #666;
  font-size: 13px;
}

/* 파일 목록 */
.file-list {
  background: #fafafa;
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid #f0f0f0;
}

.file-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.file-list h3 {
  color: #333;
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}

.add-file-btn {
  background: #333;
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.add-file-btn:hover {
  background: #0056b3;
  transform: scale(1.05);
}

/* 다운로드 옵션 버튼들 */
.download-options {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: center;
}

.download-options .btn {
  flex: 1;
  max-width: 200px;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.file-item:last-child {
  border-bottom: none;
}

.file-name {
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

.clickable-filename {
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 4px;
  padding: 2px 4px;
  margin: -2px -4px;
}

.clickable-filename:hover {
  background: #e3f2fd;
  color: #1976d2;
  text-decoration: underline;
}

/* 파일 목록 안내 메시지 */
.file-list-info {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.file-list-info p {
  margin: 0;
  font-size: 13px;
  color: #666;
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* 토스트 알림 스타일 */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #4caf50;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  max-width: 300px;
  word-break: break-word;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.success {
  background: #4caf50;
}

.toast.error {
  background: #f44336;
}

/* 모바일에서 토스트 위치 조정 */
@media (max-width: 768px) {
  .toast {
    top: 20px;
    right: 15px;
    left: 15px;
    max-width: none;
    text-align: center;
  }
}

.file-details {
  display: flex;
  gap: 16px;
  align-items: center;
}

.file-size {
  color: #666;
  font-size: 13px;
}

.file-date {
  color: #999;
  font-size: 12px;
}

/* 파일 정보 */
.file-info {
  background: #f8f8f8;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
}

.file-info h4 {
  color: #333;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
}

.file-info p {
  color: #666;
  margin: 4px 0;
  font-size: 13px;
}

/* 결과 컨테이너 */
.result-container {
  background: #f8f8f8;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 24px;
  margin-top: 24px;

  text-align: center;
}

.success-message h3 {
  color: #333;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 1rem;
}

.success-message p {
  color: #666;
  margin-bottom: 16px;
  font-size: 14px;
}

/* 상태 메시지 */
.status-message {
  background: #f8f8f8;
  border: 1px solid #e5e5e5;
  color: #666;
  padding: 16px;
  border-radius: 6px;
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
}

.error-message {
  background: #fafafa;
  border: 1px solid #ddd;
  color: #666;
  padding: 16px;
  border-radius: 6px;
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
}

/* 파일 업로드 컨테이너 */
.file-upload-container {
  background: #fafafa;
  border-radius: 6px;
  padding: 24px;
  border: 1px solid #f0f0f0;
}

/* 유틸리티 클래스 */
.hidden {
  display: none;
}

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

/* 반응형 디자인 */
@media (max-width: 768px) {
  .container {
    padding: 20px 16px;
  }

  .main-header {
    margin-bottom: 24px;
    padding: 20px 16px;
  }

  .header-content h1 {
    font-size: 1.5rem;
  }

  .header-subtitle {
    font-size: 0.9rem;
  }

  .main-card {
    padding: 24px 20px;
  }

  .section-icon {
    font-size: 2rem;
  }

  .card-section h3 {
    font-size: 1.2rem;
  }

  .section-description {
    font-size: 14px;
  }

  .step {
    padding: 24px 20px;
  }

  .file-upload-area {
    padding: 32px 20px;
  }

  .file-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .file-details {
    gap: 12px;
  }

  .input-wrap {
    flex-direction: column;
    gap: 12px;
  }

  .btn.primary {
    width: 100%;
  }
}

.divider {
  text-align: center;
  margin: 32px 0;
  position: relative;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, #e5e5e5, transparent);
  z-index: 1;
}

.divider span {
  background: white;
  padding: 0 20px;
  color: #888;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.skip-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

/* 버튼 스타일 확장 */
.btn.outline {
  width: 100%;
  background: white;
  color: #555;
  border: 1px solid #e9ecef;
  padding: 12px 24px;
  font-size: 14px;
  height: 44px;
  box-sizing: border-box;
}

.btn.outline:hover {
  background: #f8f9fa;
  border-color: #dee2e6;
  color: #333;
}

/* 직접 업로드 섹션 */
#directUpload .input-group {
  margin-bottom: 20px;
}

#directFile {
  padding: 12px;
  border: 2px dashed #ddd;
  border-radius: 6px;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.3s ease;
}

#directFile:hover {
  border-color: #bbb;
  background: #f5f5f5;
}

/* 로딩 스피너 */
.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #555;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 삭제 버튼 스타일 */
.delete-btn {
  color: rgb(160, 160, 160);
  border: rgb(174, 174, 174);
  border-radius: 4px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-left: 8px;
}

.delete-btn:hover {
  color: rgb(119, 119, 119);
  transform: scale(1.1);
}

.delete-btn:active {
  transform: scale(0.95);
}

/* 파일 항목 hover 효과 */
.file-item:hover {
  background: #f8f8f8;
  border-radius: 4px;
  margin: 0 -8px;
  padding: 12px 8px;
}

/* 단계 설명 */
.step-description {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.step-description p {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.step-description p:last-child {
  margin-bottom: 0;
}

/* 단계별 액션 버튼 */
.step-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.step-actions .btn {
  flex: 1;
  min-width: 140px;
}

/* 반응형 */
@media (max-width: 640px) {
  .skip-buttons {
    flex-direction: column;
  }

  .btn.outline {
    width: 100%;
    text-align: center;
  }

  .btn.primary {
    width: 100%;
    text-align: center;
  }

  .delete-btn {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .step-actions {
    flex-direction: column;
  }

  .step-actions .btn {
    min-width: auto;
  }
}

/* 모달 스타일 */
.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: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.show .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 0 24px;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 24px;
}

.modal-header h2 {
  margin: 0;
  color: #333;
  font-size: 1.3rem;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #333;
}

.modal-body {
  padding: 0 24px 24px 24px;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.guide-step {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #666;
}

.guide-step h3 {
  margin: 0 0 12px 0;
  color: #333;
  font-size: 1.1rem;
  font-weight: 600;
}

.guide-step p {
  margin: 0;
  color: #666;
  line-height: 1.6;
  font-size: 14px;
}

.guide-step strong {
  color: #333;
  font-weight: 600;
}

/* 반응형 모달 */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .modal-header {
    padding: 20px 20px 0 20px;
  }

  .modal-body {
    padding: 0 20px 20px 20px;
  }

  .guide-step {
    padding: 16px;
  }

  .guide-step h3 {
    font-size: 1rem;
  }
}

/* 섹션 도움말 버튼 */
.section-help-btn {
  background: #999;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin-left: 8px;
  vertical-align: middle;
  margin-bottom: 10px;
}

.section-help-btn:hover {
  background: #777;
  transform: scale(1.1);
}

/* 탭 네비게이션 */
.tab-navigation {
  display: flex;
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 24px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
  color: #666;
  flex: 1;
  text-align: center;
}

.tab-btn:hover {
  color: #333;
  background: #f8f9fa;
}

.tab-btn.active {
  color: #333;
  border-bottom-color: #666;
  background: #f8f9fa;
}

/* 탭 컨텐츠 */
.tab-content {
  position: relative;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 가이드 노트 스타일 */
.guide-note {
  background: #f0f7ff;
  padding: 12px 16px;
  margin-top: 20px !important;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.5;
}

/* 반응형 탭 */
@media (max-width: 480px) {
  .tab-btn {
    padding: 10px 12px;
    font-size: 13px;
  }

  .guide-note {
    padding: 10px 12px;
    font-size: 12px;
  }
}
