* {
  margin: 0;
  padding: 0;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1560px;
  min-height: 1240px;
  margin: 20px auto;
  color: #333;
  line-height: 1.6;
}

.container * {
  box-sizing: border-box;
}

header {
  margin-bottom: 30px;
  text-align: center;
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.description {
  font-size: 1rem;
  max-width: 95%;
  margin: 0 auto;
  opacity: 0.92;
  line-height: 1.7;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 20px;
}

.input-section,
.output-section {
  background: #f9fafb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  border: 1px solid #eef2f7;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eef2f7;
  font-size: 1.4rem;
  color: #2c3e50;
  font-weight: 700;
}

.form-group {
  margin-bottom: 25px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #d1d9e6;
  border-radius: 10px;
  font-size: 1.05rem;
  background-color: white;
  transition: all 0.3s ease;
  color: #2d3748;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.2);
}

input[type="file"] {
  padding: 12px;
  background: #f8fafc;
  cursor: pointer;
}

textarea {
  min-height: 140px;
  resize: vertical;
  font-family: monospace;
  line-height: 1.5;
}

.file-info {
  margin-top: 10px;
  font-size: 0.95rem;
  color: #718096;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-container {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px;
  margin-top: 12px;
}

.result-title {
  font-weight: 600;
  margin-bottom: 12px;
  color: #4a5568;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
}

.result-value {
  font-family: monospace;
  word-break: break-all;
  padding: 15px;
  background: #f8fafc;
  border-radius: 8px;
  min-height: 80px;
  max-height: 200px;
  overflow-y: auto;
  font-size: 1.05rem;
  line-height: 1.6;
}

.instructions {
  background: #e8f4fe;
  border-left: 5px solid #3498db;
  padding: 25px;
  border-radius: 0 12px 12px 0;
  margin-top: 35px;
}

.instructions h3 {
  margin-bottom: 18px;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
}

.instructions ul {
  padding-left: 25px;
}

.instructions li {
  margin-bottom: 12px;
  line-height: 1.7;
}

.btn-group {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

button {
  padding: 15px 25px;
  border: none;
  border-radius: 10px;
  background: #3498db;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

button:hover {
  background: #2980b9;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
}

button:active {
  transform: translateY(-1px);
}

button.secondary {
  background: #95a5a6;
  box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

button.secondary:hover {
  background: #7f8c8d;
  box-shadow: 0 6px 15px rgba(149, 165, 166, 0.4);
}

footer {
  text-align: center;
  padding: 30px;
  color: #718096;
  border-top: 1px solid #eee;
  font-size: 1rem;
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(52, 152, 219, 0.3);
  border-radius: 50%;
  border-top-color: #3498db;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.copy-btn {
  background: #27ae60;
  padding: 8px 15px;
  font-size: 0.9rem;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.copy-btn:hover {
  background: #219653;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
