@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  text-decoration: none;
  list-style: none;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #f0f0f0;
  zoom: 0.95
}


/* Base styles */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

.input-box {
  position: relative;
  overflow: hidden;
  margin: 3vh 0;
}

.input-box input {
  padding-right: 50px;
  /* Prevent text overflow into icons */
  max-width: calc(100% - 15px);
}

/* Required field indicator */
.required::before {
  content: '*';
  color: red;
  margin-left: 2px;
}

.password-requirements {
  font-size: 12px;
  margin: 5px 0;
  color: #666;
  padding: 10px;
  border-radius: 4px;
  background-color: #f8f8f8;
  transition: all 0.3s ease;
}

.requirement {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 5px 0;
}

.requirement i {
  font-size: 14px;
}

.valid-icon {
  display: none;
  color: #4CAF50;
}

.invalid-icon {
  display: none;
  color: #f44336;
}

.requirement.valid .valid-icon {
  display: inline-block;
}

.requirement.valid .invalid-icon {
  display: none;
}

.requirement.invalid .invalid-icon {
  display: inline-block;
}

.requirement.invalid .valid-icon {
  display: none;
}

.eula-acceptance {
  margin: 1em 0;
  font-size: 0.9em;
}

.eula-acceptance a {
  color: #007bff;
  text-decoration: underline;
  cursor: pointer;
}

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

.modal-content {
  background: white;
  padding: 1.5em;
  border-radius: 8px;
  /* max-width: 90vw; */
  width: 90%;
  height: 90%;
  position: relative;
}

/* Close button styling */
.close-eula {
  position: relative;
  top: -6vh;
  left: 89vw;
  width: 35px;
  height: 35px;
  font-size: 16px !important;
  font-weight: 600;
  cursor: pointer;
  z-index: 999;
  border-radius: 50%;
  background-color: #ff4444;
  color: white;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}

.close-eula {
  background-color: #ff0000;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar {
  width: 8px;
  height: 6px;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

::-webkit-scrollbar-track {
  background: transparent;
}

.container {
  position: relative;
  width: 70vw;
  height: 90vh;
  top: 3vh;
  background: #fff;
  margin: 20px;
  border-radius: 30px;
  box-shadow: 0 0 30px rgba(0, 0, 0, .2);
  overflow: hidden;
}

.container h1 {
  font-size: 32px;
  margin: -10px 0;
}

.container p {
  font-size: 14.5px;
  margin: 15px 0;
}

form {
  width: 100%;
}

.form-box {
  position: absolute;
  right: 0;
  width: 50%;
  overflow: scroll;
  height: 86vh;
  margin-top: 2vh;
  background: #fff;
  display: flex;
  align-items: center;
  color: #333;
  text-align: center;
  padding: 40px;
  z-index: 1;
}

.container.active .form-box {
  right: 50%;
}

.form-box.register {
  visibility: hidden;
}

.container.active .form-box.register {
  visibility: visible;
}



.input-box input,
.input-box select,
.input-box option {
  width: 100%;
  padding: 1.5vh 2vw;
  background: #eee;
  border-radius: 8px;
  border: none;
  outline: none;
  font-size: 16px;
  color: #333;
  font-weight: 500;
}

.input-box input::placeholder {
  color: #888;
  font-weight: 400;
}

.input-box i {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
}

.forgot-link {
  margin: -15px 0 15px;
}

.forgot-link a {
  font-size: 14.5px;
  color: #333;
}

.btn {
  width: 100%;
  height: 48px;
  padding: 2vh;
  margin: 5px;
  background: #7494ec;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, .1);
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #fff;
  font-weight: 600;
}

.social-icons {
  display: flex;
  justify-content: center;
}

.small-btn {
  font-size: 0.8em;
  margin-top: 5px;
  padding: 0.3em 0.6em;
  background: none;
  border: none;
  color: #007bff;
  cursor: pointer;
}

.small-btn:hover {
  text-decoration: underline;
}

.social-icons a {
  display: inline-flex;
  padding: 10px;
  border: 2px solid #ccc;
  border-radius: 8px;
  font-size: 24px;
  color: #333;
  margin: 0 8px;
}

.toggle-box {
  position: absolute;
  width: 100%;
  height: 100%;
}

.toggle-box::before {
  content: '';
  position: absolute;
  left: -250%;
  width: 300%;
  height: 100%;
  background: #7494ec;
  /* border: 2px solid red; */
  border-radius: 150px;
  z-index: 2;
  transition: 1.8s ease-in-out;
}

.container.active .toggle-box::before {
  left: 50%;
}

.toggle-panel {
  position: absolute;
  width: 50%;
  height: 100%;
  /* background: seagreen; */
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2;
  transition: .6s ease-in-out;
}

.toggle-panel.toggle-left {
  left: 0;
  transition-delay: 1.2s;
}

.container.active .toggle-panel.toggle-left {
  left: -50%;
  transition-delay: .6s;
}

.toggle-panel.toggle-right {
  right: -50%;
  transition-delay: .6s;
}

.container.active .toggle-panel.toggle-right {
  right: 0;
  transition-delay: 1.2s;
}

.toggle-panel p {
  margin-bottom: 20px;
}

.toggle-panel .btn {
  width: 160px;
  height: 46px;
  background: transparent;
  border: 2px solid #fff;
  box-shadow: none;
}

@media screen and (max-width: 650px) {
  .container {
    height: calc(100vh - 40px);
  }

  .form-box {
    bottom: 0;
    width: 100%;
    height: 70%;
  }

  .container.active .form-box {
    right: 0;
    bottom: 30%;
  }

  .toggle-box::before {
    left: 0;
    top: -270%;
    width: 100%;
    height: 300%;
    border-radius: 20vw;
  }

  .container.active .toggle-box::before {
    left: 0;
    top: 70%;
  }

  .container.active .toggle-panel.toggle-left {
    left: 0;
    top: -30%;
  }

  .toggle-panel {
    width: 100%;
    height: 30%;
  }

  .toggle-panel.toggle-left {
    top: 0;
  }

  .toggle-panel.toggle-right {
    right: 0;
    bottom: -30%;
  }

  .container.active .toggle-panel.toggle-right {
    bottom: 0;
  }
}

/* Error Popup Styles */
.error-popup {
  position: fixed;
  top: -60px;
  /* Initially hidden */
  left: 50%;
  transform: translateX(-50%);
  background: #ff4d4d;
  color: white;
  padding: 15px 20px;
  border-radius: 5px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* width: 300px; */
  transition: top 0.5s ease-in-out;
  z-index: 1000;
}

/* Close Button */
.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  margin-left: 10px;
}

.close-btn:hover {
  color: #ddd;
}

.logo {
  position: relative;
  height: 10vh;
  margin-bottom: 1vh;
  background-color: rgba(255, 255, 255);
  padding: 5px;
  border-radius: 8px;
  filter: drop-shadow(2px 4px 6px gray);
}

@media screen and (max-width: 400px) {
  .form-box {
    padding: 20px;
  }

  .toggle-panel h1 {
    font-size: 30px;
  }
}

/* Change Password Popup Styles */
#changePasswordPopup {
  display: none;
  position: fixed;
  margin-top: -8px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 12px;
  z-index: 1000;
  backdrop-filter: blur(3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Optional: Style the popup content for better appearance */
#changePasswordPopup h3 {
  margin-top: 0;
}

#changePasswordPopup label {
  display: block;
  margin: 8px 0 4px;
}

#changePasswordPopup input {
  width: 500px;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#changePasswordPopup .popup-buttons {
  text-align: right;
}

#changePasswordPopup button.btn {
  padding: 6px 12px;
  margin-left: 5px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#changePasswordPopup button.btn:hover {
  opacity: 0.9;
}