:root {
  --bg: #07111c;
  --bg-deep: #04111a;
  --panel: rgba(8, 21, 33, 0.78);
  --panel-strong: rgba(10, 28, 43, 0.92);
  --line: rgba(141, 206, 255, 0.16);
  --text: #eff8ff;
  --muted: #9cb7c7;
  --accent: #ffb000;
  --accent-2: #6fe4ff;
  --accent-3: #ff6b6b;
  --success: #8af0bf;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(255, 176, 0, 0.16), transparent 30%),
    radial-gradient(circle at 85% 18%, rgba(111, 228, 255, 0.18), transparent 32%),
    linear-gradient(180deg, #081018 0%, #04111a 100%);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, sans-serif;
  overflow-x: hidden;
}

code,
textarea,
pre,
.pill,
.ghost-btn,
.primary-btn,
.upload,
.badge,
.context-tag {
  font-family: "IBM Plex Mono", monospace;
}

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(50px);
  opacity: 0.4;
}

.glow-one {
  width: 24rem;
  height: 24rem;
  top: -6rem;
  left: -5rem;
  background: rgba(255, 176, 0, 0.3);
}

.glow-two {
  width: 28rem;
  height: 28rem;
  right: -7rem;
  top: 20%;
  background: rgba(111, 228, 255, 0.24);
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 85%);
}

.shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
  position: relative;
  z-index: 1;
}

.hero {
  padding: 2rem 0 2.5rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(2.1rem, 4.8vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.lede {
  margin: 1.25rem 0 0;
  max-width: 60rem;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.5vw, 1.08rem);
  line-height: 1.7;
}

.privacy-banner,
.privacy-note {
  color: var(--text);
  border: 1px solid rgba(138, 240, 191, 0.2);
  background: linear-gradient(135deg, rgba(138, 240, 191, 0.12), rgba(111, 228, 255, 0.06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.privacy-banner {
  margin: 1.25rem 0 0;
  max-width: 48rem;
  padding: 0.95rem 1.1rem;
  border-radius: 18px;
  line-height: 1.65;
  font-size: 0.98rem;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 1.25rem;
  align-items: start;
}

.input-panel {
  align-self: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  padding: 1.25rem;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.quick-actions,
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.field-label,
.helper-text,
.location-value,
.decoded-value,
.summary-label {
  color: var(--muted);
}

.field-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 19rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(3, 12, 21, 0.9);
  color: var(--text);
  padding: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  outline: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

textarea:focus {
  border-color: rgba(111, 228, 255, 0.5);
  transform: translateY(-1px);
}

.ghost-btn,
.primary-btn,
.upload {
  border-radius: 999px;
  padding: 0.85rem 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
}

.ghost-btn:hover,
.primary-btn:hover,
.upload:hover {
  transform: translateY(-1px);
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), #ff7a18);
  color: #0f1820;
  font-weight: 700;
}

.upload {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(111, 228, 255, 0.08);
  border-color: rgba(111, 228, 255, 0.22);
  color: var(--text);
}

.upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.helper-text {
  min-height: 1.5rem;
  margin: 0.9rem 0 0;
  font-size: 0.92rem;
}

.privacy-note {
  margin: 0.85rem 0 0;
  padding: 0.8rem 0.95rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.pill,
.badge,
.context-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.73rem;
  white-space: nowrap;
}

.pill {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.summary-card {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.summary-card strong {
  display: block;
  margin-top: 0.35rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.results {
  display: grid;
  gap: 0.9rem;
}

.empty-state,
.result-card {
  border-radius: 24px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: var(--panel-strong);
}

.empty-state {
  color: var(--muted);
  line-height: 1.7;
}

.result-topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.badge {
  background: rgba(255, 107, 107, 0.14);
  color: #ffb4b4;
  border: 1px solid rgba(255, 107, 107, 0.25);
}

.context-tag {
  background: rgba(111, 228, 255, 0.12);
  color: var(--accent-2);
  border: 1px solid rgba(111, 228, 255, 0.2);
}

.raw-value {
  margin: 0.85rem 0 0.35rem;
  font-size: 1.05rem;
  word-break: break-word;
}

.decoded-value,
.location-value {
  margin: 0.3rem 0;
  line-height: 1.6;
}

.snippet {
  margin: 0.9rem 0 0;
  padding: 0.85rem;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--success);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
}

@media (max-width: 960px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 1rem, 1180px);
    padding-top: 1.5rem;
  }

  .panel {
    border-radius: 22px;
    padding: 1rem;
  }

  .panel-header,
  .result-topline {
    flex-direction: column;
    align-items: flex-start;
  }

  .summary {
    grid-template-columns: 1fr;
  }

  textarea {
    min-height: 15rem;
  }
}
