/* MAG Uploader — dark HUD aesthetic, matching the MAG tools (task-manager).
   Palette: bg #0b0b0c, surface #121214, line #1f1f23, accent #ff6a00.
   Fonts: Inter (body), Rajdhani (display/labels), JetBrains Mono (paths). */

:root {
  --bg: #0b0b0c;
  --surface: #121214;
  --surface-2: #17171a;
  --line: #1f1f23;
  --line-2: #2a2a30;
  --fg: #e6e6e6;
  --muted: #8a8a93;
  --accent: #ff6a00;
  --accent-weak: rgba(255, 106, 0, 0.14);
  --danger: #ff6b6b;
  --radius: 0.65rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.6 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Rajdhani", "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
h2 { font-size: 22px; }
h3 { font-size: 17px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header — branded HUD bar */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
header h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}
header img { height: 26px; width: auto; display: block; }
header .wordmark {
  font-family: "Rajdhani", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 600;
  font-size: 15px;
  color: var(--muted);
  padding-left: 12px;
  border-left: 1px solid var(--line-2);
}
#whoami { font-size: 12.5px; color: var(--muted); font-family: "JetBrains Mono", ui-monospace, monospace; }
.logout {
  font: 600 12px/1 "Rajdhani", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 7px 12px;
}
.logout:hover { color: #fff; border-color: var(--accent); text-decoration: none; }

main { padding: 28px 24px; max-width: 960px; margin: 0 auto; }

/* Section heading with an accent tick (HUD divider) */
h3 { position: relative; padding-left: 14px; }
h3::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 16px;
  background: var(--accent);
  border-radius: 2px;
}

/* Buttons */
button {
  font: 600 14px/1 "Inter", sans-serif;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s, background .15s, transform .05s;
}
button:hover {
  box-shadow: 0 0 0 1px rgba(255, 106, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 22px rgba(255, 106, 0, 0.18);
}
button:active { transform: translateY(1px); }
button.secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-2);
}
button.secondary:hover { border-color: var(--accent); box-shadow: none; color: #fff; }
button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* Inputs */
input[type=text], input[type=number] {
  font: inherit;
  padding: 9px 11px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--fg);
}
input[type=text]:focus, input[type=number]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-weak);
}
input[type=text]::placeholder { color: #5c5c64; }
input[type=file] { color: var(--muted); font-size: 13px; max-width: 320px; }
input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }
label { color: var(--fg); }

/* Cards */
.card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 16px;
  margin: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card:hover { border-color: var(--line-2); }

.row { display: flex; gap: 10px; align-items: center; }
.muted { color: var(--muted); font-size: 13px; }
.error { color: var(--danger); }

/* Path tree */
.tree { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; line-height: 1.8; color: #c9c9d0; }
.tree .dir { font-weight: 600; color: var(--fg); }

/* Thumbnails — uniform tiles: image + copy button only */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 12px; }
.thumb {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.thumb { position: relative; }
.thumb:hover { border-color: var(--line-2); }
.thumb img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  background: #0e0e10;
  border-radius: 6px;
  cursor: zoom-in;
}
.thumb button { padding: 7px 10px; font-size: 12px; }
.thumb-check {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 4px;
  padding: 2px 4px;
  line-height: 0;
}
.thumb-check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

button.danger { border-color: rgba(255, 107, 107, 0.5); color: var(--danger); background: transparent; }
button.danger:hover { border-color: var(--danger); background: rgba(255, 107, 107, 0.12); color: var(--danger); box-shadow: none; }

/* Lightbox — click a thumbnail to expand */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.86);
  cursor: zoom-out;
}
.lightbox.hidden { display: none; }
.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
}

/* Progress bar */
.bar { height: 8px; background: var(--line); border-radius: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

/* Diff table */
table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
td, th { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); }
th {
  font-family: "Rajdhani", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--muted);
}

/* Status tags */
.tag {
  font: 600 11px/1 "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 7px;
  border-radius: 5px;
}
.tag.new { background: rgba(33, 195, 110, 0.16); color: #4ade80; }
.tag.overwrite { background: rgba(255, 176, 32, 0.16); color: #fbbf24; }
.tag.same { background: var(--line); color: var(--muted); }
.tag.blocked { background: rgba(255, 107, 107, 0.16); color: var(--danger); }
