body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  max-width: 1400px;
  margin: auto;
  padding: 20px;
  background: #f9fafb;
}

.container {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Main Layout - Two Column */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.left-column {
  min-width: 0;
}

.right-column {
  position: sticky;
  top: 20px;
  align-self: start;
}

.payment-section {
  background: #f9fafb;
  padding: 20px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.payment-section h2 {
  color: #1f2937;
  font-size: 18px;
  margin: 0 0 16px 0;
}

.payment-section .result {
  min-height: 100px;
  max-height: 600px;
  margin-top: 20px;
}

h1 {
  color: #1f2937;
  margin-bottom: 10px;
}

p {
  color: #6b7280;
  margin-bottom: 30px;
}

.button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.button:active {
  transform: translateY(0);
}

.button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

.result {
  margin-top: 20px;
  padding: 16px;
  border-radius: 6px;
  display: none;
  max-height: 500px;
  overflow-y: auto;
}

.result.show {
  display: block;
}

.result.success {
  background-color: #d1fae5;
  border: 1px solid #10b981;
  color: #065f46;
}

.result.error {
  background-color: #fee2e2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

.code-block {
  background: #f3f4f6;
  padding: 16px;
  border-radius: 6px;
  margin: 20px 0;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  overflow-x: auto;
}

.json-display {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 16px;
  margin-top: 12px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  max-height: 500px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.json-key {
  color: #059669;
  font-weight: 600;
}

.json-string {
  color: #dc2626;
}

.json-number {
  color: #2563eb;
}

.json-boolean {
  color: #7c3aed;
}

.json-null {
  color: #6b7280;
  font-style: italic;
}

.json-object {
  margin-left: 20px;
}

.json-array {
  margin-left: 20px;
}

.config-section {
  background: #f9fafb;
  padding: 20px;
  border-radius: 6px;
  margin: 0 20px 20px 0;
  border: 1px solid #e5e7eb;
}

.config-section h2 {
  color: #1f2937;
  font-size: 18px;
  margin: 0 0 16px 0;
}

.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  padding: 8px 0;
  margin-bottom: 16px;
  transition: color 0.2s;
}

.collapsible-header:hover {
  color: #667eea;
}

.collapse-icon {
  font-size: 14px;
  transition: transform 0.3s ease;
  color: #6b7280;
}

.collapsible-header.collapsed .collapse-icon {
  transform: rotate(-90deg);
}

.config-content {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin-bottom 0.3s ease;
  max-height: 2000px;
  opacity: 1;
  margin-bottom: 0;
}

.config-content.collapsed {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.config-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.config-group {
  display: flex;
  flex-direction: column;
}

.config-group label {
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
  font-size: 14px;
}

.config-group input,
.config-group select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}

.config-group input:focus,
.config-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.config-group.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.config-group.checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.config-group small {
  color: #6b7280;
  font-size: 12px;
  margin-top: 4px;
}

.hf-hint {
  padding-top: 10px !important;
}

/* Test Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

/* Test Card */
.test-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.test-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.test-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}

.test-card:hover::before {
  transform: scaleX(1);
}

.test-card:active {
  transform: translateY(0);
}

/* Test Card Header */
.test-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}

.test-card-type {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Test Card Badges */
.test-card-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background-color: #d1fae5;
  color: #065f46;
}

.badge-error {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-challenge {
  background-color: #dbeafe;
  color: #1e40af;
}

/* Test Card Number */
.test-card-number {
  font-family: 'Courier New', monospace;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
  letter-spacing: 1px;
  word-spacing: 4px;
}

.test-card:hover .test-card-number {
  color: #667eea;
}

/* Test Card Label */
.test-card-label {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
  margin-top: 4px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .right-column {
    position: relative;
    top: 0;
  }
}

@media (max-width: 640px) {
  body {
    padding: 10px;
  }

  .container {
    padding: 20px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .config-row {
    grid-template-columns: 1fr;
  }
}
