* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #0d1117;
  color: #e6edf3;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem 4rem;
}

main {
  width: 100%;
  max-width: 560px;
}

h1 {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.tagline {
  color: #8b949e;
  margin: 0 0 2rem;
  font-size: 1rem;
}

#check-form {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

#name-input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #30363d;
  border-radius: 6px;
  background: #161b22;
  color: #e6edf3;
  outline: none;
}

#name-input::placeholder {
  color: #6e7681;
}

#name-input:focus {
  border-color: #58a6ff;
  box-shadow: 0 0 0 1px #58a6ff;
}

#submit-btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background: #cf222e;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

#submit-btn:hover {
  background: #a40e26;
}

#submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.result {
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  border: 1px solid #30363d;
  background: #161b22;
}

.result.hidden {
  display: none;
}

.result h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.result .alert {
  color: #f85149;
}

.result .name-highlight {
  font-weight: 600;
  color: #e6edf3;
}

.result .sources {
  margin: 0;
  padding-left: 1.25rem;
  color: #8b949e;
  font-size: 0.9375rem;
}

.result .sources li {
  margin-bottom: 0.25rem;
}

.document-label {
  font-size: 0.8125rem;
  color: #8b949e;
  margin: 1rem 0 0.5rem;
}

/* PDF-style page container */
.document-page {
  position: relative;
  margin-top: 0.5rem;
  width: 100%;
  max-width: 480px;
  min-height: 320px;
  background: #fafaf9;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

/* Diagonal satirical watermark */
.document-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-35deg);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: rgba(0, 0, 0, 0.06);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.document {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 2rem 2.25rem 2.5rem;
  background: transparent;
  border: none;
  border-radius: 0;
  font-family: "Liberation Serif", "Times New Roman", Times, Georgia, serif;
  font-size: 13px;
  line-height: 1.55;
  color: #1a1a1a;
  white-space: pre-wrap;
  word-break: break-word;
}

.document-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #d4d4d4;
}

.document-title {
  font-weight: 700;
  font-size: 14px;
  color: #0f0f0f;
  letter-spacing: 0.01em;
}

.document-date {
  font-size: 11px;
  color: #525252;
}

.document-body {
  margin: 0;
  font-size: 12px;
  color: #262626;
  line-height: 1.6;
}

.share-label {
  font-size: 0.8125rem;
  color: #8b949e;
  margin: 1rem 0 0.5rem;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.share-btn {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #e6edf3;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.share-btn:hover {
  background: #30363d;
  border-color: #484f58;
  color: #e6edf3;
}

.share-whatsapp:hover { border-color: #25d366; background: #1e4d2e; }
.share-telegram:hover { border-color: #0088cc; background: #0d3d56; }
.share-signal:hover { border-color: #3a76f0; background: #1e3a5f; }
.share-facebook:hover { border-color: #1877f2; background: #0d3d6e; }
.share-twitter:hover { border-color: #1da1f2; background: #0d3d5c; }
.share-email:hover { border-color: #8b949e; background: #30363d; }

.footnote {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #21262d;
}

.footnote p {
  margin: 0;
  font-size: 0.8125rem;
  color: #6e7681;
  max-width: 52ch;
}

.footnote a {
  color: #58a6ff;
  text-decoration: none;
}

.footnote a:hover {
  text-decoration: underline;
}
