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

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #e0f7fa, #f3e8ff);
  min-height: 100vh;
  padding: 40px;
  color: #1a1a1a;
}

.container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  flex: 1 1 350px;
  max-width: 500px;
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeIn 0.5s ease-in-out;
}

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

h2 {
  text-align: center;
  color: #1e40af;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 25px;
}

.input-group {
  position: relative;
  margin-bottom: 25px; /* Increased spacing to prevent overlap */
}

label {
  position: absolute;
  top: 50%; /* Center vertically initially */
  left: 12px;
  transform: translateY(-50%); /* Adjust for vertical centering */
  font-size: 0.9rem;
  color: #6b7280;
  font-weight: 500;
  transition: all 0.3s ease; /* Smoother transition */
  pointer-events: none;
  padding: 0 4px;
}

input, select {
  width: 100%;
  padding: 16px 12px; /* Increased top padding for label space */
  border: none; /* Remove default border */
  border-bottom: 2px solid #d1d5db; /* Underline style */
  border-radius: 4px 4px 0 0; /* Rounded top corners */
  font-size: 1rem;
  background: #f9fafb;
  transition: border-bottom-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus {
  outline: none;
  border-bottom-color: #3b82f6;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

input:focus + label, input:not(:placeholder-shown) + label,
select:focus + label, select:not(:placeholder-shown) + label {
  top: -10px; /* Move above input */
  transform: translateY(0); /* Remove vertical centering */
  font-size: 0.75rem;
  color: #3b82f6;
  background: linear-gradient(180deg, #ffffff, #f8fafc); /* Subtle gradient background */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Soft shadow for depth */
  border-radius: 4px;
  scale: 0.95; /* Slight scale-down for elegance */
}

button {
  margin-top: 25px;
  width: 100%;
  padding: 12px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

button:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.result, #result {
  margin-top: 20px;
  padding: 12px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #f87171;
}

.success {
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #4ade80;
}

.error::before {
  content: "⚠️";
}

.success::before {
  content: "✅";
}

.info {
  max-width: 900px;
  margin: 40px auto;
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.5s ease-in-out;
}

.info h3 {
  color: #1e40af;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.info p, .info ul {
  line-height: 1.7;
  font-size: 1rem;
  color: #374151;
  margin-bottom: 15px;
}

.info code {
  background: #f1f5f9;
  padding: 3px 6px;
  border-radius: 5px;
  font-family: 'Consolas', monospace;
  color: #b91c1c;
}

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

@media (max-width: 768px) {
  body {
    padding: 20px;
  }

  .card {
    flex: 1 1 100%;
    max-width: 100%;
  }

  h2 {
    font-size: 1.5rem;
  }

  .info {
    padding: 20px;
  }

  .input-group {
    margin-bottom: 20px;
  }
}