
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", sans-serif;
}

html,
body {
  height: 100%;
  overflow: hidden;
  background: #5c3d2e;
}


.fade-container {
  opacity: 0;
  animation: fadeIn 1s ease-out forwards;
}

.fade-out {
  animation: fadeOut 0.8s ease-in forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}


.loader-wrapper {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 180px;
  font-family: "Inter", sans-serif;
  font-size: 1.2em;
  font-weight: 300;
  color: white;
  border-radius: 50%;
  background-color: transparent;
  z-index: 9999;
}

.loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background-color: transparent;
  animation: loader-rotate 2s linear infinite;
  z-index: 0;
}

@keyframes loader-rotate {
  0% {
    transform: rotate(90deg);
    box-shadow:
      0 10px 20px 0 #fff8dc inset,
      0 20px 30px 0 #d2691e inset,
      0 60px 60px 0 #8b4513 inset;
  }
  50% {
    transform: rotate(270deg);
    box-shadow:
      0 10px 20px 0 #fff8dc inset,
      0 20px 10px 0 #f5deb3 inset,
      0 40px 60px 0 #5c3d2e inset;
  }
  100% {
    transform: rotate(450deg);
    box-shadow:
      0 10px 20px 0 #fff8dc inset,
      0 20px 30px 0 #d2691e inset,
      0 60px 60px 0 #8b4513 inset;
  }
}

.loader-letter {
  display: inline-block;
  opacity: 0.4;
  transform: translateY(0);
  animation: loader-letter-anim 2s infinite;
  z-index: 1;
  border-radius: 50ch;
  border: none;
  color: #fff8dc; 
}

.loader-letter:nth-child(1) { animation-delay: 0s; }
.loader-letter:nth-child(2) { animation-delay: 0.1s; }
.loader-letter:nth-child(3) { animation-delay: 0.2s; }
.loader-letter:nth-child(4) { animation-delay: 0.3s; }
.loader-letter:nth-child(5) { animation-delay: 0.4s; }
.loader-letter:nth-child(6) { animation-delay: 0.5s; }
.loader-letter:nth-child(7) { animation-delay: 0.6s; }
.loader-letter:nth-child(8) { animation-delay: 0.7s; }
.loader-letter:nth-child(9) { animation-delay: 0.8s; }
.loader-letter:nth-child(10) { animation-delay: 0.9s; }

@keyframes loader-letter-anim {
  0%, 100% { opacity: 0.4; transform: translateY(0); }
  20% { opacity: 1; transform: scale(1.15); }
  40% { opacity: 0.7; transform: translateY(0); }
}


.container {
  display: flex;
  height: 100vh;
}

.left,
.right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.left {
  background: #fff;
  flex-direction: column;
  text-align: center;
}

.left img {
  max-width: 100%;
  max-height: 80%;
  object-fit: contain;
  opacity: 0.85;
}

.right {
  background: linear-gradient(160deg, #5c3d2e, #3d2419);
  color: #fff;
  flex-direction: column;
}


.form-wrapper {
  background: rgba(255, 255, 255, 0.1);
  padding: 35px 25px;
  border-radius: 20px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-width: 400px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-box {
  text-align: center;
}

.form-box h2 {
  margin-bottom: 25px;
  color: #fff8dc;
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 1px;
}

form {
  display: flex;
  flex-direction: column;
}

.password-wrapper {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
}

.password-wrapper input {
  width: 100%;
  padding-right: 35px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  top: 15px;            
}

input {
  padding: 13px;
  margin-bottom: 15px;
  border: none;
  border-radius: 10px;
  background: #fff;
  color: #333;
  font-size: 15px;
  transition: all 0.2s ease-in-out;
}

input:focus {
  outline: none;
  border: 2px solid #d2691e;
  box-shadow: 0 0 8px rgba(210, 105, 30, 0.5);
}

input::placeholder {
  color: #777;
}

button.submit-btn {
  padding: 13px;
  background: linear-gradient(135deg, #fff8dc, #e0c097);
  color: #5c3d2e;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 12px;
  transition: transform 0.2s ease, background 0.2s ease;
}

button.submit-btn:hover {
  background: linear-gradient(135deg, #ffe4b5, #d2a679);
  transform: scale(1.03);
}

.toggle-text {
  font-size: 14px;
  color: #eee;
  text-align: center;
  margin-top: 5px;
}

.toggle-text a {
  color: #fff8dc;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease;
}

.toggle-text a:hover {
  color: #ffe4b5;
}

.error-message {
  color: #ffbdbd;
  background: rgba(255, 0, 0, 0.1);
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 8px;
  font-size: 14px;
}


@media (max-width: 768px) {
  .container {
    flex-direction: column;
    height: auto;
  }

  .left,
  .right {
    flex: none;
    width: 100%;
    padding: 20px;
  }

  .left {
    background: #fff;
    padding: 25px 15px;
  }

  .left img {
    max-width: 180px;
    max-height: 180px;
    margin: 0 auto 15px;
    display: block;
  }

  .right {
    padding: 25px 15px;
    display: flex;
    justify-content: flex-start;
  }

  .form-wrapper {
    padding: 25px 20px;
    max-width: 100%;
    margin: 0 auto;
  }

  .form-box h2 {
    font-size: 20px;
    margin-bottom: 18px;
  }

  input {
    font-size: 14px;
    padding: 11px;
  }

  button.submit-btn {
    font-size: 15px;
    padding: 11px;
  }

  .toggle-text {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .left img {
    max-width: 140px;
    max-height: 140px;
  }

  .form-wrapper {
    padding: 18px 15px;
  }

  .form-box h2 {
    font-size: 18px;
  }

  input {
    font-size: 13px;
    padding: 10px;
  }

  button.submit-btn {
    font-size: 14px;
    padding: 10px;
  }
}
