:root {
  --primary-color: #3b82f6;
  --primary-light: #93c5fd;
  --primary-dark: #1d4ed8;
  --secondary-color: #6366f1;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-color: #334155;
  --text-light: #64748b;
  --text-dark: #1e293b;
  --success-color: #10b981;
  --success-hover: #059669;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --font-family: "Inter", system-ui, -apple-system, sans-serif;
  --spacing: 1.5rem;
  --radius: 0.5rem;
  --transition: 0.2s ease;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  font-size: 16px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

header {
  background-color: var(--card-bg);
  box-shadow: var(--shadow);
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  letter-spacing: -0.025em;
}

form {
  background: var(--card-bg);
  padding: 1.75rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.form-group-inline {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.form-group-inline .form-group {
  flex: 1;
  min-width: 250px;
}

.form-group label {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-dark);
}

input[type="text"],
input[type="datetime-local"] {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  background-color: var(--card-bg);
  color: var(--text-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="datetime-local"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.input-readonly {
  background-color: var(--bg-color);
  cursor: not-allowed;
}

.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.search-button {
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.search-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}

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

.clear-button {
  background-color: var (--success-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.clear-button:hover {
  background-color: var(--success-hover);
  transform: translateY(-1px);
}

.loading {
  display: none;
  padding: 1.5rem;
  text-align: center;
  color: var(--text-color);
  margin-top: 1.5rem;
  background-color: var (--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.loading-spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

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

.error {
  display: none;
  padding: 1rem 1.5rem;
  color: #b91c1c;
  background-color: #fee2e2;
  border-radius: var (--radius);
  margin-bottom: 1.5rem;
  margin-top: 1.5rem;
  border-left: 4px solid #dc2626;
}

#result {
  background: var(--card-bg);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: #f1f5f9;
  font-weight: 500;
  color: var(--text-dark);
}

tr:hover td {
  background-color: #f8fafc;
}

.process-item {
  background-color: var(--card-bg);
  padding: 0;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.process-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.item-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.item-header h3 {
  margin: 0;
  color: var(--text-dark);
  font-weight: 600;
}

.item-content {
  display: none;
  padding: 1.5rem;
}

.process-detail {
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--card-bg);
}

.process-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
}

.process-table tr td:first-child {
  width: 200px;
  background-color: #f1f5f9;
  font-weight: 600;
  color: var(--text-dark);
  border-right: 1px solid var(--border-color);
}

.process-section {
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.section-header {
  background-color: #f1f5f9;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-content {
  padding: 1rem;
}

.property-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.property-item {
  flex: 1;
  min-width: 250px;
  background-color: #f8fafc;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.property-label {
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
  display: block;
  font-size: 0.875rem;
}

.property-value {
  color: var(--text-color);
}

.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: var(--card-bg);
  margin: 5% auto;
  padding: 2rem;
  border-radius: var(--radius);
  width: 80%;
  max-width: 800px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalFadeIn 0.3s;
}

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

.close {
  position: absolute;
  right: 1.5rem;
  top: 1.25rem;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.2s;
}

.close:hover {
  color: var(--text-dark);
}

.feature-type-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
  border-bottom: 1px dashed var(--primary-light);
  padding-bottom: 1px;
}

.feature-type-link:hover {
  color: var(--primary-dark);
}

.feature-section {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background-color: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.feature-section h3 {
  color: var(--text-dark);
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-light);
  font-weight: 600;
}

.feature-property {
  margin: 0.75rem 0;
  padding: 0.75rem;
  background-color: #f1f5f9;
  border-radius: var(--radius);
}

.feature-property-label {
  font-weight: 500;
  color: var (--text-dark);
  display: inline-block;
  min-width: 120px;
}

.feature-property-value {
  color: var(--text-color);
}

.null-value {
  color: var(--text-light);
  font-style: italic;
}

.spatial-sampling-section {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background-color: #f0f7ff;
  border-radius: var(--radius);
  border: 1px solid #bfdbfe;
}

.json-value {
  white-space: pre-wrap;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 0.875rem;
  background-color: #f1f5f9;
  padding: 0.75rem;
  border-radius: var(--radius);
  color: var(--text-dark);
  border: 1px solid #e2e8f0;
  max-height: 300px;
  overflow-y: auto;
}

.sub-table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.sub-table td {
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
}

.sub-table tr:first-child td {
  background-color: #f1f5f9;
  font-weight: 500;
}

.reference-table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 0.5rem;
}

.reference-table th {
  background-color: #e5e7eb;
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 600;
}

.reference-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.reference-table tr:nth-child(even) {
  background-color: #f8fafc;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 0.5rem;
}

.badge-primary {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

.badge-secondary {
  background-color: #ddd6fe;
  color: #5b21b6;
}

.badge-info {
  background-color: #bae6fd;
  color: #0369a1;
}

.collapsible-content {
  white-space: pre-wrap;
  font-family: "Consolas", "Monaco", monospace;
  background-color: #f1f5f9;
  padding: 0.75rem;
  border-radius: var(--radius);
  margin-top: 0.5rem;
  border: 1px solid #e2e8f0;
}

.toggle-button {
  background-color: transparent;
  color: var(--text-color);
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  margin-right: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.toggle-button:hover {
  background-color: var(--primary-light);
  color: white;
  border-color: var(--primary-light);
}

.expand-button {
  background-color: var(--secondary-color);
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.expand-button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.empty-message {
  padding: 2rem;
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .container {
    max-width: 100%;
    padding: 1rem;
  }

  .form-group-inline {
    flex-direction: column;
    gap: 1rem;
  }

  .feature-property-label {
    min-width: auto;
    display: block;
    margin-bottom: 0.25rem;
  }
}
