* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  min-height: 100vh;
  color: #1f2937;
  padding-bottom: 4rem;
}

.header {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  padding: 2rem;
  text-align: center;
  color: white;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.tagline {
  opacity: 0.9;
  font-size: 1.1rem;
}

.demo-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.query-section {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.query-section h2 {
  color: #1e3a8a;
  margin-bottom: 0.5rem;
}

.help-text {
  color: #6b7280;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.example-queries {
  background: #f3f4f6;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.example-queries p {
  color: #374151;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.example-queries ul {
  list-style: none;
}

.example-queries li {
  color: #3b82f6;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 0.25rem;
}

.example-queries li:hover {
  background: #dbeafe;
  padding-left: 1rem;
}

#question {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.3s;
}

#question:focus {
  outline: none;
  border-color: #3b82f6;
}

#submit {
  width: 100%;
  background: #1e3a8a;
  color: white;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: bold;
  margin-top: 1rem;
  transition: all 0.3s;
}

#submit:hover:not(:disabled) {
  background: #1e40af;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(30,58,138,0.3);
}

#submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loading {
  text-align: center;
  padding: 2rem;
}

.spinner {
  border: 4px solid #f3f4f6;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.response-section {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  margin-top: 2rem;
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.response-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.response-header h3 {
  color: #1e3a8a;
}

.compliance-badge {
  background: #10b981;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-weight: bold;
  font-size: 0.9rem;
}

.answer-text {
  background: #f9fafb;
  padding: 1.5rem;
  border-radius: 0.5rem;
  line-height: 1.8;
  color: #374151;
  white-space: pre-wrap;
  margin-bottom: 1.5rem;
  border-left: 4px solid #3b82f6;
}

.section {
  margin-top: 1.5rem;
}

.section h4 {
  color: #1e3a8a;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.case-citation {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0.25rem;
}

.case-citation strong {
  color: #1e40af;
  display: block;
  margin-bottom: 0.5rem;
}

.case-citation p {
  color: #6b7280;
  line-height: 1.6;
}

.maxim-card {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0.25rem;
}

.maxim-card .latin {
  color: #92400e;
  font-style: italic;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.maxim-card .translation {
  color: #78350f;
  margin-bottom: 0.5rem;
}

.principle-tag {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  margin: 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.new-question-btn {
  width: 100%;
  background: #10b981;
  color: white;
  padding: 1rem 2rem;
  font-size: 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: bold;
  margin-top: 1.5rem;
  transition: all 0.3s;
}

.new-question-btn:hover {
  background: #059669;
  transform: translateY(-2px);
}

.footer {
  text-align: center;
  padding: 2rem;
  color: white;
  opacity: 0.8;
}

.footer p {
  margin: 0.5rem 0;
}

.footer a {
  color: white;
  text-decoration: none;
  font-weight: 600;
}

.footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .header h1 {
    font-size: 2rem;
  }

  .query-section,
  .response-section {
    padding: 1.5rem;
  }

  .response-header {
    flex-direction: column;
    align-items: flex-start;
  }
}


