* {
  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%);
  padding: 20px;
  padding-bottom: 30px;
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: 30px;
  min-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}

h1 {
  color: #333;
  margin-bottom: 10px;
  font-size: 28px;
}

.subtitle {
  color: #666;
  margin-bottom: 30px;
  font-size: 14px;
}

.upload-section {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 2px dashed #667eea;
}

.upload-section input[type="file"] {
  display: none;
}

.upload-label {
  display: inline-block;
  padding: 12px 30px;
  background: #667eea;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
}

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

.file-info {
  margin-left: 15px;
  color: #666;
  font-size: 14px;
}

.search-section {
  display: flex;
  gap: 10px;
  position: sticky;
  top: 5px;
  z-index: 10;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px solid #667eea;

}

#searchInput {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  transition: all 0.3s;
}

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

.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  font-size: 14px;
}

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

.btn-primary:hover {
  background: #5568d3;
  transform: translateY(-2px);
  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;
}

.btn-warning {
  background: #ffc107;
  color: #000;
}

.btn-warning:hover {
  background: #e0a800;
}

.btn.active {
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.2);
  opacity: 0.8;
}

.btn-primary.active {
  background: #4a56c9;
}

.btn-warning.active {
  background: #d39e00;
}

.stats {
  margin: 15px 0;
  padding: 15px;
  background: #e7f3ff;
  border-radius: 5px;
  border-left: 4px solid #667eea;
}

.stats strong {
  color: #667eea;
}

.table-container {
  overflow-x: auto;
  margin-bottom: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

th {
  background: #667eea;
  color: white;
  padding: 15px 10px;
  text-align: left;
  font-weight: 600;
  position: sticky;
  top: 0;
  cursor: pointer;
  user-select: none;
}

th:hover {
  background: #5568d3;
}

th.sortable::after {
  content: ' ⇅';
  opacity: 0.5;
}

th.sort-asc::after {
  content: ' ↑';
  opacity: 1;
}

th.sort-desc::after {
  content: ' ↓';
  opacity: 1;
}

td {
  padding: 12px 10px;
  border-bottom: 1px solid #eee;
}

tr:hover {
  background: #f8f9fa;
}

tr.selected {
  background: #e7f3ff;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.generate-section {
  position: sticky;
  bottom: 0;
  background: white;
  padding: 20px;
  border-top: 2px solid #eee;
  margin: 0 -30px -30px;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
}

.btn-generate {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s;
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.filter-label {
  font-size: 12px;
  color: #666;
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.badge-server {
  background: #e7f3ff;
  color: #0066cc;
}

.badge-tech {
  background: #fff3cd;
  color: #856404;
}

.config-output {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 500px;
  max-width: calc(100vw - 40px);
  max-height: 600px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  border: 2px solid #667eea;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.output-actions {
  display: flex;
  gap: 8px;
}

.output-header h3 {
  color: #333;
  font-size: 18px;
  margin: 0;
}

.btn-copy {
  padding: 10px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  font-size: 14px;
}

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

.btn-close {
  padding: 8px 12px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s;
  line-height: 1;
}

.btn-close:hover {
  background: #c82333;
  transform: translateY(-2px);
}

#configText {
  width: 100%;
  height: 450px;
  padding: 15px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: white;
  color: #333;
  resize: none;
  overflow-y: auto;
  line-height: 1.5;
}

#configText:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}
