@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0d0d0d;
  --surface: #141414;
  --surface-2: #1a1a1a;
  --border: #2a2a2a;
  --border-bright: #3d3d3d;
  --text: #f5f5f5;
  --text-dim: #888;
  --text-dimmer: #555;
  --acid: #d4f53c;        /* the one pop of color - acid yellow-green */
  --acid-dark: #a8c22e;
  --red: #ff4444;
  --mono: 'Space Mono', 'Courier New', monospace;
  --sans: 'Space Grotesk', system-ui, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  padding: 40px 20px 80px;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 680px;
}

/* ── HEADER ── */
header {
  margin-bottom: 48px;
}

.header-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--acid);
  margin-bottom: 12px;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 14px;
}

h1 span {
  color: var(--acid);
}

.tagline {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  border-left: 2px solid var(--border-bright);
  padding-left: 12px;
  line-height: 1.6;
}

/* ── SECTIONS ── */
.section {
  margin-bottom: 24px;
}

.section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  margin-bottom: 10px;
}

/* ── DROPZONE ── */
.dropzone-wrap {
  border: 2px solid var(--border-bright);
  background: var(--surface);
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
  overflow: hidden;
}

.dropzone-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(212, 245, 60, 0.02) 8px,
    rgba(212, 245, 60, 0.02) 9px
  );
  pointer-events: none;
}

.dropzone-wrap.dragover {
  border-color: var(--acid);
  background: #141f00;
}

.dz-big-text {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.dz-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 28px;
  line-height: 1.7;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 12px 24px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.12s;
  position: relative;
  white-space: nowrap;
}

.btn-acid {
  background: var(--acid);
  color: #0d0d0d;
  border-color: var(--acid);
}

.btn-acid:hover {
  background: transparent;
  color: var(--acid);
}

.btn-acid:active {
  transform: translate(2px, 2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--border-bright);
}

.btn-outline:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.btn-full {
  width: 100%;
  padding: 16px;
  font-size: 16px;
}

/* ── APP INFO CARD ── */
.app-card {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.app-icon-wrap {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border: 1px solid var(--border-bright);
  overflow: hidden;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-details {
  flex: 1;
  min-width: 0;
}

.app-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.app-attrs {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  line-height: 1.5;
}

.attr-pill {
  padding: 2px 8px;
  border: 1px solid var(--border-bright);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.pill-ok {
  border-color: var(--acid);
  color: var(--acid);
}

.pill-warn {
  border-color: #ffaa00;
  color: #ffaa00;
}

.pill-pointless {
  border-color: #8892b0;
  color: #a8b2d1;
}

.pill-split {
  border-color: #38bdf8;
  color: #38bdf8;
}

.pill-complex {
  border-color: #ff3366;
  color: #ff3366;
  background: rgba(255, 51, 102, 0.08);
}

.pill-wear {
  border-color: #00f0ff;
  color: #00f0ff;
  background: rgba(0, 240, 255, 0.08);
}

.bundle-type-desc {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 8px;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

/* ── PRESETS ── */
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.preset-btn {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border: 1px solid var(--border-bright);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all 0.12s;
}

.preset-btn:hover {
  border-color: var(--acid);
  color: var(--acid);
  background: #141f00;
}

.preset-btn:active {
  transform: translate(1px, 1px);
}

/* ── SPLIT GROUPS ── */
.split-group {
  margin-bottom: 20px;
}

.group-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dimmer);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-subtag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--acid);
  text-transform: none;
  letter-spacing: 0.02em;
}

.group-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.lang-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 6px 2px;
  font-family: var(--mono);
  font-size: 11px;
}

.text-link-btn {
  background: none;
  border: none;
  color: var(--acid);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.12s;
}

.text-link-btn:hover {
  opacity: 0.75;
}

.text-sep {
  color: var(--text-dimmer);
  font-family: var(--mono);
  font-size: 10px;
}

.split-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.split-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: border-left-color 0.12s, background 0.12s;
}

.split-item:hover {
  background: var(--surface-2);
  border-left-color: var(--border-bright);
}

.split-item:has(.split-checkbox:checked) {
  border-left-color: var(--acid);
  background: #141f00;
}

.split-item.is-collapsed {
  display: none !important;
}

.split-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--acid);
  cursor: pointer;
  flex-shrink: 0;
}

.split-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.split-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.split-sub {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dimmer);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dimmer);
  padding: 8px 0;
}

/* ── OPTIONS ── */
.options-block {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.opt {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  cursor: pointer;
}

.opt input[type=checkbox] {
  margin-top: 3px;
  width: 15px;
  height: 15px;
  accent-color: var(--acid);
  cursor: pointer;
}

.opt-title {
  font-size: 13px;
  font-weight: 600;
}

.opt-desc {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dimmer);
  line-height: 1.6;
  margin-top: 2px;
}

/* ── PROGRESS ── */
.progress-block {
  padding: 32px 0;
}

.progress-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 12px;
  min-height: 16px;
}

.progress-track {
  width: 100%;
  height: 4px;
  background: var(--border);
  overflow: hidden;
  margin-bottom: 20px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--acid);
  transition: width 0.2s ease;
}

.log-box {
  border: 1px solid var(--border);
  background: #000;
  padding: 14px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  max-height: 160px;
  overflow-y: auto;
  line-height: 1.7;
}

.log-box::-webkit-scrollbar {
  width: 4px;
}
.log-box::-webkit-scrollbar-track {
  background: #000;
}
.log-box::-webkit-scrollbar-thumb {
  background: var(--border-bright);
}

.log-line::before {
  content: '> ';
  color: var(--text-dimmer);
}

/* ── RESULT ── */
.result-block {
  padding: 40px 0;
  text-align: center;
}

.result-big {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.result-big em {
  color: var(--acid);
  font-style: normal;
}

.result-file {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 4px;
  word-break: break-all;
}

.result-size {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dimmer);
  margin-bottom: 28px;
}

.btn-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── DIVIDER ── */
.rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ── MISC ── */
code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 1px 5px;
  border: 1px solid var(--border);
}

