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

:root {
  --void: #020203;
  --panel: #0B0712;
  --panel-edge: #19131f;
  --crimson: #7A1530;
  --amber: #FF8A3D;
  --white-hot: #FFF6E8;
  --text: #E8E6F0;
  --text-dim: #8A8398;
  --mono: 'JetBrains Mono', monospace;
  --display: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--body);
  min-height: 100vh;
  overflow-x: hidden;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 20px 100px;
}

header.eyebrow {
  text-align: center;
  margin-bottom: 6px;
}

header.eyebrow .tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 6vw, 42px);
  text-align: center;
  margin: 8px 0 6px;
  letter-spacing: -0.01em;
}

p.sub {
  text-align: center;
  color: var(--text-dim);
  max-width: 480px;
  margin: 0 auto 40px;
  font-size: 15px;
  line-height: 1.55;
}

/* The singularity / drop zone */

.singularity-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 380px;
  margin: 0 auto;
  border-radius: 50%;
  cursor: pointer;
  outline: none;
}

.singularity-frame canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}

.singularity-frame.dragover canvas {
  box-shadow: 0 0 0 2px var(--amber), 0 0 60px rgba(255,138,61,0.35);
}

.singularity-frame:focus-visible canvas {
  box-shadow: 0 0 0 2px var(--white-hot);
}

.drop-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  padding: 0 30%;
  line-height: 1.5;
}

input[type=file] { display: none; }

/* Mode selector */

.modes {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 36px 0 8px;
  flex-wrap: wrap;
}

.mode-btn {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  color: var(--text-dim);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-btn:hover { color: var(--text); border-color: var(--amber); }

.mode-btn.active {
  color: var(--void);
  background: linear-gradient(135deg, var(--amber), var(--white-hot));
  border-color: transparent;
}

.mode-desc {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  max-width: 420px;
  margin: 0 auto 8px;
  min-height: 18px;
}

.ttl-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

.ttl-row select {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--panel-edge);
  border-radius: 6px;
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 12px;
}

/* Certificate panel */

.certificate {
  margin-top: 40px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 10px;
  padding: 22px 24px;
  display: none;
}

.certificate.show { display: block; }

.certificate .cert-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
}

.certificate .cert-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-top: 1px solid var(--panel-edge);
  font-size: 13px;
}

.certificate .cert-row:first-of-type { border-top: none; }

.certificate .cert-row .k { color: var(--text-dim); }

.certificate .cert-row .v {
  font-family: var(--mono);
  font-size: 12.5px;
  word-break: break-all;
  text-align: right;
}

.certificate .cert-row .v.link {
  color: var(--amber);
  cursor: pointer;
  text-decoration: underline;
}

.certificate .cert-note {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.5;
}

.copy-btn {
  margin-top: 14px;
  width: 100%;
  background: transparent;
  border: 1px solid var(--panel-edge);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}

.copy-btn:hover { border-color: var(--amber); color: var(--amber); }

.status {
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  min-height: 18px;
  margin-top: 18px;
}

.status.error { color: #ff6b6b; }

/* Retrieve mode */

.retrieve-panel {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 10px;
  padding: 24px;
  margin-top: 24px;
}

.batch-list {
  max-height: 220px;
  overflow-y: auto;
  margin-top: 10px;
  border-top: 1px solid var(--panel-edge);
}

.batch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--panel-edge);
  font-size: 12.5px;
}

.batch-row .name {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 55%;
}

.batch-row .hash {
  font-family: var(--mono);
  color: var(--text-dim);
  font-size: 11.5px;
}

.batch-row .action {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--amber);
  cursor: pointer;
  text-decoration: underline;
  white-space: nowrap;
}

.log-section {
  margin-top: 40px;
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.log-sub {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  opacity: 0.7;
}

.log-list {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 10px;
  padding: 6px 18px;
  max-height: 240px;
  overflow-y: auto;
}

.log-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--panel-edge);
  font-family: var(--mono);
  font-size: 11.5px;
}

.log-row:last-child { border-bottom: none; }

.log-row .lh { color: var(--text-dim); }
.log-row .lm { color: var(--amber); }
.log-row .lt { color: var(--text-dim); opacity: 0.7; }

.log-empty {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  padding: 18px 0;
}

.delete-note {
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  margin: 10px auto 0;
  max-width: 420px;
  line-height: 1.5;
}

.delete-note.on { color: var(--amber); }

footer {
  text-align: center;
  margin-top: 60px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.6;
}

footer a {
  color: var(--amber);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}