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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f1218;
  color: #e0e0e0;
  min-height: 100vh;
}

.container { max-width: 800px; margin: 0 auto; padding: 20px; }

header { text-align: center; padding: 30px 0 20px; }

.logo {
  font-size: 32px; font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}
.logo span { color: #6c63ff; }

.tagline {
  color: #888;
  font-size: 14px;
  margin-top: 4px;
}

.card {
  background: #1a1e26;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
  border: 1px solid #2a2f3a;
}

.editor-section { margin-bottom: 20px; }

textarea {
  width: 100%;
  height: 180px;
  background: #0f1218;
  border: 1px solid #2a2f3a;
  border-radius: 10px;
  padding: 16px;
  color: #e0e0e0;
  font-size: 15px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
}
textarea:focus { outline: none; border-color: #6c63ff; }
textarea::placeholder { color: #555; }

.text-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  color: #888;
  font-size: 13px;
}

.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.control-group label {
  display: block;
  font-size: 13px;
  color: #aaa;
  margin-bottom: 6px;
  font-weight: 500;
}

.control-group select {
  width: 100%;
  padding: 10px 12px;
  background: #0f1218;
  border: 1px solid #2a2f3a;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 14px;
  cursor: pointer;
}
.control-group select:focus { outline: none; border-color: #6c63ff; }

.format-group {
  display: flex;
  gap: 12px;
  padding: 8px 0;
}
.format-option {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 14px;
}
.format-option input[type="radio"] { accent-color: #6c63ff; }

.advanced-settings {
  margin-bottom: 20px;
  border: 1px solid #2a2f3a;
  border-radius: 10px;
  padding: 0;
}
.advanced-settings summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 500;
  color: #aaa;
  font-size: 14px;
}
.advanced-settings summary:hover { color: #6c63ff; }
.advanced-settings[open] { padding: 16px; }

.settings-grid { display: grid; gap: 20px; }

.setting label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #aaa;
  margin-bottom: 6px;
}
.setting label span { color: #6c63ff; font-weight: 600; }

input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  background: #2a2f3a;
  height: 4px;
  border-radius: 2px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #6c63ff;
  cursor: pointer;
  transition: 0.15s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.1); }

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #555;
  margin-top: 2px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
}
.btn:hover { transform: translateY(-1px); }

.btn-sm { padding: 6px 14px; background: #2a2f3a; color: #aaa; font-size: 13px; }
.btn-sm:hover { background: #333a48; color: #fff; }

.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #6c63ff, #a855f7);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border: none;
}
.btn-primary:hover { opacity: 0.9; }

.btn-secondary {
  display: inline-block;
  background: #2a2f3a;
  color: #e0e0e0;
  text-decoration: none;
  text-align: center;
}
.btn-secondary:hover { background: #333a48; }

.loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  color: #aaa;
  font-size: 14px;
  justify-content: center;
  margin-top: 16px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #2a2f3a;
  border-top-color: #6c63ff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.result-section {
  margin-top: 20px;
  padding: 20px;
  background: #0f1218;
  border-radius: 10px;
  border: 1px solid #2a2f3a;
}

.result-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  align-items: center;
}

.success-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #0d2818;
  border: 1px solid #1a4730;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  flex-wrap: wrap;
}
.success-icon {
  width: 24px;
  height: 24px;
  background: #22c55e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  flex-shrink: 0;
}
.success-bar small { color: #888; width: 100%; font-size: 12px; }

.info-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.step {
  background: #1a1e26;
  border: 1px solid #2a2f3a;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.step-num {
  width: 36px; height: 36px;
  background: #6c63ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-weight: 700;
  font-size: 16px;
}
.step-text { font-size: 13px; color: #ccc; line-height: 1.5; }
.step-text strong { color: #e0e0e0; }

@media (max-width: 600px) {
  .controls-grid { grid-template-columns: 1fr; }
  .info-card { grid-template-columns: 1fr; }
  .container { padding: 12px; }
  .card { padding: 20px; }
}
