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

  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
  }

  body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
  }

  /* Animated Background Canvas */
  canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    background: radial-gradient(#FFF, #DDD);
    transform-origin: 0 0;
    display: block;
  }

  .login-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    border-radius: 24px;
    padding: 60px;
    width: 600px;
    max-width: 90vw;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 10;
    transition: transform 0.8s ease, opacity 0.8s ease;
  }

  .login-container .alert {
    text-align: center;
    margin-bottom: 20px;
    
  }

  /* Welcome Container Styles */
  .welcome-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    border-radius: 24px;
    padding: 60px;
    width: 600px;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    text-align: center;
  }

  .welcome-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .welcome-icon {
    font-size: 64px;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
  }

  .welcome-container h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(45deg, #fff, #6cddff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .welcome-name {
    font-size: 24px;
    font-weight: 600;
    color: #6cddff;
    margin: 0;
  }

  .welcome-message {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    max-width: 400px;
    margin: 0;
  }

  .continue-btn {
    background: linear-gradient(45deg, #6cddff, #4facfe);
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 221, 255, 0.3);
    margin-top: 10px;
  }

  .continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 221, 255, 0.4);
    background: linear-gradient(45deg, #4facfe, #6cddff);
  }

  .continue-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(108, 221, 255, 0.3);
  }

  /* Bounce animation for welcome icon */
  @keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
      transform: translateY(0);
    }
    40% {
      transform: translateY(-10px);
    }
    60% {
      transform: translateY(-5px);
    }
  }
  
  .login-container h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 600;
  }
  
  .input-group {
    margin-bottom: 32px;
  }
  
  .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
  }
  
  .input-icon {
    position: absolute;
    left: 16px;
    top: 60%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    z-index: 1;
  }
  
  .input-group label {
    font-size: 14px;
    display: block;
  }
  
  .input-group input {
    width: 70%;
    padding: 12px 0 6px 48px;
    border: none;
    border-radius: 0;
    outline: none;
    font-size: 14px;
    background: linear-gradient(to right, transparent 16px, rgba(255, 255, 255, 0.8) 16px, rgba(255, 255, 255, 0.8) 100%) no-repeat bottom;
    background-size: 100% 2px;
    color: #fff;
    transition: background 0.3s ease;
    min-height: 44px; /* Touch target compliance */
    -webkit-appearance: none; /* Remove iOS styling */
    appearance: none; /* Remove default styling */
  }
  
  .input-group input:focus {
    background: linear-gradient(to right, transparent 16px, #fff 24px, #fff 100%) no-repeat bottom;
    background-size: 100% 2px;
  }
  
  .input-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
  }
  
  
  .options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 13px;
  }
  
  .options label {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 44px;
  }
  
  .options label:hover {
  background: rgba(255, 255, 255, 0.1);
  }
  
  .options input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #6cddff;
  }
  
  .options a {
    color: #6cddff;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 44px;
    line-height: 28px;
    display: inline-block;
  }
  
  .options a:hover {
    background: rgba(108, 221, 255, 0.1);
    text-decoration: underline;
  }
  
  .options a:focus {
    outline: 2px solid #6cddff;
    outline-offset: 2px;
  }
  
  .login-btn {
  width: 50%;
  padding: 12px;
  background: transparent;
  border: 1px solid #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  color: #ffffff;
  transition: all 0.3s ease;
  margin: 0 auto;
  display: block;
  margin-top: 48px;
  min-height: 44px;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
  }
  
  .login-btn:hover {
  background: #ffffff;
  color: #333;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
  }
  
  .login-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
  }
  
  .login-btn:focus {
  outline: 2px solid #6cddff;
  outline-offset: 2px;
  }
  
  .register {
  text-align: center;
  margin-top: 15px;
  font-size: 13px;
  }
  
  .register a {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
    min-height: 44px;
    line-height: 28px;
  }
  
  .register a:hover {
    text-decoration: underline;
    background: rgba(255, 255, 255, 0.1);
  }
  
  .register a:focus {
    outline: 2px solid #6cddff;
    outline-offset: 2px;
  }

  /* Prevent white/grey background when selecting from Chrome autocomplete */
  .input-group input:-webkit-autofill,
  .input-group input:-webkit-autofill:hover,
  .input-group input:-webkit-autofill:focus,
  .input-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px transparent inset !important;
    -webkit-text-fill-color: #fff !important;
    background: linear-gradient(to right, transparent 16px, rgba(255, 255, 255, 0.8) 16px, rgba(255, 255, 255, 0.8) 100%) no-repeat bottom !important;
    background-size: 100% 2px !important;
    transition: background-color 5000s ease-in-out 0s !important;
    caret-color: #fff !important;
  }

  /* Success and Error input styling - Higher specificity */
  .input-group input.success,
  .input-group input.success:-webkit-autofill,
  .input-group input.success:-webkit-autofill:hover,
  .input-group input.success:-webkit-autofill:focus,
  .input-group input.success:-webkit-autofill:active {
    color: #1bbeff !important;
    -webkit-text-fill-color: #1bbeff !important;
  }

  .input-group input.error,
  .input-group input.error:-webkit-autofill,
  .input-group input.error:-webkit-autofill:hover,
  .input-group input.error:-webkit-autofill:focus,
  .input-group input.error:-webkit-autofill:active {
    color: #ff4757 !important;
    -webkit-text-fill-color: #ff4757 !important;
  }

/* Animated Background UI Controls */
.ui {
  display: none;
  position: fixed;
  z-index: 5;
  bottom: 0;
  left: 0;
  width: 120px;
  padding: 10px;
  background: rgba(255,255,255,0.7);
}

.ui p {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 3px;
}

.ui p.zoom {
  margin-bottom: 5px;
}

.ui p.zoom span {
  margin-right: 5px;
  border: solid 1px #777;
  cursor: pointer;
  border-radius: 2px;
}

.ui p.zoom span.zoomin {
  padding: 2px 5px;
}

.ui p.zoom span.zoomout {
  padding: 2px 8px;
}

.ui p.zoom span:hover {
  background: black;
  color: white;
}

.ui a.save {
  color: #333;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
}

.ui a.save:hover {
  text-decoration: underline;
}

/* Text Animated Background */
.animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: transparent;
  pointer-events: none;
}

.animated-background .container {
  font-size: 40px;
  font-family: 'Red Hat Display', 'Poppins', sans-serif;
  letter-spacing: 1.5px;
  position: absolute;
  top: clamp(3%, 10vh, 8%);
  left: 50%;
  transform: translateX(-50%);
  width: clamp(250px, 80vw, 800px);
  max-width: 90vw;
  text-align: left;
  overflow: visible;
}

.animated-background .container * {
  display: inline-block;
  overflow: hidden;
  position: absolute;
}

.animated-background .txt1 {
  position: relative;
  color: #fff;
  font-weight: 400;
  display: inline-block;
  vertical-align: top;
}

.animated-background .txt2 {
  position: absolute;
  color: #17c0fd;
  font-weight: bold;
  display: inline-block;
  vertical-align: top;
  top: 0;
}

.animated-background .bar {
  width: 3px;
  height: clamp(30px, 6vw, 49px);
  position: absolute;
  top: -1px;
  background-color: #fff;
}

/* Responsive Design - Comprehensive Mobile Support */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
  .login-container {
    width: 85vw;
    padding: 50px 40px;
  }
  
  .animated-background .container {
    font-size: 36px;
    width: 700px;
  }
}

/* Landscape Orientation Optimization */
@media (max-height: 600px) and (orientation: landscape) {
  .login-container {
    padding: 20px 30px;
    margin: 10px auto;
  }
  
  .login-container h2 {
    font-size: 18px;
    margin-bottom: 15px;
  }
  
  .input-group {
    margin-bottom: 16px;
  }
  
  .login-btn {
    margin-top: 20px;
    padding: 12px;
  }
  
  .animated-background .container {
    top: 5%;
    font-size: 28px;
  }
}

/* Tablets and Large Mobile Landscape */
@media (max-width: 768px) {
  .animated-background .container {
    font-size: 30px !important;
  }
  
  .login-container {
    width: 90vw;
    padding: 40px 30px;
    border-radius: 20px;
  }
  
  .login-container h2 {
    font-size: 22px;
    margin-bottom: 20px;
  }
  
  .input-group {
    margin-bottom: 28px;
  }
  
  .input-group input {
    width: 100%;
    padding: 16px 0 8px 48px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .login-btn {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    margin-top: 32px;
  }
  
  .options {
    font-size: 14px;
    margin-bottom: 24px;
  }
  
  .register {
    font-size: 14px;
    margin-top: 20px;
  }
  
  .animated-background .container {
    font-size: 32px;
    width: 600px;
    top: 8%;
  }
  
  .welcome-container {
    width: 90%;
    padding: 40px 30px;
    margin: 0 20px;
  }

  .welcome-icon {
    font-size: 48px;
  }

  .welcome-container h2 {
    font-size: 24px;
  }

  .welcome-name {
    font-size: 20px;
  }

  .welcome-message {
    font-size: 14px;
    max-width: 300px;
  }

  .continue-btn {
    padding: 14px 28px;
    font-size: 14px;
  }
}

/* Mobile Devices */
@media (max-width: 480px) {
  .login-container {
    width: 95vw;
    padding: 30px 20px;
    border-radius: 16px;
    margin: 10px;
  }
  
  .login-container h2 {
    font-size: 20px;
    margin-bottom: 18px;
  }
  
  .input-group {
    margin-bottom: 24px;
  }
  
  .input-group input {
    width: 100%;
    padding: 18px 0 10px 48px;
    font-size: 16px;
  }
  
  .input-icon {
    width: 18px;
    height: 18px;
    left: 14px;
  }
  
  .login-btn {
    width: 100%;
    padding: 18px;
    font-size: 16px;
    margin-top: 28px;
    min-height: 44px; /* Touch target compliance */
  }
  
  .options {
    font-size: 13px;
    margin-bottom: 20px;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .register {
    font-size: 13px;
    margin-top: 16px;
  }
  
  .animated-background .container {
    font-size: 24px;
    width: 400px;
    top: 6%;
  }
  
  .welcome-container {
    width: 95%;
    padding: 30px 20px;
    margin: 0 10px;
  }

  .welcome-icon {
    font-size: 40px;
  }

  .welcome-container h2 {
    font-size: 20px;
  }

  .welcome-name {
    font-size: 18px;
  }

  .welcome-message {
    font-size: 13px;
    max-width: 250px;
  }

  .continue-btn {
    padding: 12px 24px;
    font-size: 13px;
  }
}

/* Small Mobile Devices */
@media (max-width: 375px) {
  .login-container {
    width: 98vw;
    padding: 25px 15px;
    margin: 5px;
  }
  
  .login-container h2 {
    font-size: 18px;
  }
  
  .input-group input {
    padding: 20px 0 12px 44px;
  }
  
  .input-icon {
    width: 16px;
    height: 16px;
    left: 12px;
  }
  
  .login-btn {
    padding: 20px;
    font-size: 15px;
  }
  
  .animated-background .container {
    font-size: 20px;
    width: 320px;
    top: 5%;
  }
  
  .welcome-container {
    width: 98%;
    padding: 25px 15px;
  }
  
  .welcome-container h2 {
    font-size: 18px;
  }
  
  .welcome-name {
    font-size: 16px;
  }
}
