/* Checkout Page Styling */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
  --bg-color: #0d1117;
  --text-color: #e6edf3;
  --accent-color: #58a6ff;
  --glass-bg: rgba(22, 27, 34, 0.7);
  --glass-border: rgba(240, 246, 252, 0.1);
  --button-start: #238636;
  --button-end: #2ea043;
  --error-color: #f85149;
}

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

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(88, 166, 255, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(163, 113, 247, 0.1) 0%, transparent 20%);
  padding: 2rem 1rem;
}

.checkout-container {
  width: 100%;
  max-width: 500px;
  padding: 2.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.6s ease-out;
}

.back-link {
  display: inline-flex;
  align-items: center;
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  transition: opacity 0.2s;
}

.back-link:hover {
  opacity: 0.8;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 0%, #a5d6ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.product-details {
  background: rgba(13, 17, 23, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.product-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product-description {
  color: #8b949e;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.product-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-color);
}

#payment-form {
  margin-top: 2rem;
}

#payment-element {
  margin-bottom: 1.5rem;
}

#submit-button {
  width: 100%;
  background: linear-gradient(180deg, var(--button-start) 0%, var(--button-end) 100%);
  color: #ffffff;
  border: 1px solid rgba(240, 246, 252, 0.1);
  padding: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(35, 134, 54, 0.2);
}

#submit-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(35, 134, 54, 0.3);
  filter: brightness(1.1);
}

#submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
}

#error-message {
  color: var(--error-color);
  font-size: 0.9rem;
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid rgba(248, 81, 73, 0.2);
  border-radius: 8px;
  display: none;
}

#error-message.show {
  display: block;
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  .checkout-container {
    padding: 2rem 1.5rem;
  }
  
  h1 {
    font-size: 1.75rem;
  }
}
