/* ==================== 1. Base & Reset ==================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: 'Poppins', sans-serif;
  display: flex;
  flex-direction: column;
  transition: background 0.4s ease, color 0.4s ease;
}

body.light { 
  background: #ffffff;
  color: #333333; 
}
body.dark {
  background: #1a1a1a;
  color: #ffffff; 
}

main {
  flex: 1;
  padding-top: 100px;               
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - 200px);
}

/* ==================== 2. Navbar  ==================== */
.nav-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 40px;
  z-index: 1000;
  flex: 1;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

body.light .nav-container { 
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid #eaeaea;
}

body.dark .nav-container { 
  background: #222222;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid #333333;
}

.logo {
  height: 60px;
  width: auto;
  object-fit: contain;
  margin-right: 40px;
  flex-shrink: 0;
  max-width: 120px;
}

/* Navigation Links - Left aligned after logo */
.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-right: auto;
}

.nav-links a {
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  color: #4a5568;
  padding: 8px 0;
  position: relative;
  transition: color 0.3s ease;
  white-space: nowrap;
}

body.dark .nav-links a {
  color: #cbd5e0;
}

.nav-links a:hover {
  color: #2652c0;
}

body.dark .nav-links a:hover {
  color: #a3bffa;
}

/* Simple underline effect */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: #2652c0;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Auth Buttons - Right aligned */
.auth-buttons {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.auth-buttons button {
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  white-space: nowrap;
}

#login-btn {
  background: transparent;
  color: #2652c0;
  border: 2px solid #2652c0;
}

body.dark #login-btn {
  color: #a3bffa;
  border-color: #a3bffa;
}

#login-btn:hover {
  background: rgba(38, 82, 192, 0.1);
  transform: translateY(-2px);
}

#register-btn {
  background: linear-gradient(135deg, #2652c0, #1ee9c0);
  color: white;
  box-shadow: 0 4px 12px rgba(38, 82, 192, 0.3);
}

#register-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(38, 82, 192, 0.4);
}

/* Theme Toggle Switch */
.switch {
  font-size: 17px;
  position: relative;
  display: inline-block;
  width: 3.5em;
  height: 2em;
  margin-left: 15px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  --background: #2652c0;
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--background);
  transition: .5s;
  border-radius: 30px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 1.4em;
  width: 1.4em;
  border-radius: 50%;
  left: 10%;
  bottom: 15%;
  box-shadow: inset 8px -4px 0px 0px #fff000;
  background: var(--background);
  transition: .5s;
}

input:checked + .slider {
  background-color: #764ba2;
}

input:checked + .slider:before {
  transform: translateX(100%);
  box-shadow: inset 15px -4px 0px 15px #fff000;
}

/* Hamburger Menu - Hidden on desktop */
.hamburger {
  display: none;
  width: 35px;
  height: 30px;

  flex-direction: column;
  justify-content: space-between;

  background: none;
  border: none;
  cursor: pointer;

  margin-left: auto; 

  z-index: 1001;
}

.hamburger span {
  display: flex;
  height: 4px;
  width: 100%;
  justify-content: space-between;
  background-color: #2652c0;
  border-radius: 2px;
  transition: all 0.3s ease;
}

body.dark .hamburger span {
  background-color: #a3bffa;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(20px);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background: #ffffff;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  z-index: 999;
  transition: right 0.4s ease;
  padding: 100px 30px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

body.dark .mobile-menu {
  background: #222222;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.mobile-menu-links a {
  font-size: 20px;
  font-weight: 500;
  color: #4a5568;
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid #eaeaea;
  transition: color 0.3s ease;
}

body.dark .mobile-menu-links a {
  color: #cbd5e0;
  border-bottom-color: #333333;
}

.mobile-menu-links a:hover {
  color: #2652c0;
}

.mobile-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.mobile-auth-buttons button {
  padding: 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

#mobile-login-btn {
  background: transparent;
  color: #2652c0;
  border: 2px solid #2652c0;
}

#mobile-register-btn {
  background: linear-gradient(135deg, #2652c0, #1ee9c0);
  color: white;
}

/* ==================== 3. Login Page ==================== */
.login-section {
  width: 100%;
  max-width: 1200px;
  text-align: center;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

.login-section h1 {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #2652c0, #1ee9c0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.login-section p {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

body.dark .login-section p {
  color: #bbb;
}

/* Login Form Container */
.login-form-container {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: left;
}

body.light .login-form-container { 
  background: #ffffff;
  border: 1px solid #f0f0f0;
}

body.dark .login-form-container { 
  background: #2a2a2a;
  border: 1px solid #444;
}

/* Form Group Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
  color: #4a5568;
}

body.dark .form-group label {
  color: #cbd5e0;
}

.login-form-container input {
  width: 100%;
  padding: 15px;
  margin: 5px 0 0 0;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

body.light .login-form-container input { 
  background: #f9f9f9;
  color: #333;
}

body.dark .login-form-container input { 
  background: #333;
  color: #fff;
  border-color: #555;
}

.login-form-container input:focus {
  outline: none;
  border-color: #2652c0;
  box-shadow: 0 0 0 3px rgba(38, 82, 192, 0.2);
  transform: translateY(-1px);
}

.login-submit-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #2652c0, #1ee9c0);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.4s ease;
}

.login-submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(38, 82, 192, 0.4);
}

.login-submit-btn.loading {
  position: relative;
  color: transparent;
}

.login-submit-btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-top: -10px;
  margin-left: -10px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Form footer text */
.login-form-container p {
  text-align: center;
  margin-top: 25px;
  font-size: 0.95rem;
  color: #666;
}

body.dark .login-form-container p {
  color: #bbb;
}

.login-form-container a {
  color: #2652c0;
  text-decoration: none;
  font-weight: 600;
}

.login-form-container a:hover {
  text-decoration: underline;
}

/* Additional form options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 15px 0 25px 0;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: #666;
}

body.dark .remember-me {
  color: #bbb;
}

.remember-me input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.forgot-password {
  color: #2652c0;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.forgot-password:hover {
  text-decoration: underline;
}

.register-link-container {
  text-align: center;
  margin-top: 25px;
  padding-top: 25px;
  border-top: 1px solid #eaeaea;
}

body.dark .register-link-container {
  border-top-color: #444;
}

.register-link {
  color: #2652c0;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.register-link:hover {
  color: #1ee9c0;
  text-decoration: underline;
}

/* ==================== 4. Footer ==================== */
footer {
  flex-shrink: 0;
  width: 100%;
  padding: 30px 20px;
  text-align: center;
  background: linear-gradient(135deg, #2652c0, #1ee9c0);
  color: white;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-top: auto;
}

/* ==================== 5. Responsive Design ==================== */
@media (max-width: 1024px) {
  .nav-container {
    padding: 0 30px;
  }
  
  .nav-links {
    gap: 30px;
  }
  
  .nav-links a {
    font-size: 17px;
  }
  
  .auth-buttons button {
    padding: 8px 20px;
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 20px;
    height: 70px;
  }
  
  .nav-links,
  .auth-buttons {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .logo {
    height: 50px;
    max-width: 40px;
    margin-right: auto;
  }
  
  .login-section h1 {
    font-size: 2.5rem;
  }
  
  .login-form-container {
    padding: 30px 25px;
    margin: 0 20px;
  }
  
  .form-options {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 15px;
  }
  
  .mobile-menu {
    width: 250px;
    padding: 80px 20px;
  }
  
  .mobile-menu-links a {
    font-size: 18px;
  }
  
  .mobile-auth-buttons button {
    padding: 12px;
    font-size: 16px;
  }
  
  .login-section h1 {
    font-size: 2.2rem;
  }
  
  .login-section p {
    font-size: 1rem;
    padding: 0 10px;
  }
  
  .login-form-container {
    padding: 25px 20px;
  }
  
  .form-group label {
    font-size: 13px;
  }
  
  .login-form-container input {
    padding: 12px;
    font-size: 0.95rem;
  }
  
  .login-submit-btn {
    padding: 14px;
    font-size: 1rem;
  }
}


