/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  background: linear-gradient(135deg, #f8f4f0 0%, #e8d5c4 25%, #d4c4b0 50%, #c4b5a0 75%, #b8a896 100%);
  background-attachment: fixed;
  min-height: 100vh;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 182, 193, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 218, 185, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 228, 225, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Form container */
.form-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.form-card {
  background: linear-gradient(145deg, #ffffff 0%, #fefefe 100%);
  border-radius: 24px;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 50px;
  width: 100%;
  max-width: 550px;
  animation: slideUp 0.8s ease-out;
  position: relative;
  overflow: hidden;
}

.form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #d4af37 0%, #ffd700 25%, #ffed4e 50%, #ffd700 75%, #d4af37 100%);
}

.form-card::after {
  content: '✨';
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 24px;
  opacity: 0.3;
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
h1 {
  color: #2c3e50;
  font-size: 2.4rem;
  font-weight: 700;
  margin: 0 auto 25px auto;
  text-align: center;
  font-family: 'Playfair Display', serif;
  letter-spacing: 1px;
  position: relative;
  line-height: 1.3;
  padding: 20px 30px;
  max-width: 95%;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  animation: titleGlow 3s ease-in-out infinite alternate;
  border-radius: 15px;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 
    0 8px 32px rgba(212, 175, 55, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

h1 .emoji {
  background: none;
  background-clip: initial;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  color: initial;
}

h1::before {
  content: '✨';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 1.5rem;
  animation: sparkleFloat 2s ease-in-out infinite;
  z-index: 1;
  background: none;
  background-clip: initial;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  color: initial;
}

h1::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, #d4af37, #ffd700, #ffed4e, #ffd700, #d4af37);
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
  animation: underlinePulse 2s ease-in-out infinite;
}

h1 .sparkle-right {
  position: absolute;
  top: -10px;
  right: 20px;
  font-size: 1.5rem;
  animation: sparkleFloat 2s ease-in-out infinite reverse;
  z-index: 1;
  background: none;
  background-clip: initial;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  color: initial;
}

.form-description {
  color: #5a6c7d;
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.6;
  font-style: italic;
  font-weight: 300;
}

/* Form styles */
.form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  color: #2d3748;
  font-weight: 600;
  font-size: 0.95rem;
  display: block;
}

.required {
  color: #e53e3e;
  font-weight: 700;
}

.form-input {
  padding: 16px 20px;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fefefe;
  font-family: 'Playfair Display', serif;
  letter-spacing: 0.3px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.form-input:focus {
  outline: none;
  border-color: #d4af37;
  background: white;
  box-shadow: 
    0 0 0 3px rgba(212, 175, 55, 0.1),
    inset 0 1px 3px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.form-input.error {
  border-color: #e53e3e;
  background: #fef5f5;
}

.form-input.error:focus {
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

/* Radio button styles */
.radio-group {
  display: flex;
  gap: 24px;
  margin-top: 4px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
  color: #4a5568;
  transition: color 0.2s ease;
}

.radio-label:hover {
  color: #2d3748;
}

.radio-input {
  width: 20px;
  height: 20px;
  accent-color: #d4af37;
  cursor: pointer;
  margin-right: 8px;
}

.radio-text {
  font-size: 1rem;
}

/* Error message */
.error-message {
  color: #e53e3e;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 4px;
  display: block;
}

/* Submit button */
.submit-button {
  background: linear-gradient(135deg, #d4af37 0%, #ffd700 50%, #ffed4e 100%);
  color: #2c3e50;
  border: none;
  padding: 18px 32px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 12px;
  position: relative;
  overflow: hidden;
  font-family: 'Playfair Display', serif;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 
    0 8px 25px rgba(212, 175, 55, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 48px;
  min-width: 48px;
}

.submit-button:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 
    0 12px 35px rgba(212, 175, 55, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.submit-button:active:not(:disabled) {
  transform: translateY(0);
}

.submit-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.submit-button.submitting {
  background: #a0aec0;
}

/* Status messages */
.status-message {
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
  margin-top: 16px;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.status-message.success {
  background: #f0fff4;
  color: #22543d;
  border: 1px solid #9ae6b4;
}

.status-message.error {
  background: #fed7d7;
  color: #742a2a;
  border: 1px solid #feb2b2;
}

/* Responsive design */
@media (max-width: 768px) {
  body {
    padding: 8px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }
  
  .form-container {
    padding: 8px;
    min-height: calc(100vh - 16px);
    display: flex;
    align-items: flex-start;
    padding-top: 20px;
  }
  
  .form-card {
    padding: 30px 20px;
    margin: 0;
    border-radius: 20px;
    max-width: 100%;
  }
  
  h1 {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    margin: 0 auto 18px auto;
    line-height: 1.3;
    padding: 12px 15px;
    max-width: 98%;
    letter-spacing: 0.2px;
    word-spacing: 0.05em;
  }
  
  h1::before {
    top: -6px;
    left: 10px;
    font-size: 1rem;
  }
  
  h1 .sparkle-right {
    top: -6px;
    right: 10px;
    font-size: 1rem;
  }
  
  h1::after {
    width: 60px;
    height: 2px;
    bottom: 3px;
  }
  
  .form-description {
    font-size: 1rem;
    margin-bottom: 30px;
    padding: 0 10px;
  }
  
  .form {
    gap: 20px;
  }
  
  .form-group {
    gap: 6px;
  }
  
  .form-label {
    font-size: 0.9rem;
  }
  
  .form-input {
    padding: 14px 16px;
    font-size: 16px; /* Prevents zoom on iOS */
    border-radius: 10px;
    min-height: 48px; /* Better touch target */
    -webkit-appearance: none;
    border-radius: 10px;
  }
  
  .radio-group {
    flex-direction: column;
    gap: 12px;
    margin-top: 6px;
  }
  
  .radio-label {
    font-size: 0.95rem;
    padding: 12px 8px;
    min-height: 48px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    transition: background-color 0.2s ease;
  }
  
  .radio-label:hover {
    background-color: rgba(212, 175, 55, 0.05);
  }
  
  .submit-button {
    padding: 16px 28px;
    font-size: 1rem;
    margin-top: 8px;
    min-height: 48px;
    width: 100%;
    border-radius: 25px;
  }
  
  .status-message {
    font-size: 0.9rem;
    padding: 10px 14px;
    margin-top: 12px;
  }
  
  .powered-by {
    padding: 10px 15px;
    font-size: 0.8rem;
  }
  
  .form-container {
    padding-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .form-card {
    padding: 25px 15px;
    border-radius: 16px;
  }
  
  h1 {
    font-size: clamp(1rem, 5vw, 1.4rem);
    margin: 0 auto 15px auto;
    line-height: 1.3;
    padding: 10px 12px;
    max-width: 100%;
    letter-spacing: 0.1px;
    word-spacing: 0.03em;
  }
  
  h1::before {
    top: -5px;
    left: 8px;
    font-size: 0.9rem;
  }
  
  h1 .sparkle-right {
    top: -5px;
    right: 8px;
    font-size: 0.9rem;
  }
  
  h1::after {
    width: 50px;
    height: 2px;
    bottom: 2px;
  }
  
  .form-description {
    font-size: 0.95rem;
    margin-bottom: 25px;
    padding: 0 5px;
  }
  
  .form-input {
    padding: 12px 14px;
  }
  
  .submit-button {
    padding: 14px 24px;
    font-size: 0.95rem;
  }
  
  .form-card::after {
    font-size: 20px;
    top: 15px;
    right: 15px;
  }
}

@media (max-width: 360px) {
  .form-card {
    padding: 20px 12px;
  }
  
  h1 {
    font-size: clamp(0.85rem, 6vw, 1.2rem);
    margin: 0 auto 12px auto;
    line-height: 1.3;
    padding: 8px 8px;
    max-width: 100%;
    letter-spacing: 0.05px;
    word-spacing: 0.02em;
  }
  
  h1::before {
    top: -4px;
    left: 5px;
    font-size: 0.8rem;
  }
  
  h1 .sparkle-right {
    top: -4px;
    right: 5px;
    font-size: 0.8rem;
  }
  
  h1::after {
    width: 40px;
    height: 1.5px;
    bottom: 1px;
  }
  
  .form-description {
    font-size: 0.9rem;
  }
  
  .form-input {
    padding: 10px 12px;
  }
  
  .submit-button {
    padding: 14px 24px;
    font-size: 0.9rem;
    min-height: 48px;
    width: 100%;
  }
  
  .form-card {
    padding: 20px 10px;
    margin: 0;
  }
  
  .form {
    gap: 16px;
  }
}

/* Loading animation for submit button */
.submit-button.submitting::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  margin: auto;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes sparkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

@keyframes titleGlow {
  0% {
    box-shadow: 
      0 8px 32px rgba(212, 175, 55, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  100% {
    box-shadow: 
      0 12px 40px rgba(212, 175, 55, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.5);
  }
}

@keyframes underlinePulse {
  0%, 100% {
    transform: translateX(-50%) scaleX(1);
    opacity: 0.8;
  }
  50% {
    transform: translateX(-50%) scaleX(1.1);
    opacity: 1;
  }
}

@keyframes sparkleFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-5px) rotate(10deg);
    opacity: 1;
  }
}

/* Powered by footer */
.powered-by {
  position: static;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 12px 20px;
  text-align: center;
  font-size: 0.875rem;
  color: #4a5568;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  margin: 0;
  width: 100%;
}

.powered-by p {
  margin: 0;
  font-weight: 500;
}

.powered-by strong {
  color: #2d3748;
  font-weight: 700;
}

/* Form container */
.form-container {
  padding-bottom: 20px;
}
