* {
  margin: 0;
  padding: 0;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1540px;
  min-width: 1240px;
  margin: 20px auto;
  color: #333;
  line-height: 1.6;
}

.container *{
  box-sizing: border-box;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  font-size: 2rem;
  margin-bottom: 5px;
  color: #2c3e50;
}

.subtitle {
  font-size: 1rem;
  color: #7f8c8d;
  max-width: 95%;
  margin: 0 auto;
}

.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  padding: 20px;
  min-height: 810px;
  margin-bottom: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.card-title {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #3498db;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.input-section,
.output-section {
  display: flex;
  flex-direction: column;
}

.file-upload-area {
  border: 3px dashed #bdc3c7;
  border-radius: 10px;
  padding: 50px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 20px;
  background: #f8f9fa;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
  border-color: #3498db;
  background: #e3f2fd;
}

.file-upload-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.file-info {
  margin: 15px 0;
  padding: 12px;
  background: #f0f7ff;
  border-radius: 8px;
  display: none;
}

.columns-container {
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  display: none;
}

.columns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.column-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

.btn-primary {
  background: #3498db;
  color: white;
}

.btn-primary:hover {
  background: #2980b9;
  transform: translateY(-2px);
}

.btn-secondary {
  background: #2ecc71;
  color: white;
}

.btn-secondary:hover {
  background: #27ae60;
  transform: translateY(-2px);
}

.btn-utility {
  background: #9b59b6;
  color: white;
}

.btn-utility:hover {
  background: #8e44ad;
  transform: translateY(-2px);
}

.btn-warning {
  background: #e74c3c;
  color: white;
}

.btn-warning:hover {
  background: #c0392b;
  transform: translateY(-2px);
}

.btn:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
  transform: none;
}

textarea {
  width: 100%;
  height: 650px;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: monospace;
  font-size: 14px;
  resize: vertical;
  background: #fcfcfc;
}

textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.output-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 15px;
}

.instructions {
  margin-top: 20px;
}

.instructions h2 {
  margin-bottom: 15px;
  color: #2c3e50;
  font-size: 1.3rem;
}

.instructions-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.instruction-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.instruction-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: #3498db;
}

.instruction-card ul {
  padding-left: 20px;
}

.instruction-card li {
  margin-bottom: 8px;
}

.status-message {
  padding: 10px;
  border-radius: 6px;
  margin: 10px 0;
  text-align: center;
  display: none;
}

.success {
  background: #d4edda;
  color: #155724;
}

.error {
  background: #f8d7da;
  color: #721c24;
}

.hidden {
  display: none;
}

footer {
  text-align: center;
  margin-top: 20px;
  padding: 20px;
  color: #7f8c8d;
  font-size: 0.9rem;
}
