body {
  font-family: Arial, sans-serif;
  background: #f9f9fb;
  color: #333;
  margin: 0;
  padding: 40px;
}
h2 {
  margin-bottom: 15px;
}

.dropdown {
  position: relative;
  width: 320px;
  margin-bottom: 20px;
}
.dropdown-btn {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-top: 6px;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  display: none;
  z-index: 1000;
}
.dropdown-list .item {
  padding: 10px 14px;
  cursor: pointer;
}
.dropdown-list .item:hover {
  background: #f0f0f5;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}
.modal-content {
  background: #fff;
  width: 500px;
  max-height: 80vh;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-header {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header input {
  width: 70%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.modal-body {
  overflow-y: auto;
  flex: 1;
}
.font-item {
  padding: 12px 16px;
  cursor: pointer;
}
.font-item:hover {
  background: #f9f9f9;
}
.close-btn {
  cursor: pointer;
  font-size: 20px;
  color: #666;
}

/* Preview */
#preview {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  font-size: 22px;
  text-align: center;
}
#preview[contenteditable="true"] {
  outline: none;
  cursor: text;
}

.controls {
  margin-top: 15px;
  display: flex;
  gap: 15px;
}
.controls label {
  font-size: 14px;
  color: #555;
}
select {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
}
