body {
  width: 600px;
  background: #000;
  padding: 30px;
  font-size: 9pt;
  font-family: fixedsys, "Lucida Console", "Lucida Sans Typewriter", monospace;
  color: #fff;
  text-align: left;
  overflow: auto;
  border: 5px solid #fff;
  margin: 50px auto;
}

h1 {
  margin-bottom: -10px;
  margin-top: -10px;
  font-size: 22px;
  font-weight: bold;
}

p {
  line-height: 1.4;
}

.terminal-form {
  margin-top: -10px;
}

#intro-terminal {
  width: 600px;
  height: 300px;
  background: #000;
  padding: 30px;
  font-size: 9pt;
  font-family: fixedsys, "Lucida Console", "Lucida Sans Typewriter", monospace;
  color: #909090;
  text-align: left;
  overflow: auto;
  border: 1px solid #111;
  box-sizing: border-box;
  resize: none;
}

.spacer {
  height: 120px;
}

.level-copy {
  margin-top: 48px;
  margin-bottom: 24px;
}

.password-card {
  width: 15%;
  min-width: 170px;
  margin: 0 auto;
  border: 1px solid #111;
  border-collapse: collapse;
  text-align: center;
  padding: 16px 10px 8px;
}

.password-title {
  font-size: 10pt;
  font-family: Tahoma, sans-serif;
  margin-bottom: 12px;
}

.password-input-wrap,
.password-actions {
  margin: 0;
}

.password-input-wrap input {
  width: 120px;
}

.password-actions {
  margin-top: 10px;
}

.footer-links {
  text-align: center;
  margin: 32px 0;
}

.footer-links a {
  color: #fff;
}

.disclaimer {
  margin-top: 48px;
}

@media (max-width: 920px) {
  body {
    width: auto;
    margin: 20px;
  }

  #intro-terminal {
    width: 100%;
  }
}

body.wide-page {
  width: auto;
  max-width: 980px;
  margin: 40px auto;
}

.center-note {
  text-align: center;
}

.panel {
  border: 1px solid #222;
  padding: 18px;
  margin: 22px 0;
  background: rgba(0, 0, 0, 0.88);
}

.old-form {
  width: 260px;
  margin: 26px auto 0;
  border: 1px solid #111;
  padding: 18px 14px;
  background: rgba(0, 0, 0, 0.85);
}

.old-form table {
  width: 100%;
}

.old-form label,
.old-form td {
  font-family: Tahoma, sans-serif;
  font-size: 10pt;
}

.old-input {
  width: 100%;
  box-sizing: border-box;
  background: #060606;
  color: #fff;
  border: 1px solid #666;
  padding: 6px;
  font-family: inherit;
}

.old-button {
  background: #111;
  color: #fff;
  border: 1px solid #777;
  padding: 6px 12px;
  cursor: pointer;
  font-family: inherit;
}

.error-copy {
  color: #f26b6b;
}

.muted-copy {
  color: #9a9a9a;
}

.large-copy {
  font-size: 12pt;
  line-height: 1.8;
}

.fake-logo {
  width: 300px;
  height: 145px;
  border: 1px solid #2f2f2f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
  font-size: 40px;
  font-weight: bold;
  letter-spacing: 4px;
  background: linear-gradient(180deg, #0e0e0e 0%, #040404 100%);
}

.stage {
  position: relative;
  min-height: 520px;
  border: 1px solid #111;
  background: #050505;
  overflow: auto;
}

.stage .canvas {
  position: relative;
  width: 1500px;
  height: 760px;
}

.offscreen-clue {
  position: absolute;
  top: 610px;
  left: 1080px;
  color: #202020;
  white-space: nowrap;
}

.big-question {
  font-size: 18pt;
  text-align: center;
  margin: 90px 0 30px;
}

.encoded-scroll {
  margin: 90px 0 30px;
  padding: 18px;
  border: 1px solid #111;
  background: #050505;
  overflow-x: auto;
  overflow-y: hidden;
}

.encoded-scroll-copy {
  min-width: max-content;
  font-size: 18pt;
  line-height: 1.5;
  white-space: nowrap;
}

.tiny-white {
  color: #050505;
}

.success-banner {
  margin-top: 36px;
  border: 1px solid #1f6f1f;
  padding: 18px;
  color: #b7ffb7;
}

.final-banner {
  margin-top: 40px;
  border: 1px solid #fff;
  padding: 18px;
  line-height: 1.8;
}

.simple-link {
  color: #fff;
  text-decoration: underline;
}

.hero-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 26px 0 22px;
}

.rule-list {
  margin: 0;
  padding-left: 18px;
}

.rule-list li {
  margin-bottom: 10px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.primary-button,
.secondary-button,
.steam-button,
.danger-button {
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid #888;
  text-decoration: none;
  color: #fff;
  font-family: inherit;
}

.primary-button {
  background: #151515;
}

.secondary-button {
  background: #050505;
}

.steam-button {
  background: #0f1a29;
  border-color: #3d7aa8;
}

.danger-button {
  background: #220909;
  border-color: #8b3a3a;
}

.progress-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.progress-card {
  border: 1px solid #1f1f1f;
  padding: 12px;
  background: rgba(0, 0, 0, 0.78);
}

.progress-label {
  display: block;
  color: #9a9a9a;
  margin-bottom: 6px;
}

.progress-value {
  font-size: 16px;
  font-weight: bold;
}

.hud-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #1f1f1f;
  padding: 14px 16px;
  margin: 20px 0 24px;
  background: rgba(0, 0, 0, 0.88);
}

.hud-player {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.hud-avatar {
  width: 48px;
  height: 48px;
  border: 1px solid #2c2c2c;
  object-fit: cover;
}

.hud-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hud-link {
  color: #fff;
  text-decoration: none;
  border: 1px solid #444;
  padding: 8px 10px;
}

.milestone-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.milestone-tab {
  color: #fff;
  text-decoration: none;
  border: 1px solid #333;
  padding: 8px 12px;
}

.milestone-tab.is-active {
  border-color: #fff;
  background: #111;
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
}

.rank-table th,
.rank-table td {
  border: 1px solid #1f1f1f;
  padding: 12px;
  vertical-align: middle;
}

.rank-table th {
  text-align: left;
}

.rank-player {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank-player img {
  width: 42px;
  height: 42px;
  border: 1px solid #2c2c2c;
  object-fit: cover;
}

.rank-player-meta {
  min-width: 0;
}

.rank-player-id-link {
  color: #9a9a9a;
  text-decoration: underline;
  word-break: break-all;
}

.admin-action-link {
  padding: 8px 10px;
}

.admin-table-input,
.admin-table-textarea {
  min-width: 160px;
}

.admin-table-textarea {
  resize: vertical;
  min-height: 74px;
}

.admin-inline-button {
  white-space: nowrap;
}

.admin-form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-field {
  display: block;
}

.admin-field span {
  display: block;
  margin-bottom: 6px;
  color: #9a9a9a;
}

.admin-field-wide {
  grid-column: 1 / -1;
}

.admin-auto-cell {
  min-width: 220px;
}

.admin-auto-winner + .admin-auto-winner {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #1f1f1f;
}

.admin-danger-box {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid #1f1f1f;
}

body.final-42-page {
  width: auto;
  max-width: 980px;
  margin: 40px auto;
  padding: 40px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 38%),
    linear-gradient(180deg, #050505 0%, #0d0d0d 100%);
}

.answer-hero {
  min-height: 520px;
  border: 1px solid #222;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    rgba(0, 0, 0, 0.72);
}

.answer-kicker {
  color: #9a9a9a;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 18px;
}

.answer-number {
  font-size: clamp(84px, 18vw, 190px);
  line-height: 0.9;
  font-weight: bold;
  letter-spacing: 8px;
  color: #fff;
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.12);
}

.answer-number--small {
  font-size: clamp(62px, 12vw, 120px);
}

.answer-copy {
  max-width: 520px;
  margin: 26px auto 0;
  color: #d3d3d3;
  font-size: 13pt;
  line-height: 1.8;
}

.answer-hint {
  margin: 16px 0 0;
  color: #9a9a9a;
  letter-spacing: 1px;
}

.answer-copy--wide {
  max-width: 640px;
}

.answer-form {
  width: min(360px, calc(100% - 40px));
  margin-top: 28px;
}

.answer-form-label {
  display: block;
  margin-bottom: 8px;
  color: #9a9a9a;
  text-align: left;
}

.answer-input {
  text-align: center;
}

.answer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

.answer-button {
  min-width: 130px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.ghost-clue {
  margin: 34px 0 0;
  color: #050505;
  user-select: text;
}

.ghost-clue::selection {
  color: #f3f3f3;
  background: #4a63d8;
}

.hackevent-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
  z-index: 9999;
}

.hackevent-modal.is-open {
  display: flex;
}

.hackevent-modal__dialog {
  width: min(460px, calc(100vw - 48px));
  border: 1px solid #4a4a4a;
  background: #1d1b1c;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  padding: 18px 18px 14px;
}

.hackevent-modal__title {
  font-size: 18px;
  margin: 0 0 16px;
}

.hackevent-modal__message {
  color: #f4f4f4;
  line-height: 1.6;
  margin: 0 0 18px;
}

.hackevent-modal__label {
  display: block;
  margin: 0 0 12px;
  color: #f4f4f4;
}

.hackevent-modal__input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 2px solid #9cb9df;
  border-radius: 10px;
  background: #26242c;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
}

.hackevent-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.hackevent-modal__button {
  min-width: 68px;
  padding: 9px 14px;
  border: 1px solid #8db8f2;
  background: #b9d4f7;
  color: #0d0d0d;
  cursor: pointer;
  font-family: inherit;
}

.hackevent-modal__button--secondary {
  border-color: #666;
  background: transparent;
  color: #fff;
}

@media (max-width: 920px) {
  .hero-grid,
  .progress-grid,
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .hud-bar {
    flex-direction: column;
    align-items: flex-start;
  }

}
