* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: white;
  min-height: 100vh;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  background: white;
  border-radius: 0;
  box-shadow: none;
  padding: 40px 60px;
  max-width: 100%;
  width: 100%;
}

h1 {
  color: #667eea;
  text-align: center;
  margin-bottom: 10px;
  font-size: 2.5em;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
  font-size: 1.1em;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
  max-height: 600px;
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 600px;
}

.right-column {
  display: flex;
  flex-direction: column;
  max-height: 600px;
}

.input-section,
.output-section {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #333;
  font-size: 1.1em;
}

textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1em;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.3s;
}

textarea:focus {
  outline: none;
  border-color: #667eea;
}

.options-section {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 15px;
}

.options-section h3 {
  color: #333;
  margin-bottom: 20px;
  font-size: 1.3em;
}

.option-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px;
  background: white;
  border-radius: 8px;
  transition: background 0.3s;
}

.option:hover {
  background: #e8eaf6;
}

.option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  cursor: pointer;
  accent-color: #667eea;
}

.option span {
  color: #333;
  font-size: 0.95em;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.3;
}

.spacing-control {
  background: white;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.spacing-control label {
  margin-bottom: 10px;
  font-size: 1em;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

input[type="range"] {
  flex: 1;
  height: 8px;
  border-radius: 5px;
  background: #e0e0e0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  transition: transform 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  border: none;
}

#spacingValue {
  font-weight: 700;
  color: #667eea;
  font-size: 1.2em;
  min-width: 20px;
  text-align: center;
}

.output-box {
  flex: 1;
  padding: 20px;
  background: #f8f9fa;
  border: 2px solid #667eea;
  border-radius: 10px;
  font-size: 1.2em;
  word-wrap: break-word;
  color: #333;
  line-height: 1.8;
  margin-bottom: 15px;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  overflow-y: auto;
  align-content: flex-start;
}

.copy-btn {
  width: 100%;
  padding: 15px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.copy-btn:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.copy-btn:active {
  transform: translateY(0);
}

.copy-btn.copied {
  background: #4caf50;
}

@media (max-width: 768px) {
  .container {
    padding: 20px;
  }

  h1 {
    font-size: 2em;
  }

  .main-content {
    grid-template-columns: 1fr;
  }

  .right-column {
    position: static;
  }

  .option-group {
    grid-template-columns: 1fr;
  }
}
