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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-sherif;
}

body {
  min-height: 100vh;
  background-color: #926735;
  background-image: url("KD-bg.jpg");
  background-size: cover;          
  background-position: center center; 
  background-repeat: no-repeat;
  background-color: #000;         
}

.logo {
  width: auto;
  height: auto;
  position: absolute;
  margin-top: -600px;
}

.wrapper {
  max-width: 420px;
  width: 100%;
  color: #fff;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 18px;
  padding: 36px 56px; /* Increased horizontal padding */
  margin: 40px auto;
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.37), 0 0 0 8px #ffd09b22;
  position: relative;
  border: 2px solid #ffd09b44; /* Subtle border for accent */
  transition: box-shadow 0.3s, transform 0.3s;
}

.wrapper:hover, .wrapper:focus-within {
  box-shadow: 0 0 12px 2px #ffd09b88, 0 6px 20px 0 rgba(0,0,0,0.25), 0 0 0 12px #ffd09b33;
  transform: translateY(-8px) scale(1.015);
  border: 2px solid #ffd09b88;
}

.wrapper h1{
  font-size: 40px;
  text-align: center;
}

.wrapper .input-box {
  position: relative;
  width: 100%;
  height: 50px;
  margin: 30px 0px;
}

.input-box input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  border: 2px solid rgba(255, 255, 255, .2);
  border-radius: 40px;
  font-size: 18px;
  color: #fff;
  padding: 20px 45px 20px 20px;
}

.input-box input:focus {
  border: 2px solid #ffd09b;
  background: rgba(255,255,255,0.08);
  outline: none;
  box-shadow: 0 0 8px #ffd09b55;
  transition: border 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-box input::placeholder {
  color: rgba(255, 255, 255, .7);
}

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

.input-box h2 {
  text-align: center;
  padding: 10px 10px;
}
.wrapper .forgot {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  margin: -10px 5px 15px;
}

.forgot label input {
  accent-color: gray;
  margin-right: 3px;
}

.forgot a {
  color: #fff;
  text-decoration: none;
}

.frogot a:hover{
  text-decoration: underline;
}

.wrapper .btn {
  height: 45px;
  width: 100%;
  background: #926735;
  border: 1px solid #fff;
  outline: none;
  border-radius: 40px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.wrapper .btn:hover,
.wrapper .btn:focus {
  background: #c59761;
  color: #fff;
}

.btn-register {
  background: #ffd59e;
  color: #926735;
  margin-top: 10px;
  border-radius: 22px;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 8px 22px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.btn-register:hover,
.btn-register:focus {
  background: #ffb84d;
  color: #fff;
}

.center-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.show-password {
  display: flex;
  align-items: center;
  font-size: 15px;
  margin: -15px 0 15px 2px;
  color: #ffd09b;
  gap: 6px;
}
.show-password input[type="checkbox"] {
  accent-color: #ffd09b;
}

.card-container {
  perspective: 1200px;
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  transition: height 0.5s cubic-bezier(.4,0,.2,1);
  height: auto;
}

.card {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  backface-visibility: hidden;
  transition: transform 0.7s cubic-bezier(.4,0,.2,1);
  will-change: transform;
  padding: 0 20px 24px 20px; /* Add left/right padding */
  display: block;
  min-height: unset;
}

.card-login {
  z-index: 2;
  transform: rotateY(0deg);
}

.card-register {
  z-index: 1;
  transform: rotateY(180deg);
}

.card-container.flipped .card-login {
  transform: rotateY(-180deg);
  z-index: 1;
}

.card-container.flipped .card-register {
  transform: rotateY(0deg);
  z-index: 2;
}

.login-link {
  display: inline-block;
  margin-top: 16px;
  color: #f5d5b1; /* Light brown */
  font-size: 1rem;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s;
}
.login-link:hover {
  color: #ffd59e;
}

/* Registration Popup Styles */
.reg-popup-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.reg-popup-box {
  background: #fff8ed;
  color: #926735;
  border-radius: 18px;
  padding: 32px 36px;
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.25);
  text-align: center;
  min-width: 260px;
  max-width: 90vw;
}

.reg-popup-box h2 {
  margin-bottom: 12px;
  font-size: 1.5rem;
  color: #c99253;
}

.reg-popup-box p {
  margin-bottom: 24px;
  font-size: 1.05rem;
}

/* Style for terms checkbox and links */
.terms-checkbox-area {
  display: flex;
  align-items: center;
  font-size: 15px;
  margin: 8px 0 18px 2px;
  color: #ffd09b;
  gap: 8px;
}
.terms-checkbox-area input[type="checkbox"] {
  accent-color: #ffd09b;
  margin-right: 6px;
}
.terms-checkbox-area a {
  color: #e2cc67;
  text-decoration: underline;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}
.terms-checkbox-area a:hover,
.terms-checkbox-area a:focus {
  color: #c59761;
  text-decoration: underline;
}

/* Highlight reminder/error/success messages in registration and login */
#reg-msg span,
#msg span {
  color: #c99253; /* Light brown for reminders and errors */
  font-weight: 600;
  background: #fff8ed;
  padding: 3px 10px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(201,146,83,0.08);
  display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .wrapper {
    max-width: 98vw;
    width: 98vw;
    padding: 18px 12px; /* More space on sides for mobile */
    margin: 24px auto;
    border-radius: 12px;
  }
  .card-container {
    max-width: 98vw;
    width: 98vw;
  }
  .card {
    padding: 0 6px 18px 6px; /* Add left/right padding for mobile */
  }
}