/* 기본 리셋 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f3f4f6;
  color: #111827;
}

/* 레이아웃 */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px;
  max-width: 960px;
  margin: 0 auto;
}

/* 헤더 */
.header {
  text-align: center;
  margin-bottom: 24px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo span {
  color: #2563eb;
}

.subtitle {
  margin-top: 6px;
  color: #6b7280;
  font-size: 0.95rem;
}

/* 메인 */
.main {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .main {
    grid-template-columns: 1fr;
  }
}

/* 카드 */
.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 20px 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
}

.card h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.card .desc {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.4;
}

/* Form */
.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
}

/* Dropzone */
.dropzone {
  position: relative;
  border-radius: 12px;
  border: 1px dashed #cbd5f5;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.1s ease,
    background-color 0.15s ease;
}

.dropzone:hover {
  border-color: #3b82f6;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.dropzone.drag-over {
  border-color: #1d4ed8;
  background: #e0ebff;
}

.drop-hint {
  font-size: 0.86rem;
  color: #4b5563;
}

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* 파일 정보 */
.file-info {
  font-size: 0.8rem;
  color: #6b7280;
}

/* 섬네일 미리보기 */
.thumb-preview-wrap {
  margin-top: 4px;
  border-radius: 10px;
  padding: 8px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.preview-label {
  display: block;
  font-size: 0.78rem;
  color: #6b7280;
  margin-bottom: 4px;
}

#thumb-preview {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  object-fit: contain;
}

/* 버튼 / 상태 */
.actions {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 16px;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.1s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

/* Primary button */
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.32);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: default;
  box-shadow: none;
  transform: none;
}

/* Secondary button */
.btn-secondary {
  background: #f3f4f6;
  color: #111827;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

/* 상태 메시지 */
.status {
  font-size: 0.8rem;
  min-height: 1em;
}

.status--info {
  color: #2563eb;
}

.status--success {
  color: #059669;
}

.status--error {
  color: #dc2626;
}

/* 푸터 */
.footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: #9ca3af;
}
