@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Ubuntu', sans-serif;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 5%;
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  flex-wrap: wrap;
}

.logo {
  font-size: clamp(24px, 4vw, 32px);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.navbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(15px, 3vw, 40px);
}

.navbar a {
  font-size: clamp(14px, 2.5vw, 18px);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: #ddd;
}

.navbar .SignInbt {
  position: relative;
  background: transparent;
  border: none;
  outline: none;
  font-size: clamp(15px, 2.5vw, 19px);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.navbar .SignInbt:hover {
  color: #ddd;
}

.navbar .SignInbt::before {
  content: '';
  position: absolute;
  width: 100%;
  left: 0;
  bottom: -4px;
  height: 2px;
  background: #fff;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.section2 {
  min-height: 100vh;
  background: url('../images/Background4.jpg') no-repeat center/cover;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(100px, 15vh, 120px) 5% clamp(20px, 5vh, 40px);
}

.wrapper2 {
  width: min(480px, 90vw); /* Increased width for reset form */
  max-width: 480px;
  background: transparent;
  backdrop-filter: blur(15px);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: clamp(25px, 5vw, 45px); /* Increased padding */
  color: #fff;
  max-height: 90vh;
  overflow-y: auto;
}

.logreg-title {
  text-align: center;
  margin-bottom: clamp(25px, 5vw, 35px); /* Increased margin */
}

.logreg-title h2 {
  font-size: clamp(24px, 5vw, 32px); /* Slightly larger */
  margin-bottom: 12px;
  line-height: 1.2;
}

.logreg-title p {
  font-size: clamp(13px, 2.2vw, 15px); /* Slightly larger */
  font-weight: 400;
  line-height: 1.5;
  opacity: 0.9;
}

.input-box {
  position: relative;
  width: 100%;
  margin: clamp(22px, 4.5vw, 32px) 0; /* Increased margin */
  border-bottom: 2px solid #fff;
  min-height: 50px; /* Increased height */
}

.input-box input {
  width: 100%;
  padding: clamp(10px, 2.5vw, 12px) 0;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: clamp(15px, 2.8vw, 17px); /* Slightly larger */
  padding-right: 35px;
  transition: all 0.3s ease;
}

/* Enhanced readonly state */
.input-box input[readonly] {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: clamp(10px, 2.5vw, 12px) 8px;
  opacity: 0.8;
}

.input-box input:focus ~ label,
.input-box input:valid ~ label,
.input-box input:not(:placeholder-shown) ~ label {
  top: -12px;
  font-size: clamp(11px, 2.2vw, 13px);
  color: #ddd;
  font-weight: 500;
}

.input-box label {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: clamp(15px, 2.8vw, 17px);
  pointer-events: none;
  transition: all 0.4s ease;
  opacity: 0.9;
}

.input-box .icon {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  font-size: clamp(20px, 3.5vw, 22px); /* Slightly larger */
  color: #fff;
  opacity: 0.8;
}

/* Password strength indicator styling */
#password-strength {
  margin: 15px 0;
  font-size: clamp(12px, 2.2vw, 14px);
  min-height: 25px;
  padding: 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  line-height: 1.3;
}

.btn {
  width: 100%;
  height: clamp(45px, 8vw, 50px); /* Increased height */
  min-height: 48px;
  background: #fff;
  border: none;
  outline: none;
  border-radius: 40px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  font-size: clamp(15px, 2.8vw, 17px); /* Slightly larger */
  color: #222;
  font-weight: 600;
  margin-top: clamp(20px, 4vw, 25px); /* Increased margin */
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  background: #f8f9fa;
}

.btn:active {
  transform: translateY(0);
}

.logreg-link {
  font-size: clamp(13px, 2.2vw, 15px); /* Slightly larger */
  text-align: center;
  margin-top: clamp(20px, 4vw, 25px); /* Increased margin */
  line-height: 1.6;
}

.logreg-link p {
  margin: 8px 0; /* Add margin between links */
}

.logreg-link a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.logreg-link a:hover {
  text-decoration: underline;
  color: #ddd;
  background: rgba(255, 255, 255, 0.1);
}

/* Message display styling */
#message-display {
  margin-top: 20px;
  text-align: center;
  font-size: clamp(13px, 2.2vw, 15px);
  line-height: 1.4;
}

/* Enhanced border colors for validation */
.input-box input {
  transition: border-bottom-color 0.3s ease;
}

.input-box input:focus {
  border-bottom-color: rgba(255, 255, 255, 0.8);
}

/* Popup styles remain the same */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 20px;
}

.popup-overlay.show {
  display: flex;
}

.popup-box {
  background: #fff;
  color: #222;
  padding: clamp(20px, 4vw, 30px);
  border-radius: 12px;
  width: min(400px, 90vw);
  max-width: 400px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  transform: scale(0.8);
  transition: transform 0.3s ease;
  max-height: 80vh;
  overflow-y: auto;
}

.popup-overlay.show .popup-box {
  transform: scale(1);
}

.popup-box h3 {
  margin-bottom: 10px;
  font-size: clamp(18px, 3vw, 22px);
}

.popup-box p {
  font-size: clamp(12px, 2vw, 14px);
  margin-bottom: clamp(15px, 3vw, 20px);
  line-height: 1.4;
}

.popup-box .btn.close-btn {
  background: #222;
  color: #fff;
  border: none;
  padding: clamp(8px, 2vw, 10px) clamp(15px, 3vw, 20px);
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
  font-size: clamp(12px, 2vw, 14px);
  min-height: 44px;
  transition: all 0.3s ease;
}

.popup-box .btn.close-btn:hover {
  background: #333;
  transform: translateY(-1px);
}

/* RESPONSIVE BREAKPOINTS */

@media (max-width: 1200px) {
  .header {
    padding: 18px 4%;
  }
  
  .section2 {
    padding: clamp(90px, 12vh, 110px) 4% clamp(20px, 4vh, 30px);
  }
  
  .wrapper2 {
    width: min(450px, 85vw);
  }
}

@media (max-width: 1024px) {
  .header {
    padding: 15px 4%;
  }
  
  .navbar {
    gap: clamp(12px, 2.5vw, 25px);
  }
  
  .section2 {
    padding: clamp(80px, 10vh, 100px) 4% clamp(15px, 3vh, 25px);
  }
  
  .wrapper2 {
    width: min(420px, 80vw);
    padding: clamp(20px, 4vw, 35px);
  }
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }
  
  .header {
    padding: 12px 3%;
    flex-direction: column;
    gap: 15px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
  }
  
  .navbar {
    gap: clamp(10px, 2vw, 20px);
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .section2 {
    padding: clamp(140px, 20vh, 160px) 3% clamp(20px, 4vh, 30px);
    background-attachment: scroll;
  }
  
  .wrapper2 {
    width: min(100%, 400px);
    padding: clamp(25px, 5vw, 35px);
    margin: 0 auto;
  }
  
  .input-box {
    margin: clamp(20px, 4vw, 28px) 0;
    min-height: 45px;
  }
  
  .popup-box {
    width: min(350px, 85vw);
    padding: clamp(18px, 3vw, 25px);
  }
}

@media (max-width: 600px) {
  .header {
    padding: 10px 3%;
  }
  
  .section2 {
    padding: clamp(120px, 18vh, 140px) 3% clamp(15px, 3vh, 25px);
  }
  
  .wrapper2 {
    width: min(100%, 350px);
    padding: clamp(20px, 4vw, 30px);
    border-radius: 8px;
  }
  
  .input-box {
    margin: clamp(18px, 3vw, 24px) 0;
    min-height: 42px;
  }
  
  .popup-box {
    width: min(320px, 80vw);
    border-radius: 8px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 8px 2%;
    gap: 10px;
  }
  
  .navbar {
    gap: clamp(8px, 1.5vw, 15px);
  }
  
  .section2 {
    padding: clamp(100px, 15vh, 120px) 2% clamp(10px, 2vh, 20px);
  }
  
  .wrapper2 {
    width: min(100%, 320px);
    padding: clamp(18px, 3vw, 25px);
    border-radius: 6px;
  }
  
  .input-box {
    margin: clamp(15px, 2.5vw, 20px) 0;
    min-height: 40px;
  }
  
  .popup-box {
    width: min(300px, 75vw);
    padding: clamp(15px, 2.5vw, 20px);
    border-radius: 6px;
  }
}

@media (max-width: 320px) {
  .wrapper2 {
    width: 95%;
    padding: 18px;
  }
  
  .section2 {
    padding: clamp(90px, 12vh, 110px) 2.5% clamp(10px, 2vh, 15px);
  }
  
  .popup-box {
    width: 90%;
    padding: 15px;
  }
}

/* Accessibility and Touch Improvements */
@media (max-width: 768px) {
  .navbar a,
  .navbar .SignInbt,
  .btn,
  .popup-box .btn.close-btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Improve tap targets */
  .logreg-link a {
    padding: 8px 12px;
    display: inline-block;
    min-height: 36px;
  }
}

/* Enhanced focus states for accessibility */
.navbar a:focus,
.navbar .SignInbt:focus,
.input-box input:focus,
.btn:focus,
.logreg-link a:focus,
.popup-box .btn.close-btn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

/* Smooth scrolling for better UX */
html {
  scroll-behavior: smooth;
}

/* Prevent horizontal scrolling issues */
* {
  max-width: 100%;
}

/* Animation for popup */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Loading animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}