* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  background: #f5f7fb;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.container {
  text-align: center;
  width: 100%;
  max-width: 400px;
}

.header h1 {
  margin: 0;
  color: #333;
  font-size: clamp(1.5rem, 5vw, 2rem);
}

.header span {
  font-size: clamp(0.8rem, 3vw, 0.875rem);
  color: #777;
}

.card {
  background: white;
  padding: clamp(1rem, 5vw, 1.25rem);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
  margin: 20px auto;
}

.toggle {
  display: flex;
  margin-bottom: 20px;
}

.toggle button {
  flex: 1;
  padding: clamp(0.5rem, 2.5vw, 0.625rem);
  border: none;
  background: #f5f7fb;
  color: #333;
  cursor: pointer;
  border-radius: 5px 0 0 5px;
  transition: background 0.3s, color 0.3s;
  font-size: clamp(0.875rem, 3vw, 1rem);
}

.toggle button:last-child {
  border-radius: 0 5px 5px 0;
}

.toggle button.active {
  background: #2b6cff;
  color: white;
}

.form {
  display: flex;
  flex-direction: column;
}

.form.hidden {
  display: none;
}

.form h2 {
  margin-bottom: 20px;
  color: #333;
  font-size: clamp(1.25rem, 4vw, 1.5rem);
}

.form input {
  padding: clamp(0.5rem, 2.5vw, 0.625rem);
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: clamp(0.875rem, 3vw, 1rem);
  width: 100%;
}

.form button {
  padding: clamp(0.5rem, 2.5vw, 0.625rem);
  background: #2b6cff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: clamp(0.875rem, 3vw, 1rem);
  transition: background 0.3s;
  width: 100%;
}

.form button:hover {
  background: #1e4bb8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .container {
    max-width: 90%;
  }

  .card {
    padding: 15px;
  }

  .form input,
  .form button {
    font-size: 1rem;
    padding: 12px;
    min-height: 44px; /* Touch-friendly */
  }
}

@media (max-width: 576px) {
  body {
    padding: 5px;
  }

  .container {
    max-width: 95%;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .header span {
    font-size: 0.8rem;
  }

  .card {
    padding: 10px;
    border-radius: 8px;
  }

  .form h2 {
    margin-bottom: 15px;
    font-size: 1.25rem;
  }

  .form input,
  .form button {
    padding: 14px;
    font-size: 1rem;
    min-height: 48px; /* Better touch targets */
  }

  .toggle button {
    padding: 10px;
  }
}
