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

:root {
  --blue: #2563EB;
  --blue-light: #EFF6FF;
  --blue-hover: #1D4ED8;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --green: #059669;
  --red: #DC2626;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.10);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans KR', 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.5px;
}

.header-desc {
  color: var(--gray-500);
  font-size: 15px;
}

/* ─── 업로드 영역 ────────────────────────────────────────── */
.upload-section {
  margin-bottom: 32px;
}

.dropzone {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius);
  background: white;
  padding: 56px 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}

.dropzone:hover,
.dropzone:focus {
  border-color: var(--blue);
  background: var(--blue-light);
}

.dropzone.drag-over {
  border-color: var(--blue);
  background: var(--blue-light);
  transform: scale(1.01);
}

.dropzone-icon {
  margin-bottom: 16px;
  opacity: 0.5;
}

.dropzone-title {
  font-size: 16px;
  color: var(--gray-700);
  margin-bottom: 16px;
}

.dropzone-hint {
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 12px;
}

/* ─── 버튼 ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  border: none;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--blue);
  color: white;
}

.btn-primary:hover { background: var(--blue-hover); }

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
}

.btn-secondary:hover { background: var(--gray-100); }

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  color: var(--gray-400);
  transition: background 0.15s;
  flex-shrink: 0;
}

.btn-icon:hover { background: var(--gray-100); }

/* ─── 진행 영역 ─────────────────────────────────────────── */
.progress-section {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

.file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.file-icon {
  width: 40px;
  height: 40px;
  background: var(--blue-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.file-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 2px;
}

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

.progress-bar {
  height: 6px;
  background: var(--gray-100);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 99px;
  width: 0%;
  transition: width 0.4s ease;
}

.progress-fill.indeterminate {
  width: 40% !important;
  animation: indeterminate 1.4s infinite ease-in-out;
}

@keyframes indeterminate {
  0%   { transform: translateX(-100%); }
  60%  { transform: translateX(180%); }
  100% { transform: translateX(180%); }
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-status {
  font-size: 13px;
  color: var(--gray-500);
}

.progress-percent {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
}

/* ─── 결과 영역 ─────────────────────────────────────────── */
.result-section {
  margin-bottom: 32px;
}

.result-card {
  background: white;
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow);
}

.result-card.success { border-top: 3px solid var(--green); }
.result-card.error   { border-top: 3px solid var(--red); }

.result-icon {
  margin-bottom: 16px;
}

.result-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.result-desc {
  color: var(--gray-500);
  font-size: 14px;
  margin-bottom: 24px;
}

.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── 안내 카드 ─────────────────────────────────────────── */
.info-section {
  margin-bottom: 40px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.info-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  gap: 14px;
  box-shadow: var(--shadow);
}

.info-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.info-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.info-desc {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.4;
}

/* ─── 푸터 ─────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--gray-400);
  border-top: 1px solid var(--gray-200);
}

/* ─── 유틸리티 ──────────────────────────────────────────── */
.hidden { display: none !important; }

/* ─── 반응형 ────────────────────────────────────────────── */
@media (max-width: 480px) {
  .container { padding: 24px 16px; }
  .dropzone  { padding: 40px 20px; }
  .result-card { padding: 32px 20px; }
  .result-actions { flex-direction: column; align-items: stretch; }
  .result-actions .btn { justify-content: center; }
}
