@font-face {
  font-family: 'Poppins';
  src: url('fonts/Poppins-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #1a1a1a;
  margin: 0;
  padding: 20px;
  color: #ffffff;
}

.main-container {
  max-width: 500px;
  margin: 0 auto;
  background: #2a2a2a;
  border-radius: 12px;
  border: 1px solid #404040;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

h1 {
  color: #ffffff;
  font-weight: 400;
  line-height: 50px;
  font-size: 40px;
  margin: 0 0 30px;
  text-align: center;
}

.form-row {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #cccccc;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

#card-element {
  background: #1a1a1a;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #404040;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: border-color 0.15s ease;
  min-height: 44px;
}

#card-element:focus-within {
  border-color: #ffd700;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(255, 215, 0, 0.2);
}

#card-element.StripeElement--invalid {
  border-color: #ff4444;
}

#card-errors {
  color: #ff4444;
  font-size: 14px;
  margin-top: 8px;
  min-height: 1.3em;
}

button {
  background: #ffd700;
  font-family: inherit;
  color: #000000;
  border-radius: 8px;
  border: 0;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: block;
  transition: all 0.2s ease;
  box-shadow: 0px 4px 8px rgba(255, 215, 0, 0.3);
  width: 100%;
  margin-top: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

button:hover {
  background: #ffed4e;
  transform: translateY(-1px);
  box-shadow: 0px 6px 12px rgba(255, 215, 0, 0.4);
}

button:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
  box-shadow: 0px 4px 8px rgba(255, 215, 0, 0.2);
}

button:disabled:hover {
  background: #ffd700;
  transform: none;
}

#result {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  min-height: 20px;
  background: transparent;
}

#result:not(:empty) {
  background: #2a2a2a;
  border: 1px solid #404040;
}

/* Success and error states */
#result:has-text("✅") {
  background: #1a4d1a;
  border-color: #2d7d2d;
  color: #4ade80;
}

#result:has-text("❌") {
  background: #4d1a1a;
  border-color: #7d2d2d;
  color: #ff6b6b;
}

/* Responsive design */
@media (max-width: 600px) {
  .main-container {
    margin: 0;
    border-radius: 0;
    padding: 20px;
  }
  
  h1 {
    font-size: 28px;
    line-height: 36px;
  }
}

/* Loading animation */
@keyframes loading {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

button:disabled {
  animation: loading 1.5s ease-in-out infinite;
}

/* Focus styles for accessibility */
button:focus {
  outline: 2px solid #ffd700;
  outline-offset: 2px;
}

#card-element:focus-within {
  outline: none;
}

/* Remove conflicting Stripe element styles that cause black box */
.StripeElement {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.StripeElement--focus {
  box-shadow: none !important;
}

.StripeElement--invalid {
  border: none !important;
}

.StripeElement--webkit-autofill {
  background-color: transparent !important;
}
