/* style.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#apiForm {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 450px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#apiForm h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
  font-size: 28px;
  font-weight: 600;
}

.form-group {
  margin-bottom: 25px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: 500;
  font-size: 14px;
}

#apiForm input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #f8f9fa;
  outline: none;
}

#apiForm input:focus {
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

#apiForm input::placeholder {
  color: #a0a4a8;
  transition: all 0.3s ease;
}

#apiForm input:focus::placeholder {
  transform: translateY(-20px);
  opacity: 0;
}

#apiForm input[readonly] {
  background-color: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
}

#apiForm button {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#apiForm button:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

#apiForm button:active {
  transform: translateY(-1px);
}

#apiForm button:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#output {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 25px;
  margin-top: 30px;
  width: 100%;
  max-width: 90vw;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  backdrop-filter: blur(10px);
  word-wrap: break-word;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Loading animation */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Responsive design */
@media (max-width: 768px) {
  body {
    padding: 15px;
  }
  
  #apiForm {
    padding: 30px 25px;
    max-width: 95vw;
  }
  
  #apiForm h1 {
    font-size: 24px;
  }
  
  #apiForm input {
    padding: 12px 15px;
  }
  
  #output {
    max-width: 95vw;
    padding: 20px;
    font-size: 13px;
  }
}

@media (min-width: 1200px) {
  #output {
    max-width: 800px;
  }
}

/* Success state animation */
.success {
  animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* JSON syntax highlighting */
.string { color: #d14; }
.number { color: #099; }
.boolean { color: #0086b3; }
.null { color: #0086b3; }
.key { color: #333; font-weight: bold; }