:root {
  --background-color: #181818;
}

html, body {
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
  min-height: 100%;
  overscroll-behavior: none;
}

body {
  background: url('../images/background.jpg') no-repeat center center fixed;
  background-size: cover;
  color: #fff;
  font-family: 'Red Hat Display', sans-serif;
  text-align: center;
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.main-content {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 0;
  margin-top: 0;
}

h1 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 2.8em;
  font-weight: 700;
  letter-spacing: 0;
  font-family: 'Red Hat Display', sans-serif;
}

.form-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

input[type="email"] {
  padding: 15px;
  font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(20, 20, 20, 0.9);
  color: #fff;
  border-radius: 8px;
  width: 300px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  font-family: 'Red Hat Display', sans-serif;
}

input[type="email"]:hover,
input[type="email"]:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

button {
  padding: 15px 30px;
  font-size: 16px;
  border: none;
  background-color: #fff;
  color: #1c1c1c;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: 'Red Hat Display', sans-serif;
}

button:hover {
  background-color: #ddd;
}

.footer-links {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 10px;
  z-index: 1000;
  background: none;
}

.footer-links a {
  color: #ffffff;
  text-decoration: none;
  font-family: 'Red Hat Display', sans-serif;
  text-align: center;
  padding: 10px;
  background: none;
  border: none;
}

@media (max-width: 600px) {
  .container {
    padding: 10px;
  }

  .main-content {
    min-height: 100vh;
    margin-top: 0;
  }

  h1 {
    font-size: 2.4em;
    margin-top: 0;
  }

  h2 {
    font-size: 1.8em;
  }

  .form-container {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
    margin: 15px auto;
  }

  input[type="email"],
  button {
    width: 90%;
    max-width: none;
    margin: 8px auto;
    height: 56px;
    box-sizing: border-box;
    display: block;
    font-size: 1.1em;
  }

  button {
    padding: 0;
    line-height: 56px;
  }

  .modal-content {
    width: 90%;
    max-width: 400px;
    padding: 30px;
  }

  .pin-input {
    width: 80%;
    max-width: 150px;
    height: 45px;
    font-size: 1.3em;
  }

  #pinSubmit {
    font-size: 1.2em;
    height: 56px;
    margin-top: 15px;
  }

  .footer-links {
    bottom: 30px;
    background: none;
  }

  .footer-links a {
    font-size: 1.1em;
    padding: 10px;
    background: none;
  }

  /* Additional mobile-specific fixes */
  input[type="text"],
  input[type="email"] {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
  }

  /* Remove keyboard toolbar on iOS */
  input[type="text"],
  input[type="email"],
  textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  }
}

.result {
  margin-top: 20px;
  font-size: 1.5em;
  color: #ffffff;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  font-family: 'Red Hat Display', sans-serif;
}

.hidden {
  display: none;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: rgba(20, 20, 20, 0.95);
  padding: 25px;
  border-radius: 15px;
  text-align: center;
  width: 300px;
  color: #fff;
  position: relative;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.modal-content h2 {
  font-family: 'Red Hat Display', sans-serif;
  font-size: 1.8em;
  margin-bottom: 20px;
  color: #fff;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 20px;
  color: gray;
  cursor: pointer;
}

.pin-input {
  padding: 15px;
  font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(20, 20, 20, 0.9);
  color: #fff;
  border-radius: 8px;
  width: 120px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  font-family: 'Red Hat Display', sans-serif;
  text-align: center;
  margin: 15px 0;
}

.pin-input:hover,
.pin-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

#pinSubmit {
  font-family: 'Red Hat Display', sans-serif;
  margin-top: 10px;
}

.incorrect-pin {
  display: none;
  margin-top: 10px;
  font-size: 1.5em;
  color: #ffffff;
  font-weight: bold;
  text-shadow: 0 0 20px rgba(255, 255, 255, 1);
  font-family: 'Red Hat Display', sans-serif;
}

.how-to-use-link {
  margin-top: 10px;
  color: #ffffff;
  cursor: pointer;
  text-decoration: underline;
  font-family: 'Red Hat Display', sans-serif;
}

.change-pin-link {
  margin-top: 10px;
  color: #ffffff;
  cursor: pointer;
  text-decoration: underline;
  font-family: 'Red Hat Display', sans-serif;
  text-align: center;
}

.pin-display {
  margin: 15px auto;
  padding: 10px;
  font-size: 1.2em;
  color: #ffffff;
  font-family: 'Red Hat Display', sans-serif;
  text-align: center;
}

.pin-display.hidden {
  display: none;
}

.modal-footer {
  margin-top: 20px;
  text-align: center;
}

.modal-footer a {
  color: #ffffff;
  text-decoration: underline;
  font-family: 'Red Hat Display', sans-serif;
}

.security-notification {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  background: rgba(20, 20, 20, 0.95);
  color: #fff;
  padding: 20px;
  margin: 0 auto;
  width: 85%;
  max-width: 350px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  transform: translateY(-150%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-family: 'Red Hat Display', sans-serif;
}

.security-notification.visible {
  transform: translateY(0);
}

.security-notification p {
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 1.4;
}

.security-notification button {
  margin: 5px;
  padding: 12px 0;
  width: 150px;
  font-size: 16px;
  border-radius: 8px;
  font-family: 'Red Hat Display', sans-serif;
  font-weight: 500;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

@media (max-width: 600px) {
  .security-notification {
    width: 85%;
    max-width: 320px;
    padding: 18px;
  }
  
  .security-notification p {
    font-size: 15px;
  }
  
  .security-notification button {
    width: 120px;
    padding: 10px 0;
    margin: 5px 8px;
  }
}