@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background-color: #f8fafc;
  color: #1f2937;
}

h1, h2 {
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: #111827;
  letter-spacing: -0.02em;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
}

.back-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.container:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

textarea {
  width: 100%;
  height: 320px;
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  padding: 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  resize: vertical;
  transition: all 0.3s ease;
  background-color: #f9fafb;
  color: #1f2937;
  line-height: 1.6;
}

textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

#vega-vis {
  border: 1.5px solid #e2e8f0;
  padding: 1.5rem;
  width: 100%;
  min-height: 400px;
  overflow: auto;
  border-radius: 8px;
  background-color: white;
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}

.error {
  color: #dc2626;
  padding: 1rem;
  background-color: #fef2f2;
  border-radius: 8px;
  border-left: 4px solid #dc2626;
  font-family: monospace;
  margin-bottom: 1rem;
}

.button-group {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.styled-button {
  background: linear-gradient(to bottom right, #3b82f6, #2563eb);
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.styled-button:hover {
  background: linear-gradient(to bottom right, #2563eb, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3), 0 2px 4px -1px rgba(59, 130, 246, 0.2);
}

.styled-select {
  padding: 0.625rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background-color: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.styled-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

#examples-panel {
  border: 1.5px solid #e2e8f0;
  background: white;
  padding: 1.25rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  display: none;
}

.example-category {
  font-weight: 700;
  margin: 1rem 0 0.5rem 0;
  color: #111827;
  font-size: 15px;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.example-item {
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background-color: #f8fafc;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid #3b82f6;
}

.example-item:hover {
  background-color: #f1f5f9;
  transform: translateX(2px);
}

.example-item .title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #111827;
}

.example-item .description {
  font-size: 13px;
  color: #64748b;
}

@media (max-width: 768px) {
  body {
    padding: 1rem;
  }
  
  .container {
    padding: 1.5rem;
  }
  
  textarea {
    height: 280px;
  }
  
  #vega-vis {
    min-height: 350px;
    padding: 1rem;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  .styled-button, .styled-select {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  textarea {
    height: 240px;
    font-size: 13px;
  }
  
  #vega-vis {
    min-height: 300px;
  }
  
  .container {
    padding: 1.25rem;
  }
}