:root {
  --primary: #2d8f9d;
  --primary-dark: #247784;
  --secondary: #f8f9fa;
  --accent: #7e57c2;
  --accent-dark: #6a45b0;
  --success: #34a853;
  --success-dark: #2d9248;
  --text: #333;
  --text-light: #5f6368;
  --border: #ddd;
  --shadow: rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;

}

body {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.container {
  box-sizing: border-box;
  color: var(--text);
  width: 100%;
  min-width: 1240px;
  max-width: 1560px;
  margin: 20px auto;
  overflow: hidden;
}

.container *{
  box-sizing: border-box;
}

header {
  color: var(--text);
  padding-top: 10px;
  padding-bottom: 25px;
  text-align: center;
  position: relative;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 6px;
  font-weight: 700;
}

header p {
  font-size: 1rem;
  max-width: 95%;
  margin: auto;
  color: var(--text-light);
}

.decorative {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 20px;
  background-size: 100% 100%;
}

.content {
  display: flex;
  flex-wrap: wrap;
  padding: 20px;
  gap: 20px;
  background: #fff;
  margin-bottom: 20px;
  border-radius: 10px;
}

.input-section,
.output-section {
  flex: 1;
  min-width: 300px;
}

.output-section  textarea{
  min-height: 550px !important;
  line-height: inherit !important;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  color: var(--primary-dark);
}

.section-title i {
  background: var(--primary);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-box {
  width: calc(50% - 10px);
  background: #e3f2fd;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  border-left: 4px solid var(--primary);
}

.info-box h3 {
  color: var(--primary-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-box ul {
  padding-left: 25px;
  margin: 15px 0;
}

.info-box li {
  margin-bottom: 8px;
}

.control-group {
  margin-bottom: 20px;
}

.control-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-light);
}

.container textarea {
  width: 100%;
  min-height: 250px;
  padding: 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 1.05rem;
  line-height: 1.6;
  resize: vertical;
  transition: all 0.3s;
  font-family: 'serif', 'monospace', 'cursive', 'fangsong';
}

.container textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(45, 143, 157, 0.2);
}

.container select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  background: white;
  transition: all 0.3s;
  cursor: pointer;
  appearance: none;
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
}

.container select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(45, 143, 157, 0.2);
}

.control-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.control-row .control-group {
  flex: 1;
  margin-bottom: 0;
}

.btn-group {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.btn {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(45, 143, 157, 0.3);
}

.btn-secondary {
  background: #f1f3f4;
  color: var(--text-light);
}

.btn-secondary:hover {
  background: #e8eaed;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: var(--success-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(52, 168, 83, 0.3);
}

.btn-purple {
  background: var(--accent);
  color: white;
}

.btn-purple:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(126, 87, 194, 0.3);
}

.btn i {
  font-size: 1.1rem;
}

.history-box {

}

.history-box h3 {
  color: var(--accent-dark);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}


.history-content p {
  margin-bottom: 15px;
  text-align: justify;
  break-inside: avoid;
}

footer {
  text-align: center;
  padding: 20px;
  color: var(--text-light);
  font-size: 1rem;
}

.custom-message {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 30px;
  border-radius: 12px;
  font-weight: 600;
  z-index: 1000;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  animation: slideIn 0.4s, fadeOut 0.6s 2.5s;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
}

.success {
  background: var(--success);
  color: white;
}

.error {
  background: #f44336;
  color: white;
}

@keyframes slideIn {
  from {
    bottom: -50px;
    opacity: 0;
  }

  to {
    bottom: 20px;
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}
