@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700;800&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
input {
  font-family: "Poppins", sans-serif;
}

/* Falling Leaves (Forest Theme Particles) */
#atmospheric-particle-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.particle-leaf {
  position: absolute;
  top: -40px;
  width: 15px !important;
  height: 25px !important;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 20px 0 20px 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  will-change: transform, opacity;
  animation: fallLeaf linear both;
  opacity: 0;
}

@keyframes fallLeaf {
  0% {
    transform: translate3d(0, -20px, 0) rotate(0deg) scale(1);
    opacity: 0;
  }

  10% {
    opacity: 0.8;
  }

  90% {
    opacity: 0.5;
  }

  100% {
    transform: translate3d(var(--tx), 110vh, 0) rotate(720deg) scale(0.8);
    opacity: 0;
  }
}

.leaves-paused .particle-leaf {
  animation-play-state: paused !important;
}

.toggle-leaves-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.toggle-leaves-btn:hover {
  background: rgba(46, 189, 50, 0.2);
  transform: scale(1.1) rotate(15deg);
  border-color: #2ebd32;
  color: #2ebd32;
  box-shadow: 0 10px 40px rgba(46, 189, 50, 0.3);
}

.toggle-leaves-btn.paused {
  background: rgba(46, 189, 50, 0.9);
  color: #fff;
  border-color: #ffffff;
}

.toggle-leaves-btn i {
  transition: transform 0.3s ease;
}

.toggle-leaves-btn:active {
  transform: scale(0.9);
}

.container {
  position: relative;
  width: 100%;
  background: radial-gradient(circle at top left, rgb(113 255 208) 23%, #ffffff00 15%), radial-gradient(circle at bottom right, rgb(113 255 208) 24%, white 24%), #f8fafc !important;
  min-height: 100vh;
  overflow: hidden;
}

.forms-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.signin-signup {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  left: 75%;
  width: 50%;
  transition: 1s 0.7s ease-in-out;
  display: grid;
  grid-template-columns: 1fr;
  z-index: 5;
}

form {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0rem 5rem;
  transition: all 0.2s 0.7s;
  overflow: hidden;
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}

form.sign-up-form {
  opacity: 0;
  z-index: 1;
}

form.sign-in-form {
  z-index: 2;
}

.login-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  transition: all 0.3s;
}

.title {
  font-size: 2.2rem;
  color: #444;
  margin-bottom: 10px;
}

.input-field {
  max-width: 380px;
  width: 100%;
  background-color: #f0f0f0;
  margin: 10px 0;
  height: 55px;
  border-radius: 55px;
  display: grid;
  grid-template-columns: 15% 85%;
  padding: 0 0.4rem;
  position: relative;
}

.input-field i {
  text-align: center;
  line-height: 55px;
  color: #acacac;
  transition: 0.5s;
  font-size: 1.1rem;
}

.input-field input {
  margin-right: 15px;
  background: none;
  outline: none;
  border: none;
  line-height: 1;
  margin-right: 20px;
  font-weight: 600;
  font-size: 1.1rem;
  color: #333;
}

.input-field input::placeholder {
  color: #aaa;
  font-weight: 500;
}

.password-toggle-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #acacac;
  transition: 0.3s;
  z-index: 99;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle-icon i {
  font-size: 1.1rem !important;
  line-height: normal !important;
}

.password-toggle-icon:hover {
  color: #2ebd32;
}

.password-container {
  overflow: visible !important;
}

.password-container input {
  padding-right: 0px !important;
}


.btn {
  width: 150px;
  background-color: #2ebd32;
  border: none;
  outline: none;
  height: 49px;
  border-radius: 49px;
  color: #fff;
  text-transform: uppercase;
  font-weight: 600;
  margin: 10px 0;
  cursor: pointer;
  transition: 0.5s;
}

.btn:hover {
  background-color: #68ff3a;
}

.panels-container {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.container:before {
  content: "";
  position: absolute;
  height: 2000px;
  width: 2000px;
  top: -10%;
  right: 48%;
  transform: translateY(-50%);
  background-image: linear-gradient(-45deg, #37d124 0%, #298d31 100%);
  transition: 1.8s ease-in-out;
  border-radius: 50%;
  z-index: 6;
}

.image {
  width: 100%;
  transition: transform 1.1s ease-in-out;
  transition-delay: 0.4s;
}

.panel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-around;
  text-align: center;
  z-index: 6;
}

.left-panel {
  pointer-events: all;
  padding: 3rem 17% 2rem 12%;
}

.right-panel {
  pointer-events: none;
  padding: 3rem 12% 2rem 17%;
}

.panel .content {
  color: #fff;
  transition: transform 0.9s ease-in-out;
  transition-delay: 0.6s;
}

.panel h3 {
  font-weight: 600;
  line-height: 1;
  font-size: 1.5rem;
}

.panel p {
  font-size: 0.95rem;
  padding: 0.7rem 0;
}

.btn.transparent {
  margin: 0;
  background: none;
  border: 2px solid #fff;
  width: 130px;
  height: 41px;
  font-weight: 600;
  font-size: 0.8rem;
}

.right-panel .image,
.right-panel .content {
  transform: translateX(800px);
}

/* ANIMATION */

.container.sign-up-mode:before {
  transform: translate(100%, -50%);
  right: 52%;
}

.container.sign-up-mode .left-panel .image,
.container.sign-up-mode .left-panel .content {
  transform: translateX(-800px);
}

.container.sign-up-mode .signin-signup {
  left: 25%;
}

.container.sign-up-mode form.sign-up-form {
  opacity: 1;
  z-index: 2;
}

.container.sign-up-mode form.sign-in-form {
  opacity: 0;
  z-index: 1;
}

.container.sign-up-mode .right-panel .image,
.container.sign-up-mode .right-panel .content {
  transform: translateX(0%);
}

.container.sign-up-mode .left-panel {
  pointer-events: none;
}

.container.sign-up-mode .right-panel {
  pointer-events: all;
}

/* Tablet and smaller screens */
@media (max-width: 1024px) {
  .container {
    min-height: 100vh;
  }

  .signin-signup {
    left: 50%;
    width: 85%;
    max-width: 500px;
  }

  .panels-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }

  .panel {
    padding: 2rem 5%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .left-panel {
    grid-row: 1;
  }

  .right-panel {
    grid-row: 3;
  }

  .image {
    width: 150px;
    height: auto;
  }

  .panel .content {
    padding-right: 10%;
  }

  .panel h3 {
    font-size: 1.3rem;
  }

  .panel p {
    font-size: 0.8rem;
    padding: 0.5rem 0;
  }

  .btn.transparent {
    width: 120px;
    height: 40px;
    font-size: 0.75rem;
  }
}

/* Mobile screens */
@media (max-width: 870px) {
  .container {
    min-height: 100vh;
    padding: 1rem;
  }

  .signin-signup {
    width: 100%;
    top: 60%;
    transform: translate(-50%, -50%);
    transition: 1s 0.8s ease-in-out;
    left: 50%;
    padding: 0 1rem;
  }

  .signin-signup,
  .container.sign-up-mode .signin-signup {
    left: 50%;
  }

  .panels-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 1rem;
  }

  .panel {
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 1.5rem 5%;
    grid-column: 1 / 2;
  }

  .right-panel {
    grid-row: 3 / 4;
  }

  .left-panel {
    grid-row: 1 / 2;
  }

  .image {
    width: 120px;
    transition: transform 0.9s ease-in-out;
    transition-delay: 0.6s;
  }

  .panel .content {
    padding-right: 10%;
    transition: transform 0.9s ease-in-out;
    transition-delay: 0.8s;
  }

  .panel h3 {
    font-size: 1.1rem;
  }

  .panel p {
    font-size: 0.7rem;
    padding: 0.3rem 0;
  }

  .btn.transparent {
    width: 100px;
    height: 35px;
    font-size: 0.7rem;
  }

  .container:before {
    width: 1200px;
    height: 1200px;
    transform: translateX(-50%);
    left: 50%;
    bottom: 70%;
    right: initial;
    top: initial;
    transition: 2s ease-in-out;
  }

  .container.sign-up-mode:before {
    transform: translate(-50%, 100%);
    bottom: 30%;
    right: initial;
  }

  .container.sign-up-mode .left-panel .image,
  .container.sign-up-mode .left-panel .content {
    transform: translateY(-200px);
  }

  .container.sign-up-mode .right-panel .image,
  .container.sign-up-mode .right-panel .content {
    transform: translateY(0px);
  }

  .right-panel .image,
  .right-panel .content {
    transform: translateY(200px);
  }

  .container.sign-up-mode .signin-signup {
    top: 50%;
    transform: translate(-50%, -50%);
  }

  /* Form adjustments for mobile */
  form {
    padding: 0 2rem !important;
  }

  .input-field {
    max-width: 100% !important;
    margin: 8px 0 !important;
  }

}

/* Small mobile screens */
@media (max-width: 570px) {
  .container {
    padding: 0.5rem;
    min-height: 100vh;
  }

  form {
    padding: 0 1rem !important;
  }

  .image {
    display: none;
  }

  .panel .content {
    margin-top: 20px;
    padding: 0.5rem 0.5rem;
    text-align: center;
  }

  .panel {
    padding: 1rem 2% !important;
    flex-direction: column !important;
    gap: 0.5rem;
  }

  .panel h3 {
    font-size: 1rem !important;
    margin-bottom: 0.5rem;
  }

  .panel p {
    font-size: 0.75rem !important;
    padding: 0.2rem 0 !important;
    line-height: 1.3;
  }

  .btn.transparent {
    width: 90px !important;
    height: 30px !important;
    font-size: 0.65rem !important;
  }

  .container:before {
    bottom: 68%;
    left: 50%;
    width: 1000px;
    height: 1000px;
  }

  .container.sign-up-mode:before {
    bottom: 33%;
    left: 50%;
  }

  /* Mobile form optimizations */
  .title {
    font-size: 1.8rem !important;
    margin-bottom: 1rem;
  }

  .input-field {
    height: 50px !important;
    margin: 6px 0 !important;
  }

  .input-field i {
    font-size: 1rem !important;
    line-height: 50px !important;
  }

  .input-field input {
    margin-right: 20px;
    font-size: 1rem !important;
  }

  .btn {
    width: 130px !important;
    height: 45px !important;
    font-size: 0.9rem !important;
    margin: 8px 0 !important;
  }


  /* Sign up mode adjustments for mobile */
  .container.sign-up-mode .signin-signup {
    top: 30% !important;
    transform: translate(-50%, -50%) !important;
  }

  .container.sign-up-mode .left-panel .content {
    transform: translateY(-150px) !important;
  }

  .container.sign-up-mode .right-panel .content {
    transform: translateY(-30px) !important;
  }

  .right-panel .content {
    transform: translateY(150px) !important;
  }
}

/* Extra small devices */
@media (max-width: 400px) {
  .container {
    padding: 0.25rem;
  }

  form {
    padding: 0 0.75rem !important;
  }

  .title {
    font-size: 2.2rem !important;
  }

  .input-field {
    height: 45px !important;
  }

  .input-field i {
    line-height: 45px !important;
  }

  .btn {
    width: 120px !important;
    height: 40px !important;
    font-size: 0.8rem !important;
  }

  .btn.transparent {
    width: 88px !important;
    height: 36px !important;
    font-size: 0.8rem !important;
  }


  .panel {
    padding: 0.75rem 1% !important;
  }

  .panel h3 {
    font-size: 1rem !important;
  }

  .panel p {
    font-size: 0.7rem !important;
  }
}

/* Landscape orientation for mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .container {
    min-height: 100vh;
    padding: 0.5rem;
  }

  .signin-signup {
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90% !important;
    max-width: 600px;
  }

  .panels-container {
    grid-template-rows: auto 1fr auto !important;
  }

  .panel {
    padding: 1rem 3% !important;
  }

  .image {
    width: 80px !important;
  }

  .panel h3 {
    font-size: 1rem !important;
  }

  .panel p {
    font-size: 0.7rem !important;
  }

  .btn.transparent {
    width: 100px !important;
    height: 32px !important;
    font-size: 0.7rem !important;
  }
}

.checkbox-field {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 10px 0;
  width: 100%;
  max-width: 380px;
  padding: 0 0.5rem;
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  cursor: pointer;
  accent-color: #2ebd32;
}

.checkbox-field label {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
  cursor: pointer;
}

.checkbox-field label a {
  color: #2ebd32;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

.checkbox-field label a:hover {
  text-decoration: underline;
}

/* Success 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.5);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-out;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  margin: auto;
  padding: 0;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideIn 0.4s ease-out;
  position: relative;
}

.modal-header {
  background: linear-gradient(135deg, #2ebd32 0%, #37d124 100%);
  color: white;
  padding: 2rem;
  text-align: center;
  border-radius: 20px 20px 0 0;
  position: relative;
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: bounceIn 0.6s ease-out;
}

.modal-header h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modal-body {
  padding: 2rem;
}

.account-details {
  margin-bottom: 2rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #e9ecef;
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-item label {
  font-weight: 600;
  color: #495057;
  font-size: 1rem;
}

.detail-item span {
  color: #6c757d;
  font-size: 1rem;
  word-break: break-all;
}

.password-field {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.password-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.password-hidden {
  font-family: monospace;
  letter-spacing: 2px;
  font-size: 1.2rem;
  color: #495057;
}

.password-visible {
  font-family: inherit;
  letter-spacing: normal;
  font-size: 1rem;
  color: #495057;
}

.toggle-btn {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #6c757d;
  font-size: 1rem;
}

.toggle-btn:hover {
  background: #e9ecef;
  border-color: #2ebd32;
  color: #2ebd32;
}

.toggle-btn:active {
  transform: scale(0.95);
}

.modal-actions {
  text-align: center;
  margin-top: 1.5rem;
}

.modal-btn {
  background: linear-gradient(135deg, #2ebd32 0%, #37d124 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(46, 189, 50, 0.3);
  min-width: 150px;
}

.modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 189, 50, 0.4);
}

.modal-btn:active {
  transform: translateY(0);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-50px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive Modal Styles */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 1rem;
  }

  .modal-header {
    padding: 1.5rem;
  }

  .success-icon {
    font-size: 3rem;
    margin-bottom: 0.8rem;
  }

  .modal-header h2 {
    font-size: 1.5rem;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.8rem 0;
  }

  .detail-item label {
    font-size: 0.9rem;
  }

  .detail-item span {
    font-size: 0.9rem;
  }

  .modal-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    min-width: 120px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 98%;
    margin: 0.5rem;
  }

  .modal-header {
    padding: 1rem;
  }

  .success-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
  }

  .modal-header h2 {
    font-size: 1.3rem;
  }

  .modal-body {
    padding: 1rem;
  }

  .detail-item {
    padding: 0.6rem 0;
  }

  .detail-item label {
    font-size: 0.85rem;
  }

  .detail-item span {
    font-size: 0.85rem;
  }

  .password-hidden {
    font-size: 1rem;
  }

  .modal-btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
    min-width: 100px;
  }
}

@media (max-width: 360px) {
  .modal-header h2 {
    font-size: 1.1rem;
  }

  .success-icon {
    font-size: 2rem;
  }

  .detail-item label {
    font-size: 0.8rem;
  }

  .detail-item span {
    font-size: 0.8rem;
  }

  .modal-btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    min-width: 90px;
  }
}
