.gpai-wrapper {
  max-width: 960px;
  margin: 2.5rem auto;
  padding: 0 1.25rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.gpai-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.gpai-hero-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.gpai-hero-subtitle {
  font-size: 1rem;
  color: #4b5563;
  max-width: 680px;
  margin: 0 auto;
}

.gpai-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  padding: 1.5rem 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.gpai-input-card {
  margin-top: 1rem;
}

.gpai-field {
  margin-bottom: 1rem;
}

.gpai-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: #111827;
}

.gpai-textarea {
  width: 100%;
  min-height: 140px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  padding: 0.75rem 0.9rem;
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gpai-textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.3);
}

.gpai-input-meta {
  margin-top: 0.35rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.gpai-helper {
  font-size: 0.8rem;
  color: #6b7280;
}

.gpai-counter {
  font-size: 0.8rem;
  color: #4b5563;
  white-space: nowrap;
}

.gpai-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.gpai-field-half {
  flex: 1 1 180px;
}

.gpai-select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  background-color: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gpai-select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.3);
}

.gpai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.gpai-btn {
  border-radius: 9999px;
  border: 0;
  padding: 0.55rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.1s ease, color 0.1s ease;
}

.gpai-btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.25);
}

.gpai-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.3);
}

.gpai-btn-secondary {
  background-color: #e5e7eb;
  color: #111827;
}

.gpai-btn-secondary:hover {
  background-color: #d1d5db;
}

.gpai-btn-ghost {
  background-color: transparent;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.gpai-btn-ghost:hover {
  background-color: #f9fafb;
}

.gpai-status {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.gpai-status-loading {
  color: #6366f1;
}

.gpai-status-error {
  color: #b91c1c;
}

.gpai-status-success {
  color: #15803d;
}

.gpai-result-card {
  margin-top: 0.75rem;
}

.gpai-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.gpai-result-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.gpai-result {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background-color: #0f172a;
  color: #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
  max-height: 420px;
  overflow: auto;
}

/* Responsive */
@media (max-width: 640px) {
  .gpai-card {
    padding: 1.1rem 1.1rem 1.25rem;
  }

  .gpai-input-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .gpai-hero-title {
    font-size: 1.6rem;
  }

  .gpai-hero-subtitle {
    font-size: 0.95rem;
  }
}
