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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  padding: 20px;
  line-height: 1.6;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 24px;
}

.header h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.header p {
  opacity: 0.9;
  font-size: 14px;
}

.tabs {
  display: flex;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  overflow-x: auto;
}

.tab {
  padding: 16px 24px;
  cursor: pointer;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  color: #6c757d;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.tab:hover {
  color: #495057;
  background: #e9ecef;
}

.tab.active {
  color: #667eea;
  border-bottom-color: #667eea;
  background: white;
}

.tab-content {
  display: none;
  padding: 24px;
}

.tab-content.active {
  display: block;
}

.section {
  margin-bottom: 24px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #495057;
}

textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-family: 'Courier New', Consolas, monospace;
  font-size: 13px;
  resize: vertical;
  transition: border-color 0.2s;
}

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

.button-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: #667eea;
  color: white;
}

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

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-success {
  background: #28a745;
  color: white;
}

.btn-success:hover {
  background: #218838;
}

.output-section {
  margin-top: 24px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.output-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #212529;
}

pre {
  background: #282c34;
  color: #abb2bf;
  padding: 16px;
  border-radius: 4px;
  font-family: 'Courier New', Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
}

.validation-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  background: white;
}

.validation-table th {
  background: #f8f9fa;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
  position: sticky;
  top: 0;
}

.validation-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #dee2e6;
  font-size: 13px;
}

.validation-table tr:hover {
  background: #f8f9fa;
}

.field-name {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  color: #495057;
}

.field-value {
  font-family: 'Courier New', monospace;
  color: #212529;
  word-break: break-word;
}

.match-status {
  text-align: center;
  font-weight: 600;
  font-size: 16px;
}

.match-true {
  color: #28a745;
}

.match-false {
  color: #dc3545;
}

.match-na {
  color: #6c757d;
}

.status {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}

.status.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.test-results {
  margin-top: 16px;
  padding: 16px;
  background: white;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  max-height: 400px;
  overflow-y: auto;
}

.test-pass {
  color: #28a745;
  margin: 4px 0;
}

.test-fail {
  color: #dc3545;
  margin: 4px 0;
}

.test-summary {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid #dee2e6;
  font-weight: 600;
}

/* SQL Analyzer styles */
.analysis-result {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 6px;
  border-left: 4px solid #667eea;
  margin-top: 16px;
  line-height: 1.8;
}

.analysis-result h1 {
  font-size: 24px;
  color: #2c3e50;
  margin: 20px 0 12px 0;
  border-bottom: 2px solid #667eea;
  padding-bottom: 8px;
}

.analysis-result h2 {
  font-size: 20px;
  color: #34495e;
  margin: 16px 0 10px 0;
  font-weight: 600;
}

.analysis-result h3 {
  font-size: 18px;
  color: #4a5568;
  margin: 14px 0 8px 0;
  font-weight: 600;
}

.analysis-result ul {
  margin: 12px 0;
  padding-left: 0;
  list-style: none;
}

.analysis-result li {
  padding: 8px 0 8px 24px;
  position: relative;
  margin: 4px 0;
}

.analysis-result li:before {
  content: "•";
  position: absolute;
  left: 8px;
  color: #667eea;
  font-weight: bold;
  font-size: 18px;
}

.analysis-result code {
  background: #2d3748;
  color: #a0aec0;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

.analysis-result pre {
  background: #2d3748;
  color: #e2e8f0;
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 12px 0;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
}

.analysis-result pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.analysis-result strong {
  color: #2c3e50;
  font-weight: 600;
}

.analysis-result p {
  margin: 8px 0;
  color: #4a5568;
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  .header h1 {
    font-size: 24px;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  button {
    width: 100%;
  }
}
