:root {
  --bg: #d1feff;
  --panel: #ffffff;
  --text: #1f2430;
  --muted: #355369;
  --line: #a7e8f0;
  --accent: #156fbe;
  --accent-hover: #0f5e9f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at top right, #8fd9ff 0%, transparent 40%),
    radial-gradient(circle at bottom left, #ffffff 0%, transparent 34%),
    var(--bg);
  color: var(--text);
}

.container {
  width: min(920px, 92vw);
  margin: 2rem auto;
}

h1 {
  margin-bottom: 0.2rem;
}

.subtitle {
  margin-top: 0;
  color: var(--muted);
}

.back-link {
  display: inline-block;
  margin-bottom: 0.6rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
}

.label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

input[type="file"],
select,
button {
  font: inherit;
}

input[type="file"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
  align-items: end;
}

select {
  min-width: 180px;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

button {
  padding: 0.56rem 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

button:hover {
  background: var(--accent-hover);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.secondary {
  background: #dff0fd;
  color: #0f5e9f;
}

.secondary:hover {
  background: #cde7fb;
}

.danger {
  background: #c23030;
}

.danger:hover {
  background: #a72626;
}

.hint,
.empty {
  color: var(--muted);
  font-size: 0.92rem;
}

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.file-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--line);
}

.file-list li:last-child {
  border-bottom: 0;
}

.name {
  word-break: break-word;
}

.meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.download {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.download:hover {
  text-decoration: underline;
}

.file-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.results-header h2 {
  margin: 0;
}

.remove-btn {
  padding: 0.35rem 0.65rem;
  background: #f5d8d8;
  color: #612020;
}

.remove-btn:hover {
  background: #efc7c7;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 20;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 23, 37, 0.48);
}

.modal-card {
  position: relative;
  width: min(420px, 92vw);
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 1rem;
  box-shadow: 0 18px 50px rgba(10, 20, 35, 0.28);
}

.modal-card h2 {
  margin: 0;
}

.modal-text {
  color: var(--muted);
  margin-top: 0.6rem;
  margin-bottom: 0.9rem;
}

.modal-actions {
  display: flex;
  gap: 0.6rem;
}
