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

body {
  font-family: 'Georgia', serif;
  background: #1a1a1a;
  color: #e8e8e8;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Binary pattern background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2;
}

/* Binary mask pattern overlay - Method 1: Repeating content */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.6;
}

/* Alternative: Text-based repeating pattern */
body::before {
  content: '';
  position: fixed;
  top: 20px;
  left: 20px;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='350' height='120'%3E%3Ctext x='0' y='15' font-family='Courier New' font-size='18' fill='rgba(175,175,175,0.5)'%3E00 00 00 00 00 00 00 00 00 04%3C/text%3E%3Ctext x='0' y='30' font-family='Courier New' font-size='18' fill='rgba(175,175,175,0.5)'%3E00 00 00 00 00 00 00 00 04 00%3C/text%3E%3Ctext x='0' y='45' font-family='Courier New' font-size='18' fill='rgba(175,175,175,0.5)'%3E00 00 00 00 00 00 00 00 00 00%3C/text%3E%3Ctext x='0' y='60' font-family='Courier New' font-size='18' fill='rgba(175,175,175,0.5)'%3E00 00 01 00 00 80 00 00 00 00%3C/text%3E%3Ctext x='0' y='75' font-family='Courier New' font-size='18' fill='rgba(175,175,175,0.5)'%3E00 00 00 20 00 80 01 00 00 00%3C/text%3E%3Ctext x='0' y='90' font-family='Courier New' font-size='18' fill='rgba(175,175,175,0.5)'%3E00 00 00 00 00 00 00 00      %3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
  z-index: -2;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
  z-index: 1;
}

h1 {
  font-size: 2.5em;
  margin-top: 4rem;
  margin-bottom: 2rem;
  text-align: center;
  color: #dadada;
  font-weight: normal;
}

.story-box {
  max-width: 600px;
  width: 100%;
  background: rgba(40, 40, 40, 0.9);
  border: 2px solid #2f6b60;
  border-radius: 15px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: 
      0 0 20px rgba(101, 120, 97, 0.3),
      inset 0 0 10px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;
}

.story-text {
  font-size: 1.1em;
  line-height: 1.8;
  text-align: justify;
  margin-bottom: 20px;
  color: #e8e8e8;
}

.question {
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  color: #d4af37;
  font-style: italic;
}

/* Form styling */
form[name="puzzle_1"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 400px;
  margin: 0 auto;
}

.input-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.input-container label {
  font-size: 1.1em;
  color: #d6d5d2;
  text-align: center;
  font-weight: 500;
  margin-bottom: 8px;
}

.input-field {
  padding: 15px 20px;
  font-size: 1.1em;
  border: 2px solid #2f6b60;
  border-radius: 8px;
  background: rgba(30, 30, 30, 0.9);
  color: #e8e8e8;
  width: 300px;
  text-align: center;
  font-family: 'Georgia', serif;
  transition: all 0.3s ease;
}

.input-field:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
  background: rgba(40, 40, 40, 0.9);
}

.input-field::placeholder {
  color: #888;
  font-style: italic;
}

/* Submit button styling */
button[type="submit"] {
  padding: 12px 30px;
  font-size: 1.2em;
  font-family: 'Georgia', serif;
  font-weight: bold;
  background: linear-gradient(135deg, #1488cc, #2b32b2);
  color: #e8e8e8;
  border: 2px solid #acacac;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

button[type="submit"]:hover {
  background: linear-gradient(135deg, #6fb1fc, #0052d4);
  border-color: #d8d8d8;
  box-shadow: 0 0 20px rgba(55, 188, 212, 0.5);
  transform: translateY(-2px);
}

button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hint {
  font-size: 0.9em;
  color: #aaa;
  text-align: center;
  font-style: italic;
  margin-top: 10px;
}

/* Keyhole effect around the title */
h1::before {
  content: '🗝️';
  position: absolute;
  left: -50px;
  opacity: 0.3;
  font-size: 0.7em;
}

/* Responsive design */
@media (max-width: 768px) {
  h1 {
      font-size: 2em;
  }
  
  .story-box {
      padding: 25px;
      margin: 0 10px 20px 10px;
  }
  
  .story-text {
      font-size: 1em;
  }
  
  .input-field {
      width: 250px;
  }
}