/* === FORM 27-B: THE GAME — Stylesheet === */
/* Base & Typography */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Times New Roman', Times, serif;
  background: #e8e8e0;
  color: #1a1a4a;
  min-height: 100vh;
  line-height: 1.5;
}
a { color: #0000cc; }
a:hover { color: #cc0000; }

/* Header */
.official-header {
  background: #fafaf5;
  border-bottom: 3px double #1a1a4a;
  text-align: center;
  padding: 2rem 1rem 1.5rem;
}
.seal {
  font-size: 3rem;
  margin-bottom: 0.25rem;
  filter: grayscale(0.3);
}
.official-header h1 {
  font-size: 2.2rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #1a1a4a;
}
.dept {
  font-size: 1rem;
  margin-top: 0.3rem;
  font-variant: small-caps;
  letter-spacing: 0.1em;
}
.revision {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.2rem;
  font-style: italic;
}

/* Instructions */
.instructions {
  max-width: 800px;
  margin: 2rem auto;
  background: #fafaf5;
  border: 1px solid #999;
  padding: 1.5rem 2rem;
}
.instructions h2 {
  font-size: 1.1rem;
  border-bottom: 1px solid #999;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
.instructions ol { margin-left: 1.5rem; margin-bottom: 0.75rem; }
.instructions li { margin-bottom: 0.25rem; }
.subtext { font-size: 0.85rem; color: #555; font-style: italic; }

/* Game Area */
.game-area {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.game-columns {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.form-column {
  flex: 1;
  background: #fafaf5;
  border: 2px solid #1a1a4a;
  padding: 1.5rem;
  position: relative;
  min-height: 420px;
}
.form-header-bar {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed #999;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  font-weight: bold;
  font-size: 0.95rem;
}
.form-number { color: #1a1a4a; }
.timer { color: #0000cc; font-family: 'Courier New', monospace; }

/* Form Fields */
.form-field { margin-bottom: 1rem; }
.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
  color: #1a1a4a;
}
.form-field label .field-num {
  display: inline-block;
  width: 1.5em;
  text-align: right;
  margin-right: 0.4em;
}
.form-field input {
  width: 100%;
  padding: 0.5rem;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1rem;
  color: #0000cc;
  border: 1px dashed #999;
  background: #fff;
  outline: none;
}
.form-field input:focus { border-color: #0000cc; background: #f8f8ff; }
.form-field input::placeholder { color: #aaa; font-style: italic; font-size: 0.85rem; }

/* Submit Button */
.submit-btn {
  display: block;
  width: 100%;
  padding: 0.75rem;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.1rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: #1a1a4a;
  color: #fafaf5;
  border: none;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s;
}
.submit-btn:hover { background: #0000cc; }
.submit-btn:disabled { background: #999; cursor: not-allowed; }

/* Processing Overlay */
.processing-overlay {
  display: none;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(250,250,245,0.95);
  z-index: 10;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.processing-overlay.active { display: flex; }
.processing-overlay p { font-size: 1.4rem; font-weight: bold; letter-spacing: 0.15em; }
.processing-sub { font-size: 0.8rem !important; color: #666; font-style: italic; font-weight: normal !important; margin-top: 0.75rem; }
.progress-bar {
  width: 70%;
  height: 20px;
  border: 1px solid #1a1a4a;
  margin-top: 1rem;
  background: #fff;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: #1a1a4a;
  transition: width 1.8s linear;
}

/* Result Stamp */
.result-stamp {
  display: none;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  font-size: 3.5rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  padding: 0.3em 0.6em;
  border: 6px solid;
  border-radius: 8px;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  text-transform: uppercase;
}
.result-stamp.show { display: block; animation: stampIn 0.3s ease-out forwards; }
.result-stamp.rejected { color: #cc0000; border-color: #cc0000; }
.result-stamp.approved { color: #006600; border-color: #006600; }
@keyframes stampIn {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-18deg) scale(2); }
  100% { opacity: 0.85; transform: translate(-50%, -50%) rotate(-18deg) scale(1); }
}

/* Start / Win Screens */
.start-screen, .win-screen {
  display: none;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #fafaf5;
  z-index: 15;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
.start-screen.active, .win-screen.active { display: flex; }
.start-screen h3, .win-screen h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.start-btn {
  margin-top: 1.5rem;
  padding: 0.75rem 2rem;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.1rem;
  font-weight: bold;
  background: #1a1a4a;
  color: #fafaf5;
  border: none;
  cursor: pointer;
  letter-spacing: 0.1em;
}
.start-btn:hover { background: #0000cc; }
.win-stamp {
  font-size: 4rem;
  font-weight: bold;
  color: #006600;
  border: 6px solid #006600;
  padding: 0.1em 0.5em;
  border-radius: 8px;
  transform: rotate(-8deg);
  margin-bottom: 1rem;
  letter-spacing: 0.15em;
}
.win-stats { margin-top: 1rem; font-size: 0.95rem; color: #555; }

/* Sidebar */
.sidebar {
  width: 280px;
  flex-shrink: 0;
}
.score-box, .history-box {
  background: #fafaf5;
  border: 1px solid #999;
  padding: 1rem;
  margin-bottom: 1rem;
}
.score-box h3, .history-box h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.4rem;
  margin-bottom: 0.6rem;
}
.score-box p { font-size: 0.9rem; margin-bottom: 0.3rem; }
.rejected-stat { color: #cc0000; }
.approved-stat { color: #006600; font-weight: bold; }
.history-box { max-height: 300px; overflow-y: auto; }
.history-box ul { list-style: none; }
.history-box li {
  font-size: 0.8rem;
  padding: 0.4rem 0;
  border-bottom: 1px dotted #ccc;
  color: #cc0000;
}
.history-box li.empty-history { color: #999; font-style: italic; }

/* Hall of Shame */
.hall-of-shame {
  max-width: 800px;
  margin: 2rem auto;
  background: #fafaf5;
  border: 1px solid #999;
  padding: 1.5rem 2rem;
}
.hall-of-shame h2 {
  font-size: 1.1rem;
  border-bottom: 1px solid #999;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; border-bottom: 2px solid #1a1a4a; padding: 0.4rem 0.5rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
td { padding: 0.4rem 0.5rem; border-bottom: 1px dotted #ccc; }
tr:last-child td { border-bottom: none; }

/* Legal Disclaimer */
.legal {
  max-width: 800px;
  margin: 2rem auto;
  background: #fafaf5;
  border: 1px solid #999;
  padding: 1.5rem 2rem;
  font-size: 0.85rem;
  color: #555;
}
.legal h2 {
  font-size: 1.1rem;
  color: #1a1a4a;
  border-bottom: 1px solid #999;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

/* Footer */
footer {
  max-width: 800px;
  margin: 2rem auto;
  text-align: center;
  padding: 1.5rem 1rem 3rem;
}
.footer-text { font-size: 0.8rem; color: #999; margin-top: 1.5rem; }

/* Responsive */
@media (max-width: 768px) {
  .game-columns { flex-direction: column; }
  .sidebar { width: 100%; }
  .result-stamp { font-size: 2.5rem; }
  .official-header h1 { font-size: 1.5rem; }
}