/* Modern CSS with Animations & Enhanced Features */
:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #4895ef;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #4cc9f0;
    --warning: #f72585;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  }
  
  /* Base Reset & Typography */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #f5f7ff;
    padding: 2rem 1rem;
    min-height: 100vh;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  /* Layout & Structure */
  .container {
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.6s ease-out;
  }
  
  .header {
    text-align: center;
    margin-bottom: 2.5rem;
  }
  
  .header h1 {
    font-size: 2.5rem;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
    font-weight: 800;
  }
  
  .header p {
    color: #64748b;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
  }
  
  /* Form Styling */
  .form-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: var(--transition);
  }
  
  .form-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  }
  
  fieldset {
    border: none;
    margin-bottom: 2rem;
    padding: 0;
  }
  
  legend {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
  }
  
  legend::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: var(--accent);
    border-radius: 6px;
  }
  
  /* Input Fields */
  .input-group {
    margin-bottom: 1.5rem;
  }
  
  label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
  }
  
  input[type="text"],
  input[type="date"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: #f8fafc;
  }
  
  input:focus,
  textarea:focus,
  select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(72, 149, 239, 0.2);
    background-color: white;
  }
  
  textarea {
    min-height: 120px;
    resize: vertical;
  }
  
  /* Radio & Checkbox */
  .option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
  }
  
  .option-item {
    position: relative;
    flex: 1 1 200px;
  }
  
  .option-item input {
    position: absolute;
    opacity: 0;
  }
  
  .option-item label {
    display: block;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: var(--radius);
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-weight: 500;
  }
  
  .option-item input:checked + label {
    background-color: rgba(67, 97, 238, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
  }
  
  .option-item input:focus + label {
    box-shadow: 0 0 0 3px rgba(72, 149, 239, 0.2);
  }
  
  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 0.5rem;
  }
  
  .btn-primary {
    background-color: var(--primary);
    color: white;
  }
  
  .btn-primary:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
  }
  
  .btn-secondary {
    background-color: white;
    color: var(--primary);
    border: 2px solid var(--primary);
  }
  
  .btn-secondary:hover {
    background-color: #f0f4ff;
  }
  
  /* Preview Section */
  #previewSection {
    display: none;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    margin-top: 2rem;
    animation: fadeIn 0.4s ease-out;
  }
  
  .preview-content {
    margin: 1.5rem 0;
  }
  
  .preview-item {
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid #f1f5f9;
  }
  
  .preview-item:last-child {
    border-bottom: none;
  }
  
  .preview-label {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.4rem;
    display: block;
  }
  
  /* Notification */
  .notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(76, 201, 240, 0.3);
    display: none;
    z-index: 100;
    animation: fadeIn 0.3s ease-out;
  }
  
  /* Progress Indicator */
  .progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
  }
  
  .progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #e2e8f0;
    transform: translateY(-50%);
    z-index: 1;
  }
  
  .step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #64748b;
    position: relative;
    z-index: 2;
  }
  
  .step.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.2);
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .header h1 {
      font-size: 2rem;
    }
    
    .form-card {
      padding: 1.5rem;
    }
    
    legend {
      font-size: 1.2rem;
    }
    
    .option-group {
      flex-direction: column;
      gap: 0.5rem;
    }
    
    .option-item {
      flex: 1 1 100%;
    }
  }
  
  @media (max-width: 480px) {
    body {
      padding: 1rem;
    }
    
    .header h1 {
      font-size: 1.8rem;
    }
    
    .btn {
      width: 100%;
    }
    
    .notification {
      bottom: 1rem;
      right: 1rem;
      left: 1rem;
    }
  }
  
  /* Animations */
  @keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
  }
  
  .btn-pulse:hover {
    animation: pulse 1s infinite;
  }
  
  /* Floating Labels */
  .float-label {
    position: relative;
    margin-bottom: 1.5rem;
  }
  
  .float-label input,
  .float-label textarea,
  .float-label select {
    padding-top: 1.2rem;
  }
  
  .float-label label {
    position: absolute;
    top: 0.8rem;
    left: 1rem;
    color: #64748b;
    transition: var(--transition);
    pointer-events: none;
  }
  
  .float-label input:focus + label,
  .float-label textarea:focus + label,
  .float-label select:focus + label,
  .float-label input:not(:placeholder-shown) + label,
  .float-label textarea:not(:placeholder-shown) + label {
    top: 0.2rem;
    left: 0.8rem;
    font-size: 0.75rem;
    color: var(--primary);
  }