* {
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(135deg, #f1f2f3 0%, #e4e7eb 100%);
}

.header {
  text-align: center;
  margin-top: 25px;
  width: 100%;
  padding-bottom: 10px;
}

.header h1 {
  font-size: 2.2rem;
  color: #2c3e50;
  margin-bottom: 10px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
  background: linear-gradient(90deg, #3498db, #2c3e50);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header p {
  font-size: 1rem;
  color: #5a6a7f;
  max-width: 90%;
  line-height: 1.6;
  margin: 0 auto;
}

.tool-container {
  width: 100%;
  max-width: 1540px;
  min-width: 1240px;
  box-sizing: border-box;
  background: white;
  border-radius: 18px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
  margin: 20px auto;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.tool-container *{
  box-sizing: border-box;
}

.upload-area {
  border: 3px dashed #cbd6e2;
  border-radius: 14px;
  padding: 50px 20px;
  text-align: center;
  transition: all 0.3s ease;
  background: #f8fafc;
  margin-bottom: 30px;
  position: relative;
  cursor: pointer;
}

.upload-area.active {
  border-color: #3498db;
  background-color: #e8f4fe;
  box-shadow: inset 0 0 15px rgba(52, 152, 219, 0.1);
}

.upload-area .icon {
  font-size: 6rem;
  margin-bottom: 20px;
  display: block;
  opacity: 0.8;
  transition: transform 0.3s;
}

.upload-area:hover .icon {
  transform: translateY(-5px);
}

.upload-area h2 {
  color: #2c3e50;
  font-size: 1.4rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.upload-area p {
  color: #7f8c8d;
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.browse-btn {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  padding: 16px 42px;
  font-size: 1.2rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
  display: inline-block;
  box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.browse-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
}

.file-input {
  display: none;
}

.file-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  margin-top: 30px;
  padding: 25px;
  background: #f8f9fa;
  border-radius: 12px;
  border-left: 5px solid #3498db;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.file-info .icon {
  font-size: 3rem;
  color: #3498db;
}

.file-details {
  text-align: left;
}

.file-details h3 {
  font-size: 1.4rem;
  color: #2c3e50;
  margin-bottom: 10px;
  font-weight: 600;
}

.file-details p {
  font-size: 1.1rem;
  color: #5a6a7f;
  margin: 0;
}

.result-area {
  display: none;
  margin-top: 30px;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.result-header h3 {
  font-size: 1.6rem;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-group {
  display: flex;
  gap: 15px;
}

.action-btn {
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
}

.copy-btn {
  background: linear-gradient(135deg, #27ae60, #219653);
}

.copy-btn:hover {
  background: linear-gradient(135deg, #219653, #1e8449);
}

.download-btn {
  background: linear-gradient(135deg, #3498db, #2980b9);
}

.download-btn:hover {
  background: linear-gradient(135deg, #2980b9, #2573a7);
}

.clear-btn {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.clear-btn:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
}

.result-textarea {
  width: 100%;
  height: 280px;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #d1d8e0;
  background: #f8f9fa;
  font-family: 'Consolas', monospace;
  font-size: 1rem;
  resize: none;
  line-height: 1.6;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.06);
}

.loading {
  display: none;
  text-align: center;
  padding: 40px;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #f3f3f3;
  border-top: 6px solid #3498db;
  border-radius: 50%;
  margin: 0 auto 25px;
  animation: spin 1s linear infinite;
}

.loading p {
  font-size: 1.2rem;
  color: #5a6a7f;
  font-weight: 500;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.alert {
  display: none;
  padding: 22px;
  background: #fef9c3;
  border-left: 5px solid #f59e0b;
  border-radius: 10px;
  margin-top: 25px;
  animation: shake 0.5s;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-5px);
  }

  40%,
  80% {
    transform: translateX(5px);
  }
}

.alert p {
  font-size: 1.2rem;
  color: #8e7b0d;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert.error {
  background: #fee2e2;
  border-left-color: #ef4444;
}

.alert.error p {
  color: #b91c1c;
}

footer {
  margin-top: 20px;
  text-align: center;
  color: #7f8c8d;
  font-size: 1rem;
  padding: 20px;
}

.instructions {
  background: linear-gradient(135deg, #f8f9fa, #f0f4f8);
  border-radius: 14px;
  padding: 30px;
  margin-top: 50px;
  border-left: 5px solid #9b59b6;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.instructions h3 {
  color: #2c3e50;
  margin-bottom: 20px;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.instructions ul {
  padding-left: 30px;
}

.instructions li {
  margin-bottom: 14px;
  line-height: 1.7;
  color: #34495e;
  font-size: 1rem;
  position: relative;
}

.instructions li::before {
  content: "•";
  color: #9b59b6;
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 40px;
}

.feature-card {
  flex: 1;
  min-width: 250px;
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
  text-align: center;
  transition: transform 0.3s;
  border: 1px solid #ddd;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.feature-card .icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
}

.feature-card h4 {
  font-size: 1.4rem;
  color: #2c3e50;
  margin-bottom: 15px;
}

.feature-card p {
  color: #5a6a7f;
  font-size: 1rem;
  line-height: 1.6;
}
