@font-face {
  font-family: "Eight Bit Operator";
  src: url("./8bitoperator.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Eight Bit Operator Plus";
  src: url("./8bitOperatorPlus-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #020202;
  --panel: #000000;
  --line: rgba(255, 255, 255, 0.32);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --accent: #ffff00;
}

* {
  box-sizing: border-box;
}

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

body {
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 45%),
    var(--bg);
  color: var(--text);
  font-family: "Eight Bit Operator", "Courier New", monospace;
}

.share-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.share-card {
  width: min(860px, 100%);
  padding: 28px;
  border: 2px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.share-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 18px;
  letter-spacing: 0.12em;
}

h1 {
  margin: 0;
  font: 700 40px/1 "Eight Bit Operator Plus", "Eight Bit Operator", monospace;
}

.share-copy,
.share-note,
#share-status {
  margin: 0;
  font-size: 22px;
  line-height: 1.18;
}

.share-copy {
  max-width: 32em;
  margin-top: 18px;
  color: var(--muted);
}

.share-picker {
  display: block;
  margin-top: 26px;
  padding: 18px 20px;
  border: 2px dashed var(--line);
  cursor: pointer;
}

.share-picker span,
.share-field span {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
  letter-spacing: 0.08em;
}

#share-file-input {
  width: 100%;
  color: var(--text);
  font: 400 18px/1.2 "Eight Bit Operator", "Courier New", monospace;
}

.share-field {
  display: block;
  margin-top: 18px;
}

#share-code-mode {
  width: 100%;
  padding: 14px 16px 12px;
  border: 2px solid #ffffff;
  background: #000000;
  color: #ffffff;
  font: 400 20px/1 "Eight Bit Operator", "Courier New", monospace;
  letter-spacing: 0.06em;
  outline: none;
  cursor: pointer;
}

#share-code-mode:focus {
  border-color: var(--accent);
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.share-actions button {
  padding: 12px 18px 10px;
  border: 2px solid #ffffff;
  background: transparent;
  color: var(--text);
  font: 400 20px/1 "Eight Bit Operator", "Courier New", monospace;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.share-actions button:hover,
.share-actions button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.share-actions button:disabled {
  opacity: 0.45;
  cursor: default;
}

#share-status {
  min-height: 24px;
  margin-top: 16px;
  color: #ff7b7b;
}

#share-status[data-state="ok"] {
  color: var(--text);
}

#share-code-output {
  width: 100%;
  margin-top: 16px;
  padding: 16px 18px;
  border: 2px solid #ffffff;
  background: #000000;
  color: #ffffff;
  resize: vertical;
  font: 400 22px/1.32 "Eight Bit Operator", "Courier New", monospace;
  letter-spacing: 0.08em;
}

#share-code-output.is-short {
  min-height: 84px;
  height: 84px;
  resize: none;
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0.14em;
  text-align: center;
  padding-top: 22px;
}

#share-code-output.is-raw {
  min-height: 180px;
  height: auto;
  resize: vertical;
  font-size: 22px;
  line-height: 1.32;
  letter-spacing: 0.08em;
  text-align: left;
  padding-top: 16px;
}

.share-note {
  margin-top: 16px;
  color: var(--muted);
}

@media (max-width: 700px) {
  .share-shell {
    padding: 16px;
  }

  .share-card {
    padding: 20px;
  }

  h1 {
    font-size: 28px;
  }

  .share-copy,
  .share-note,
  #share-status {
    font-size: 18px;
  }

  #share-code-output {
    font-size: 18px;
  }
}
