/* ===== RESET ===== */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
}

/* ===== THEME ===== */
:root {
  --bg: #f5f5f5;
  --card: #ffffff;
  --text: #111;
  --muted: #666;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --input-bg: #fff;
  --btn-bg: #000;
  --btn-text: #fff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --card: #171a21;
    --text: #e6e6e6;
    --muted: #9aa0a6;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
    --input-bg: #1f232b;
    --btn-bg: #fff;
    --btn-text: #000;
  }
}

/* ===== BODY ===== */
body {
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
}

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: 600px;
  background: var(--card);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* ===== TITLE ===== */
h2 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 20px;
}

/* ===== FORM ===== */
form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===== INPUTS ===== */
input[type="file"],
input[type="text"] {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 14px;
}

/* ===== BUTTON ===== */
button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: var(--btn-bg);
  color: var(--btn-text);
  cursor: pointer;
  font-size: 14px;
  transition:
    opacity 0.2s ease,
    transform 0.1s ease;
}

button:hover {
  opacity: 0.85;
}

button:active {
  transform: scale(0.97);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== RESULT ===== */
#result {
  margin-top: 15px;
  padding: 12px;
  border-radius: 8px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .container {
    padding: 15px;
  }
}

/* ===== BULK UPLOAD ===== */

.progress-wrap {
  width: 100%;
  height: 18px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 15px;
  margin-bottom: 15px;
}

#progressBar {
  width: 0%;
  height: 100%;
  background: #4ade80;
  transition:
    width 0.25s ease,
    opacity 0.2s ease;

  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );

  background-size: 30px 30px;
}

#uploadStatus {
  margin-top: 15px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  font-family: monospace;
  overflow-wrap: anywhere;
}

/* ===== FILE LIST ===== */

#fileList {
  margin-top: 15px;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--input-bg);
}

.file-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.file-item:last-child {
  border-bottom: none;
}
