/* Base reset and theme */
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: #151717; /* Always use dark background */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* Remove light mode specific styles */
@media (prefers-color-scheme: light) {
  .register-container h1 {
    color: #ffffff; /* Always use light text on dark background */
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #151717;
  }
  
  .register-container h1 {
    color: #ffffff;
  }
  
  /* Keep the rest of the dark mode styles */
  .form {
    background-color: #ffffff;
    border: 1px solid #ecedec;
  }
  
  .input {
    background-color: #ffffff;
    color: #000000;
  }
  
  .inputForm {
    border-color: #ecedec;
    background-color: #ffffff;
  }
  
  .inputForm svg g path,
  .inputForm svg path {
    fill: #000000;
  }
  
  .flex-column > label {
    color: #000000;
  }

  .p {
    color: #000000;
  }

  .button-submit {
    background-color: #151717;
    color: #ffffff;
  }

  .button-submit:hover {
    background-color: #2c2e2e;
  }

  .error-message {
    color: #ff4d4d;
  }

  .input::placeholder {
    color: #666666;
  }
}

.register-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  box-sizing: border-box;
  width: 100%; /* Ensure full width */
  max-width: 100%; /* Prevent overflow */
}

.register-container h1 {
  margin-bottom: 2rem;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 450px;
  margin-bottom: 2rem;
}

.logo {
  width: 30%;
  height: auto;
  margin-bottom: 1rem;
}

.logo-container h2 {
  color: #ffffff;
  font-size: 1.8rem;
  margin: 0;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: #ffffff;
  padding: 30px;
  width: 90%;
  max-width: 450px;
  border-radius: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin: 0 auto; 
}

.flex-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flex-column > label {
  font-weight: 600;
}

.inputForm {
  border: 1.5px solid #ecedec;
  border-radius: 10px;
  height: 50px;
  display: flex;
  align-items: center;
  padding-left: 10px;
  transition: 0.2s ease-in-out;
}

.input {
  margin-left: 10px;
  border-radius: 10px;
  border: none;
  width: 100%;
  height: 100%;
}

.input:focus {
  outline: none;
}

.inputForm:focus-within {
  border: 1.5px solid #2d79f3;
}

.button-submit {
  margin: 20px 0 10px 0;
  background-color: #151717;
  border: none;
  color: white;
  font-size: 15px;
  font-weight: 500;
  border-radius: 10px;
  height: 50px;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.button-submit:hover {
  background-color: #2c2e2e;
}

.p {
  text-align: center;
  font-size: 14px;
  margin: 5px 0;
}

.span {
  color: #2d79f3;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.span:hover {
  text-decoration: underline;
}

.error-message {
  color: #d32f2f;
  text-align: center;
  font-size: 14px;
  margin-top: 5px;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.modal-content {
  position: relative;
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  width: 90%;
  height: 80%;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.close-modal {
  position: absolute;
  right: 20px;
  top: 10px;
  font-size: 28px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  z-index: 1001;
}

.close-modal:hover {
  color: #000;
}

#privacyFrame {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 5px;
}

@media (max-width: 768px) {
  .modal-content {
    margin: 10% auto;
    width: 95%;
    height: 85%;
  }
}

.validation-message {
  color: #d32f2f;
  font-size: 0.8rem;
  margin-top: 4px;
  min-height: 16px;
}

.inputForm.error {
  border-color: #d32f2f;
}

.button-submit:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  opacity: 0.7;
}

.privacy-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0;
  font-size: 14px;
}

.privacy-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.privacy-checkbox label {
  color: #666;
  line-height: 1.4;
}

.privacy-checkbox a {
  color: #2d79f3;
  text-decoration: none;
}

.privacy-checkbox a:hover {
  text-decoration: underline;
}

.error-message {
  color: #d32f2f;
  text-align: center;
  font-size: 0.9rem;
  margin: 8px 0;
  min-height: 20px;
  font-weight: 500;
}

@media (max-width: 480px) {
  .logo {
    width: 120px;
    margin-top: 0;
  }

  .form {
    padding: 20px;
    width: 85%; /* Slightly narrower on small screens */
    margin: 0 auto; /* Ensure centering */
  }

  .logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .logo-container h2 {
    font-size: 1.5rem;
    margin-top: 10px;
  }
}

@media (max-height: 700px) {
  .register-container {
    padding-top: 40px;
    justify-content: flex-start;
  }
}

.inputForm i {
  margin-right: 10px;
  color: #999; /* Match the login page icon color */
}
