@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: hsl(0, 2%, 92%);
  padding: 20px;
}

.container {
  position: relative;
  width: 100%;
  max-width: 980px;
  min-height: 750px;
  height: auto;
  transition: height 0.3s ease;
  background: #fff;
  border-radius: 30px;
  box-shadow: 0 0 30px rgba(0, 0, 0, .2);
  overflow: hidden;
}

.form-box {
  position: absolute;
  right: 0;
  width: 50%;
  height: 100%;
  z-index: 1;
  color: #333;
  text-align: center;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.form-box.register {
  visibility: hidden;
}

form {
  width: 100%;
  padding: 40px;
}

.container h1 {
  font-size: 30px;
  margin: -10px 0 20px 0;
  font-weight: 700;
  color: #28a745;
}

.input-box {
  position: relative;
  margin: 20px 0;
}

.input-box input,
.input-box select {
  width: 100%;
  padding: 13px 50px 13px 20px;
  background: #eee;
  border-radius: 8px;
  border: none;
  outline: none;
  font-size: 16px;
  color: #333;
  font-weight: 500;
  transition: all 0.3s ease;
}

.input-box select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="gray" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 20px;
}

.input-box input:focus,
.input-box select:focus {
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.input-box input.error,
.input-box select.error {
  border: 1px solid #ff6b6b;
}

.input-box input.success,
.input-box select.success {
  border: 1px solid #51cf66;
}

.input-box input::placeholder {
  color: #888;
  font-weight: 400;
}

.input-box i {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #28a745;
}

.error-message {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: -15px;
  text-align: left;
  display: none;
  margin-bottom: -8px;
}

.error-message-pass {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 5px;
  text-align: left;
  display: none;
}

.success-message {
  color: #51cf66;
  font-size: 13px;
  margin-top: 5px;
  text-align: left;
  display: none;
}

.btn {
  width: 100%;
  height: 40px;
  background: #28a745;
  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;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.btn:hover {
  background: #218838;
}

.container p {
  font-size: 14.5px;
  margin: 15px 0;
}

.toggle-box {
  position: absolute;
  width: 100%;
  height: 100%;
  padding-left: 10px;
  transition: all 0.3s ease;
}

.toggle-panel {
  position: absolute;
  width: 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 30px;
  transition: all 0.3s ease;
}

.toggle-panel h2 {
  font-size: 26px;
  color: #1F2937;
  text-align: center;
}

.toggle-panel h3 {
  font-size: 20px;
  color: #1F2937;
  text-align: center;
}

.toggle-panel p {
  font-size: 15px;
  font-weight: 500;
  color: #1F2937;
  text-align: center;
}

.password-strength {
  margin-top: 5px;
  height: 5px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}

.strength-weak {
  background-color: #ff6b6b;
  width: 33%;
}

.strength-medium {
  background-color: #fcc419;
  width: 66%;
}

.strength-strong {
  background-color: #51cf66;
  width: 100%;
}

.password-requirements {
  margin-top: 5px;
  font-size: 12px;
  color: #666;
  text-align: left;
}

.requirement {
  display: flex;
  align-items: center;
  margin-bottom: 3px;
}

.requirement i {
  margin-right: 5px;
  font-size: 14px;
  color: #ff6b6b;
}

.requirement.valid i {
  color: #51cf66;
}

.requirement.valid {
  color: #51cf66;
}

.requirement.invalid {
  color: #ff6b6b;
}

/* Responsive styles */
@media (max-width: 900px) {
  .container {
    max-width: 700px;
  }

  .toggle-panel h2 {
    font-size: 22px;
  }

  .toggle-panel h3 {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .container {
    height: auto;
    min-height: auto;
    display: flex;
    flex-direction: column;
  }

  .form-box {
    position: relative;
    width: 100%;
    height: auto;
    /* padding: 30px 0; */
  }

  .toggle-box {
    position: relative;
    width: 100%;
    height: auto;
    /* padding: 30px 20px; */
    order: -1;
  }

  .toggle-panel {
    position: relative;
    width: 100%;
    height: auto;
    gap: 15px;
    padding: 20px 0;
  }

  .prmsu-logo {
    margin-bottom: 10px;
  }

  form {
    padding: 30px;
  }

  .container h1 {
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  /*form {*/
  /*  padding: 25px 20px;*/
  /*}*/

  .container h1 {
    font-size: 24px;
  }

  .input-box {
    margin: 15px 0;
  }

  .input-box input,
  .input-box select {
    padding: 12px 45px 12px 15px;
    font-size: 15px;
  }

  .toggle-panel h2 {
    font-size: 20px;
    color: #1F2937;
  }

  .toggle-panel h3 {
    font-size: 16px;
  }

  .toggle-panel p {
    font-size: 14px;
  }

  .prmsu-logo img {
    width: 80px;
  }

  .toggle-box {
    padding: 20px 15px;
  }

  .btn {
    height: 42px;
    font-size: 15px;
  }
}

@media (max-width: 360px) {
  .container {
    border-radius: 20px;
  }

  /*form {*/
  /*  padding: 20px 15px;*/
  /*}*/

  .container h1 {
    font-size: 22px;
  }

  .input-box input,
  .input-box select {
    padding: 10px 40px 10px 12px;
    font-size: 14px;
  }

  .btn {
    height: 38px;
    font-size: 14px;
  }

  .toggle-panel {
    gap: 10px;
  }

  .toggle-panel h2 {
    font-size: 18px;
  }

  .password-requirements {
    font-size: 11px;
  }
}