* {
  margin: 0;
  padding: 0;

}

body {
  background-color: #f1f2f3;
}

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

.container *{
  box-sizing: border-box;
}
header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  font-size: 28px;
  margin-bottom: 5px;
  color: #2c3e50;
}

.subtitle {
  font-size: 15px;
  color: #7f8c8d;
}

.main-content {
  display: flex;
  gap: 30px;
}

.panel {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.left-panel {
  flex: 1;
}

.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.section-title {
  display: flex;
  align-items: center;
  font-size: 20px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f2f3;
  color: #2c3e50;
}

.section-title span {
  margin-right: 10px;
  font-size: 24px;
}

.upload-area {
  border: 2px dashed #3498db;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  margin-bottom: 25px;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.3s;
}

.upload-area:hover {
  background: #e3f2fd;
  border-color: #2980b9;
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 15px;
  color: #3498db;
}

.upload-text {
  margin-bottom: 15px;
  color: #7f8c8d;
}

.file-name {
  font-weight: bold;
  color: #2c3e50;
  margin-top: 10px;
  word-break: break-all;
}

.input-group {
  margin-bottom: 25px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
}

textarea {
  width: 100%;
  height: 150px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: monospace;
  font-size: 16px;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.buttons {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

button {
  flex: 1;
  padding: 15px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.process-btn {
  background: #3498db;
  color: white;
}

.process-btn:hover {
  background: #2980b9;
}

.download-btn {
  background: #2ecc71;
  color: white;
  display: none;
}

.download-btn:hover {
  background: #27ae60;
}

.preview-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.preview-box {
  flex: 1;
  background: white;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 25px;
  overflow: auto;
}

.preview-text {
  font-size: 18px;
  line-height: 1.8;
  min-height: 200px;
}

.html-example {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  font-family: monospace;
  font-size: 14px;
  white-space: pre-wrap;
  overflow: auto;
  max-height: 250px;
}

.info-box {
  background: #e8f4fd;
  border-left: 4px solid #3498db;
  padding: 15px;
  border-radius: 4px;
  margin-top: 20px;
  font-size: 14px;
}

.info-box p{
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.info-box ul{
  margin-left: 20px;
}

.info-box ul li{
  margin-top: 5px;
}

.font-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
  color: #7f8c8d;
  font-size: 14px;
}

.font-stats span {
  color: #2c3e50;
  font-weight: 600;
}

.hidden {
  display: none;
}

.loading {
  text-align: center;
  padding: 20px;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top: 4px solid #3498db;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% {
      transform: rotate(0deg);
  }

  100% {
      transform: rotate(360deg);
  }
}

.error {
  color: #e74c3c;
  margin-top: 10px;
  font-weight: 500;
}

footer {
  text-align: center;
  padding: 20px;
  color: #7f8c8d;
  font-size: 0.9rem;
}
