@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #e34240;
  --primary-light: #eef2ff;
  --primary-dark: #3a56d4;
  --secondary-color: #6c63ff;
  --text-dark: #333;
  --text-light: #666;
  --success-color: #4caf50;
  --error-color: #f44336;
  --border-radius: 12px;
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  background: linear-gradient(135deg, #c2e9fb 0%, #a1c4fd 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 500px;
}

.card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transform: translateY(0);
  transition: var(--transition);
  animation: fadeIn 0.8s ease-out;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, , 0, 0, 0.12);
}

.card-header {
  padding: 30px 30px 20px;
  text-align: center;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  color: white;
}

.logo {
  font-size: 3rem;
  margin-bottom: 15px;
  color: white;
  animation: pulse 2s infinite;
}

h1 {
  font-size: 24px;
  margin-bottom: 8px;
  font-weight: 600;
}

p {
  opacity: 0.9;
  margin-bottom: 0;
  font-size: 14px;
}

form {
  padding: 30px;
}

.form-group {
  margin-bottom: 24px;
  transition: var(--transition);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-dark);
  font-size: 14px;
}

label i {
  margin-right: 6px;
  color: var(--primary-color);
}

.input-field {
  position: relative;
  width: 100%;
}

input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  transition: var(--transition);
  background-color: #f9fafc;
}

input:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: white;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.focus-border {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

input:focus ~ .focus-border {
  width: 100%;
}

.input-with-button {
  display: flex;
  gap: 10px;
  align-items: center;
}

.input-with-button .input-field {
  flex: 1;
}

button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button i {
  margin-right: 8px;
}

.btn-send {
  white-space: nowrap;
}

.btn-verify {
  width: 100%;
  margin-top: 10px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.2);
  height: 50px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: var(--transition);
}

.btn-verify.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.otp-group {
  opacity: 0;
  height: 0;
  margin-bottom: 0;
  overflow: hidden;
  transition: var(--transition);
}

.otp-group.active {
  opacity: 1;
  height: auto;
  margin-bottom: 24px;
}

.otp-container {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-top: 12px;
}

.otp-input {
  width: 48px;
  height: 48px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  padding: 0;
  border-radius: 8px;
}

#message {
  margin: 0 30px 30px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.success {
  background-color: rgba(76, 175, 80, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(76, 175, 80, 0.2);
}

.error {
  background-color: rgba(244, 67, 54, 0.1);
  color: var(--error-color);
  border: 1px solid rgba(244, 67, 54, 0.2);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive Styles */
@media (max-width: 480px) {
  .input-with-button {
    flex-direction: column;
  }

  .btn-send {
    width: 100%;
  }

  .otp-container {
    gap: 4px;
  }

  .otp-input {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}