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

body {
  background: #000000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
}

.container-lg {
  background: transparent;
}

h2 {
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 30px;
  text-align: center;
  font-size: 2.5rem;
}

h3 {
  color: #2d3748;
  font-weight: 600;
  font-size: 1.4rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

h5 {
  color: #4a5568;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 15px;
}

/* Main layout */
.row {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

.col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Request and Response Cards */
.col:first-child,
.col:last-child {
  background: #ffffff;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* Request section styling */
.input-group {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

#requestMethod {
  font-weight: 600;
  background: #f7fafc;
  color: #2d3748;
  border: 1px solid #e2e8f0;
  border-right: none;
  padding: 12px 30px 12px 12px;
  font-size: 14px;
  width: 90px;
  max-width: 90px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232d3748' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  border-radius: 8px 0 0 8px;
}

#requestMethod:hover {
  background-color: #edf2f7;
}

#requestMethod:focus {
  outline: none;
  background-color: #fff;
  border-color: #667eea;
}

#requestMethod option {
  background: white;
  color: #2d3748;
  padding: 8px;
}

#requestUrl {
  border: 1px solid #e2e8f0;
  border-left: none;
  border-right: none;
  padding: 12px 18px;
  font-size: 14px;
  flex: 1;
  background: #fff;
  color: #2d3748;
}

#requestUrl:focus {
  outline: none;
  background: #f7fafc;
  border-color: #667eea;
}

#requestUrl::placeholder {
  color: #a0aec0;
}

#sendRequest {
  border: 1px solid #38a169;
  border-left: none;
  font-weight: 600;
  padding: 12px 30px;
  cursor: pointer;
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
  transition: all 0.3s ease;
  white-space: nowrap;
  border-radius: 0 8px 8px 0;
}

#sendRequest:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

#sendRequest:active:not(:disabled) {
  transform: translateY(0);
}

#sendRequest:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Tabs styling */
.nav-tabs {
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 20px;
  display: flex;
  gap: 5px;
}

.nav-tabs .nav-link {
  color: #718096;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 12px 24px;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s;
  background: transparent;
  border-radius: 0;
  position: relative;
}

.nav-tabs .nav-link:hover {
  color: #2d3748;
  background: #f7fafc;
  border-bottom-color: #cbd5e0;
}

.nav-tabs .nav-link.active {
  color: #667eea;
  border-bottom-color: #667eea;
  background: transparent;
  font-weight: 600;
}

/* Tab content */
.tab-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.tab-pane {
  padding: 15px 0;
  animation: fadeIn 0.3s ease;
}

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

/* List group styling */
.list-group {
  list-style: none;
  padding: 0;
}

.list-group-item {
  border: 1px solid #e2e8f0;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 8px;
  background-color: #fff;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.list-group-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-color: #cbd5e0;
}

.list-group-item input[type="checkbox"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: #667eea;
  margin-top: 0;
}

.list-group-item input[type="text"] {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  transition: all 0.2s;
  flex: 1;
  background: #fff;
}

.list-group-item input[type="text"]:focus {
  border-color: #667eea;
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.list-group-item input[type="text"]::placeholder {
  color: #a0aec0;
}

/* Buttons */
.btn {
  transition: all 0.2s;
  border-radius: 6px;
  font-weight: 500;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  padding: 10px 24px;
  color: white;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Form controls */
.form-select, .form-control {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  transition: all 0.2s;
  background: #fff;
  color: #2d3748;
}

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

.form-select::placeholder,
.form-control::placeholder {
  color: #a0aec0;
}

/* Textarea styling */
textarea.form-control {
  min-height: 250px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  padding: 15px;
  background-color: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #2d3748;
}

textarea.form-control:focus {
  background-color: #fff;
  border-color: #667eea;
}

/* Response section */
#responseStatus, #responseSize, #responseTime {
  font-weight: 600;
  color: #2d3748;
}

#responseStatus {
  color: white;
}

/* Response display container */
.response-container {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  margin-top: 15px;
  flex: 1;
  min-height: 300px;
  max-height: 310px;
  overflow-y: auto;
  overflow-x: auto;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
  display: block;
}

.response-container pre {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  overflow: visible;
  max-width: 100%;
  word-wrap: normal;
  overflow-wrap: normal;
}

.response-container code {
  display: block;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #2d3748;
  white-space: pre;
  word-wrap: normal;
  overflow-wrap: normal;
  max-width: 100%;
}

/* Ensure highlight.js styles work */
.response-container code.hljs {
  background: transparent;
  padding: 0;
}

.response-container pre code {
  display: block;
  overflow-x: auto;
}

/* Scrollbar styling */
.response-container::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.response-container::-webkit-scrollbar-track {
  background: #e2e8f0;
  border-radius: 5px;
}

.response-container::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 5px;
}

.response-container::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

/* Response info bar */
.response-info {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  padding: 15px 0;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 20px;
}

.response-info > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.response-info span:first-child {
  color: #718096;
  font-weight: 500;
  font-size: 14px;
}

.response-info span:last-child {
  font-size: 14px;
}

/* Empty state for response */
.response-container.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  background: #f7fafc;
  border-color: #e2e8f0;
}

.response-container.empty-state::before {
  content: "No response yet. Send a request to see the response here.";
  color: #a0aec0;
  font-style: italic;
  font-size: 15px;
  text-align: center;
}

/* Auth section improvements */
#auth .form-select {
  margin-bottom: 15px;
}

.auth-methods input {
  margin-bottom: 10px;
}

.auth-methods input:last-child {
  margin-bottom: 0;
}

/* Better checkbox alignment */
.list-group-item {
  align-items: center;
}

/* Improved input focus states */
input[type="text"]:focus,
input[type="url"]:focus,
input[type="password"]:focus {
  border-color: #667eea;
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Status badge styling */
.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.status-success {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
}

.status-error {
  background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
  color: white;
}

/* Auth and body types visibility - handled by JavaScript removing visually-hidden class */
.auth-methods,
.body-types {
  display: block;
}

.auth-methods.visually-hidden,
.body-types.visually-hidden {
  display: none;
}

/* Responsive design */
@media (max-width: 1200px) {
  .row {
    flex-direction: column;
  }

  .col {
    width: 100%;
    margin-bottom: 20px;
  }
}

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

  h2 {
    font-size: 2rem;
    margin-bottom: 20px;
  }

  .col:first-child,
  .col:last-child {
    padding: 20px;
  }

  .response-info {
    flex-direction: column;
    gap: 15px;
  }

  .nav-tabs {
    flex-wrap: wrap;
  }

  .nav-tabs .nav-link {
    padding: 10px 16px;
    font-size: 13px;
  }

  .input-group {
    flex-direction: column;
  }

  #requestMethod {
    width: 100%;
    border-radius: 8px 8px 0 0;
  }

  #requestUrl {
    border-radius: 0;
  }

  #sendRequest {
    width: 100%;
    border-radius: 0 0 8px 8px;
  }
}

/* Additional polish */
.list-group-item:last-child {
  margin-bottom: 0;
  justify-content: flex-end;
  background: transparent;
  border: none;
  padding-top: 15px;
}

.list-group-item:last-child:hover {
  box-shadow: none;
}

/* Smooth transitions */
* {
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

/* Code highlighting improvements */
.hljs {
  background: transparent !important;
}

/* Form hints and helper text */
.form-text {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.4;
}

.form-text.text-muted {
  color: #718096 !important;
}

.url-hint {
  color: #a0aec0;
  font-style: italic;
}

/* Input validation styles */
.form-control:invalid {
  border-color: #f56565;
}

.form-control:valid {
  border-color: #48bb78;
}

/* Focus states for better UX */
.form-control:focus + .form-text,
.form-select:focus + .form-text {
  color: #667eea;
}
