.generator {
  padding: 4rem 0;
}

.generator-content {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: center;
}

.generator-form-container {
  width: 100%;
  max-width: 32rem;
}

.generator-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input-file {
  width: 100%;
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color var(--transition);
}

.form-input-file:hover {
  border-color: var(--accent);
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.option-item {
  display: flex;
  flex-direction: column;
}

.form-color {
  height: 40px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 3px;
  background: var(--bg);
}

.form-color::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.form-color::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.form-range {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border-light);
  border-radius: var(--radius-full);
  outline: none;
  accent-color: var(--accent);
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
}

.form-select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
  transition: border-color var(--transition);
}

.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.1);
}

.form-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-section {
  margin-top: 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 1rem;
  border: 1px solid var(--border-light);
}

.history-section h3 {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-section h3 .material-icons-outlined {
  font-size: 1rem;
}

.history-section ul {
  list-style: none;
}

.history-section ul li {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--transition);
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg);
  margin-bottom: 0.3rem;
  border: 1px solid var(--border-light);
}

.history-section ul li:hover {
  background: rgba(108, 92, 231, 0.04);
  border-color: var(--accent);
  color: var(--text);
}

.btn-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  margin-top: 0.4rem;
  padding: 4px 0;
  transition: color var(--transition);
}

.btn-clear:hover {
  color: var(--accent);
}

.qr-preview-container {
  width: 100%;
  max-width: 28rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-preview {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  margin-bottom: 1rem;
}

.qr-placeholder-text {
  color: var(--text-muted);
  text-align: center;
  font-size: 0.85rem;
}

.pro-tabs {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin: 1.5rem 0 2rem;
  flex-wrap: wrap;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.pro-tab {
  background: transparent;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pro-tab .material-icons-outlined {
  font-size: 1.1rem;
}

.pro-tab:hover {
  color: var(--text);
}

.pro-tab.active {
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow);
}

.pro-panel {
  display: none;
}

.pro-panel.active {
  display: block;
}

@media (min-width: 1024px) {
  .generator-content {
    flex-direction: row;
    align-items: flex-start;
  }
  .form-buttons {
    flex-direction: row;
  }
}
