/* ============================================================
   EHAX RECRUITMENT RESULTS — "Victor CTF Theme" (CTFd)
   Minimal login view mirroring Figma Login screen (2037:328)
   Palette: #412E1E #EFEEED #372517 #AEB9CA #D7DCE5 #614F40
            #D8D4D3 #ECE9E9 + 50% white veil
   Fonts:   Pixeboy (self-hosted) / Boldonse / Pixelify Sans
   ============================================================ */

@font-face {
  font-family: 'Pixeboy';
  src: url('/fonts/Pixeboy-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

:root {
  --cream: #ECE9E9;
  --paper: #EFEEED;
  --white: #FFFFFF;
  --ink: #412E1E;
  --brown: #614F40;
  --mud: #372517;
  --blue: #AEB9CA;
  --blue-soft: #D7DCE5;
  --gray: #D8D4D3;
  --veil: rgba(255, 255, 255, 0.5);

  --green: #2fa95c;
  --green-deep: #1e7a41;
  --red: #a4442f;
  --red-deep: #8a3322;

  --font-pixel: 'Pixeboy', 'Pixelify Sans', monospace;
  --font-title: 'Boldonse', 'Pixeboy', sans-serif;
  --font-x: 'Pixelify Sans', monospace;

  --shadow-card: 0 5px 10px rgba(0, 0, 0, 0.25);
  --transition: all 0.15s ease-out;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--font-pixel);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

/* ============================================================
   OAT background artwork (1:1 from Figma home OAT_BG group)
   ============================================================ */
.oat-art {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 1051px;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.oat-img {
  position: absolute;
  top: -411px;          /* Rectangle 7 top lands at y=0 (per Figma group offsets) */
  left: 50%;
  transform: translateX(-50%);
  width: 1280px;
  max-width: none;
  height: auto;
}

.oat-veil {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1051px;
  background: var(--veil);
  z-index: 1;
}

.content-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================================
   Pixel button (Victor theme)
   ============================================================ */
.btn-pixel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  font-family: var(--font-pixel);
  font-size: 30px;
  line-height: 1.3;
  padding: 0.5rem 1rem 0.55rem;
  box-shadow: 0 7px 0 var(--ink);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-pixel:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 0 var(--ink);
}

.btn-pixel:active {
  transform: translateY(7px);
  box-shadow: 0 0 0 var(--ink);
}

.btn-pixel:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 7px 0 var(--ink);
}

.btn-pixel.btn-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
  box-shadow: 0 7px 0 var(--brown);
}

.btn-pixel.btn-dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 0 var(--brown);
  color: var(--white);
}

.btn-pixel.btn-dark:active {
  transform: translateY(7px);
  box-shadow: 0 0 0 var(--ink);
}

/* ============================================================
   Login view (login card centered in the middle of the page)
   ============================================================ */
.login-view {
  flex: 1;
  width: 100%;
  display: flex;
  padding: 2.5rem 1.5rem 4rem;
}

/* ---- Login card (Figma Rectangle 11: 477x469 #EFEEED, 1px border) ---- */
.terminal-panel {
  margin: auto; /* safe centering: scrollable when taller than the viewport */
  width: 100%;
  max-width: 477px;
  scroll-margin-top: 110px;
}

.terminal-card {
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow-card);
  padding: 14px 40px 38px;
}

.login-title {
  font-size: 70px;
  line-height: 1.25;
  font-weight: 400;
  color: var(--ink);
  -webkit-text-stroke: 4px var(--gray);
  paint-order: stroke fill;
  margin-bottom: 31px;
}

.form-group {
  margin-bottom: 21px;
}

.form-input {
  width: 100%;
  background: var(--cream);
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 0 7px 0 var(--ink);
  font-family: var(--font-pixel);
  font-size: 28px;
  line-height: 1.3;
  padding: 0.6rem 0.85rem 0.68rem;
  outline: none;
  transition: var(--transition);
}

.form-input::placeholder {
  color: var(--ink);
  opacity: 0.55;
}

.form-input:focus {
  background: var(--white);
  transform: translateY(2px);
  box-shadow: 0 5px 0 var(--ink);
}

.btn-login {
  width: 100%;
  margin-top: 10px;
}

.reg-hint {
  font-size: 24px;
  line-height: 1.3;
  color: #000;
  margin-top: 27px;
  text-align: center;
}

/* Feedback box */
.feedback-box {
  margin-top: 1rem;
  padding: 0.6rem 0.8rem;
  font-size: 20px;
  line-height: 1.35;
  display: none;
  border: 2px solid var(--ink);
}

.feedback-box.error {
  display: block;
  background: #f4e0db;
  border-color: var(--red);
  color: var(--red-deep);
}

.feedback-box.info {
  display: block;
  background: #e2f0e6;
  border-color: var(--green);
  color: var(--green-deep);
}

/* ---- DTU gate graphic panel ---- */
.dtu-panel {
  display: none;
}


/* ============================================================
   Result Modal (Victor theme modal card)
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(65, 46, 30, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  overflow-y: auto;
  padding: 1.4rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  margin: auto; /* safe centering: overlay scrolls when the card is taller than the viewport */
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.25), 0 24px 70px rgba(65, 46, 30, 0.5);
  width: min(560px, 100%);
  overflow: hidden;
  animation: pop 0.22s steps(3) both;
}

@keyframes pop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); }
}

.modal-card.modal-card-large {
  max-width: 1050px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--ink);
  min-height: 37px;
  padding: 0.5rem 0.9rem 0.5rem 1.1rem;
}

.modal-title {
  font-size: 20px;
  line-height: 1.2;
  color: var(--ink);
  margin-right: 0.75rem;
}

.modal-close {
  flex-shrink: 0;
  width: 40px;
  height: 37px;
  border: 1px solid var(--ink);
  border-right: none;
  border-top: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-x);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--ink);
  color: var(--paper);
}

.modal-body {
  padding: 1.25rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Roll check */
.roll-check-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.roll-check-heading {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 400;
  color: var(--ink);
  -webkit-text-stroke: 2px var(--gray);
  paint-order: stroke fill;
}

.roll-check-instructions {
  font-size: 20px;
  line-height: 1.4;
  color: var(--mud);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-left-width: 8px;
  padding: 0.65rem 0.85rem;
}

.roll-input-wrapper {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.roll-input {
  flex: 1;
  min-width: 220px;
  background: var(--cream);
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 0 7px 0 var(--ink);
  font-family: var(--font-pixel);
  font-size: 23px;
  line-height: 1.3;
  padding: 0.62rem 0.85rem 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  outline: none;
  transition: var(--transition);
}

.roll-input::placeholder {
  color: var(--ink);
  opacity: 0.5;
  letter-spacing: 0;
  text-transform: none;
}

.roll-input:focus {
  background: var(--white);
  transform: translateY(2px);
  box-shadow: 0 5px 0 var(--ink);
}

.btn-check-roll {
  font-size: 24px;
  padding: 0.62rem 1rem 0.7rem;
}

/* Status result cards (injected by app.js) */
.status-card-selected {
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 0 7px 0 var(--brown);
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: pop 0.22s steps(3) both;
}

.selected-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 24px;
  line-height: 1.2;
  color: var(--green-deep);
}

.selected-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  background: var(--cream);
  border: 2px solid var(--ink);
  padding: 1rem;
}

.meme-selection {
  display: block;
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
  border: 3px solid var(--ink);
  box-shadow: 0 5px 0 var(--brown);
  image-rendering: auto;
}

.meta-item-label {
  font-size: 16px;
  color: var(--ink);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
}

.meta-item-val {
  font-size: 24px;
  line-height: 1.25;
  color: var(--ink);
  word-break: break-word;
}

.btn-join-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: var(--green);
  border: 3px solid var(--ink);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 22px;
  line-height: 1;
  text-decoration: none;
  padding: 0.62rem 1.1rem 0.7rem;
  box-shadow: 0 7px 0 var(--green-deep);
  transition: var(--transition);
}

.btn-join-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 0 var(--green-deep);
  color: #fff;
}

.btn-join-group:active {
  transform: translateY(7px);
  box-shadow: 0 0 0 var(--green-deep);
}

.status-card-rejected {
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 0 7px 0 var(--brown);
  padding: 2rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  animation: pop 0.22s steps(3) both;
}

.rejected-punchline {
  font-family: var(--font-title);
  font-size: 2.3rem;
  line-height: 1.15;
  color: var(--red);
  text-transform: uppercase;
}

.rejected-subtext {
  font-size: 20px;
  line-height: 1.4;
  color: var(--mud);
  max-width: 440px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
  .login-view {
    padding: 1.5rem 1rem 3.5rem;
  }

  .terminal-card {
    padding: 12px 24px 26px;
  }

  .login-title {
    font-size: 54px;
    -webkit-text-stroke: 3px var(--gray);
  }

  .form-input {
    font-size: 23px;
  }

  .reg-hint {
    font-size: 20px;
  }

  .modal-body {
    padding: 1.2rem 1.1rem;
  }

  .modal-title {
    font-size: 17px;
  }

  .roll-check-heading {
    font-size: 24px;
  }

  .selected-header {
    font-size: 20px;
  }

  .selected-meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 400px) {
  .login-title {
    font-size: 46px;
    -webkit-text-stroke: 2px var(--gray);
  }

  .form-input {
    font-size: 20px;
  }

  .roll-input,
  .btn-check-roll {
    width: 100%;
    justify-content: center;
  }

  .selected-header {
    flex-wrap: wrap;
  }

  .meme-selection {
    max-width: 220px;
  }
}