* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #1f6feb;
  --primary-hover: #1158c7;
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #24292f;
  --text-sub: #6a737d;
  --border: #e1e4e8;
  --danger: #cf222e;
  --radius: 10px;
}

body {
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.header { text-align: center; margin-bottom: 28px; }
.header h1 { font-size: 26px; font-weight: 700; color: #1a2733; }
.subtitle { margin-top: 6px; font-size: 13px; color: var(--text-sub); }

.search-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto 28px;
  background: var(--card);
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(27, 31, 35, 0.08);
}

.search-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

#noInput {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color .15s;
}
#noInput:focus { border-color: var(--primary); }
#noInput::placeholder { color: #9aa1a9; }

.btn-primary {
  height: 44px;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.result-area { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.info-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(27, 31, 35, 0.06);
}
.info-label {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-sub);
  background: #eef3fb;
  padding: 4px 12px;
  border-radius: 20px;
}
.info-value { font-size: 15px; font-weight: 600; word-break: break-all; }

.file-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.file-slot {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 168px;
  transition: box-shadow .15s, transform .15s;
}
.file-slot.filled:hover {
  box-shadow: 0 4px 12px rgba(31, 111, 235, 0.15);
  transform: translateY(-2px);
}
.file-slot.empty {
  background: #fafbfc;
  border-style: dashed;
  justify-content: center;
  color: #b6bdc4;
  font-size: 13px;
}

.file-icon { font-size: 34px; margin-bottom: 10px; }
.file-name {
  flex: 1;
  width: 100%;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.btn-download {
  height: 34px;
  padding: 0 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: #f0f6ff;
  border: 1px solid #c9e1ff;
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s;
}
.btn-download:hover:not(:disabled) { background: #dcebff; }
.btn-download:disabled { opacity: .55; cursor: not-allowed; }

.empty-area {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-sub);
  font-size: 15px;
}
.empty-area::before { content: "🔍"; display: block; font-size: 40px; margin-bottom: 14px; }

.footer {
  margin-top: 40px;
  text-align: center;
  font-size: 12px;
  color: #9aa1a9;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
  background: rgba(24, 29, 36, 0.92);
  color: #fff;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 8px;
  z-index: 999;
  white-space: nowrap;
}

.hidden { display: none !important; }

@media (max-width: 760px) {
  .file-grid { grid-template-columns: repeat(2, 1fr); }
}
