*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    Pretendard,
    -apple-system,
    sans-serif;
  background: #f2f2f2;
  color: #333;
  min-height: 100vh;
}

.container {
  max-width: 520px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.page-header {
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 32px;
  font-weight: 800;
  color: #e24545;
  letter-spacing: -0.01em;
}

.subtitle {
  margin-top: 15px;
  font-size: 16px;
  color: black;
  letter-spacing: -0.01em;
  line-height: 1.7;
  font-weight: 400;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.field label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: black;
  margin-bottom: 8px;
}

.field label .hint {
  font-weight: 400;
  font-size: 14px;
  color: #aaa;
  margin-left: 6px;
}

.field label .required {
  color: #e24545;
  font-weight: 700;
}

.field-desc {
  font-size: 14px;
  color: #999;
  line-height: 1.6;
  margin-bottom: 12px;
  word-break: keep-all;
}

.field input[type="text"],
.field select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.field input:focus,
.field select:focus {
  border-color: #e24545;
}

.input-with-prefix {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s;
}

.input-with-prefix:focus-within {
  border-color: #e24545;
}

.input-with-prefix .prefix {
  padding: 12px 0 12px 16px;
  font-size: 15px;
  color: #999;
  user-select: none;
}

.input-with-prefix input {
  flex: 1;
  border: none !important;
  border-radius: 0 !important;
  padding-left: 4px !important;
}

.input-with-prefix input:focus {
  border: none !important;
}

/* 드래그 앤 드롭 영역 */
.drop-zone {
  position: relative;
  border: 1.5px dashed #ddd;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: #e24545;
  background: #fef5f5;
}

.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.drop-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.drop-icon {
  font-size: 32px;
  font-weight: 300;
  color: #ccc;
  line-height: 1;
}

.drop-text {
  font-size: 14px;
  color: #999;
}

.drop-limit {
  font-size: 12px;
  color: #bbb;
}

#mainDropZone.has-file {
  display: none;
}

.drop-zone.has-file {
  border-style: solid;
  border-color: #e24545;
  background: #fef5f5;
}

.drop-zone.has-file .drop-content {
  display: none;
}

/* 파일 미리보기 */
.file-preview {
  margin-top: 10px;
}

.file-preview-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
}

.file-preview-item img,
.file-preview-item video {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  background: #f0f0f0;
}

.file-preview-item .file-info {
  flex: 1;
  min-width: 0;
}

.file-preview-item .file-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-preview-item .file-size {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.file-preview-item .file-error {
  font-size: 12px;
  color: #e24545;
  margin-top: 2px;
}

.file-preview-item .remove-file {
  background: none;
  border: none;
  color: #ccc;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.file-preview-item .remove-file:hover {
  color: #e24545;
}

/* 상세 이미지 리스트 */
.detail-list {
  display: flex;
  flex-direction: column;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.detail-item .detail-drop {
  flex: 1;
  position: relative;
  border: 1.5px dashed #ddd;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.detail-item .detail-drop:hover {
  border-color: #e24545;
  background: #fef5f5;
}

.detail-item .detail-drop input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.detail-item .detail-drop .drop-placeholder {
  font-size: 14px;
  color: #999;
  pointer-events: none;
}

.detail-item .detail-drop.has-file {
  border-style: solid;
  border-color: #ddd;
  background: white;
}

.detail-item .detail-drop.has-file .drop-placeholder {
  display: none;
}

.detail-item .detail-info {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.detail-item .detail-info img,
.detail-item .detail-info video {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

.detail-item .detail-info .detail-name {
  font-size: 13px;
  font-weight: 600;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-item .remove-detail {
  background: none;
  border: none;
  color: #ccc;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.2s;
}

.detail-item .remove-detail:hover {
  color: #e24545;
}

.btn-add {
  align-self: flex-start;
  padding: 10px 18px;
  background: white;
  color: black;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-submit {
  width: 100%;
  padding: 16px;
  background: #e24545;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}

.btn-submit:hover {
  background: #c93434;
}

.btn-submit:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* 업로드 오버레이 */
.upload-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

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

.overlay-box p {
  font-size: 16px;
  font-weight: 700;
  color: #e24545;
  margin-bottom: 16px;
}

.progress-track {
  width: 240px;
  height: 4px;
  background: #eee;
  border-radius: 2px;
  overflow: hidden;
}

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

/* 성공 화면 */
.success-screen {
  text-align: center;
  padding: 80px 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: #e24545;
  color: #fff;
  font-size: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.success-screen h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
}

.success-screen p {
  font-size: 16px;
  color: black;
  letter-spacing: -0.01em;
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 32px;
}

/* 모바일 */
@media (max-width: 600px) {
  .container {
    padding: 32px 20px 60px;
  }

  .page-header h1 {
    font-size: 24px;
  }
}
