html,
body {
  margin: 0;
  padding: 0;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Ubuntu,
    Cantarell,
    Noto Sans,
    Helvetica,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  background: #0a0a0f;
  color: #ffffff;
  min-height: 100vh;
  position: relative;
}

body {
  display: flex;
  flex-direction: column;
}
.container {
  width: min(960px, 92%);
  margin: 0 auto;
}
h1,
h2 {
  font-weight: 600;
}
/* Hero Section */
.hero-section {
  text-align: center;
  padding: 1.5rem 0;
  max-width: 1500px;
  margin: 0;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: #ffffff;
  letter-spacing: -0.05em;
  padding: 1.5rem 2rem;
  border: 1px solid transparent;
  border-radius: 16px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02)
  );
  position: relative;
  backdrop-filter: blur(10px);
}

.hero-title::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  background: linear-gradient(135deg, #ff6b35, #f7931e, #ffdc00, #00d4aa);
  border-radius: 16px;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  opacity: 0.5;
}

.hero-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 3rem 0;
  line-height: 1.6;
  padding: 0.5rem 0.8rem;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.01)
  );
  backdrop-filter: blur(8px);
  position: relative;
}

.hero-subtitle::after {
  content: "↓";
  position: absolute;
  bottom: -3rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  color: rgba(255, 107, 53, 0.7);
}

/* Input Section */
.input-section {
  margin-bottom: 4rem;
  width: 100%;
}

.decode-form {
  display: flex;
  gap: 0.5rem;
  max-width: 1000px;
  margin: 0 auto;
  align-items: stretch;
}

/* Amboss-style search container */
.input-shell {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.08),
    rgba(247, 147, 30, 0.05)
  );
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 24px 28px;
  transition: all 0.3s ease;
  flex: 1;
  position: relative;
  backdrop-filter: blur(10px);
}

.input-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  background: linear-gradient(135deg, #ff6b35, #f7931e, #ffdc00, #00d4aa);
  border-radius: 16px;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.input-shell:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.1),
    rgba(247, 147, 30, 0.1)
  );
  border-color: rgba(255, 107, 53, 0.4);
}

.input-shell:hover::before {
  opacity: 1;
}

.input-shell:focus-within {
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.15),
    rgba(247, 147, 30, 0.15)
  );
  border-color: rgba(255, 107, 53, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.input-shell:focus-within::before {
  opacity: 1;
}

.decode-input {
  flex: 1;
  padding: 0;
  font-size: 20px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.decode-input::placeholder {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
}

.decode-input:focus {
  outline: none;
}

.decode-button {
  width: 64px;
  height: 64px;
  padding: 0;
  font-size: 26px;
  font-weight: 400;
  color: white;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.08),
    rgba(247, 147, 30, 0.05)
  );
  border: 2px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.decode-button::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  background: linear-gradient(135deg, #ff6b35, #f7931e, #ffdc00, #00d4aa);
  border-radius: 16px;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.decode-button:hover {
  transform: translateY(-2px) scale(1.05);
  background: linear-gradient(135deg, #ff6b35, #f7931e, #ffdc00);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
  border-color: rgba(255, 107, 53, 0.6);
}

.decode-button:hover::before {
  opacity: 1;
}

.decode-button:active {
  transform: translateY(0) scale(0.98);
}

#storm-terminal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  opacity: 0.2;
  pointer-events: none;
  margin: 0;
  padding: 0;
  line-height: 1;
  font-size: 17px;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  white-space: pre;
  background: transparent;
  color: #cbd5e1;
  overflow: hidden;
  box-sizing: border-box;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
    padding: 1rem 1.5rem;
  }

  .decode-form {
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem;
  }

  .input-shell {
    padding: 20px 24px;
  }

  .decode-button {
    width: 100%;
    height: 56px;
    font-size: 22px;
  }
}

#json {
  white-space: pre-wrap;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  background: #0b0e14;
  color: #e6e6e6;
  padding: 12px 14px;
  border-radius: 6px;
  overflow-x: auto;
}

/* Table styling to match input background */
.invoice-table,
.offer-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.08),
    rgba(247, 147, 30, 0.05)
  );
  border: 2px solid transparent;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.invoice-table::before,
.offer-table::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  background: linear-gradient(135deg, #ff6b35, #f7931e, #ffdc00, #00d4aa);
  border-radius: 16px;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  opacity: 0.3;
  pointer-events: none;
}

.invoice-table th,
.offer-table th {
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.15),
    rgba(247, 147, 30, 0.1)
  );
  color: #ffffff;
  font-weight: 600;
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 107, 53, 0.3);
  font-size: 1rem;
}

.invoice-table td,
.offer-table td {
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  vertical-align: top;
  line-height: 1.5;
}

.invoice-table tr:last-child td,
.offer-table tr:last-child td {
  border-bottom: none;
}

.invoice-table td:first-child,
.offer-table td:first-child {
  font-weight: 700;
  color: #ffffff;
  width: 200px;
  min-width: 200px;
}

.invoice-table td:last-child,
.offer-table td:last-child {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.9rem;
  word-break: break-all;
}

/* Route hint and path styling */
.route-hint,
.path-details {
  margin: 0.5rem 0;
  padding: 0.8rem;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02)
  );
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hop,
.path-item {
  margin: 0.3rem 0;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border-left: 3px solid rgba(255, 107, 53, 0.6);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Nested path table */
.path-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.85rem;
  table-layout: fixed;
}

.path-table th {
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.2),
    rgba(247, 147, 30, 0.15)
  );
  color: #ffffff;
  font-weight: 700;
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 107, 53, 0.4);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.path-table td {
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  vertical-align: top;
  line-height: 1.3;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  word-break: break-all;
  font-size: 0.75rem;
}

.path-table tr:last-child td {
  border-bottom: none;
}

/* Fix for nested blinded hops table */
.path-table .path-table {
  margin: 0.2rem 0;
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.path-table .path-table th {
  padding: 0.4rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.15),
    rgba(247, 147, 30, 0.1)
  );
}

.path-table .path-table td {
  padding: 0.3rem 0.6rem;
  font-size: 0.7rem;
  line-height: 1.2;
}

/* Responsive table styling */
@media (max-width: 768px) {
  .invoice-table,
  .offer-table {
    font-size: 0.9rem;
  }

  .invoice-table th,
  .offer-table th,
  .invoice-table td,
  .offer-table td {
    padding: 0.6rem 1rem;
  }

  .invoice-table td:first-child,
  .offer-table td:first-child {
    width: 120px;
    min-width: 120px;
  }

  .path-table {
    font-size: 0.7rem;
  }

  .path-table th {
    padding: 0.4rem 0.5rem;
    font-size: 0.65rem;
  }

  .path-table td {
    padding: 0.3rem 0.5rem;
    font-size: 0.6rem;
  }

  .path-table .path-table th {
    padding: 0.3rem 0.4rem;
    font-size: 0.6rem;
  }

  .path-table .path-table td {
    padding: 0.2rem 0.4rem;
    font-size: 0.55rem;
  }
}

/* Link styling in tables */
.invoice-table a,
.offer-table a {
  color: rgba(255, 107, 53, 0.9);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.invoice-table a:hover,
.offer-table a:hover {
  color: rgba(255, 107, 53, 1);
  text-decoration: none;
}

/* Timestamp display styling */
.time-display {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.utc-time {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.seconds-info,
.unix-time {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-style: italic;
}

/* Expiry status styling */
.expiry-status {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  display: inline-block;
  min-width: 80px;
  text-align: center;
}

.expiry-status.valid {
  background: linear-gradient(
    135deg,
    rgba(0, 212, 170, 0.2),
    rgba(0, 212, 170, 0.1)
  );
  color: rgba(0, 212, 170, 0.9);
  border: 1px solid rgba(0, 212, 170, 0.3);
}

.expiry-status.expired {
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.2),
    rgba(255, 107, 53, 0.1)
  );
  color: rgba(255, 107, 53, 0.9);
  border: 1px solid rgba(255, 107, 53, 0.3);
}

.expired-info {
  color: rgba(255, 107, 53, 0.8);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.2rem;
}

.valid-info {
  color: rgba(0, 212, 170, 0.8);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.2rem;
}

/* Route hint and hop link styling */
.route-hint a,
.hop a {
  color: rgba(255, 107, 53, 0.9);
  text-decoration: underline;
  transition: color 0.3s ease;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.route-hint a:hover,
.hop a:hover {
  color: rgba(255, 107, 53, 1);
  text-decoration: none;
}

/* Query page header styling */
.query-header {
  position: relative;
  z-index: 10;
  width: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.back-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.08),
    rgba(247, 147, 30, 0.05)
  );
  border: 1px solid rgba(255, 107, 53, 0.3);
  color: rgba(255, 107, 53, 0.9);
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.back-arrow:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.15),
    rgba(247, 147, 30, 0.1)
  );
  border-color: rgba(255, 107, 53, 0.6);
  color: rgba(255, 107, 53, 1);
  transform: translateX(-2px);
}

.query-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.05em;
}

/* Mobile responsive for query header */
@media (max-width: 768px) {
  .query-title {
    font-size: 1.5rem;
  }

  .back-arrow {
    width: 36px;
    height: 36px;
  }
}

/* Original input display styling */
.original-input-section {
  margin-top: 2rem;
  padding: 1rem;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.original-input-section h4 {
  margin: 0 0 0.8rem 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  font-weight: 600;
}

.input-display {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.8rem;
}

.input-text {
  flex: 1;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  word-break: break-all;
  line-height: 1.4;
  max-height: 100px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.copy-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-radius: 6px;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.08),
    rgba(247, 147, 30, 0.05)
  );
  color: rgba(255, 107, 53, 0.9);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.copy-button:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.15),
    rgba(247, 147, 30, 0.1)
  );
  border-color: rgba(255, 107, 53, 0.6);
  color: rgba(255, 107, 53, 1);
  transform: scale(1.05);
}

.copy-button.copy-success {
  background: linear-gradient(
    135deg,
    rgba(0, 212, 170, 0.15),
    rgba(0, 212, 170, 0.08)
  );
  border-color: rgba(0, 212, 170, 0.6);
  color: rgba(0, 212, 170, 1);
}

/* Mobile responsive for input display */
@media (max-width: 768px) {
  .original-input-section {
    margin-top: 1.5rem;
    padding: 0.8rem;
  }

  .input-text {
    font-size: 0.75rem;
    max-height: 80px;
  }

  .copy-button {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }
}

/* Footer Styling */
footer {
  position: relative;
  z-index: 10;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.footer-content {
  width: min(960px, 92%);
  margin: 0 auto;
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

footer small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.github-link {
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.3s ease;
  text-decoration: none;
}

.github-link:hover {
  color: rgba(255, 107, 53, 0.8);
}

/* Sub-value styling (for secondary amounts and timestamps) */
.sub-value {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  font-style: italic;
  margin-left: 0.5rem;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}
