:root {
  --bg: #eef3f8;
  --ink: #0d1f33;
  --muted: #58708a;
  --card: rgba(255, 255, 255, 0.9);
  --line: rgba(20, 49, 84, 0.16);
  --primary: #0f5ea8;
  --primary-ink: #ffffff;
  --ok: #0e8a62;
  --warn: #cf6a20;
  --danger: #bf3d3d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", "Hiragino Sans GB", "Segoe UI", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 620px at 8% -15%, #c7dcf6 0%, rgba(200, 221, 248, 0) 65%),
              radial-gradient(1000px 520px at 94% 6%, #d8efe8 0%, rgba(216, 240, 232, 0) 60%),
              linear-gradient(180deg, #f4f8fd 0%, var(--bg) 100%);
}

.bg-shape {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
}

.bg-shape-a {
  width: 360px;
  height: 360px;
  top: 70px;
  right: -80px;
  background: rgba(41, 113, 184, 0.23);
}

.bg-shape-b {
  width: 320px;
  height: 320px;
  bottom: -80px;
  left: -70px;
  background: rgba(44, 142, 108, 0.24);
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px 20px 38px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(21, 49, 88, 0.08);
}

.hero {
  padding: 20px 24px 18px;
  margin-bottom: 12px;
  border: 1px solid rgba(17, 89, 159, 0.18);
  background:
    linear-gradient(135deg, rgba(15, 94, 168, 0.11) 0%, rgba(17, 136, 96, 0.08) 100%),
    var(--card);
}

.hero h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0.5px;
  text-align: center;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 2px 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.section-head span {
  font-size: 12px;
  color: var(--muted);
}

.controls {
  padding: 16px;
  margin-bottom: 14px;
}

label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 14px;
}

input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.95);
  font-size: 14px;
}

input[type="text"]:focus {
  outline: none;
  border-color: rgba(13, 77, 143, 0.45);
  box-shadow: 0 0 0 3px rgba(13, 77, 143, 0.12);
}

.actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.7);
}

.inline-form {
  margin: 0;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-right: auto;
}

.btn {
  border: 0;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

.btn.primary {
  background: linear-gradient(135deg, #0d4d8f 0%, #1b6dbd 100%);
  color: var(--primary-ink);
  box-shadow: 0 8px 18px rgba(24, 96, 166, 0.28);
}

.btn.secondary {
  background: #dfeaf5;
  color: #15395f;
}

.btn.ghost {
  background: #ffffff;
  border: 1px solid rgba(20, 49, 84, 0.18);
  color: #36587a;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.status-card {
  padding: 14px 16px 13px;
  min-height: 126px;
  animation: rise-in 0.45s ease both;
}

.upload-card {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.upload-card:hover {
  transform: translateY(-1px);
  border-color: rgba(13, 77, 143, 0.34);
}

.upload-card.dragging {
  border-color: rgba(13, 77, 143, 0.62);
  box-shadow: 0 0 0 4px rgba(13, 77, 143, 0.12);
  background: rgba(229, 240, 252, 0.92);
}

.upload-card.uploading {
  cursor: progress;
  opacity: 0.72;
}

.status-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-card h3 {
  margin: 0;
  font-size: 16px;
}

.status-card .path {
  margin: 10px 0 0;
  color: #4e647d;
  word-break: break-all;
  font-size: 15px;
  line-height: 1.45;
}

.status-pill {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.status-pill.ok {
  background: rgba(14, 138, 98, 0.13);
  color: #0f6c4f;
}

.status-pill.missing {
  background: rgba(207, 106, 32, 0.14);
  color: #a8581b;
}

.drop-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: #607791;
}

.status-card.ok {
  border-color: rgba(16, 132, 95, 0.25);
  box-shadow: 0 8px 18px rgba(16, 132, 95, 0.12);
}

.status-card.missing {
  border-color: rgba(210, 107, 31, 0.25);
  box-shadow: 0 8px 18px rgba(210, 107, 31, 0.1);
}

.result-panel {
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(17, 89, 159, 0.16);
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-head h2 {
  margin: 0;
  font-size: 19px;
}

.result-head span {
  font-size: 12px;
  color: var(--muted);
}

.result-title {
  margin: 10px 0 0;
  font-weight: 600;
  color: #174269;
}

.result-stats {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.result-table-wrap {
  margin-top: 12px;
  overflow: auto;
  border: 1px solid rgba(20, 49, 84, 0.18);
  border-radius: 12px;
  background: #ffffff;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  font-size: 13px;
}

.result-table th,
.result-table td {
  border-bottom: 1px solid rgba(20, 49, 84, 0.1);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.result-table thead th {
  position: sticky;
  top: 0;
  background: #e9f1fb;
  color: #163a62;
  font-weight: 600;
  z-index: 1;
}

.result-table tbody tr:hover {
  background: #f4f9ff;
}

.result-table tbody tr:nth-child(even) {
  background: rgba(244, 249, 255, 0.56);
}

.result-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
}

.result-badge.ok {
  color: #0f6f50;
  background: rgba(14, 138, 98, 0.14);
}

.result-badge.wait {
  color: #8d5a18;
  background: rgba(212, 144, 53, 0.16);
}

.result-badge.fail {
  color: #983131;
  background: rgba(191, 61, 61, 0.16);
}

.result-more {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.result-empty {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  padding: 14px;
  border: 1px dashed rgba(20, 49, 84, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
}

.hero,
.controls,
.result-panel {
  animation: rise-in 0.45s ease both;
}

.status-card:nth-child(1) { animation-delay: 0.03s; }
.status-card:nth-child(2) { animation-delay: 0.06s; }
.status-card:nth-child(3) { animation-delay: 0.09s; }

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .controls,
  .result-panel,
  .status-card,
  .btn {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 980px) {
  .container {
    padding: 16px;
  }
  .hero h1 {
    font-size: 24px;
  }
  .status-grid {
    grid-template-columns: 1fr;
  }
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .actions-row {
    flex-direction: column;
    align-items: stretch;
  }
  .download-actions {
    width: 100%;
  }
  .download-actions .btn {
    width: 100%;
    text-align: center;
  }
  .inline-form .btn {
    width: 100%;
  }
}
