*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0c0c0c;
  --surface: #121212;
  --card: #181818;
  --card2: #1e1e1e;
  --border: #222222;
  --border2: #2c2c2c;
  --green: #10b981;
  --green-d: #059669;
  --green-bg: #061510;
  --green-glow: rgba(16, 185, 129, 0.1);
  --text: #e4e4e4;
  --text-muted: #666;
  --text-dim: #3a3a3a;
  --radius: 8px;
}

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.5;
}

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 4px;
}

a {
  text-decoration: none;
  color: inherit;
}

/* NAVBAR */
.navbar {
  height: 50px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.brand-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.brand-sep {
  width: 1px;
  height: 16px;
  background: var(--border2);
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-free {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 4px;
  padding: 2px 8px;
  letter-spacing: 0.5px;
}

.btn-explore {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 5px 12px;
  background: var(--card);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.btn-explore:hover {
  color: var(--text);
  border-color: var(--border2);
  background: var(--card2);
}

/* HERO */
.hero {
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--surface);
}

.hero-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.6px;
  line-height: 1.15;
  margin-bottom: 6px;
}

.hero-title span {
  color: var(--green);
}

.hero-desc {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  max-width: 440px;
  line-height: 1.6;
}

.hero-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.stat {
  text-align: center;
}

.stat-n {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 2px;
}

.stat-l {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-sep {
  width: 1px;
  height: 32px;
  background: var(--border2);
}

.btn-cta {
  font-size: 13px;
  font-weight: 600;
  color: #000;
  background: var(--green);
  border: none;
  border-radius: var(--radius);
  padding: 9px 18px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.15s;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.25);
}

.btn-cta:hover {
  background: var(--green-d);
  transform: translateY(-1px);
}

/* COMMITMENT BAR */
.commit-bar {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 0;
  overflow-x: auto;
}

.commit-bar::-webkit-scrollbar {
  display: none;
}

.ci {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 8px 0;
  margin-right: 16px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  border-right: 1px solid var(--border);
}

.ci:last-child {
  border-right: none;
}

.ci-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

/* FILE TYPE TOP BAR */
.type-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 2px;
  overflow-x: auto;
  flex-shrink: 0;
}

.type-bar::-webkit-scrollbar {
  display: none;
}

.type-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
  position: relative;
}

.type-tab:hover {
  color: var(--text);
}

.type-tab.active {
  color: var(--text);
  border-bottom-color: var(--green);
}

.type-tab .ext {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.type-tab .cat-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cat-dot-pdf {
  background: #3b82f6;
}

.cat-dot-img {
  background: #10b981;
}

.cat-dot-sheet {
  background: #f59e0b;
}

.cat-dot-json {
  background: #14b8a6;
}

.cat-dot-text {
  background: #a78bfa;
}

.type-tab .count {
  font-size: 10px;
  color: var(--text-dim);
  background: var(--card2);
  border-radius: 3px;
  padding: 1px 5px;
  font-family: 'JetBrains Mono', monospace;
}

.type-tab.active .count {
  background: var(--green-bg);
  color: var(--green);
}

.type-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 4px;
}

/* MAIN BODY */
.body-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: calc(100vh - 240px);
}

/* LEFT: UPLOAD */
.upload-col {
  border-right: 1px solid var(--border);
  padding: 24px;
  background: var(--bg);
  position: sticky;
  top: 50px;
  height: calc(100vh - 50px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.upload-col-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.drop-zone {
  border: 1.5px dashed var(--border2);
  border-radius: 10px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--surface);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.drop-zone:hover,
.drop-zone.over {
  border-color: var(--green);
  background: var(--green-bg);
}

.drop-zone input {
  display: none;
}

.dz-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--card2);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.dz-icon svg {
  opacity: 0.5;
}

.dz-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.dz-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.dz-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green);
  color: #000;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  margin-top: 4px;
}

.dz-btn:hover {
  background: var(--green-d);
}

.dz-formats {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.6;
}

.dz-privacy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 4px;
  padding: 4px 10px;
}

/* RIGHT: ACTIONS */
.actions-col {
  padding: 24px;
  background: var(--bg);
  overflow-y: auto;
}

.fmt-panel {
  display: none;
  animation: fadeIn 0.2s ease;
}

.fmt-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 5px;
  padding: 3px 10px;
  display: inline-block;
  margin-bottom: 8px;
}

.panel-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.4px;
  margin-bottom: 4px;
}

.panel-desc {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 440px;
}

.panel-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 5px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.action-group {
  margin-bottom: 24px;
}

.action-group-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.ac {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ac:hover {
  background: var(--card2);
  border-color: var(--border2);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.ac-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
}

.tag-green {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.tag-blue {
  background: #0a1428;
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.tag-orange {
  background: #1e1508;
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.tag-purple {
  background: #130f1e;
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, 0.2);
}

.tag-teal {
  background: #071515;
  color: #14b8a6;
  border: 1px solid rgba(20, 184, 166, 0.2);
}

.tag-op {
  background: #0f0f1e;
  color: #818cf8;
  border: 1px solid rgba(129, 140, 248, 0.2);
}

.tag-out {
  background: var(--card2);
  color: var(--text-muted);
  border: 1px solid var(--border2);
}

.tag-arrow {
  color: var(--text-dim);
  font-size: 11px;
}

.ac-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 7px;
}

.footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.footer-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  font-size: 11px;
  color: var(--text-dim);
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--green);
}

.footer-copy {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .body-grid {
    grid-template-columns: 1fr;
  }

  .upload-col {
    position: relative;
    top: 0;
    height: auto;
  }

  .hero-right {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero {
    flex-direction: column;
  }

  .type-tab .count {
    display: none;
  }
}