.stego-page {
  --stego-green: #63d483;
  --stego-orange: #f2a900;
  --stego-purple: #bc83d9;
  --stego-cyan: #63dfe4;
  --stego-panel: rgba(24, 26, 28, .88);
  --stego-field: #121415;
  --background-color: #101112;
  --background-reverse-color: #f0f0f0;
  --text-color: var(--stego-green);
  --text-border: var(--stego-green);
  --file-color: var(--stego-orange);
  --file-border: var(--stego-orange);
  --nostr-color: var(--stego-purple);
  --nostr-border: var(--stego-purple);
  --cipher-color: var(--stego-cyan);
  --cipher-border: var(--stego-cyan);
  color: #e6e7e4;
  font-family: "Roboto Mono", monospace;
}

.stego-page .stego-app {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 92px;
  text-align: left;
}

.stego-app,
.stego-app * {
  box-sizing: border-box;
}

.stego-hero {
  margin-bottom: 44px;
  padding: 0 0 34px;
  border-bottom: 1px solid #3b3e40;
}

.stego-hero p {
  margin: 0 0 9px;
  color: var(--stego-orange);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.stego-hero h1 {
  margin: 0;
  color: #f1f2ee;
  font-size: clamp(2rem, 7vw, 4.4rem);
  font-weight: 400;
  line-height: 1.02;
}

.stego-hero > span {
  display: block;
  max-width: 630px;
  margin-top: 18px;
  color: #a9adae;
  font-size: .86rem;
  line-height: 1.75;
}

#helpIcon {
  position: fixed;
  top: max(22px, env(safe-area-inset-top));
  right: 22px;
  z-index: 2100;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #777d82;
  font: 400 1.25rem/1 "Roboto Mono", monospace;
  cursor: pointer;
}

#helpIcon:hover,
#helpIcon:focus-visible {
  color: var(--stego-orange);
  outline: none;
}

.stego-app h2,
.stego-app h3,
.stego-app h4,
.stego-app h5,
.stego-app h6 {
  letter-spacing: 0;
}

.stego-app > .sectionTitle,
.stego-app > h3,
.stego-app > h5,
.stego-app > .input-container,
.stego-app > .output-container,
.stego-app > #encodeButton,
.stego-app > #decodeButton {
  --section-color: var(--stego-green);
}

.stego-app .sectionTitle {
  margin: 0 0 8px;
  color: var(--section-color, var(--stego-green));
  font-size: clamp(1.45rem, 4vw, 2.25rem);
  font-weight: 500;
}

.stego-app h3 {
  margin: 30px 0 14px;
  color: #e6e7e4;
  font-size: 1rem;
  font-weight: 600;
}

.stego-app h5,
.stego-app h6 {
  margin: 22px 0 8px;
  color: #9da1a2;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.stego-app label {
  display: block;
  margin: 15px 0 7px;
  color: var(--section-color, var(--stego-green));
  font-size: .76rem;
  font-weight: 600;
}

.stego-app textarea,
.stego-app input,
.stego-app select,
.stego-app button {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #45494b;
  border-radius: 6px;
  background: var(--stego-field);
  color: #eceeea;
  font: inherit;
  font-size: .84rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, background 160ms ease;
}

.stego-app textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.55;
}

.stego-app input[type="file"] {
  padding: 8px;
  color: #aeb2b3;
}

.stego-app input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 10px;
  padding: 5px 10px;
  border: 1px solid #4a4e50;
  border-radius: 4px;
  background: #242729;
  color: #d8dad8;
  cursor: pointer;
}

.stego-app textarea:focus,
.stego-app input:focus,
.stego-app select:focus {
  outline: 0;
  border-color: var(--section-color, var(--stego-green));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--section-color, var(--stego-green)) 16%, transparent);
}

.stego-app button {
  margin-top: 14px;
  border-color: var(--section-color, var(--stego-green));
  color: var(--section-color, var(--stego-green));
  font-weight: 700;
  cursor: pointer;
}

.stego-app button:hover {
  background: color-mix(in srgb, var(--section-color, var(--stego-green)) 10%, #121415);
  box-shadow: 0 0 18px color-mix(in srgb, var(--section-color, var(--stego-green)) 15%, transparent);
}

.input-container,
.output-container,
.file-section,
.nostr-section,
.cipher-section {
  width: 100%;
  max-width: none;
}

.output-container {
  margin-top: 10px;
}

.nostr-recipient-preview {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 9px;
  padding: 9px;
  border: 1px solid color-mix(in srgb, var(--stego-purple) 55%, #45494b);
  border-radius: 6px;
  background: rgba(148, 87, 176, .08);
  color: #dfe2dd;
  font-size: .76rem;
  line-height: 1.35;
}

.nostr-recipient-preview[hidden],
.bunker-controls[hidden] {
  display: none;
}

.nostr-recipient-preview.is-error {
  grid-template-columns: 1fr;
  border-color: #b75252;
  color: #f1a6a6;
}

.nostr-recipient-avatar {
  width: 42px;
  height: 42px;
  border: 1px solid #555b5d;
  border-radius: 50%;
  object-fit: cover;
  background: #222628;
}

.nostr-recipient-name {
  display: block;
  overflow: hidden;
  color: var(--stego-purple);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nostr-recipient-nip05 {
  display: block;
  overflow: hidden;
  margin-bottom: 2px;
  color: #aeb2b3;
  font-size: .68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.private-key-warning {
  margin: 7px 0 0;
  color: #d9a26b;
  font-size: .7rem;
  line-height: 1.4;
}

.private-key-warning[hidden] {
  display: none;
}

.decode-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.decode-actions button {
  min-width: 0;
}

.stego-app .nostr-sign-button {
  border-color: var(--stego-purple);
  color: #c596dc;
}

.bunker-controls {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--stego-purple) 45%, #45494b);
  border-radius: 6px;
  background: rgba(10, 11, 12, .48);
}

.bunker-controls label {
  margin-top: 0;
  color: #c596dc;
}

.stego-app .amber-continue-button {
  width: auto;
  min-height: 38px;
  margin: 12px 0 0;
  padding: 8px 13px;
  border-color: var(--stego-purple);
  color: #d1a7e5;
}

@media (max-width: 620px) {
  .decode-actions {
    grid-template-columns: 1fr;
  }
}

.output,
.output-box {
  min-height: 74px;
  padding: 13px;
  overflow-wrap: anywhere;
  border: 1px dashed var(--section-color, var(--stego-green));
  border-radius: 5px;
  background: rgba(10, 11, 12, .55);
  color: #dfe2dd;
  font-family: system-ui, sans-serif;
  font-size: .86rem;
  line-height: 1.55;
}

.copy-container {
  display: flex;
  justify-content: flex-end;
}

.stego-app .copy-button {
  width: auto;
  min-height: 34px;
  margin: 7px 0 0;
  padding: 6px 12px;
  border: 0;
  background: var(--section-color, var(--stego-green));
  color: #0d0f10;
  font-size: .7rem;
}

.stego-app hr {
  height: 1px;
  margin: 30px 0;
  border: 0;
  background: #343739;
}

.multi-section-hr {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  height: 4px;
  margin: 36px 0;
  overflow: hidden;
  border-radius: 2px;
}

.section-link {
  cursor: pointer;
  transition: filter 160ms ease, transform 160ms ease;
}

.section-link:hover {
  filter: brightness(1.35);
  transform: scaleY(1.8);
}

.file-section,
.nostr-section,
.cipher-section {
  margin-top: 8px;
  padding: 6px 0;
}

.file-section { --section-color: var(--stego-orange); color: #d5d7d4; }
.nostr-section { --section-color: var(--stego-purple); color: #d5d7d4; }
.cipher-section { --section-color: var(--stego-cyan); color: #d5d7d4; opacity: 1; }

.file-section .sectionTitle,
.nostr-section .sectionTitle,
.cipher-section h2,
.file-section label,
.nostr-section label,
.cipher-section label {
  color: var(--section-color);
}

.file-section input,
.file-section textarea,
.nostr-section input,
.nostr-section textarea,
.cipher-section input,
.cipher-section textarea,
.cipher-section select {
  border-color: color-mix(in srgb, var(--section-color) 55%, #45494b);
}

#addRelayButton {
  width: 46px;
  min-height: 42px;
  padding: 0;
  font-size: 1.3rem;
}

#textTransformationMethod {
  appearance: auto;
  color: #e6e7e4;
  background: #121415;
}

#textTransformationMethod option,
#textTransformationMethod optgroup {
  color: #e6e7e4;
  background: #17191a;
}

.method-sequence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.method-bubble {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  color: #101112;
  font-size: .72rem;
}

.method-controls {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.method-controls button {
  margin: 0;
}

.thumbnail-container {
  width: 100%;
  margin-top: 14px;
  text-align: center;
}

.thumbnail-container img {
  display: none;
  max-height: 360px;
  margin: 0 auto;
  border: 1px solid var(--section-color, var(--stego-orange));
  border-radius: 5px;
}

#stegoDownloadLink,
#fileHiddenDownloadLink,
#imageHiddenDownloadLink {
  display: none;
  color: var(--stego-orange);
  font-size: .8rem;
}

.file-ready-output {
  min-height: 0;
  border-style: solid;
  border-color: color-mix(in srgb, var(--stego-orange) 48%, #45494b);
  color: #cfd2ce;
}

.file-section #stegoDownloadLink {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--stego-orange);
  border-radius: 6px;
  background: rgba(242, 169, 0, .09);
  color: var(--stego-orange);
  font-size: .78rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.loader {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 5000;
  padding: 12px 18px;
  transform: translate(-50%, -50%);
  border: 1px solid #4b4f51;
  border-radius: 6px;
  background: #121415;
  color: #f2a900;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}

#toastContainer {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  z-index: 5200;
  display: none;
  max-width: min(520px, calc(100% - 32px));
  padding: 11px 16px;
  transform: translateX(-50%);
  border: 1px solid #4b4f51;
  border-radius: 5px;
  background: #17191a;
  color: #eceeea;
  font-size: .78rem;
  text-align: center;
  opacity: 0;
  transition: opacity 200ms ease;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 4500;
  display: none;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  overflow-y: auto;
  background: rgba(4, 5, 6, .84);
  backdrop-filter: blur(8px);
}

#infoModal,
#obfuscationModal {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  overflow-y: auto;
  border-radius: 0;
}

.modal-content,
#obfuscationModal .modal-content {
  position: relative;
  width: min(720px, 100%) !important;
  max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  margin: auto !important;
  padding: 26px !important;
  overflow-y: auto;
  border: 1px solid #44484a !important;
  border-top: 2px solid var(--stego-orange) !important;
  border-radius: 7px;
  background: #151718 !important;
  color: #c8cbc8;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .66);
  font-size: .8rem;
  line-height: 1.7;
  text-align: left;
}

.modal-content h2,
.modal-content h3,
.modal-content h4 {
  color: #f2f3ef;
}

.modal-content a { color: var(--stego-orange); }
.modal-content code { color: #d6d8d5; }
.modal-content .close,
.modal-content .close-button {
  position: sticky !important;
  top: 0 !important;
  float: right;
  color: #c6c9c7;
  font-size: 1.7rem;
  cursor: pointer;
}

.qr-code-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.qr-code-wrapper {
  min-width: 0;
  padding: 12px;
  border: 1px solid #373a3c;
  text-align: center;
}

.qr-code { width: min(150px, 100%); padding: 4px; background: #fff; }
.qr-code-text { display: block; color: #999d9e; font-size: .65rem; word-break: break-all; }

.mini-modal {
  position: fixed;
  z-index: 5100;
  width: min(300px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid var(--stego-cyan);
  border-radius: 6px;
  background: #151718;
  color: #dfe2df;
  box-shadow: 0 14px 45px rgba(0, 0, 0, .6);
}

.legal-disclaimer {
  max-width: none !important;
  margin: 42px 0 0 !important;
  padding: 18px 0 0 !important;
  border-color: #343739 !important;
  color: #9b7777 !important;
  font-size: .7rem !important;
  line-height: 1.6;
  text-align: left !important;
}

@media (max-width: 600px) {
  .stego-page .stego-app {
    width: min(100% - 24px, 720px);
    padding-top: 84px;
  }

  #helpIcon {
    top: max(14px, env(safe-area-inset-top));
    right: 14px;
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
  }

  .stego-hero { margin-bottom: 34px; }
  .stego-app textarea { min-height: 94px; }
  .method-controls { flex-direction: column; }
  .qr-code-container { grid-template-columns: 1fr; }
  .modal-content,
  #obfuscationModal .modal-content { padding: 20px 16px !important; }
}
