* {
  margin: 0;
  padding: 0;
}

body {
  background: #f1f2f3;
}

.container {
  box-sizing: border-box;
  max-width: 1560px;
  min-width: 1240px;
  margin: 0 auto;
  color: #333;
}

.container *{
    box-sizing: border-box;
}

header {
  color: #333;
  padding: 25px 40px;
  text-align: center;
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.subtitle {
  font-size: 1.1rem;
  color: #7a7a7a;
  opacity: 0.9;
  max-width: 95%;
  margin: 0 auto;
  line-height: 1.6;
}

.main-content {
  display: flex;
  flex-direction: column;
  padding: 30px;
  gap: 30px;
  min-height: 600px;
}

.input-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.output-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid #3498db;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.container textarea {
  width: 100%;
  min-height: 350px;
  padding: 20px;
  font-size: 0.9rem;
  line-height: 1.5;
  border: 2px solid #ddd;
  border-radius: 10px;
  resize: none;
  transition: all 0.3s;
  font-family: monospace;
  background: #f8f9fa;
}

.container textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.btn-container {
  display: flex;
  margin-top: 20px;
}

.btn {
  min-width: 180px;
  padding: 14px 20px;
  font-size: 1.1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
  margin-right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(90deg, #2ecc71, #27ae60);
  color: white;
}

.btn-secondary {
  background: linear-gradient(90deg, #3498db, #2980b9);
  color: white;
}

.btn-warning {
  background: linear-gradient(90deg, #e74c3c, #c0392b);
  color: white;
}

.btn-demo {
  background: linear-gradient(90deg, #9b59b6, #8e44ad);
  color: white;
}

.preview-container {
  flex: 1;
  border: 2px dashed #3498db;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  background: #f8f9fa;
  overflow: auto;
}

.file-info {
  background: #e3f2fd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.info-item {
  background: white;
  padding: 10px 15px;
  border-radius: 6px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.preview-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  text-align: center;
  padding: 20px;
  border-radius: 8px;
  background: white;
}

.preview-placeholder {
  color: #7f8c8d;
  font-size: 1.2rem;
}

.text-preview {
  white-space: pre-wrap;
  text-align: left;
  width: 100%;
  font-family: monospace;
  font-size: 1.1rem;
  line-height: 1.6;
  max-height: 400px;
  overflow: auto;
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 6px;
}

.image-preview {
  max-width: 100%;
  max-height: 1000px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
}

.pdf-preview {
  width: 100%;
  height: 400px;
  border: none;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.font-preview {
  font-size: 3rem;
  text-align: center;
  padding: 40px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  width: 100%;
}

.download-link {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 25px;
  background: linear-gradient(90deg, #2ecc71, #27ae60);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.2s;
  text-align: center;
}

.download-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.error-message {
  color: #e74c3c;
  background: #fdecea;
  padding: 15px;
  border-radius: 8px;
  font-weight: 500;
  margin-top: 15px;
}

footer {
  text-align: center;
  margin-bottom: 20px;
  color: #7f8c8d;
  font-size: 1rem;
}

.file-type-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}
