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

html, body {
  height: 100%;
}

body {
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  margin: 0;
  padding: 10px;
  background-color: #CF2030;
  transition: background-color 0.5s ease;
}

h1, p {
  text-align: center;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 20px;
}

.logo {
  display: block;
  margin: 20px 0 20px 0; /* Adjust the margin to give enough space at the top */
  width: 100px;
  height: 100px;
  animation: fadeIn 1s ease-in; /* Apply fade-in effect */
  transition: transform 0.5s ease, margin 0.5s ease, width 0.5s ease, height 0.5s ease; /* Add transition for smooth animation */
}

.logo.up {
  transform: translateY(-30px); /* Move the logo up */
  margin: 40px auto; /* Adjust margin when logo is moved up */
  width: 60px; /* Reduce the logo size by 50% */
  height: 60px; /* Reduce the logo size by 50% */
}

.logo.ios-up {
  transform: translateY(-10px); /* Move the logo up less on iOS */
  margin: 30px auto; /* Adjust margin when logo is moved up on iOS */
  width: 60px; /* Reduce the logo size by 50% */
  height: 60px; /* Reduce the logo size by 50% */
}

.animate-title {
  font-size: 2em; /* Smaller on mobile */
  color: #ffffff;
  animation: fadeIn 1s ease-in;
  transition: transform 0.5s ease, margin 0.5s ease; /* Add transition for smooth animation */
}

.animate-title.up {
  transform: translateY(-50px); /* Move the title up */
}

.animate-title.ios-up {
  transform: translateY(-30px); /* Move the title up less on iOS */
}

.animate-text {
  font-size: 1.5em;
  color: #ffffffc7;
  animation: slideInFromBottom 1s ease-out;
  transition: transform 0.5s ease, margin 0.5s ease; /* Add transition for smooth animation */
}

.animate-text.up {
  transform: translateY(-50px); /* Move the text up */
}

.animate-text.ios-up {
  transform: translateY(-30px); /* Move the text up less on iOS */
}

.animate-form {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.5);
  width: 100%;
  max-width: 600px;
  animation: zoomIn 1s ease-out;
  transition: transform 0.5s ease; /* Add transition for smooth animation */
}

.animate-form.up {
  transform: translateY(-50px); /* Move the form up */
}

.animate-form.ios-up {
  transform: translateY(-30px); /* Move the form up less on iOS */
}

.form-field {
  margin-bottom: 15px;
}

.animate-label {
  display: block;
  margin-bottom: 5px;
  color: #333;
  font-weight: bold;
  transition: color 0.3s ease;
}

.animate-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 1.5em; /* Adjust for mobile */
}

.animate-input:focus {
  outline: none;
  border-color: #CF2030;
  box-shadow: 0 0 5px rgba(255, 13, 0, 0.5);
}

.animate-button {
  width: 100%;
  padding: 15px; /* Larger touch target for mobile */
  background-color: #CF2030;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-size: 1em; /* Adjust for mobile */
  font-weight: bold;
}

.animate-button:hover, .animate-button:focus {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.animate-button:active {
  transform: scale(0.95);
}

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

.modal-content {
  background-color: #fefefe;
  padding: 60px 20px 40px 20px;
  border: 1px solid #888;
  width: 100%;
  max-width: 300px;
  border-radius: 10px;
  text-align: center;
  color: #000;
  position: relative; /* Ensure the close button is positioned relative to the modal */
  font-weight: bold;
  margin: 200px auto; /* Center the modal content horizontally */
}

.animate-modal {
  animation: zoomIn 0.5s ease-out;
}

.close {
  color: #aaa;
  font-size: 38px;
  font-weight:400;
  cursor: pointer;
  position: absolute;
  top: 1px;
  right: 9px;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Celebration animation */
.celebration {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.emoji {
  position: fixed;
  top: 0;
  font-size: 44px;
  opacity: 0.7;
  animation: fall 3s linear infinite, fadeInOut 3s linear infinite;
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(360deg);
  }
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
  }
}

/* Keyframes for animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInFromBottom {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Disclaimer text styling */
.disclaimer-text {
  font-size: 12px !important;
  color: #ffffffa6;
  text-align: center;
  margin-top: 20px;
  padding: 0 10px 0 10px;
  transition: transform 0.5s ease, margin 0.5s ease; /* Add transition for smooth animation */
}

.disclaimer-text a {
  color: #ffffff; /* Set link color to white */
  text-decoration: none; /* Remove underline */
}

.disclaimer-text a:hover {
  text-decoration: underline; /* Add underline on hover */
}

.disclaimer-text.up {
  transform: translateY(-50px); /* Move the disclaimer text up */
}

.disclaimer-text.ios-up {
  transform: translateY(-30px); /* Move the disclaimer text up less on iOS */
}

/* Media Queries for responsiveness */
@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  .animate-title {
    font-size: 1.5em;
  }

  .animate-text {
    font-size: 1em;
  }

  .animate-form {
    padding: 15px;
    max-width: 100%; /* Ensure the form takes full width on small screens */
  }

  .animate-input {
    font-size: 1.2em;
  }

  .animate-button {
    padding: 12px;
    font-size: 0.9em;
  }

  .modal-content {
    width: 95%;
    max-width: 280px;
  }
}

/* Styles for larger screens */
@media (min-width: 600px) {
  .animate-title {
    font-size: 2em; /* Larger on bigger screens */
  }

  .animate-text {
    font-size: 1.3em;
  }

  .animate-input {
    font-size: 16px;
  }

  .animate-button {
    font-size: 18px;
  }

  .modal-content {
    width: 60%;
  }
}